- 03 Dec 2024
- DarkLight
Approve, decline, amend batch transactions for a given advertiser
- Updated on 03 Dec 2024
- DarkLight
accessToken
advertiserId
Request Body:
The request body contains an array of transaction objects (a single bulk request is limited to 40 thousand transaction objects). Each object represents the action to be executed, the transaction, and if required, any additional parameters. Transactions are identified either by transactionId, or by orderRef, transactionDate, and timezone.
"transactionId": "484816099", |
"orderRef": "123ABC555", "transactionDate": "2017-02-20T22:04:00", "timezone": "Europe/Paris" |
Available Operations
Approve
Approve by transactionId:
{ "action": "approve", "transaction": { "transactionId": 1234567 } } |
Approve by orderRef, transactionDate, and timezone:
{ "action": "approve", "transaction": { "orderRef": "123ABC555", "transactionDate": "2017-02-20T22:04:00", "timezone": "Europe/Paris" } } |
Decline
Decline by transactionId:
{ |
Decline by orderRef, transactionDate, and timezone:
{ |
Amend Sale Amount
Amend sale amount by transactionId:
{ |
Amend sale amount by orderRef, transactionDate, and timezone:
{ |
Note: To ensure the integrity of amendment transactions, the sum of the transaction parts must be identical to the saleAmount. Otherwise, the "DEFAULT" commissionGroup is adjusted automatically to balance possible differences.
If you set the approve parameter to "true", the API first amends the transaction, and then approves it immediately after that.
Amend Tracking Parameter - Custom Parameter
This operation can be used to UPDATE or CREATE custom parameter values that advertisers parse in our Tracking Parameter. Within the API call, you specify which custom parameter key you want to update/create and provide the value. Advertisers cannot DELETE or send blank custom parameter values.
Amend custom parameter by transactionId:
[ |
Amend custom parameter by orderRef, transactionDate, and timezone:
[ |
Note: Awin will actively work on removing the below conditions after the feature has gone live. Till then, if any of these conditions are met Awin will return a 422 error code. Please see the list of criteria below:
- CPO advertiser.
- Have previously had their sale amount or commission amended.
- Any shared transactions.
- Transactions involving subnetwork publishers.
- Transactions with the sale date before June 2023.
transactions
OK
Common Response Codes
The following table contains a list of possible response reasons for common response codes that may appear when using the API:
Response Code | Response Message | Possible Response Reason |
200 | OK | The transaction was validated as desired. |
304 | NOT_MODIFIED | The transaction was already in the desired commission state. For example, trying to decline a declined transaction. |
400 | JSON parse error | Ensure that your JSON object is enclosed by square brackets. |
404 | NOT_FOUND | The transactionId or (orderRef, transactionDate, timezone) did not correspond to a transaction. |
422 | UNPROCESSABLE_ENTITY | Unable to complete the request due to the current transaction state. For example, trying to approve a declined transaction. |