Accounts
List accounts with their mapped roles for an entity.
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Query Parameters
uuidResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/ledger/accounts?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "code": "string", "name": "string", "type": "ASSET", "normalBalance": "DEBIT", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "currency": "string", "isActive": true, "tags": [ "string" ], "createdAt": "2019-08-24T14:15:22Z" }]{ "error": "string"}{ "error": "string"}Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/ledger/accounts" \ -H "Content-Type: application/json" \ -d '{ "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "code": "1000", "name": "Cash", "type": "ASSET" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "code": "string", "name": "string", "type": "ASSET", "normalBalance": "DEBIT", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "currency": "string", "isActive": true, "tags": [ "string" ], "createdAt": "2019-08-24T14:15:22Z"}{ "error": "string"}{ "error": "string"}Patch one or many chart-of-accounts rows (action: update or deactivate). Requires write:ledger. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/api/ledger/accounts" \ -H "Content-Type: application/json" \ -d '{}'{ "error": "string"}{ "error": "string"}Delete an account and its mappings.
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Query Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/ledger/accounts?id=497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "success": true}{ "error": "string"}{ "error": "string"}{ "error": "string"}Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/ledger/accounts" \ -H "Content-Type: application/json" \ -d '{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "name": "string", "type": "ASSET", "normalBalance": "DEBIT" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "code": "string", "name": "string", "type": "ASSET", "normalBalance": "DEBIT", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "currency": "string", "isActive": true, "tags": [ "string" ], "createdAt": "2019-08-24T14:15:22Z"}{ "error": "string"}{ "error": "string"}{ "error": "string"}Returns all journal lines posted to the specified account with running balance.
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/ledger/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/ledger"{}{ "error": "string"}One chart-of-accounts row. Requires read:ledger. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Path Parameters
uuidQuery Parameters
Entity UUID; must match the API key’s entity when using Bearer auth.
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/ledger/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "error": "string"}{ "error": "string"}Deactivate one account. Requires write:ledger. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Path Parameters
uuidQuery Parameters
Entity UUID; must match the API key’s entity when using Bearer auth.
uuidResponse Body
application/json
application/json
curl -X DELETE "https://example.com/api/ledger/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "error": "string"}{ "error": "string"}