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

Requirements

campaigns *

The list of program IDs you want to send applications to. The applications will be sent according to the positions of program IDs in the list.

list List of affiliate programs (has_tool=broker_traffic)
test_mode

An application will be sent in test mode. In test mode there will be no ‘id’ in the response and ‘responses’ field will be empty.

bool

1 or 0

The other Application parameters

     
  • * Required parameter

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=[17809]' \
     -F 'first_name=Иван' \
     -F 'last_name=Иванов' \
     -F 'middle_name=Иванович' \
     -F 'mobile_phone=03512345678' \
     -F 'work_date=11.11.2016' \
     -F 'email=ivanov11123test@gmail.com'

где 17809 - id кампании, которая принимает брокерские заявки, Иванов Иван Иванович - заполнитель заявки, мобильный телефон которого 03512345678, электронная почта - ivanov11123test@gmail.com, а 11.11.2016 - дата устройства на работу.

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

{
    "id": 1,
    "subid": "",
    "subid1": "",
    "subid3": "",
    "subid2": "",
    "subid4": "",
    "responses": [
        {
            "campaign_id": 1,
            "status": "processing",
            "order_id": null,
            "server_response": {
                "message": "objects_list_returned_ok",
                "code": 200,
                "data": false
            }
        }
    ],
    "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

subid

Additional parameter

subid1

Additional parameter 1

subid2

Additional parameter 2

subid3

Additional parameter 3

subid4

Additional parameter 4

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

server_response

Advertiser server response

Description of the fields of errors when creating an application

Name

Description

campaign_id

Program ID

message

Error message