Amplify APIReference
Create a Budget for a Marketer
POST
/marketers/{id}/budgetsTo create a new budget use the following properties
| Property | Type | Semantic | Example |
|---|---|---|---|
| name | String | The name of this Budget. Must be unique per each marketer. Maximum length is 100 characters. | "First quarter budget" |
| amount | Money | The monetary amount of this Budget | 2000.00 |
| startDate | Date | The date this Budget is scheduled to begin spending. | "2014-01-15" |
| endDate | Date | The date this Budget is scheduled to stop spending. If runForever is true this will not be used. | "2014-01-17" |
| runForever | Boolean | Designates whether the budget has an end date. In case of true, endDate attribute will be ignored. | true |
| type | Budget Type | Controls on which period the Budget refreshes | "MONTHLY" |
| pacing | Pacing Type | Controls how fast the Budget will be spent. For budget type DAILY only SPEND_ASAP pacing is supported. | "AUTOMATIC" |
| dailyTarget | Money | The maximum amount of spend that is allowed per day. Mandatory only in case the pacing is set to DAILY_TARGET | 100.00 |
Authorization
obToken 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 id of the Marketer
Query Parameters
detachedOnly?boolean
return only budgets that are not attached to any campaign
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/marketers/00f4b02153ee75f3c9dc4fc128ab041962/budgets?detachedOnly=true" \ -H "Content-Type: application/json" \ -d '{ "name": "new budget", "amount": 100, "startDate": "2014-06-26", "endDate": "2015-07-26", "pacing": "SPEND_ASAP", "type": "CAMPAIGN" }'{ "id": "006b09dce4c948774439b4c1ee6a05d0aa", "name": "new budget", "shared": false, "amount": 100, "currency": "CAD", "amountRemaining": 100, "amountSpent": 0, "creationTime": "2014-12-22 08:19:18", "lastModified": "2014-12-22 08:19:18", "startDate": "2015-06-26", "endDate": "2014-07-26", "runForever": false, "type": "CAMPAIGN", "pacing": "SPEND_ASAP"}