Get History Before Go-Live
GET/api/ledger/history
History before go-live is a separate register of inventory counts and supplier purchases dated before the account's inventory start date. It never creates stock takes, FIFO layers, inventory movements or journal entries. Every date must be before the inventory start date: live data covers the rest.
accounting:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Returns the months worked out from the register, per warehouse and for all warehouses, by the periodic method: COGS = opening value + purchases − closing value.
- A month end with a count of its own is
counted(full count) orpartial(partial count or estimated quantities). When the month before go-live has no historical count, the go-live opening count closes it (golive). - Between two consecutive counts, a month's COGS is
measured. Across a longer span the span's COGS is measured and then spread over its months, by the sales recorded for that warehouse (spread_by_sales) or by days (spread_evenly). Those month ends areestimated(walked forward) and always labelled as estimates. - Months before the first count, and after the last count with no go-live count, are
missing, with COGS null.
trust per month: the weaker count trust of its two month ends (full count 95, go-live count 95, partial count 60, estimated or walked forward 25) times the value-weighted cost basis of the opening, purchases and closing rows. Labels: high, medium, low, estimate, unknown. spans give each measured span's total, which carries its two counts' trust. tiles summarise the register, and findings list purchases with no warehouse, rows now on or after the start date, and negative COGS.
Authentication: Requires Bearer token + accounting.index permission.
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.