AdSet Collections
The AdSet Collections API is designed to retrieve a list of collections eligible for inclusion a AdSet for a given supplier and retailer combination within campaigns.
API Endpoint
Method: GET
URL: https://<PA_RM_END_POINT>/retail-media/suppliers/{supplierId}/retailers/{retailerId}/collections
info
Please refer to the Supplier API documentation for detailed instructions on how to retrieve the supplierId
and Retailer API for retailerId
.
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 |
---|---|---|
retailerId | string | Get the retailer ID from the Retailer API |
supplierId | string | Get the supplier ID from the Supplier API |
Query 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 collections for a particular retailer that belongs to a specific supplier in JSON format
{
"status": "Success",
"message": "Data retrieved successfully.",
"errorCode": "",
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Collection 1",
"totalProducts": 49,
"collectionType": "Dynamic Collection"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Collection 2",
"totalProducts": 17,
"collectionType": "Dynamic Collection"
}
],
"metadata": {
"requestId": "3fd195a8-5844-42d8-9dac-e6538a365be7",
"timestamp": "2025-06-10T10:16:11.0533615Z"
}
}
info
Please refer to the Collection Products API documentation to view the products for the collection.
Response Parameters
Parameter | Type | Description |
---|---|---|
collections | Array of Object | Array of adset collections. |
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. |
collection Object
Parameter | Type | Description |
---|---|---|
id | string | Unique identifier for the collection. |
name | string | Name of the collection. |
totalProducts | integer | Number of products in the collection. |
collectionType | string | Type of collection - Fixed or Dynamic |
rules | Array of String | Array of rules for the collection. |
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 urlencoded = new URLSearchParams();
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: urlencoded,
redirect:'follow'
};
fetch("https://<PA_RM_END_POINT>/retail-media/suppliers/{supplierId}/retailers/{retailerId}/collections?page=1&limit=100", requestOptions)
.then(response => response.json())
.then(result=> {
console.log(result);
})
.catch(error => console.log('error', error));