Inventory Recon Accounts (Earmark Suggestions)
GET/api/ledger/reconciliation/inventory/accounts
Candidate inventory control accounts for the daily reconciliation earmark step. Pulls SKU's current-asset nominal codes (plus any warehouse-mapped account), cross-references the provider's cached current-asset chart (Xero xero_accounts, matched by code — no live provider call), computes each account's point-in-time SKU inventory value as-of now, and flags which look like inventory accounts. Suggested-then-code ordered.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Authentication: Requires Bearer token.
Row fields: nominal_code_id, code, sku_name, sku_type, provider_account_name, provider_account_type, provider_account_id (nullable when no provider match), warehouse_count, warehouse_names[], is_earmarked (the user's persisted decision), is_suggested (heuristic), suggestion_reasons[] (strongest first: warehouse-mapped, SKU type Inventory, provider type Inventory, name looks like inventory), current_sku_value (null when no warehouse — and therefore no SKU inventory — maps to it). current_sku_value sums THREE valuation subsystems, because inventory does not all live in one place: standard warehouse stock (fifo_layers), Amazon FBA stock, and Amazon AWD stock (both in amazon_fifo_layers). An AWD or FBA control account therefore shows its real value here rather than $0 — before AWD was folded in, the one account that most needed earmarking looked like an empty one.
Request
Responses
- 200
- 401
- 403
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.