Skip to main content
PUT
/
budgets
/
{budget_token}
Update budget
curl --request PUT \
  --url https://api.vantage.sh/v2/budgets/{budget_token} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "cost_report_token": "<string>",
  "child_budget_tokens": [
    "<string>"
  ],
  "periods": [
    {
      "start_at": "2023-12-25",
      "amount": 123,
      "end_at": "2023-12-25"
    }
  ]
}
'
{
  "token": "bdgt_39ce7f848dff6d54",
  "name": "New Name New Budget Who Dis",
  "workspace_token": "wrkspc_949771e4fb8d7bfe",
  "user_token": "usr_9b375256090d0fda",
  "created_by_token": "usr_9b375256090d0fda",
  "cost_report_token": "rprt_07325bc3667263b7",
  "created_at": "2024-07-11T20:22:48Z",
  "budget_alert_tokens": [],
  "periods": [
    {
      "start_at": "2023-01-01",
      "end_at": "2023-01-31",
      "amount": "234.0"
    },
    {
      "start_at": "2024-01-01",
      "end_at": "2024-01-31",
      "amount": "123.0"
    },
    {
      "start_at": "2024-07-01",
      "end_at": "2024-09-30",
      "amount": "10000.0"
    }
  ],
  "performance": [
    {
      "date": "July, 2024",
      "actual": "-100%",
      "amount": "10000.0"
    },
    null,
    null,
    null,
    null,
    null,
    {
      "date": "January, 2024",
      "actual": "-100%",
      "amount": "123.0"
    },
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    {
      "date": "January, 2023",
      "actual": "1224%",
      "amount": "234.0"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

budget_token
string
required

Body

application/json

Update a Budget.

name
string

The name of the Budget.

cost_report_token
string

The CostReport token. Ignored for hierarchical Budgets.

child_budget_tokens
string[]

The tokens of any child Budgets when creating a hierarchical Budget.

periods
object[]

The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.

Response

Budget model

token
string
name
string

The name of the Budget.

Example:

"Acme123 Budget"

workspace_token
string

The token for the Workspace the Budget is a part of.

user_token
string

The token for the User who created this Budget.

created_by_token
string

The token of the Creator of the Budget.

cost_report_token
string

The token of the Report associated with the Budget.

created_at
string

The date and time, in UTC, the Budget was created. ISO 8601 Formatted.

Example:

"2024-03-19T00:00:00Z"

budget_alert_tokens
string[]

The tokens of the BudgetAlerts associated with the Budget.

child_budget_tokens
string[]

The tokens of the child Budgets associated with the hierarchical Budget.

periods
object[]

The budget periods associated with the Budget.

performance
object[]

The historical performance of the Budget.