Skip to main content

Get Account Map

GET 

/api/product-account-map

Where the active catalog posts for one account type, as a grid of groups × accounts. Each product counts once, at its product-level account (override, rule or company default).

Required scope: accounting:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token with the accounting:read scope.

Response (data):

  • account_type, group_by.
  • totals — active_products, accounts_in_use, on_company_default, anomalies.
  • company_default — {id, code, name, archived_at} or null.
  • has_rules_or_overrides — whether any rule or product override sets this account type.
  • columns — accounts in use (ordered by code), then the company default (key: default), then key: unmapped when some products resolve to no account: {key, account, is_company_default}.
  • rows — one per group, largest first, with a trailing "(no …)" row (id: null) for products without a value: {id, name, product_count, cells}. cells is keyed by column key: {count, sources: {rule|product_override|company_default|unmapped: count}, anomalies}. When grouped by category, rows are top-level categories with children for their direct sub-categories (plus a "(directly)" row for products on the top-level category itself).
  • channel_note — for Sales, COGS and Discount, a reminder that a sales channel can set its own account (null otherwise).

Request​

Responses​

OK

Response Headers
    Content-Type