Entities

Entities are the companies a business keeps its books for: clinics, properties or subsidiaries under one login, each with its own balance sheet. Read-only; entities are created and archived in the app. Requires entities:read (or the broad reports scope).

The list carries multi_entity_enabled. When it is true, every journal entry line names its entity_id; when it is false, the company has one default entity and lines can leave it out. The default entity comes first, then the rest by name. An archived entity has active false and still answers by id.

The Entity Object

FieldTypeDescription
iduuidEntity UUID
objectentityAlways 'entity'
namestringEntity name
legal_namestring | nullLegal name, if different from the name
abbreviationstring | nullShort code shown on reports (e.g. 'CLA')
activebooleanFalse for an archived entity
defaultbooleanWhether this is the company's default entity

Endpoints

GET/api/v1/entities

List entities

Returns the company's entities, the default first, then by name. multi_entity_enabled says whether the company keeps several: when true, every journal entry line names its entity.

Scopes: entities:read or reports·operationId: listEntities

Path & Query Parameters

ParameterTypeDescription
activestring'true' for active entities only, 'false' for archived only
pageintegerPage number (default 1)
per_pageintegerResults per page (default 50, max 200)
Example
curl https://imprest.ai/api/v1/entities \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response · 200
{
  "entities": [
    {
      "id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
      "object": "entity",
      "name": "Test Business",
      "legal_name": null,
      "abbreviation": null,
      "active": true,
      "default": true
    },
    {
      "id": "3c69a03e-b84c-416b-a9ff-bd3d177a3e2c",
      "object": "entity",
      "name": "Alpha Clinic",
      "legal_name": "Alpha Clinic PLLC",
      "abbreviation": null,
      "active": true,
      "default": false
    }
  ],
  "multi_entity_enabled": true,
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total_count": 3,
    "total_pages": 1
  }
}
Response fields
ParameterTypeDescription
entitiesrequiredobject[]Array of entity objects
idrequireduuidEntity UUID
objectrequiredentityAlways 'entity'
namerequiredstringEntity name
legal_namerequiredstring | nullLegal name, if different from the name
abbreviationrequiredstring | nullShort code shown on reports (e.g. 'CLA')
activerequiredbooleanFalse for an archived entity
defaultrequiredbooleanWhether this is the company's default entity
multi_entity_enabledrequiredbooleanWhether the company keeps several entities
paginationrequiredobjectWhere this page sits in the whole list
pagerequiredintegerThis page's number, from 1
per_pagerequiredintegerResults per page (1-200, default 50)
total_countrequiredintegerResults across every page
total_pagesrequiredintegerPages in the whole list (at least 1)

Errors

  • 401No valid access token (invalid_token).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 422A malformed active filter (invalid_filter)

Every error uses the same envelope: error, message and error_code.

GET/api/v1/entities/:id

Show an entity

Returns one entity, archived or not.

Scopes: entities:read or reports·operationId: getEntity

Path & Query Parameters

ParameterTypeDescription
idrequireduuidEntity UUID
Example
curl https://imprest.ai/api/v1/entities/de1bcf26-486e-5a7f-ab1b-97d51478637b \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response · 200
{
  "entity": {
    "id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
    "object": "entity",
    "name": "Test Business",
    "legal_name": null,
    "abbreviation": null,
    "active": true,
    "default": true
  }
}
Response fields
ParameterTypeDescription
entityrequiredobjectThe entity
idrequireduuidEntity UUID
objectrequiredentityAlways 'entity'
namerequiredstringEntity name
legal_namerequiredstring | nullLegal name, if different from the name
abbreviationrequiredstring | nullShort code shown on reports (e.g. 'CLA')
activerequiredbooleanFalse for an archived entity
defaultrequiredbooleanWhether this is the company's default entity

Errors

  • 401No valid access token (invalid_token).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 404Entity not found (not_found)

Every error uses the same envelope: error, message and error_code.