Skip to main content

Campaign Budget Update

The Campaign Budget Update API enables users to modify a campaign's budget as needed, ensuring greater flexibility in financial planning and campaign management.

warning

It is important to handle campaign data securely and ensure that access is restricted to authorized users only.

API Endpoint​

Method: POST

URL: https://<PA_RM_END_POINT>/retail-media/campaigns/{campaignId}/update-budget

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.

Path Parameters​

ParameterTypeDescription
campaignIdGUIDId of the campaign

Example Request Payload​

{
"totalBudget": 1536,
"dailyCap": 10
}
ParameterTypeRequiredDescription
totalBudgetdecimal✅Total budget for this campaign.
dailyCapdecimalDaily Usage Limit:
If a daily cap is not set or is set to zero (0), the system will treat it as unlimited usage for the day.
IMPORTANT:

If daily cap provide than it should be greater than zero(0) and less than total budget.

Response Payload​

Success Response​

  • Status Code: 200 OK
  • Payload: Returns the created campaign information in JSON format
{
"status": "Success",
"message": "Campaign budget saved successfully.",
"errorCode": "",
"data": "00000000-0000-0000-0000-000000000000",
"metadata": {
"requestId": "762ebdaa-5ba1-45e8-a1d6-e9adc6938861",
"timestamp": "2025-06-10T09:29:07.1375150Z"
}
}

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(
{
"totalBudget": 1536,
"dailyCap": 10
}
)

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: body
};

fetch("https://<PA_RM_END_POINT>/retail-media/campaigns/{campaignId}/update-budget", requestOptions)
.then(response => response.json())
.then(result=> {
console.log(result);
})
.catch(error => console.log('error', error));