API applications

Application parameters

Name Description Type Requirements
first_name Name string max length 100
last_name Last name string max length 100
middle_name Middle name string max length 100
birth_date Birthday date format %d.%m.%Y
birth_place Place of birth string max length 100
gender Sex string max length 50
mobile_phone Mobile phone string max length 32
phone Home phone string max length 32
occupation Occupation string max length 100
work_date Date of employment date format %d.%m.%Y
work_salary Salary decimal max no. of digits 12
decimal places 2
work_organization Company name string max length 100
work_address Company address string max length 100
work_phone Company phone number string max length 32
work_occupation Position string max length 100
work_region_name Job address: region string max length 50
work_city_name Job address: city string max length 50
work_street Job address: street string max length 50
work_house Job address: building string max length 10
email E-mail string max length 75
inn VAT number string max length 16
passport_cn Passport number string max length 16
passport_date Date of issue date format %d.%m.%Y
passport_expiration_date Passport validity date format %d.%m.%Y
passport_title Authority string max length 100
fact_region_name Actual place of residence: region string max length 50
fact_city_name Actual place of residence: city string max length 50
fact_street Actual place of residence: street string max length 50
fact_house Actual place of residence: house string max length 10
fact_housing Actual place of residence: building string max length 10
fact_flat Actual place of residence: apartment string max length 10
reg_region_name Place of registration: region string max length 50
reg_city_name Place of registration: city string max length 50
reg_street Place of registration: street string max length 50
reg_house Place of registration: house string max length 10
reg_housing Place of registration: building string max length 10
reg_flat Place of registration: apartment string max length 10
overdue_loans Credit history string max length 50
credit_sum Loan amount decimal max no. of digits 12
decimal places 2
credit_days Loan term integer  
credit_purpose Loan purpose string max length 300
time_for_call Time of call string max length 300
guarator Guarantor string max_length 100
guarantor_type Guarantor's relation to the loan recipient string max_length 100
guarantor_phone Guarantor's phone number string max length 32
product_type Product type string max length 50
personal_data_agent Traffic source (website or legal entity) string max length 300
application_received_date_by_client Date of the application receipt by the client date format %d.%m.%Y
subid

Additional parameter

string max length 50
shall not be used: "%00"
subid1 Additional parameter 1 string max length 50
shall not be used: "%00"
subid2 Additional parameter 2 string max length 50
shall not be used: "%00"
subid3 Additional parameter 3 string max length 50
shall not be used: "%00"
subid4 Additional parameter 4 string max length 120
shall not be used: "%00"

Requirements for application parameters can be modified by the program — Program field settings

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 Returns the created application, where w_id is the ad space ID*.
  • * Returns the result in the JSON format.

List of request parameters

Name Description Type Requirements
campaigns* List of program IDs to which applications or Application submittal algorithm must be submitted. list List of affiliate programs (traffic_types=20)
user_notified* The value "1" indicates that the user has read and agreed with the purpose of data collection, the processing of data, the list of third parties to whom data will be transferred, and the user's rights under point 2.1 of the Rules for Using the Broker Tool. "0" indicates that the user has not read and has not agreed with the above. If the value is "0", the user's form will not be sent through the API. bool 1 or 0
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, 17810]' \
-F 'first_name=Иван' \
-F 'last_name=Иванов' \
-F 'middle_name=Иванович' \
-F 'mobile_phone=03512345678' \
-F 'work_date=11.11.2016' \
-F 'email=ivanov11123test@gmail.com'

where 17809, 17810 are program IDs that accept API applications, Ivanov Ivan Ivanovich is an application creator, with the cell phone number: 03512345678, email: ivanov11123test@gmail.com, and 11.11.2016 as the first employment day.

Application submittal algorithm

The "campaings" parameter can receive the JSON array with application submittal algorithm.

campaigns=[{"ids": [17809, 16126], "pause": 0}, {"ids": [17288, 16651],
"pause": 150},{"ids": [16633],"pause": 80}]

where:

  • ids — a list off group's program IDs.
  • pause — a pause in minutes prior to sending the group (max. value is 1440 min, i.e. a day).

As the example above shows, the application for the first group [17809, 16126] will be sent immediately. If at least one application is successful (meaning, accepted via the API w/o rejections by an advertiser), submittal of an application to the second group of programs [17288, 16651] will be initiated. If all the applications from the first group are rejected, then the submittal of the application to the second group of programs will be initiated immediately, i.e. without a 150 min break. Following the same principle, the application will be sent to the third group in 80 min or immediately.

Different variations of recording the "campaigns" parameter are supported, such as:

[17809, 16126, [17288, 16651], {"ids": [16633]},
{"ids": [16326, 14605],"pause": 150}]

equals to recoding:

[{"ids": [17809], "pause": 0},
{"ids": [16126], "pause": 0},
{"ids": [17288, 16651], "pause": 0},
{"ids": [16633], "pause": 0},
{"ids": [16326, 14605], "pause": 150}]

You may see how your record is interpreted in "algorithm" parameter of the API server response.

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

{
"id": 1,
"subid": "",
"subid1": "",
"subid3": "",
"subid2": "",
"subid4": "",
"responses": [
{
"campaign_id": 17809,
"status": "processing",
"order_id": null,
"server_response": {
"message": "objects_list_returned_ok",
"code": 200,
"data": false
}
}
],
"errors": [
{
"campaign_id": 17810,
"message": "Кампания не принимает заявки брокеров."
}
],
"algorithm": [{"ids": [17809],
"pause": 0}],
}

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
algorithm Application submittal algorithm

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

Creating API applications for banks using SMS verification

Parameters

HTTP method Access rights URL Parameters Note
POST manage_broker_application https://api.admitad.com/website/{w_id}/broker/applications/sync_create/ List of request parameters Returns the created application, where w_id is the ad space ID*.
  • * Returns the result in the JSON format.

List of request parameters

Name Description Type Requirements
campaign_id * Program ID to submit applications to int List of affiliate programs (has_tool=broker_traffic)
user_notified * The value "1" indicates that the user has read and agreed with the purpose of data collection, the processing of data, the list of third parties to whom data will be transferred, and the user's rights under point 2.1 of the Rules for Using the Broker Tool. "0" indicates that the user has not read and has not agreed with the above. If the value is "0", the user's form will not be sent through the API. bool 1 or 0
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' -H "accept: application/json" -X POST
https://api.admitad.com/website/\{w_id}/broker/applications/sync_create/ -d
'campaign_id=65&first_name=Иван&last_name=Иванов&middle_name=Иванович&mobile_phone=03512345678&work_date=11.11.2016&email=ivanov11123test@gmail.com'

where 65 is the program ID that accepts API applications and requires SMS verification, Ivan Ivanovich Ivanov is an application creator, with the cell phone number: 03512345678, email: ivanov11123test@gmail.com, and 11.11.2016 as the first employment day.

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

{
"status": "waiting_sms_verification",
"application_id": 123,
"server_response":
{
"bank": "responded this"
},
}

Confirming API applications for banks using SMS verification

Parameters

HTTP method Access rights URL Parameters Note
POST manage_broker_application https://api.admitad.com/website/{w_id}/broker/applications/sync_create/{a_id}/confirm List of request parameters Returns the created application, where w_id is the ad space identifier*. a_id is the application identifier*.
  • * Returns the result in the JSON format.

List of request parameters

Name Description Type
code* SMS verification code string
  • * Required parameter

Example of use

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

curl -H 'Authorization: Bearer access_token' -H "accept: application/json" -X POST
https://api.admitad.com/website/\{w_id}/broker/applications/sync_create/\{a_id}/confirm -d 'code=1234'

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

{
"status": "waiting_sms_verification",
"application_id": 123,
"server_response":
{
"bank": "responded this"
},
}

List of broker applications

Parameters

HTTP method Access rights URL Parameters Note
GET broker_application https://api.admitad.com/website/{w_id}/broker/applications/ Parameter request list

Returns the list of created applications, where w_id is the ad space ID*.

  • * Returns the result in the JSON format.

Parameter request list

Name Type Requirements
offset integer limit, offset parameters
limit integer limit, offset parameters
order_by string
  • date_created

'-' sign before the value means the reverse order. E.g. order_by=-date_created

id integer  
campaign integer List of affiliate programs
status string
  • processing
  • approved
  • declined
  • waiting
  • error
date_start date %d.%m.%Y
date_end date %d.%m.%Y
order_id string  
subid string  
subid1 string  
subid2 string  
subid3 string  
subid4 string  

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET
'https://api.admitad.com/website/{w_id}/broker/applications/?offset=0&limit=1'

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

{
"results": [
{
"id": 1,
"subid": "",
"subid1": "",
"subid3": "",
"subid2": "",
"subid4": "",
"responses": [
{
"campaign_id": 17809,
"status": "processing",
"order_id": null,
"server_response": {
"message": "objects_list_returned_ok",
"code": 200,
"data": false
}
}
],
"algorithm": [{
"ids": [17809],"pause": 0}],
}
],
"_meta": {
"count": 1,
"limit": 1,
"offset": 0
}
}

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
algorithm Application submittal algorithm

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

Program field settings

Parameters

HTTP method Access rights URL Note
GET broker_application https://api.admitad.com/broker/campaign_settings/{c_id}/ List of required application fields and their validation, where с_id is the affiliate program ID*.

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET
'https://api.admitad.com/broker/campaign_settings/{c_id}/'

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

{
"results": [
{
"field_name": "first_name",
"regexp": "^[a-zA-Z]+$",
"required": true,
"description": ""
},
{
"field_name": "last_name",
"regexp": "^[a-zA-Z]+$",
"required": true,
"description": ""
},
{
"field_name": "middle_name",
"regexp": "",
"required": true,
"description": ""
},
{
"field_name": "product_type",
"regexp": "^[1,3,7,8]{1}$",
"required": true,
"description": "1-credit; 3-card; 7-gold-card; 8-platinum-card"
}
]
}

Description of API server response fields

Name Description
field_name List of request parameters.
regexp Regular value for validation, if empty, then is validated by default value from the list.
required Mandatory.
description Detailed description.