Costing
List FIFO Layers (DataTable)
Returns a paginated list of FIFO layers using the DataTable system. Supports filtering, sorting, and column inclusion/exclusion.
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 if FIFO Layers are 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 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.
Get SKU COGS Health Summary
Returns aggregate summary statistics for the COGS health dashboard — totals across all SKUs matching the given filters.
Show 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
Recalculates COGS for all FIFO layers of a specific product. This is a synchronous operation.
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.
Get SKU COGS Health Summary
Returns aggregate summary statistics for the COGS health dashboard — totals across all SKUs matching the given filters.
Show 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
Recalculates COGS for all FIFO layers of a specific product. This is a synchronous operation.
List Inventory Revaluations
List the inventory revaluation ledger (paginated). Every FIFO-layer cost change writes one dated row here.
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 FIFO layer analysis and outlier detection.
Get FIFO COGS Report
Returns a detailed COGS report for a specific FIFO layer.
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 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
Returns the status and progress of a tracked COGS rebuild job, including batch progress details.
Get Unified Tracking Data
Unified endpoint that combines tracked job status, recently rebuilt products, and FIFO layer changes into a single response. Replaces separate calls to tracked-job and recently-rebuilt-products.
Cancel Tracked Rebuild
Cancels a running tracked COGS rebuild job. Cancels all associated batch jobs and marks the tracked job log 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 for a tracked rebuild job as a CSV file. Returns a file download.
Get Variation by Product Report
Returns a report of products with COGS variation above the specified threshold.
Get Product COGS Report
Returns a detailed COGS report for a specific product including FIFO layer analysis and outlier detection.
Get FIFO COGS Report
Returns a detailed COGS report for a specific FIFO layer.
Get Bulk FIFO COGS Report
Returns COGS reports for multiple FIFO layers at once.
Revalue FIFO Layer
Revalues a single FIFO layer to a new unit cost, creating an InventoryRevaluation record.
Bulk Revalue FIFO Layers
Bulk revalues multiple FIFO layers at once using BulkCreateInventoryRevaluationData.
Rebuild COGS for Product
Rebuilds COGS for a single product. This is a synchronous operation.
Rebuild COGS for Multiple Products
Rebuilds COGS synchronously for multiple specific products.
Start Tracked COGS Rebuild
Starts a tracked background COGS rebuild job for all or specific products. Returns a tracked_job_id for polling progress.
Get Tracked Job Status
Returns the status and progress of a tracked COGS rebuild job, including batch progress details.
Get Unified Tracking Data
Unified endpoint that combines tracked job status, recently rebuilt products, and FIFO layer changes into a single response. Replaces separate calls to tracked-job and recently-rebuilt-products.
Cancel Tracked Rebuild
Cancels a running tracked COGS rebuild job. Cancels all associated batch jobs and marks the tracked job log as cancelled.
Get Recently Rebuilt Products
Returns products that had their COGS rebuilt since the given timestamp.
Export FIFO Layer Changes (CSV)
Exports FIFO layer cost changes for a tracked rebuild job as a CSV file. Returns a file download.
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.
Revalue FIFO Layer
Revalues a specific FIFO layer with a new unit cost. Creates an InventoryRevaluation record and updates the layer cost.
Rebuild COGS for Product
Rebuilds COGS (recalculates FIFO layer costs from source documents) for a single product. This is a synchronous operation.
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.
Export FIFO Layer Changes CSV
Exports FIFO layer cost changes from a tracked rebuild job as a CSV file download.