The Budget Account object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string
parent_type string
account string required
budget_amount number required
The Budget Account object
{
  "id": "budget-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "account": "account_example",
  "budget_amount": 0
}
GET /api/accounts/budget-account?parent_id={id}

List budget accounts by parent

Returns all budget accounts belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of budget account objects belonging to the parent.

GET /api/accounts/budget-account?parent_id={id}
curl https://api.overplane.dev/api/accounts/budget-account?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "budget-account_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "account": "account_example",
      "budget_amount": 0
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/budget-account

Create a budget account

Creates a new budget account object.

Body parameters

idx integer
parent_id string
parent_type string
account string required
budget_amount number required

Returns

Returns the newly created budget account object if the call succeeded.

POST /api/accounts/budget-account
curl https://api.overplane.dev/api/accounts/budget-account \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"account":"account_example","budget_amount":0}'
Response
{
  "id": "budget-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "account": "account_example",
  "budget_amount": 0
}
PATCH /api/accounts/budget-account/{id}

Update a budget account

Updates the specified budget account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the budget account to update.

Body parameters

idx integer
parent_id string
parent_type string
account string
budget_amount number

Returns

Returns the updated budget account object.

PATCH /api/accounts/budget-account/{id}
curl https://api.overplane.dev/api/accounts/budget-account/budget-account_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "budget-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "account": "account_example",
  "budget_amount": 0
}
DELETE /api/accounts/budget-account/{id}

Delete a budget account

Permanently deletes a budget account. This cannot be undone.

Path parameters

id string required

The identifier of the budget account to delete.

Returns

Returns a confirmation that the budget account has been deleted.

DELETE /api/accounts/budget-account/{id}
curl https://api.overplane.dev/api/accounts/budget-account/budget-account_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "budget-account_abc123",
  "deleted": true
}
POST /api/accounts/budget-account/reorder

Reorder budget accounts

Updates the sort order of budget accounts within their parent by setting new index values.

Returns

Returns the reordered list.

POST /api/accounts/budget-account/reorder
curl https://api.overplane.dev/api/accounts/budget-account/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "budget-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "account": "account_example",
  "budget_amount": 0
}