Update AdSet Banner
The Update AdSet Banner API allows users to attach existing banner / video display ads, or create and attach new banner / video display ads to an adset, providing flexibility in adset management.
It is important to handle adset data securely and ensure that access is restricted to authorized users only.
API Endpoint
Method: POST
URL: https://<PA_RM_END_POINT>/retail-media/supplier/{supplierId}/retailer/{retailerId}/adSet/{adSetId}/update-banner
Please refer to the Supplier API documentation for detailed instructions on how to retrieve the supplierId
, Retailer API for retailer and AdSet API for campaign.
Request Header
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer ACCESS_TOKEN |
Please refer to the Authentication API documentation for bearer token.
Path Parameters
Parameter | Type | Description |
---|---|---|
supplierId | Guid | Unique identifier of the supplier |
retailerId | Guid | Unique identifier of the retailer |
adSetId | Guid | Unique identifier of the AdSet to update |
Example Request Payload
{
"bannerId": "guid", // Optional: Existing banner ID if updating an existing banner
"banner": {
"name": "string", // Banner name
"callToAction": "string", // Call to action URL
"images": [
{
"deviceType": "string", // Device type for the image (e.g., "Desktop", "Mobile")
"url": "string" // URL of the banner image
}
]
}
}
Parameter | Type | Required | Description |
---|---|---|---|
bannerId | Guid | No | ID of an existing banner to update. If not provided, a new banner will be created |
banner.name | string | ✅ | Name of the banner |
banner.callToAction | string | No | URL for the call-to-action button |
banner.images | array | ✅ | Array of banner images for different device types |
banner.images[].deviceType | string | ✅ | Type of device the image is for |
banner.images[].url | string | ✅ | URL of the banner image |
- If bannerId is provided → The system updates the AdSet using the specified bannerId.
- If a banner or video object is provided (without bannerId) → The system will create a new banner and update the AdSet accordingly.
- Requirement: At least one of bannerId or banner / video must be provided.
- AdSet Type: Must be Sponsored Display.
Response Payload
Success Response
- Status Code:
200 OK
- Payload: Returns the success message of the operation in JSON format
{
"status": "Success",
"message": "Adset banner saved successfully.",
"errorCode": "",
"data": "00000000-0000-0000-0000-000000000000", // ID of the updated AdSet
"metadata": {
"requestId": "27e0c67b-17a5-4e02-afee-9e03b6fbdcc0",
"timestamp": "2025-06-10T10:42:36.5776112Z"
}
}
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");
const body = JSON.stringify(
{
"bannerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"banner": {
"name": "Summer Sale Banner",
"callToAction": "https://example.com/summer-sale",
"images": [
{
"deviceType": "Desktop",
"url": "https://example.com/images/desktop-banner.jpg"
},
{
"deviceType": "Mobile",
"url": "https://example.com/images/mobile-banner.jpg"
}
]
}
})
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: body
};
fetch("https://<PA_RM_END_POINT>/retail-media/supplier/{supplierId}/retailer/{retailerId}/adSet/{adSetId}/update-banner", requestOptions)
.then(response => response.json())
.then(result=> {
console.log(result);
})
.catch(error => console.log('error', error));