Creating broker applications

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST manage_broker_application https://api.admitad.com/website/{w_id}/broker/applications/create/ List of request parameters Возвращает созданную заявку, гдe w_id - идентификатор площадки.*
  • * Returns the result in the JSON format.

List of request parameters

Name

Description

Type

Ограничения
campaigns * Список id кампаний, в которые нужно разослать заявки. Порядок в списке влияет на порядок отправки. list List of affiliate programs (has_tool=broker_traffic)
test_mode Отправка заявки в тестовом режиме. В тестовом режиме в ответе будет отсутствовать ‘id’ и ‘responses’ будет пустой. bool

1 or 0

Остальные Параметры заявки      
  • * Обязательный параметр

Example of use

Example of a request with utility ``curl``:

curl -H 'Authorization: Bearer access_token' -X POST https://api.admitad.com/website/{w_id}/broker/applications/create/ \
     -F 'campaigns=[1,2]' \
     -F 'first_name=first_name' \
     -F 'last_name=last_name' \
     -F 'middle_name=middle_name' \
     -F 'mobile_phone=03512345678' \
     -F 'work_date=11.11.2016' \
     -F 'email=test@gmail.com'

Example of the response from the API server in the JSON format:

{
    "id": 1,
    "first_name": "first_name",
    "last_name": "last_name",
    "middle_name": "middle_name",
    "birth_date": null,
    "birth_place": "",
    "gender": "",
    "mobile_phone": "03512345678",
    "phone": "",
    "occupation": "",
    "work_date": "2016-11-11",
    "work_salary": null,
    "work_organization": "",
    "work_address": "",
    "work_phone": "",
    "work_occupation": "",
    "email": "test@gmail.com",
    "inn": "",
    "passport_cn": "",
    "passport_date": null,
    "passport_title": "",
    "fact_region_name": "",
    "fact_city_name": "",
    "fact_street": "",
    "fact_house": "",
    "fact_housing": "",
    "fact_flat": "",
    "reg_region_name": "",
    "reg_city_name": "",
    "reg_street": "",
    "reg_house": "",
    "reg_housing": "",
    "reg_flat": "",
    "overdue_loans": "",
    "credit_sum": null,
    "credit_days": null,
    "product_type": "",
    "subid": "",
    "subid1": "",
    "subid3": "",
    "subid2": "",
    "subid4": "",
    "responses": [
        {
            "campaign_id": 1,
            "status": "processing",
            "order_id": null
        }
    ],
    "errors": [
        {
            "campaign_id": 2,
            "message": "The company doesn't accept broker applications."
        }
    ]
}

Description of API server response fields

Name

Description

id

Application ID

responses

Information about sending an application in the program

errors

Error when creating an application

Остальные Параметры заявки  

Description of the fields in the information about sending an application in the program

Name

Description

campaign_id

Program ID

status
Application status
  • processing (waiting to be sent to the program)

  • approved (approved by the program)

  • declined (declined by the program)

  • waiting (being processed by the program)

  • error (errors on the side of the program)

order_id

Order ID in the system

Description of the fields of errors when creating an application

Name

Description

campaign_id

Program ID

message

Error message