Skip to content
Amplify APIReference

Update an existing Budget

PUT/budgets/{id}

To update a Budget send a JSON with the updated value for one or more of the updatable Budget attributes.

All attribute values left unset in this PUT will remain unchanged.

Only the following Budget properties are updatable:

  • amount - The amount must be lower than the maximumAmount. A budget's minimum amount limit is determined by its type:

    DAILY - more than 25

    MONTHLY - more than 750

    CAMPAIGN - The campaign's days amount multiplied by 25

  • startDate - The start date cannot be in the past. Start date cannot be modified after budget has started (ie: start date already passed)

  • endDate - The end date must be after the start date, and cannot be in the past.

  • runForever - If set to 'true', the 'endDate' attribute should not be included as it is meaningless. The current 'endDate' attribute of the Budget (if exists) will be discarded. In case of passing 'false', 'endDate' attribute must be also passed.

  • dailyTarget - The maximum amount of spend that is allowed per day. Relevant only if DAILY_TARGET pacing is used.

  • type - Allows to move between different budget types.

  • pacing - Allows to move between different pacing types (dailyTarget paramenter have to be set when moving to DAILY_TARGET pacing).

OB-TOKEN-V1<token>

Token obtained from the Obtain a token endpoint or the Amplify API token page. Valid for 30 days.

In: header

Path Parameters

id*string

the Budget id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/budgets/00f4b02153ee75f3c9dc4fc128ab041962" \  -H "Content-Type: application/json" \  -d '{    "amount": 5000,    "endDate": "2013-11-16"  }'
{  "id": "00f4b02153ee75f3c9dc4fc128ab041962",  "name": "Boost 'ABC' Brand budget",  "shared": false,  "amount": 100,  "currency": "USD",  "amountRemaining": 100,  "amountSpent": 0,  "creationTime": "2013-10-16 12:24:01",  "lastModified": "2013-10-16 12:24:01",  "startDate": "2013-11-16",  "runForever": false,  "type": "CAMPAIGN",  "pacing": "DAILY_TARGET",  "dailyTarget": 200,  "maximumAmount": 200}