contract

Add a new contract for ad register.

Request format

https://adfox.yandex.com/api/v1
  ? object=account
  & action=add
  & actionObject=contract
  & type=<integer>
  & customerID=<integer>
  & executorID=<integer>
  & [intermediaryContractID=<integer>]
  & [subjectType=<integer>]
  & [actionType=<integer>]
  & [number=<string>]
  & [amountRub=<string>]
  & [dateConclusion=<string>]
  & [isVat=<integer>]
  & [isRegReport=<integer>]
  & [isFinalAgreement=<integer>]

type*

Contract type.

Acceptable values:

  • 0: Contract.
  • 1: Intermediary contract.
  • 2: Additional agreement. Be sure to fill in the intermediaryContractID field.

customerID*

Customer ID.

executorID*

Executor ID.

intermediaryContractID

Parent contract ID.

subjectType

Information about the subject matter of a contract.

Acceptable values:

  • 0: Other.
  • 1: Distribution.
  • 2: Organization distribution.
  • 3: Mediation.
  • 4: Representation.

Default value: 0.

actionType

Description of the mediation/representative activity.

Acceptable values:

  • 0: Other.
  • 1: Distribution.
  • 2: Conclusion of contracts.
  • 3: Commercial representation.

Default value: 0.

number

Number of a contract/additional agreement.

amountRub

Contract price.

dateConclusion

Date of a contract/additional agreement. Format: YYYY-MM-DD. Date of a contract/additional agreement can't be the current date.

isVat

Price includes VAT.

Acceptable values:

  • 0: Price does not include VAT.
  • 1: Price includes VAT.

Default value: 0.

isRegReport

The executor is obliged to register and submit creatives.

Acceptable values:

  • 0: No.
  • 1: Yes.

Default value: 0.

isFinalAgreement

Original agreement between the platform and end advertiser (with no middlemen).

Acceptable values:

  • 0: No.
  • 1: Yes.

Default value: 0.

* 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=contract&type=2&customerID=108&executorID=109&isRegReport=1&subjectType=0&actionType=3&number=number&amountRub=77&isVat=0&intermediaryContractID=43792&dateConclusion=2022-08-24&isFinalAgreement=1

Response:

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

Other actions with the object

See more actions with the contract object:

Previous