- 08 Jul 2024
- Dark
Link Builder (batch)
- Updated on 08 Jul 2024
- Dark
accessToken
publisherId
access token
requestBody
OK
The response is a JSON object containing a single field “responses” which is an array of objects. Each of those objects contains 2 fields: status (indicating the HTTP status code which would have resulted from the corresponding request being sent singularly), and body. The body is as detailed for a single request above. Additionally, this contains a request field, containing the corresponding request payload, to aid in correlating the responses with the original requests.
Note: If the response contains "status": 400, "destinationUrl": "deeplinkNotPermitted" for single advertisers, they do not allow the link builder.
It's currently not possible to generate short links via the batch generated endpoint
xxxxxxxxxx
curl --request POST \
--url https://api.awin.com/publishers/%7BpublisherId%7D/linkbuilder/generate-batch \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"requests": [
{
"advertiserId": 1,
"destinationUrl": "string",
"parameters": {
"campaign": "string",
"clickref": "string",
"clickref2": "string",
"clickref3": "string",
"clickref4": "string",
"clickref5": "string",
"clickref6": "string"
}
}
]
}'
xxxxxxxxxx
curl --request POST \
--url https://api.awin.com/publishers/%7BpublisherId%7D/linkbuilder/generate-batch \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"requests": [
{
"advertiserId": 1,
"destinationUrl": "string",
"parameters": {
"campaign": "string",
"clickref": "string",
"clickref2": "string",
"clickref3": "string",
"clickref4": "string",
"clickref5": "string",
"clickref6": "string"
}
}
]
}'