contractor

Add a new contractor for ad register.

Request format

https://adfox.yandex.com/api/v1
  ? object=account
  & action=<add>
  & actionObject=contractor
  & name=<string>
  & inn=<string>
  & type=<integer>
  & [countryOKSM=<string>]
  & [mobilePhone=<string>]
  & [epayNumber=<string>]
  & [regNumber=<string>]
  & [roles[]=<integer>]
  & [isRr=<integer>]
  & [isOrs=<integer>]
  & [rsUrl=<string>]

name*

Contractor's name. You can only use Russian letters. You can also use spaces and dashes (no more than one space and/or dash between words). A dash can't be used at the beginning or end of a sentence.

inn*

Contractor's TIN.

type*

Contractor type.

Acceptable values:

  • 0: Entity (Russia). Be sure to specify the inn value (10 digits).
  • 1: Individual (Russia). Be sure to specify the inn value (12 digits).
  • 2: Individual entrepreneur (Russia). Be sure to specify the inn value (12 digits).
  • 3: Foreign entity (non-resident). Be sure to fill in the countryOKSM field and one of the following fields: mobilePhone or epayNumber.
  • 4: Foreign individual (non-resident). Be sure to fill in the countryOKSM field and one of the following fields: inn or regNumber.

Default value: 0.

countryOKSM

Country code of jurisdiction of registration as per the All-Russian Classifier of Countries of the World.

Default value: 643.

mobilePhone

Contractor's phone number. Specify it in +[country code]{phone number} format. In the phone number field, you can only specify numbers (from 1 to 50 digits) without spaces, dashes, or other characters.

epayNumber

Number of the electronic payment facility.

regNumber

Registration number.

roles[]

Roles that a contractor can assume when entering into a contract.

Acceptable values:

  • 0: Executor.
  • 1: Customer.

Default value: roles[]=0&roles[]=1 (the “Customer and Executor” roles).

isRr

Is an ad distributor.

Acceptable values:

  • 0: Is not an ad distributor.
  • 1: Is an ad distributor.

Default value: 0.

isOrs

Is an ad system operator.

Acceptable values:

  • 0: Is not an ad system operator.
  • 1: Is an ad system operator.

Default value: 0.

rsUrl

Ad system URL or other information.

* Required

Response format

<response>
<status>
  <code>{integer}</code>
  <ID>{integer}</ID>
</status>
</response>

Response parameters

code

Request processing status. If the value is 0, the request was completed successfully. For the key, see Error handling.

ID

Object ID.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=account&action=add&actionObject=contractor&name=ContractorName1&inn=1234567890&type=1&roles[]=0

Response:

<response>
<status>
  <code>0</code>
  <ID>3438</ID>
</status>
</response>

Other actions with the object

See more actions with the contractor object:

Ad system URL or other information.

Required

Contractor's name. You can only use Russian letters. You can also use spaces and dashes (no more than one space and/or dash between words). A dash can't be used at the beginning or end of a sentence.

Contractor's TIN.

Contractor type.

Acceptable values:

  • 0: Entity (Russia). Be sure to specify the inn value (10 digits).

  • 1: Individual (Russia). Be sure to specify the inn value (12 digits).

  • 2: Individual entrepreneur (Russia). Be sure to specify the inn value (12 digits).

  • 3: Foreign entity (non-resident). Be sure to fill in the countryOKSM field and one of the following fields: mobilePhone or epayNumber.

  • 4: Foreign individual (non-resident). Be sure to fill in the countryOKSM field and one of the following fields: inn or regNumber.

Default value: 0.

Country code of jurisdiction of registration as per the All-Russian Classifier of Countries of the World.

Default value: 643.

Contractor's phone number. Specify it in +[country code]{phone number} format. In the phone number field, you can only specify numbers (from 1 to 50 digits) without spaces, dashes, or other characters.

Number of the electronic payment facility.

Registration number.

Roles that a contractor can assume when entering into a contract.

Acceptable values:

  • 0: Executor.

  • 1: Customer.

Default value: roles[]=0&roles[]=1 (the “Customer and Executor” roles).

Is an ad distributor.

Acceptable values:

  • 0: Is not an ad distributor.

  • 1: Is an ad distributor.

Default value: 0.

Is an ad system operator.

Acceptable values:

  • 0: Is not an ad system operator.

  • 1: Is an ad system operator.

Default value: 0.

Previous
Next