Get Inventory Costs
Inventário com custos: the vehicles in stock at the end of the period, each with EVERY cost movement (purchase + expenses, one row per movement with its own invoice reference) and a server-computed subtotal — the JSON twin of the monthly email's "Custos" sheet (inventory_report.flatten_inventory_costs is the shared core).
Single as-of period: the cutoff is end of max(mes) of ano. Do NOT fan this out per year and merge client-side — movements carry only an UPPER date bound, so responses for different years overlap and a merge double-counts every euro. Totals come computed from here; the FE renders them and must not re-sum floats in JS. NOT cached — same reasoning as /detail (see the top of this file), and this response is strictly larger.
Query parameters
Month(s); uses max month as end-of-period cutoff
Month(s); uses max month as end-of-period cutoff
Headers
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.