List the entity's chart of accounts
Every GL account for the entity, with the external id to use as gl_account_id on a journal entry line. Filter with postable=true to get only the accounts a line may name - the journal entry endpoint refuses an account that is inactive or not postable. Paged: page_number (from 1) and page_size (max 100).
Query Parameters
- Type: booleanpostable
truereturns only accounts that are both active and postable, which is the set a journal entry line may name. Defaultfalsereturns the whole chart. - Type: integerpage
_number min:1Integer numbers.
- Type: integerpage
_size min:1max:100Integer numbers.
- Type: stringentity
External id of the entity to act for, from
GET /v1/entities. Required when signed in with OAuth (an organization can hold several entities; ask the user which one if more than one could apply). Optional with an API key, which is scoped to one entity already.
Responses
- application/json
- 400
Signed in with OAuth and no
entitygiven (CAPI12). - 401
The credential was refused: none sent (CAPI11), an API key that is not valid (CAPI15), or an OAuth sign-in that has expired (CAPI16), was not issued for this API (CAPI17), names an organization T0 does not hold (CAPI18) or a membership that is no longer usable (CAPI19).
detailsays what to do. - 403
The key lacks customer_api:read, or the signed-in user lacks gl_accounts:read on the entity (CAPI71); or
entityis not the key's own (CAPI14). - 404
No such entity in your organization (CAPI13).
- application/json
curl 'https://api.t0.ai/v1/gl-accounts?postable=false&page_number=1&page_size=100' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"data": [
{
"external_id": "string",
"account_number": "string",
"name": "string",
"account_type": "bank",
"is_active": true,
"is_postable": true,
"parent_external_id": "string",
"currency": "string"
}
],
"total_objects": 100,
"page_number": 1,
"page_size": 100
}