Costing
List Cost Entries
Returns a paginated list of cost entries, newest cost date first by default.
Create Cost Entry
Creates a cost entry.
Get Cost Entry
Returns a cost entry with its allocations and amortization schedule (including periods and the resolved allocation target).
Update Cost Entry
Updates a cost entry. All fields are optional; only provided fields are changed.
Delete Cost Entry
Deletes a cost entry and its allocations.
List Cost Entry Allocations
Returns all allocations recorded against the cost entry, including the allocated target (product, brand, supplier, sales channel or sales order line) and any amortization linkage.
Delete Cost Entry Allocations
Deletes all allocations for the cost entry, returning its full amount to unallocated.
Create Amortization Schedule
Creates an amortization schedule for a cost entry, spreading its amount across future periods. Each period, when processed, allocates its share to the configured target. A cost entry can have only one schedule.
List Cost Allocations
Returns a paginated list of cost allocations. A cost allocation assigns part (or all) of a cost entry's amount to a target entity - a product, brand, supplier, sales channel or sales order line - for landed cost and profitability reporting.
Create Cost Allocation
Creates a single cost allocation directly, assigning part (or all) of a cost entry's amount to a target entity. This is the low-level create: the caller supplies both currency amounts and the proration metadata explicitly. For most integrations the allocate endpoints under /api/cost-entries/{cost_entry}/allocate/... are simpler - they compute the account-currency amount and proration weights automatically.
Get Cost Allocation
Returns a single cost allocation by ID, including a summary of the target entity (allocatable). The summary fields depend on the target type: products include name and sku; brands, suppliers and sales channels include name; sales order lines include sales_order_id, product_id, product_name and quantity. amount is in the parent cost entry's currency and amount_in_tenant_currency is the equivalent in the account currency.
Delete Cost Allocation
Deletes a cost allocation and recalculates the parent cost entry's allocation status, freeing the amount to be allocated again.
Allocate Cost Entry to Product
Allocates part of a cost entry to a specific product. The allocation feeds into landed cost and profitability reporting.
Allocate Cost Entry to Brand
Allocates part of a cost entry to a product brand.
Allocate Cost Entry to Supplier
Allocates part of a cost entry to a supplier.
Allocate Cost Entry to Sales Channel
Allocates part of a cost entry to a sales channel.
Allocate Cost Entry to Sales Order Line
Allocates part of a cost entry to a specific sales order line.
Allocate Cost Entry by Proration
Allocates a cost entry across a custom list of products, splitting the amount by the chosen proration strategy.
Allocate Cost Entry to Purchase Order
Allocates the cost entry across the lines of a purchase order, creating one allocation per product using the chosen proration strategy (default cost_based).
Allocate Cost Entry to Sales Order
Allocates the cost entry across the lines of a sales order, creating one allocation per product using the chosen proration strategy (default revenue_based).
Allocate Cost Entry to Warehouse Transfer
Allocates the cost entry across the lines of a warehouse transfer, creating one allocation per product using the chosen proration strategy (default quantity_based).
Allocate Cost Entry to Inventory Assembly
Allocates the cost entry across the component lines of an inventory assembly, creating one allocation per product using the chosen proration strategy (default cost_based).
Allocate Cost Entry to Stock Take
Allocates the cost entry across the items of a stock take, creating one allocation per product using the chosen proration strategy (default quantity_based).
List Cost Entry Types
Returns all cost entry types, ordered alphabetically by name. Cost entry types are user-defined categories used to classify cost entries (for example Freight, Duty, Warehousing) for landed cost and profitability tracking.
Create Cost Entry Type
Creates a new cost entry type.
Get Cost Entry Type
Returns a single cost entry type by ID.
Update Cost Entry Type
Updates the name of an existing cost entry type. Cost entries already assigned to the type keep their assignment and reflect the new name.
Delete Cost Entry Type
Deletes a cost entry type.
Get FIFO Layer
Returns a single FIFO layer by ID with related product and warehouse data.
Archive FIFO Layer
Archives a single FIFO layer. Only fully utilized layers (available_quantity === 0) can be archived.
Unarchive FIFO Layer
Unarchives a previously archived FIFO layer.
Bulk Archive FIFO Layers
Archives multiple FIFO layers by ID. Only fully utilized layers are archived; partially available layers are skipped.
Bulk Unarchive FIFO Layers
Unarchives multiple FIFO layers by ID.
Check FIFO Layers Archivable
Checks whether each specified FIFO layer can be archived (i.e., available_quantity === 0). Returns a per-layer result with archivable flag and reason.
Get FIFO Layer Inventory Movements
Returns a paginated list of inventory movements linked to a specific FIFO layer.
Get FIFO Layer Activity Log
Returns a paginated activity log for a specific FIFO layer. Shows who changed the layer and what was changed.
Recalculate Total Costs
Recalculates the total_cost field for the specified FIFO layers. Useful after manual avg_cost corrections.
Get FIFO Layer Parents
Returns the immediate (depth-1) parent FIFO layers consumed to produce the given output layer, with the aggregated quantity consumed from each parent. Used by the FIFO Layer detail page's 'Consumed From' panel to render the upstream lots that were assembled into this batch.
List FIFO Layers
Returns a paginated list of FIFO layers. Supports filtering, sorting, and column inclusion/exclusion.
List SKU COGS Health
Returns paginated SKU COGS health metrics. Each item includes unit cost, initial COGS, statistics (min/max/median/avg/variation), and inventory totals.
Search SKU COGS Health
Returns the same paginated per-SKU COGS health table as the GET version of this endpoint, but accepts its parameters in a JSON request body. Each row aggregates a product's cost-of-goods statistics (min, max, median, average, and percentage variation) across its active FIFO cost layers, alongside current inventory totals.
Get SKU COGS Health Summary
Returns aggregate summary statistics for the COGS health dashboard — totals across all SKUs matching the given filters.
Get SKU COGS Health Detail
Returns detailed COGS health metrics for a specific product by product ID.
Get All Value Sources
Returns paginated COGS value sources across all products.
Get Warehouse Breakdown
Returns the COGS warehouse breakdown for a specific product, showing how inventory and cost is distributed across warehouses.
Get Initial Inventory
Returns the initial inventory breakdown by warehouse for a specific product.
Get FIFO Layers
Returns current active FIFO layers for a specific product, optionally filtered by warehouse.
Get FIFO Layers Timeline
Returns paginated FIFO layer parent records (timeline) for a specific product. Used to show the historical sequence of inventory additions.
Get Layer Consumptions
Returns paginated consumption records for a specific FIFO layer. Shows how the layer's quantity was consumed over time.
Get Consumption Timeline
Returns paginated consumption timeline for a specific product — all historical consumption events in chronological order.
Recalculate SKU COGS
Queues a COGS recalculation for all FIFO layers of a specific product as a background job. The request returns immediately with a `tracked_job_log_id` you can use to track progress; the updated costs land once the job completes. Returns a message only (no `tracked_job_log_id`) when the product has no FIFO layers to recalculate.
Export SKU COGS Health
Export SKU COGS health metrics as spreadsheet-ready JSON rows. Unlike file-download exports, this endpoint returns the rows in the JSON response body (keyed by column heading) so the caller can save them as CSV/XLSX. Returns up to 10,000 products.
List Inventory Revaluations
List the inventory revaluation ledger (paginated). Every FIFO-layer cost change writes one dated row here.
Search COGS Revaluations
Returns the same paginated inventory revaluation ledger as the GET version of this endpoint, but accepts filters as a JSON request body instead of the query string. Use this POST variant when the filter set is too large or too complex to fit in a URL (for example, deeply nested AND/OR filter groups or long lists of values).
Get Variation by Product Report
Returns a report of products whose COGS varies significantly across FIFO layers. Products with cost variation above the threshold are flagged for revaluation review.
Get Product COGS Report
Returns a detailed COGS report for a specific product, including all FIFO layers and their costs.
Get FIFO Layer COGS Report
Returns a detailed COGS report for a specific FIFO layer including cost history and revaluation events.
Get Bulk FIFO Layer COGS Report
Returns COGS reports for multiple FIFO layers in a single request.
Revalue FIFO Layer
Revalues a single FIFO layer to a new unit cost, creating an InventoryRevaluation record.
Bulk Revalue FIFO Layers
Revalues multiple FIFO layers in a single request.
Rebuild COGS for Product
Rebuilds COGS (recalculates FIFO layer costs from source documents) for a single product. This is a synchronous operation.
Rebuild COGS for Multiple Products
Rebuilds COGS for multiple specific products synchronously. Returns per-product success/failure summary.
Start Tracked COGS Rebuild
Starts a background tracked COGS rebuild job for all products (or a filtered subset). Returns a tracked_job_id to poll for progress.
Get Tracked Job Status
Polls the status and progress of a tracked COGS rebuild job.
Get Unified Tracking Data
Returns combined job status, recently rebuilt products, FIFO layer changes, and failed products in a single call. Replaces polling multiple endpoints.
Cancel Tracked Rebuild
Cancels a running tracked COGS rebuild job. Cancels all associated batch jobs and marks the tracked job as cancelled.
Get Recently Rebuilt Products
Returns a list of products that have had their COGS rebuilt recently. Used for monitoring rebuild progress.
Export FIFO Layer Changes CSV
Exports FIFO layer cost changes from a tracked rebuild job as a CSV file download.