contract

Get a list of contracts.

Request format

Note

Pagination is available.

https://adfox.yandex.com/api/v1
  ? object=account
  & action=list
  & actionObject=contract
  & [actionObjectID=<integer>]

actionObjectID

To get data for only one contract, specify its ID.

* Required parameter

Response format

<response>
<status>
  <code>{integer}</code>
</status>
<result>
<data>
  <row0>
    <ID>{integer}</ID>
    <externalID>{string}</externalID>
    <type>{integer}</type>
    <agentActingForPublisher>{integer}</agentActingForPublisher>
    <chargePaidByAgent>{integer}</chargePaidByAgent>
    <intermediaryContractID>{integer}</intermediaryContractID>
    <customerID>{integer}</customerID>
    <executorID>{integer}</executorID>
    <subjectType>{integer}</subjectType>
    <number>{string}</number>
    <dateConclusion>{string}</dateConclusion>
    <amountType>{float}</amountType>
    <amountRub>{float}</amountRub>
    <actionType>{integer}</actionType>
    <isRegReport>{integer}</isRegReport>
    <socialType>{integer}</socialType>
    <contractRole>{integer}</contractRole>
  </row0>
</data>
</result>
</response>

Response parameters

code

Request processing status. A value of 0 means the request was completed successfully. For the key, see Error handling.

row0

List item with its corresponding number.

ID

Internal ID of the contract in Adfox.

externalID

ID of the contract for the state register (ERIR).

customerID

Client ID. To learn how to get a list of counterparty IDs, see contractor.

executorID

Contractor ID. To learn how to get a list of counterparty IDs, see contractor.

type

Contract type.

Acceptable values:

  • 0: Service contract.
  • 1: Intermediary contract. Available parameters:
    • agentActingForPublisher: Intermediary function.
    • chargePaidByAgent: “Fee under this contract is paid by the intermediary, attorney, commission agent, or agent” option.
  • 2: Additional agreement.

isRegReport

The contractor is responsible for registering and submitting ad creatives.

actionType

Description of actions performed by the intermediary representative.

Acceptable values:

  • 0: Other.
  • 1: Actions related to ad distribution.
  • 2: Conclusion of contracts.
  • 3: Commercial representation.

subjectType

Subject matter of the contract.

Acceptable values:

  • 0: Other.
  • 1: Ad distribution contract.
  • 2: Contract to organize ad distribution.
  • 3: Mediation.
  • 4: Representation.

number

Number of the contract or additional agreement.

amountRub

Contract price.

amountType

Contract price. Acceptable values:

  • 0: Paid (if this value is selected, amountRub becomes mandatory).
  • 1: Unpaid.
  • 2: There is no price in the contract.

intermediaryContractID

Parent contract ID.

dateConclusion

Date of the contract or additional agreement.

socialType

Contract type. Acceptable values:

  • 0: Commercial.
  • 1 : Social advertising contract with payment.
  • 2: Social advertising contract by quota.

agentActingForPublisher

Intermediary function, attribute of the monetary flow direction towards the principal. Required if the contract type type = 1. Otherwise, must be omitted. Acceptable values:

  • 0: The agent acts in the interests of the advertiser under this agent agreement (is an advertiser's representative).
  • 1: The agent acts in the interests of the advertising distributor under this agent agreement (is an advertising platform's representative).

chargePaidByAgent

Attribute “Fee under this contract is paid by the intermediary, attorney, commission agent, or agent”. The field can be passed only in the intermediary contract type = 1 and if the attribute of the monetary flow direction towards the principal is agentActingForPublisher = 0. Acceptable values:

  • 0: Disabled.
  • 1: Enabled (fee under this contract is paid by the intermediary, attorney, commission agent, or agent).

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=account&action=list&actionObject=contract

Response:

<response>
<status>
  <code>0</code>
</status>
<result>
<data>
  <row0>
    <ID>123</ID>
    <externalID>321</externalID>
    <type>0</type>
    <agentActingForPublisher>0</agentActingForPublisher>
    <chargePaidByAgent>0</chargePaidByAgent>
    <intermediaryContractID>12</intermediaryContractID>
    <customerID>1</customerID>
    <executorID>2</executorID>
    <subjectType>0</subjectType>
    <number>123456</number>
    <dateConclusion>2022-11-10</dateConclusion>
    <amountType>0</amountType>
    <amountRub>1000000 RUB</amountRub>
    <actionType>1</actionType>
    <isRegReport>1</isRegReport>
    <socialType>0</socialType>
    <contractRole>0</contractRole>
  </row0>
</data>
</result>
</response>

Other actions with the object

See also other actions with the contract object:

To get data for only one contract, specify its ID.

Previous