All API resources
API reference

Chart of accounts

Chart of accounts templates, each entity's own accounts, and the global account library templates are built from.

Base URL https://app.prosaic.works/api/public/v1. Every request needs an API key or access token; see the overview.

List all chart of accounts templates

GET/api/public/v1/charts

SDK: prosaic.charts.list()

Returns all chart of accounts templates in the workspace. Requires API key authentication.

Responses

200 Successful response

  • dataarray of objectsrequired
    Show 4 child attributes
    • idstringrequired
    • namestringrequired
    • descriptionstringrequirednullable
    • accountCountnumberrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 401 Unauthorized - Invalid or missing API key
Node SDK
const { data } = await prosaic.charts.list();
curl
curl https://app.prosaic.works/api/public/v1/charts \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

Get chart of accounts template accounts

GET/api/public/v1/charts/{chartId}

SDK: prosaic.charts.listAccounts(chartId, params)

Returns paginated accounts from a chart-of-accounts template (the read-only blueprint entities are provisioned from). When includeHidden=true, also returns global accounts not in the template with isIncluded=false. Requires API key authentication.

Each included account also exposes its nullable confirmed systemRole and saved reportGroup/reportCategory summaries. subtype remains the legacy compatibility value, independent of report placement. Hidden global suggestions have systemRole=null and no saved report assignment.

Important: The id values returned by this endpoint are template account IDs (TemplateAccount.id). They are not the IDs of an entity's actual GL accounts — do not use them to post journals or look up reconciliation activity.

To fetch the chart of accounts for a specific entity (including bank-account-linked accounts and any custom accounts), use GET /api/public/v1/entities/{entityId}/charts. The bank-account-to-GL linkage is also embedded on each entity's bank account at bankAccounts[].entityAccount in the GET /api/public/v1/entities response.

Tax codes: The taxCode field is returned as the human-readable tax name (e.g. "15% GST on Income", or "No GST" when unset), not the machine code. When creating or updating a template you must pass the machine code instead (NZ_GST_15_INC, NZ_GST_15_EXP, NZ_GST_0_NONE, NZ_GST_0_ZERO), so convert the name back to its code before writing.

Path parameters

  • chartIdstringrequired

Query parameters

  • includeHiddenboolean

    When true, includes global accounts not in the template (with isIncluded=false). Disables pagination.

    Default: false

  • pageinteger

    Page number (starts at 1). Ignored when includeHidden=true.

    Default: 1

  • pageSizeinteger

    Number of items per page. Ignored when includeHidden=true.

    Default: 20

Responses

200 Successful response

  • templateUpdatedAtstringrequired
  • dataarray of objectsrequired
    Show 19 child attributes
    • idstringrequired
    • updatedAtstring
    • reportCategoryReviewedAtstringnullable
    • reportCategoryReviewVersionnumber
    • codestringrequired
    • namestringrequired
    • typestringrequired
    • subtypestringrequired
    • reportGroupobjectrequirednullable
      Show 5 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • accountTypestringrequired
    • reportCategoryobjectrequirednullable
      Show 4 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
    • taxCodestringrequired
    • descriptionstringrequirednullable
    • mappedCodestringrequirednullable
    • isSystembooleanrequired
    • systemRolestringnullable
    • parentIdstringnullable
    • isExcludedboolean
    • isIncludedboolean
    • sourcestring

      One of: template, overridden, custom

  • paginationobjectrequired
    Show 6 child attributes
    • currentPagenumberrequired
    • pageSizenumberrequired
    • totalCountnumberrequired
    • totalPagesnumberrequired
    • hasNextPagebooleanrequired
    • hasPreviousPagebooleanrequired
  • 400 Bad request - missing or invalid parameters
  • 401 Unauthorized - Invalid or missing API key
  • 403 Forbidden - No access to the specified chart
  • 404 Chart not found
Node SDK
const page = await prosaic.charts.listAccounts(chartId);
curl
curl https://app.prosaic.works/api/public/v1/charts/$CHART_ID \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

List approved Xero report-code mappings

GET/api/public/v1/xero-report-mappings

SDK: prosaic.charts.listXeroReportMappings()

Look up Xero Report Code values in the authorised workspace's country. Each entry gives the Prosaic report group and optional category. Only approved NZ placements that are valid in the current taxonomy are returned. Other countries return an empty lookup. Missing codes require review.

Responses

200 Successful response

  • dataobjectrequired
    Show 2 child attributes
    • countrystringrequired
    • mappingsobjectrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 401 Missing or invalid bearer authentication
  • 403 Workspace or API access denied
  • 404 Authorised workspace unavailable
  • 500 Unexpected failure loading mappings
Node SDK
const { data } = await prosaic.charts.listXeroReportMappings();
curl
curl https://app.prosaic.works/api/public/v1/xero-report-mappings \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

Create a chart of accounts template

POST/api/public/v1/charts

SDK: prosaic.charts.create(params)

Discover the current workspace contract at GET /api/public/v1/report-categories before writing. In activated workspaces, included accounts need groupKey and an explicit categoryKey (null is valid for eligible group-only accounts); type derives from the group. Parent-only and mixed classification writes are rejected. Nonactivated workspaces retain parent inputs and reject reporting inputs. Metadata-only updates preserve saved reporting. API writes do not confirm template review or approve propagation. Reporting edits require saved template and row versions; reload after 409, and never retry using an alternate request shape. In nonactivated workspaces, creates a chart from global definitions. Every system global account (see GET /api/public/v1/global-accounts, isSystem: true) must be present in accounts with isIncluded: true — otherwise the request fails with SYSTEM_ACCOUNT_VALIDATION listing all missing accounts. Set includeSystemAccounts: true to have any omitted system accounts added automatically from their global definitions. Requires API key authentication.

Tax codes: The taxCode field expects the machine code, not the human-readable tax name. Passing a name (e.g. "15% GST on Income") is stored verbatim and resolves to null wherever the code is looked up. Valid codes are NZ_GST_15_INC (15% GST on Income), NZ_GST_15_EXP (15% GST on Expenses), NZ_GST_0_NONE (No GST), and NZ_GST_0_ZERO (Zero-rated GST). Omit taxCode or set it to null to default to NZ_GST_0_NONE (No GST).

Description defaults: description is optional per account; omitting it (or null) leaves the account description empty.

Request body

application/json

  • namestringrequired
  • accountsarray of objectsrequired
    Show 15 child attributes
    • codestringrequired
    • namestringrequired
    • isIncludedbooleanrequired
    • typestring
    • subtypestringnullable
    • taxCodestringnullable

      One of: NZ_GST_15_INC, NZ_GST_15_EXP, NZ_GST_0_NONE, NZ_GST_0_ZERO, AU_GST_10_INC, AU_GST_10_EXP, AU_GST_0_NONE, AU_GST_0_INPUT, AU_GST_0_EXPORT

    • descriptionstringnullable
    • mappedCodestringnullable
    • parentCodestringnullable
    • idstring
    • clientKeystring
    • groupKeystring
    • categoryKeystringnullable
    • systemRolestringnullable
    • expectedUpdatedAtstring
  • descriptionstring
  • includeSystemAccountsboolean

Responses

201 Successful response

  • dataobjectrequired
    Show 3 child attributes
    • idstringrequired
    • namestringrequired
    • descriptionstringrequirednullable
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Validation error. `SYSTEM_ACCOUNT_VALIDATION` includes `details.missingAccounts` listing every required system account absent from the payload.
  • 401 Unauthorized
Node SDK
const { data } = await prosaic.charts.create({
  name: 'Example Ltd',
  accounts: [
    {
      code: '200',
      name: 'Example Ltd',
      isIncluded: true,
    },
  ],
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/charts \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Ltd",
    "accounts": [
      {
        "code": "200",
        "name": "Example Ltd",
        "isIncluded": true
      }
    ]
  }'

Add a single account to a chart of accounts template

POST/api/public/v1/charts/{chartId}/accounts

SDK: prosaic.charts.createAccount(chartId, params)

Discover the current workspace contract at GET /api/public/v1/report-categories before writing. In activated workspaces, included accounts need groupKey and an explicit categoryKey (null is valid for eligible group-only accounts); type derives from the group. Parent-only and mixed classification writes are rejected. Nonactivated workspaces retain parent inputs and reject reporting inputs. Metadata-only updates preserve saved reporting. API writes do not confirm template review or approve propagation. Reporting edits require saved template and row versions; reload after 409, and never retry using an alternate request shape. Adds one account to a chart of accounts template without resending the full account list. To add a legacy top-level account in a nonactivated workspace, provide its global account code; to add a legacy child account, provide code, name, and parentCode (the child code must be {parentCode}.{digits}). Activated rows use the explicit fields above and remain subject to review before reporting propagation. Requires bearer authentication.

Path parameters

  • chartIdstringrequired

Request body

application/json

  • codestringrequired
  • namestringnullable
  • parentCodestringnullable
  • taxCodestringnullable

    One of: NZ_GST_15_INC, NZ_GST_15_EXP, NZ_GST_0_NONE, NZ_GST_0_ZERO, AU_GST_10_INC, AU_GST_10_EXP, AU_GST_0_NONE, AU_GST_0_INPUT, AU_GST_0_EXPORT

  • descriptionstringnullable
  • mappedCodestringnullable
  • idstring
  • clientKeystring
  • groupKeystring
  • categoryKeystringnullable
  • systemRolestringnullable
  • expectedUpdatedAtstring

Responses

200 Successful response

  • dataobjectrequired
    Show 3 child attributes
    • idstringrequirednullable
    • codestringrequired
    • entitiesUpdatednumberrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Validation error or business rule violation
  • 401 Unauthorized
  • 404 Chart not found
  • 409 An account with this code already exists, or the code conflicts with a custom entity account
Node SDK
const { data } = await prosaic.charts.createAccount(chartId, {
  code: '200',
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/charts/$CHART_ID/accounts \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "200"
  }'

Update a chart of accounts template

POST/api/public/v1/charts/{chartId}/update

SDK: prosaic.charts.update(chartId, params)

Discover the current workspace contract at GET /api/public/v1/report-categories before writing. In activated workspaces, included accounts need groupKey and an explicit categoryKey (null is valid for eligible group-only accounts); type derives from the group. Parent-only and mixed classification writes are rejected. Nonactivated workspaces retain parent inputs and reject reporting inputs. Metadata-only updates preserve saved reporting. API writes do not confirm template review or approve propagation. Reporting edits require saved template and row versions; reload after 409, and never retry using an alternate request shape. Updates a chart of accounts template. When accounts is provided it fully replaces the template's account list (delegates to updateAccountTemplateAccounts and propagates to all entities). When accounts is omitted, only the provided template metadata (name, description) is updated and accounts are left untouched. Omit a metadata field to preserve its existing value, or send description: null to clear the description. A full replacement list in a nonactivated workspace must still contain every system account (GET /api/public/v1/global-accounts, isSystem: true) with isIncluded: true — otherwise the request fails with SYSTEM_ACCOUNT_VALIDATION listing all missing accounts. Set includeSystemAccounts: true to carry over any omitted system accounts automatically. For surgical single-account changes use the /charts/{chartId}/accounts endpoints instead. Requires API key authentication.

Tax codes: The taxCode field expects the machine code, not the human-readable tax name. Passing a name (e.g. "15% GST on Income") is stored verbatim and resolves to null wherever the code is looked up. Valid codes are NZ_GST_15_INC (15% GST on Income), NZ_GST_15_EXP (15% GST on Expenses), NZ_GST_0_NONE (No GST), and NZ_GST_0_ZERO (Zero-rated GST). Note that GET /api/public/v1/charts/{chartId} returns the human-readable name on read — convert it back to the machine code before writing.

Field preserve/clear semantics: For each account, omitting a field (description, taxCode, mappedCode) preserves its existing value, while an explicit null clears it (taxCode clears to NZ_GST_0_NONE).

Path parameters

  • chartIdstringrequired

Request body

application/json

  • namestring
  • descriptionstringnullable
  • includeSystemAccountsboolean
  • expectedUpdatedAtstring
  • accountsarray of objects
    Show 13 child attributes
    • codestringrequired
    • isIncludedbooleanrequired
    • namestring
    • descriptionstringnullable
    • taxCodestringnullable

      One of: NZ_GST_15_INC, NZ_GST_15_EXP, NZ_GST_0_NONE, NZ_GST_0_ZERO, AU_GST_10_INC, AU_GST_10_EXP, AU_GST_0_NONE, AU_GST_0_INPUT, AU_GST_0_EXPORT

    • mappedCodestringnullable
    • parentCodestringnullable
    • idstring
    • clientKeystring
    • groupKeystring
    • categoryKeystringnullable
    • systemRolestringnullable
    • expectedUpdatedAtstring

Responses

200 Successful response

  • dataobjectrequired
    Show 4 child attributes
    • idstringrequired
    • namestringrequired
    • descriptionstringrequirednullable
    • entitiesUpdatednumberrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Validation error or business rule violation. `SYSTEM_ACCOUNT_VALIDATION` includes `details.missingAccounts` listing every required system account absent from the payload.
  • 401 Unauthorized
  • 404 Chart not found
  • 409 Account code conflict - new template account codes conflict with custom accounts in entities using this template
Node SDK
const { data } = await prosaic.charts.update(chartId, {
  name: 'Example Ltd',
  description: 'Office supplies',
  includeSystemAccounts: true,
  expectedUpdatedAt: '2026-04-01',
  accounts: [
    {
      code: '200',
      isIncluded: true,
    },
  ],
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/charts/$CHART_ID/update \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Ltd",
    "description": "Office supplies",
    "includeSystemAccounts": true,
    "expectedUpdatedAt": "2026-04-01",
    "accounts": [
      {
        "code": "200",
        "isIncluded": true
      }
    ]
  }'

Update a single account in a chart of accounts template

POST/api/public/v1/charts/{chartId}/accounts/{accountId}/update

SDK: prosaic.charts.updateAccount(chartId, accountId, params)

Discover the current workspace contract at GET /api/public/v1/report-categories before writing. In activated workspaces, included accounts need groupKey and an explicit categoryKey (null is valid for eligible group-only accounts); type derives from the group. Parent-only and mixed classification writes are rejected. Nonactivated workspaces retain parent inputs and reject reporting inputs. Metadata-only updates preserve saved reporting. API writes do not confirm template review or approve propagation. Reporting edits require saved template and row versions; reload after 409, and never retry using an alternate request shape. Updates one account in a chart of accounts template without resending the full account list. Supports name, description, taxCode, mappedCode and code (rename, kept under the same parent). A code rename cascades non-destructively to every entity account derived from this template account (balances and customizations are preserved). Metadata changes follow existing propagation policy for entities using the template. Omitted fields preserve their existing values; send description: null to clear the description. accountId is the TemplateAccount ID from GET /charts/{chartId}. Reporting changes remain subject to human review before propagation. Requires bearer authentication.

Path parameters

  • chartIdstringrequired
  • accountIdstringrequired

Request body

application/json

  • expectedTemplateUpdatedAtstring
  • namestring
  • descriptionstringnullable
  • taxCodestringnullable

    One of: NZ_GST_15_INC, NZ_GST_15_EXP, NZ_GST_0_NONE, NZ_GST_0_ZERO, AU_GST_10_INC, AU_GST_10_EXP, AU_GST_0_NONE, AU_GST_0_INPUT, AU_GST_0_EXPORT

  • mappedCodestringnullable
  • codestring
  • idstring
  • clientKeystring
  • groupKeystring
  • categoryKeystringnullable
  • systemRolestringnullable
  • expectedUpdatedAtstring

Responses

200 Successful response

  • dataobjectrequired
    Show 2 child attributes
    • idstringrequired
    • entitiesUpdatednumberrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Validation error or business rule violation
  • 401 Unauthorized
  • 404 Chart or account not found
  • 409 The new code conflicts with an existing template or entity account
Node SDK
const { data } = await prosaic.charts.updateAccount(chartId, accountId, {
  expectedTemplateUpdatedAt: '2026-04-01',
  name: 'Example Ltd',
  description: 'Office supplies',
  taxCode: 'NZ_GST_15_INC',
  mappedCode: 'MAPPED_CODE',
  code: '200',
  id: 'ID',
  clientKey: 'string',
  groupKey: 'string',
  categoryKey: 'string',
  systemRole: 'string',
  expectedUpdatedAt: '2026-04-01',
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/charts/$CHART_ID/accounts/$ACCOUNT_ID/update \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expectedTemplateUpdatedAt": "2026-04-01",
    "name": "Example Ltd",
    "description": "Office supplies",
    "taxCode": "NZ_GST_15_INC",
    "mappedCode": "MAPPED_CODE",
    "code": "200",
    "id": "ID",
    "clientKey": "string",
    "groupKey": "string",
    "categoryKey": "string",
    "systemRole": "string",
    "expectedUpdatedAt": "2026-04-01"
  }'

Delete a chart of accounts template

POST/api/public/v1/charts/{chartId}/delete

SDK: prosaic.charts.del(chartId)

Deletes a chart of accounts template. Cannot delete templates with assigned entities. Requires API key authentication.

Path parameters

  • chartIdstringrequired

Responses

200 Successful response

  • dataobjectrequired
    Show 1 child attribute
    • successbooleanrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 401 Unauthorized
  • 404 Chart not found
  • 409 Cannot delete template with assigned entities
Node SDK
const { data } = await prosaic.charts.del(chartId);
curl
curl -X POST https://app.prosaic.works/api/public/v1/charts/$CHART_ID/delete \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

Delete a single account from a chart of accounts template

POST/api/public/v1/charts/{chartId}/accounts/{accountId}/delete

SDK: prosaic.charts.deleteAccount(chartId, accountId, params)

Removes one account from a chart of accounts template without resending the full account list. The removal propagates to every entity using the template. Accounts that have journal entries, child accounts, or are system accounts cannot be removed. accountId is the TemplateAccount ID from GET /charts/{chartId}. Requires API key authentication.

Path parameters

  • chartIdstringrequired
  • accountIdstringrequired

Request body

application/json

  • expectedUpdatedAtstring

Responses

200 Successful response

  • dataobjectrequired
    Show 2 child attributes
    • successbooleanrequired
    • entitiesUpdatednumberrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Account has journal entries, has children, or is a system account
  • 401 Unauthorized
  • 404 Chart or account not found
Node SDK
const { data } = await prosaic.charts.deleteAccount(chartId, accountId, {
  expectedUpdatedAt: '2026-04-01',
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/charts/$CHART_ID/accounts/$ACCOUNT_ID/delete \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expectedUpdatedAt": "2026-04-01"
  }'

List chart of accounts for an entity

GET/api/public/v1/entities/{entityId}/charts

SDK: prosaic.entityAccounts.list(entityId, params)

Returns chart account codes configured for the specified entity. Supports filtering by system accounts and excluded accounts. Requires API key authentication and entity access. reportGroup and reportCategory expose the saved reporting classification; subtype remains the legacy compatibility value and may differ from current report placement. Null category with a saved group is valid.

Path parameters

  • entityIdstringrequired

Query parameters

  • includeSystemstring

    Include system-generated accounts (GST, Rounding, Retained Earnings, etc.) in the response. Defaults to true so all account codes are available for mapping (e.g. importing a trial balance or journals). Pass includeSystem=false to exclude system accounts.

  • includeExcludedstring

    Include accounts that have been excluded from the entity's chart. When true, excluded accounts are returned with isExcluded=true flag, and their data comes from the template account.

Responses

200 Successful response

  • dataarray of objectsrequired
    Show 19 child attributes
    • idstringrequired
    • updatedAtstring
    • reportCategoryReviewedAtstringnullable
    • reportCategoryReviewVersionnumber
    • codestringrequired
    • namestringrequired
    • typestringrequired
    • subtypestringrequired
    • reportGroupobjectrequirednullable
      Show 5 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • accountTypestringrequired
    • reportCategoryobjectrequirednullable
      Show 4 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
    • taxCodestringrequired
    • descriptionstringrequirednullable
    • mappedCodestringrequirednullable
    • isSystembooleanrequired
    • systemRolestringnullable
    • parentIdstringnullable
    • isExcludedboolean
    • isIncludedboolean
    • sourcestring

      One of: template, overridden, custom

  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Bad request - missing or invalid parameters
  • 401 Unauthorized - Invalid or missing API key
  • 403 Forbidden - No access to the specified entity
  • 500 Internal server error
Node SDK
const { data } = await prosaic.entityAccounts.list(entityId);
curl
curl https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/charts \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

Create a child account in the chart of accounts

POST/api/public/v1/entities/{entityId}/charts

SDK: prosaic.entityAccounts.create(entityId, params)

Discover GET /api/public/v1/entities/{entityId}/report-categories before a write. In activated scope, create with reporting.groupKey and explicit reporting.categoryKey (null for eligible group-only accounts); omit legacy parent references. Metadata-only patches preserve reporting. Reporting updates require reporting.expected with the saved pair (or null for an unassigned account). All active workspaces must allow the write. Type derives from group. A contract mismatch or stale pair returns 409; reload and rediscover without automatically retrying a mutation. Stored subtype output remains a compatibility value.

Path parameters

  • entityIdstringrequired

Request body

application/json

  • codestringrequired
  • namestringrequired
  • taxCodestringrequired
  • reportingobject
    Show 2 child attributes
    • groupKeystringrequired
    • categoryKeystringrequirednullable
  • parentAccountIdstring
  • parentAccountCodestring
  • parentMappedCodestring
  • descriptionstringnullable
  • mappedCodestringnullable

Responses

201 Successful response

  • dataobjectrequired
    Show 19 child attributes
    • idstringrequired
    • updatedAtstring
    • reportCategoryReviewedAtstringnullable
    • reportCategoryReviewVersionnumber
    • codestringrequired
    • namestringrequired
    • typestringrequired
    • subtypestringrequired
    • reportGroupobjectrequirednullable
      Show 5 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • accountTypestringrequired
    • reportCategoryobjectrequirednullable
      Show 4 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
    • taxCodestringrequired
    • descriptionstringrequirednullable
    • mappedCodestringrequirednullable
    • isSystembooleanrequired
    • systemRolestringnullable
    • parentIdstringnullable
    • isExcludedboolean
    • isIncludedboolean
    • sourcestring

      One of: template, overridden, custom

  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Bad request - validation error or business rule violation
  • 403 Forbidden - No access to the specified entity
  • 404 Parent account not found
  • 409 Conflict - account code already exists
  • 500 Internal server error
Node SDK
const { data } = await prosaic.entityAccounts.create(entityId, {
  code: '4030.1',
  name: 'Software subscriptions',
  taxCode: 'NZ_GST_15_EXP',
  reporting: {
    groupKey: 'exp.operating',
    categoryKey: null,
  },
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/charts \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "4030.1",
    "name": "Software subscriptions",
    "taxCode": "NZ_GST_15_EXP",
    "reporting": {
      "groupKey": "exp.operating",
      "categoryKey": null
    }
  }'

Update an entity account

POST/api/public/v1/entities/{entityId}/charts/{accountId}/update

SDK: prosaic.entityAccounts.update(entityId, accountId, params)

Discover GET /api/public/v1/entities/{entityId}/report-categories before a write. In activated scope, create with reporting.groupKey and explicit reporting.categoryKey (null for eligible group-only accounts); omit legacy parent references. Metadata-only patches preserve reporting. Reporting updates require reporting.expected with the saved pair (or null for an unassigned account). All active workspaces must allow the write. Type derives from group. A contract mismatch or stale pair returns 409; reload and rediscover without automatically retrying a mutation. Stored subtype output remains a compatibility value.

Path parameters

  • entityIdstringrequired
  • accountIdstringrequired

Request body

application/json

  • reportingobject
    Show 3 child attributes
    • groupKeystringrequired
    • categoryKeystringrequirednullable
    • expectedobjectrequirednullable
      Show 2 child attributes
      • groupKeystringrequired
      • categoryKeystringrequirednullable
  • namestring
  • descriptionstringnullable
  • taxCodestring
  • mappedCodestringnullable
  • codestring

Responses

200 Successful response

  • dataobjectrequired
    Show 19 child attributes
    • idstringrequired
    • updatedAtstring
    • reportCategoryReviewedAtstringnullable
    • reportCategoryReviewVersionnumber
    • codestringrequired
    • namestringrequired
    • typestringrequired
    • subtypestringrequired
    • reportGroupobjectrequirednullable
      Show 5 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • accountTypestringrequired
    • reportCategoryobjectrequirednullable
      Show 4 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
    • taxCodestringrequired
    • descriptionstringrequirednullable
    • mappedCodestringrequirednullable
    • isSystembooleanrequired
    • systemRolestringnullable
    • parentIdstringnullable
    • isExcludedboolean
    • isIncludedboolean
    • sourcestring

      One of: template, overridden, custom

  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Validation error or business rule violation
  • 404 Account not found
Node SDK
const { data } = await prosaic.entityAccounts.update(entityId, accountId, {
  reporting: {
    groupKey: 'exp.operating',
    categoryKey: null,
    expected: {
      groupKey: 'exp.operating',
      categoryKey: 'CATEGORY_KEY_FROM_LATEST_READ',
    },
  },
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/charts/$ACCOUNT_ID/update \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reporting": {
      "groupKey": "exp.operating",
      "categoryKey": null,
      "expected": {
        "groupKey": "exp.operating",
        "categoryKey": "CATEGORY_KEY_FROM_LATEST_READ"
      }
    }
  }'

Restore a hidden/excluded template account

POST/api/public/v1/entities/{entityId}/charts/excluded/{templateAccountId}/restore

SDK: prosaic.entityAccounts.restore(entityId, templateAccountId)

Restores an excluded template account by removing the exclusion and recreating the entity account from the template. No request body required.

Path parameters

  • entityIdstringrequired
  • templateAccountIdstringrequired

Responses

200 Successful response

  • dataobjectrequired
    Show 1 child attribute
    • successbooleanrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Parent account must be restored first, or restoring would conflict with an assigned system role (SYSTEM_ACCOUNT_CONFLICT).
  • 404 Template account no longer exists (chart template may have been updated)
  • 500 Internal server error
Node SDK
const { data } = await prosaic.entityAccounts.restore(entityId, templateAccountId);
curl
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/charts/excluded/$TEMPLATE_ACCOUNT_ID/restore \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

Reset an entity account to template defaults

POST/api/public/v1/entities/{entityId}/charts/{accountId}/reset

SDK: prosaic.entityAccounts.reset(entityId, accountId)

Resets all customized fields on a template-based entity account back to the template values and clears customization flags. No request body required.

Path parameters

  • entityIdstringrequired
  • accountIdstringrequired

Responses

200 Successful response

  • dataobjectrequired
    Show 1 child attribute
    • successbooleanrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 404 Account not found
  • 500 Internal server error
Node SDK
const { data } = await prosaic.entityAccounts.reset(entityId, accountId);
curl
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/charts/$ACCOUNT_ID/reset \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

Delete or hide an entity account

POST/api/public/v1/entities/{entityId}/charts/{accountId}/delete

SDK: prosaic.entityAccounts.del(entityId, accountId)

Deletes a custom child account or hides a template-based child account by creating an exclusion. Parent accounts cannot be deleted. Accounts assigned a system role or linked to bank accounts, fixed assets or inter-entity transfers cannot be deleted.

Path parameters

  • entityIdstringrequired
  • accountIdstringrequired

Responses

200 Successful response

  • dataobjectrequired
    Show 1 child attribute
    • successbooleanrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 The account is a parent, has children or journal entries, or has an operational link that prevents deletion (DELETE_RESTRICTED).
  • 404 Account not found
Node SDK
const { data } = await prosaic.entityAccounts.del(entityId, accountId);
curl
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/charts/$ACCOUNT_ID/delete \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

List report groups and categories for the authorised workspace

GET/api/public/v1/report-categories

SDK: prosaic.reportCategories.listForWorkspace()

Returns the complete stored taxonomy for the authorised workspace's country. Parent IDs and sort order describe the group tree. Headings are structure only; isAssignable=false prevents their selection. An ordinary group may allow a null category, but bank and asset-account functions can still require one. Category placements are exact, not inherited. Examples: Operating expenses (exp.operating) is assignable with no category; Retained earnings (equ.retainedearnings) also permits a null category. Expenses (exp) is a heading and cannot be assigned. This endpoint does not change accounts. No country parameter or pagination is required.

Responses

200 Successful response

  • dataobjectrequired
    Show 6 child attributes
    • countrystringrequired
    • legacyDefaultsarray of objects
      Show 4 child attributes
      • globalAccountIdstringrequired
      • codestringrequired
      • groupKeystringrequired
      • categoryKeystringrequirednullable
    • groupsarray of objectsrequired
      Show 11 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • accountTypestringrequired
      • descriptionstringrequirednullable
      • parentIdstringrequirednullable
      • sortOrdernumberrequired
      • isHeadingbooleanrequired
      • isAssignablebooleanrequired
      • allowGroupOnlybooleanrequired
    • categoriesarray of objectsrequired
      Show 8 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • descriptionstringrequired
      • codingGuidancestringrequirednullable
      • defaultGroupIdstringrequired
      • allowedGroupIdsarray of stringsrequired
    • workspaceIdstringrequired
    • reportingInputsEnabledbooleanrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Invalid entity ID
  • 401 Missing or invalid bearer authentication
  • 403 Bearer token is pinned to another entity
  • 404 Entity not found or access denied
  • 500 Unexpected failure loading the taxonomy
  • 503 Permission service temporarily unavailable
Node SDK
const { data } = await prosaic.reportCategories.listForWorkspace();
curl
curl https://app.prosaic.works/api/public/v1/report-categories \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

List report groups and categories for an entity

GET/api/public/v1/entities/{entityId}/report-categories

SDK: prosaic.reportCategories.list(entityId)

Returns the complete stored taxonomy for the authorised entity's country. Parent IDs and sort order describe the group tree. Headings are structure only; isAssignable=false prevents their selection. An ordinary group may allow a null category, but bank and asset-account functions can still require one. Category placements are exact, not inherited. Examples: Operating expenses (exp.operating) is assignable with no category; Retained earnings (equ.retainedearnings) also permits a null category. Expenses (exp) is a heading and cannot be assigned. This endpoint does not change accounts. No country parameter or pagination is required.

Path parameters

  • entityIdstringrequired

Responses

200 Successful response

  • dataobjectrequired
    Show 5 child attributes
    • countrystringrequired
    • legacyDefaultsarray of objects
      Show 4 child attributes
      • globalAccountIdstringrequired
      • codestringrequired
      • groupKeystringrequired
      • categoryKeystringrequirednullable
    • groupsarray of objectsrequired
      Show 11 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • accountTypestringrequired
      • descriptionstringrequirednullable
      • parentIdstringrequirednullable
      • sortOrdernumberrequired
      • isHeadingbooleanrequired
      • isAssignablebooleanrequired
      • allowGroupOnlybooleanrequired
    • categoriesarray of objectsrequired
      Show 8 child attributes
      • idstringrequired
      • keystringrequired
      • namestringrequired
      • statusstringrequired
      • descriptionstringrequired
      • codingGuidancestringrequirednullable
      • defaultGroupIdstringrequired
      • allowedGroupIdsarray of stringsrequired
    • reportingInputsEnabledbooleanrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 400 Invalid entity ID
  • 401 Missing or invalid bearer authentication
  • 403 Bearer token is pinned to another entity
  • 404 Entity not found or access denied
  • 500 Unexpected failure loading the taxonomy
  • 503 Permission service temporarily unavailable
Node SDK
const { data } = await prosaic.reportCategories.list(entityId);
curl
curl https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/report-categories \
  -H "Authorization: Bearer $PROSAIC_API_KEY"

List all global accounts

GET/api/public/v1/global-accounts

SDK: prosaic.globalAccounts.list()

Returns the full system account library (global accounts). These are the master accounts from which templates are built. Requires API key authentication.

Responses

200 Successful response

  • dataarray of objectsrequired
    Show 9 child attributes
    • idstringrequired
    • codestringrequired
    • namestringrequired
    • descriptionstringrequirednullable
    • typestringrequired
    • subtypestringrequired
    • isSystembooleanrequired
    • taxCodestringrequirednullable
    • metadataanyrequired
  • metaobject
    Show 1 child attribute
    • countnumberrequired
  • 401 Unauthorized - Invalid or missing API key
Node SDK
const { data } = await prosaic.globalAccounts.list();
curl
curl https://app.prosaic.works/api/public/v1/global-accounts \
  -H "Authorization: Bearer $PROSAIC_API_KEY"