Skip to main content

Get Accounts for Products

GET 

/api/products/accounts

The resolved GL accounts and their source for up to 200 products in one call. data is keyed by product id; each value has the same per-type shape as Get Product Accounts. Unknown ids are left out.

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.

Each account type (sales, cogs, inventory, inventory_in_transit, accrued_purchases, discount) returns:

  • account — {id, code, name, type, is_archived} the product posts to at product level, or null.
  • source — why: product_override (the product's own account), rule (an account rule), company_default, or unmapped (no account).
  • rule — {id, name} of the rule that matched for this type, or null.
  • override_account_id — the product's own override, whether or not it won.
  • rule_would_apply — a rule sets this type for the product (so clearing the override would hand it to that rule); rule_account is that rule's account.
  • detail — an explanatory note, e.g. that a sales channel can still set its own Sales, COGS or Discount account for orders on that channel.

Request​

Responses​

OK

Response Headers
    Content-Type