AdSet Information
The AdSet Information API fetches a list of all AdSets associated with a specific campaign, including detailed placement configuration. This endpoint is useful for reviewing AdSet setup and placement details within a campaign.
warning
Ensure that Ad Set data is accessed securely and only by authorized users to maintain confidentiality and integrity of the information.
API Endpoint
Method: GET
URL: https://<PA_RM_END_POINT>/retail-media/campaigns/{campaignId}/adset-information
info
Please refer to the Campaign API documentation for detailed instructions on how to retrieve the campaignId.
Request Header
| Name | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer ACCESS_TOKEN |
info
Please refer to the Authentication API documentation for bearer token.
Response Payload
Success Response
- Status Code:
200 OK - Payload: Returns list of adsets for a particular campaign in JSON format
{
"status": "Success",
"message": "Data retrieved successfully.",
"errorCode": "",
"data": [
{
"id": "00000000-0000-0000-0000-000000000001",
"name": "Test AdSet Name",
"placements": [
{
"id": "00000000-0000-0000-0000-000000000002",
"name": "Test Placement Name",
"widget": "test-widget-name",
"widgetId": "00000000-0000-0000-0000-000000000003",
"route": "Test Route",
"routeId": "00000000-0000-0000-0000-000000000004",
"strategy": "fixed",
"adSetType": "sponsored display",
"costType": "FIXED",
"cost": 29.76,
"maxCost": 29.76,
"startDate": "2025-03-09T13:00:00",
"endDate": "2025-03-16T12:59:59",
"isKeywordTargetingEnabled": false,
"isAuctionWeighted": false,
"configuredBookingType": "daily",
"specialRates": []
},
{
"id": "00000000-0000-0000-0000-000000000005",
"name": "Test Placement Name",
"widget": "test-widget-name",
"widgetId": "00000000-0000-0000-0000-000000000003",
"route": "Test Route",
"routeId": "00000000-0000-0000-0000-000000000004",
"strategy": "fixed",
"adSetType": "sponsored display",
"costType": "FIXED",
"cost": 29.76,
"maxCost": 29.76,
"startDate": "2025-04-01T13:00:00",
"endDate": "2025-04-08T12:59:59",
"isKeywordTargetingEnabled": false,
"isAuctionWeighted": false,
"configuredBookingType": "daily",
"specialRates": []
}
]
}
],
"metadata": {
"requestId": "00000000-0000-0000-0000-000000000000",
"timestamp": "2025-06-10T09:29:14.4252375Z"
}
}
| Parameter | Type | Description |
|---|---|---|
id | GUID | System generated ID of the adset. |
name | string | Name of the adset. |
placements | Array of Object | Array of placements attached to this adset. Check the details parameter definition in the placement object section below. |
placement object
| Parameter | Type | Description |
|---|---|---|
id | GUID | System generated unique identifier for the placement. |
name | string | Name of the placement. |
widget | string | Name of the widget where the placement is located. |
widgetId | GUID | System generated unique identifier for the widget. |
route | string | Name of the route where the placement is located. |
routeId | GUID | System generated unique identifier for the route. |
strategy | string | Advertising strategy used for the placement. |
adSetType | string | Type of ad set associated with the placement. |
costType | string | Type of cost associated with the placement. |
cost | float | Cost associated with the placement. |
maxCost | float | Maximum cost configured for the placement. |
startDate | string | Start date for the placement. Only available for fixed strategy. |
endDate | string | End date for the placement. Only available for fixed strategy. |
isKeywordTargetingEnabled | boolean | Indicates if keyword targeting is enabled for the placement. |
isAuctionWeighted | boolean | Indicates if auction weighting is enabled for the placement. |
configuredBookingType | string | The booking type configured for the placement (e.g. daily). |
specialRates | Array | List of special rates for the placement. Only available for fixed strategy. |
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": "00000000-0000-0000-0000-000000000000",
"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/{campaignId}/adset-information", requestOptions)
.then(response => response.json())
.then(result=> {
console.log(result);
})
.catch(error => console.log('error', error));