Campaigns API
The Campaigns API retrieves a paginated list of marketing campaigns within the Retail Media platform for a specific supplier.
warning
Always ensure that sensitive campaign data is handled securely and in compliance with data protection regulations.
API Endpoint
Method: GET
URL: https://<PA_RM_END_POINT>/retail-media/campaigns/retailers/{retailerid}/supplier/{supplierId}
info
Please refer to the Retailer API documentation for detailed instructions on how to retrieve the retailerId
and refer to the Supplier API documentation for detailed instructions on how to retrieve the supplierId
.
Request Header
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer ACCESS_TOKEN |
info
Please refer to the Authentication API documentation for bearer token.
Path Parameters
Parameter | Type | Description |
---|---|---|
page | integer | The page number of the user list. Defaults to 1 if not specified. |
limit | integer | The number of users to return per page. Defaults to 10 but can be set as needed up to a maximum of 100 . |
Response Payload
Success Response
- Status Code:
200 OK
- Payload: Returns list of campaings associated with the supplier in JSON format
{
"status": "Success",
"message": "Data retrieved successfully.",
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "test -> 1",
"startDate": "2024-12-05T05:47:09.0000000",
"endDate": "",
"dailyCap": 0,
"totalBudget": 0.00,
"clicks": 0,
"impressions": 0,
"spentCredits": 0,
"isRunning": true
},
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Test -> Sponsored -> Product -> Bid",
"startDate": "2024-12-12T01:06:41.0000000",
"endDate": "",
"dailyCap": 0,
"totalBudget": 1000.00,
"clicks": 0,
"impressions": 0,
"spentCredits": 0,
"isRunning": true
}
],
"pagination": {
"totalItems": 67,
"totalPages": 7,
"currentPage": 1,
"pageSize": 10,
"hasPreviousPage": false,
"hasNextPage": true
},
"metadata": {
"requestId": "8d9e7689-51fe-44a1-82fd-d162c82acf32",
"timestamp": "2025-06-10T07:18:39.1187239Z"
},
"errorCode": ""
}
Response Parameters
Parameter | Type | Description |
---|---|---|
campaigns | Array of Object | Array of campaigns. |
totalItems | integer | Total number of users available for the given organisation. |
totalPages | integer | Total number of pages available for the given organisation. |
currentPage | integer | Current page number for the list of users. |
pageSize | integer | Number of users returned per page. |
hasPreviousPage | boolean | Indicates if previous page is available. |
hasNextPage | boolean | Indicates if next page is available. |
Campaign Object
Parameter | Type | Description |
---|---|---|
id | string | Unique identifier for the campaign. |
name | string | Name of the campaign. |
dailyCap | decimal | Maximum spend allowed per day. If zero(0) no cap has set. |
startDate | string(ISO 8601) | Campaign start date. |
end date | string(ISO 8601) | Campaign end date. |
totalBudget | decimal | Total budget allocated for the campaign. |
clicks | integer | The total number of clicked the campaign has received. |
impressions | integer | The total number of impressions the campaign has received. |
isRunning | integer | Indicates if the campaign is currently running(true) or paused(false). |
Error Response
If an error occurs, the API will return an appropriate status code along with an error message.
- Sample Error Response:
{
"status": "Error"
"errorCode": 401,
"errors": ["error message 1", "error message 2"],
"message": "Details error message",
"metadata": {
"requestId": "3d65d860-5acd-4663-b14d-c0bb55317660",
"timeStamp": "2025-04-28T00:00:00.000Z"
},
}
Example Usage (JavaScript)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "BEARER YOUR_ACCESS_TOKEN");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect:'follow'
};
fetch("https://<PA_RM_END_POINT>/retail-media/campaigns/retailers/{retailerid}/supplier/{supplierId}?page=1&limit=100", requestOptions)
.then(response => response.json())
.then(result=> {
console.log(result);
})
.catch(error => console.log('error', error));