API get transaction queries
From Wiki
Contents |
GET transaction queries (list)
Publishers can pull individual transactions queries, to check the status of the transaction query, to create own reports, and to pull additional information that can be shared between publishers and advertisers via clickref (from publisher to advertiser).
Who can use it
Publishers
How to call it
As a publisher:
https://api.awin.com/publisher/<yourPublisherId>/transactionqueries? startDate=yyyy-MM-ddThh%3Amm%3Ass&endDate=yyyy-MM-ddThh%3Amm%3Ass&timezone=UTC& dateType=transactionDate&statuses=approved&advertiserId=<advertiserIdForWhichToFilter>
Example:
https://api.awin.com/publisher/154870/transactionqueries?startDate=2020-11-11T00:00:00&endDate=2020-11-13T23:59:59&timezone=UTC&dateType=transactionDate&statuses=approved&advertiserId=1001 (as a publisher)
Add the parameter 'accessToken' to provide your access key as described in API authentication and authorization.
Please note: the maximum date range between startDate and endDate currently supported is 31 days.
Parameter | Format | Mandatory/optional | Data Type |
startDate | yyyy-MM-ddThh:mm:ss | mandatory | date-time |
endDate | yyyy-MM-ddThh:mm:ss | mandatory | date-time |
dateType | enquiryDate transactionDate | optional (falls back to "transactionDate" if not set) | string |
timezone | Europe/Berlin Europe/Paris | mandatory | string |
publisherId | 12345 | mandatory | integer(64) |
advertiserId | 12345 or 12345,67890 for multiple ones | optional, available for publishers | array[integer] |
statuses | pending approved | optional | array[string] |
clickRefs | clickRef1 or clickRef1 (value2),clickRef1 (value3 )for multiple ones | optional | array[string] |
pageNumber | 3 | optional (Defaults to 1 if not supplied) | integer(32) |
pageSize | 20 | optional (Defaults to 100 if not supplied) | integer(32) |
How the response looks
[ { "enquiryId": 44562, "advertiserId": 100, "advertiserName": "ExampleAdvertiser", "enquiryDate": "2020-10-03T12:18:00", "enquiryStatus": "approved", "commissionAmount": { "amount": 5.59, "currency": "GBP" }, "saleAmount": { "amount": 55.96, "currency": "GBP" }, "orderRef": "14523698", "clickRef": "customerClickId", "enquiryType": "approved", "transactionDate": "2020-10-01T11:45:00", "validationDate": "2020-10-02T15:30:00", "declineReason": "null", "description": "approved", }, { .... Next transaction query data here ..... } ] (...)
Common Error Messages
Some error which appear when incorrect API values are parsed.
Error Scenario | Error Message |
Start date after end date | endDate cannot be before startDate |
Start date greater than 31days | This endpoint only supports a date range of 31 days. Please adjust your startDate or endDate. |
Using invalid date type | Wrong data type for parameter 'dateType' |
Using invalid statuses type | Wrong data type for parameter 'statuses' |