Skip to main content

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.

warning

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

info

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

NameValue
Content-Typeapplication/json
AuthorizationBearer ACCESS_TOKEN
info

Please refer to the Authentication API documentation for bearer token.

Path Parameters

ParameterTypeDescription
supplierIdGuidUnique identifier of the supplier
retailerIdGuidUnique identifier of the retailer
adSetIdGuidUnique 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
}
]
}
}

ParameterTypeRequiredDescription
bannerIdGuidNoID of an existing banner to update. If not provided, a new banner will be created
banner.namestringName of the banner
banner.callToActionstringNoURL for the call-to-action button
banner.imagesarrayArray of banner images for different device types
banner.images[].deviceTypestringType of device the image is for
banner.images[].urlstringURL of the banner image
IMPORTANT
  • 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));