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
Get FIFO Layer
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. Only fully utilized layers (available_quantity = 0) can be archived. Use apply_to_all with filters to archive all matching layers.
Bulk Unarchive FIFO Layers
Unarchives multiple FIFO layers.
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.
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 FIFO inventory layers originating from this warehouse transfer.
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.
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 Product COGS Report
Returns a detailed COGS report for a specific product including FIFO layer analysis and outlier detection.
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 single FIFO layer to a new unit cost, creating an InventoryRevaluation record.
Rebuild COGS for Product
Rebuilds COGS for a single product. This is a synchronous operation.
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.
Export FIFO Layer Changes (CSV)
Exports FIFO layer cost changes for a tracked rebuild job as a CSV file. Returns a file download.