Skip to main content

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.

Required scope: accounting:read

Grant 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) or partial (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 are estimated (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​

OK

Response Headers
    Content-Type