Skip to main content

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

NameValue
Content-Typeapplication/json
AuthorizationBearer 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"
}
}
ParameterTypeDescription
idGUIDSystem generated ID of the adset.
namestringName of the adset.
placementsArray of ObjectArray of placements attached to this adset. Check the details parameter definition in the placement object section below.

placement object

ParameterTypeDescription
idGUIDSystem generated unique identifier for the placement.
namestringName of the placement.
widgetstringName of the widget where the placement is located.
widgetIdGUIDSystem generated unique identifier for the widget.
routestringName of the route where the placement is located.
routeIdGUIDSystem generated unique identifier for the route.
strategystringAdvertising strategy used for the placement.
adSetTypestringType of ad set associated with the placement.
costTypestringType of cost associated with the placement.
costfloatCost associated with the placement.
maxCostfloatMaximum cost configured for the placement.
startDatestringStart date for the placement. Only available for fixed strategy.
endDatestringEnd date for the placement. Only available for fixed strategy.
isKeywordTargetingEnabledbooleanIndicates if keyword targeting is enabled for the placement.
isAuctionWeightedbooleanIndicates if auction weighting is enabled for the placement.
configuredBookingTypestringThe booking type configured for the placement (e.g. daily).
specialRatesArrayList 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));