contract
Add a new contract for ad labeling.
Request format
https://adfox.yandex.com/api/v1
? object=account
& action=add
& actionObject=contract
& type=<integer>
& [agentActingForPublisher=<integer>]
& [chargePaidByAgent=<integer>]
& [intermediaryContractID=<integer>]
& customerID=<integer>
& executorID=<integer>
& [subjectType=<integer>]
& [number=<string>]
& [dateConclusion=<string>]
& [amountType=<string>]
& [amountRub=<string>]
& [actionType=<integer>]
& [isRegReport=<integer>]
& [socialType=<integer>]
& contractRole=<integer>
|
|
Contract type. Acceptable values:
|
|
|
Client ID. To learn how to get a list of counterparty IDs, see contractor. |
|
|
Contractor ID. To learn how to get a list of counterparty IDs, see contractor. |
|
|
Contract role. Acceptable values:
|
|
|
Parent contract ID. Passed only if |
|
|
Subject matter of the contract. Acceptable values:
Default value: |
|
|
Description of actions performed by the intermediary representative. Acceptable values:
Default value: |
|
|
Contract / additional agreement number. There should be no spaces or line break characters at the beginning and end of the line. |
|
|
Contract amount. Passed only if |
|
|
Contract price. Acceptable values:
Default value: |
|
|
Date of the contract or additional agreement. Format: |
|
|
The contractor is responsible for registering and submitting ad creatives. Acceptable values:
Default value: |
|
|
Contract type. You can't change the parameter value after the contract is created. Acceptable values:
Default value: |
|
|
Intermediary function, attribute of the monetary flow direction towards the principal. Required if the contract type
|
|
|
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
|
* Required parameter
Response format
<response>
<status>
<code>{integer}</code>
<ID>{integer}</ID>
</status>
</response>
Response parameters
|
|
Request processing status. A value of |
|
|
The ID of the created object. |
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&intermediaryContractID=43792&dateConclusion=2022-08-24Response:
<response> <status> <code>0</code> <ID>1111</ID> </status> </response>
Other actions with the object
See also other actions with the contract object:
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. Ensure to fill in theintermediaryContractIDfield.
Customer ID. To learn how to get a list of counterparty IDs, see contractor.
Contractor ID. To learn how to get a list of counterparty IDs, see contractor.
Parent contract ID. Passed only if type = 2.
Subject matter of the contract.
Acceptable values:
-
0: Other. -
1: Ad distribution contract. -
2: Contract to organize ad distribution. -
3: Mediation. -
4: Representation.
Default value: 0. To set the value to the “Not specified” state, pass either null or an empty value ''. When editing, you can set the value to the “Not specified” state the following way: 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.
Default value: 0. To set the value to the “Not specified” state, pass either null or an empty value ''. When editing, you can set the value to the “Not specified” state the following way: actionType=&.
Contract / additional agreement number. There should be no spaces or line breaks at the beginning and end of the line.
Contract amount. Passed only if amountType = 0 (paid).
Contract price. Acceptable values:
0: Paid (if this value is selected,amountRubbecomes mandatory).1: Unpaid.2: There is no price in the contract.
Default value: 1 (unpaid).
Contract role. Acceptable values:
0: Primary.1: Final.2: Direct.
Contract type. You can't change the parameter value after the contract is created. Acceptable values:
0: Commercial.1: Social advertising contract with payment.2: Social advertising contract by quota.
Default value: 0 (commercial).
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).
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).
Date of the contract / additional agreement. Format: YYYY-MM-DD. The contract/additional agreement date cannot be in the future.
The contractor is responsible for registering and submitting ad creatives.
Acceptable values:
-
0: No -
1: Yes.
Default value: 0.
Required parameter.