The Account object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

parent_id string
is_group boolean

Default: false

account_name string required
account_number string
company string required
root_type string
report_type string
account_currency string
parent_account string required
account_type string
tax_rate number
freeze_account string
balance_must_be string
include_in_gross boolean

Default: false

disabled boolean

Default: false

account_category string
The Account object
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}
GET /api/accounts/account/{id}

Retrieve a account

Retrieves the details of an existing account. Supply the unique account ID that was returned from a previous request.

Path parameters

id string required

The identifier of the account to retrieve.

Returns

Returns the account object if a valid identifier was provided.

GET /api/accounts/account/{id}
curl https://api.overplane.dev/api/accounts/account/account_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}
GET /api/accounts/account

List all accounts

Returns a list of accounts. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of account objects.

GET /api/accounts/account
curl https://api.overplane.dev/api/accounts/account \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "account_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "parent_id": null,
      "is_group": false,
      "account_name": "account_name_example",
      "account_number": "account_number_example",
      "company": "Example Corp",
      "root_type": "root_type_example",
      "report_type": "report_type_example",
      "account_currency": "USD",
      "parent_account": "parent_account_example",
      "account_type": "account_type_example",
      "tax_rate": 0,
      "freeze_account": "freeze_account_example",
      "balance_must_be": "balance_must_be_example",
      "include_in_gross": false,
      "disabled": false,
      "account_category": "account_category_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/account

Create a account

Creates a new account object.

Body parameters

parent_id string
is_group boolean

Default: false

account_name string required
account_number string
company string required
root_type string
report_type string
account_currency string
parent_account string required
account_type string
tax_rate number
freeze_account string
balance_must_be string
include_in_gross boolean

Default: false

disabled boolean

Default: false

account_category string

Returns

Returns the newly created account object if the call succeeded.

POST /api/accounts/account
curl https://api.overplane.dev/api/accounts/account \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"account_name":"account_name_example","company":"Example Corp","parent_account":"parent_account_example"}'
Response
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}
PATCH /api/accounts/account/{id}

Update a account

Updates the specified 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 account to update.

Body parameters

parent_id string
is_group boolean

Default: false

account_name string
account_number string
company string
root_type string
report_type string
account_currency string
parent_account string
account_type string
tax_rate number
freeze_account string
balance_must_be string
include_in_gross boolean

Default: false

disabled boolean

Default: false

account_category string

Returns

Returns the updated account object.

PATCH /api/accounts/account/{id}
curl https://api.overplane.dev/api/accounts/account/account_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"is_group":false}'
Response
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}
DELETE /api/accounts/account/{id}

Delete a account

Permanently deletes a account. This cannot be undone.

Path parameters

id string required

The identifier of the account to delete.

Returns

Returns a confirmation that the account has been deleted.

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

Get children

Returns the direct children of the specified node in the tree.

Path parameters

id string required

The identifier of the account to act on.

Returns

A list of direct child objects.

GET /api/accounts/account/{id}/children
curl https://api.overplane.dev/api/accounts/account/account_abc123/children \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}
GET /api/accounts/account/{id}/ancestors

Get ancestors

Returns all ancestors from the immediate parent up to the root of the tree.

Path parameters

id string required

The identifier of the account to act on.

Returns

A list of ancestor objects from parent to root.

GET /api/accounts/account/{id}/ancestors
curl https://api.overplane.dev/api/accounts/account/account_abc123/ancestors \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}
GET /api/accounts/account/{id}/descendants

Get descendants

Returns all descendants of the specified node in the tree.

Path parameters

id string required

The identifier of the account to act on.

Returns

A list of all descendant objects.

GET /api/accounts/account/{id}/descendants
curl https://api.overplane.dev/api/accounts/account/account_abc123/descendants \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "account_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "account_name": "account_name_example",
  "account_number": "account_number_example",
  "company": "Example Corp",
  "root_type": "root_type_example",
  "report_type": "report_type_example",
  "account_currency": "USD",
  "parent_account": "parent_account_example",
  "account_type": "account_type_example",
  "tax_rate": 0,
  "freeze_account": "freeze_account_example",
  "balance_must_be": "balance_must_be_example",
  "include_in_gross": false,
  "disabled": false,
  "account_category": "account_category_example"
}