Skip to main content

Allocate Cost Entry to Inventory Assembly

POST 

/api/cost-entries/:costEntry/allocate/inventory-assembly/:inventoryAssembly

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).

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Fields: strategy (optional proration strategy: straight_line, front_loaded, back_loaded, revenue_based, cost_based, weight_based, volume_based, quantity_based, specific_line, manual), amount (optional - defaults to the cost entry's unallocated amount), allocation_date (defaults to today), period_start and period_end.

Authentication: Requires Bearer token.

Returns 422 when none of the document's lines has the measure the chosen strategy divides by (for example no product has a weight under weight_based); the message names the missing measure and nothing is allocated.

Request​

Responses​

OK

Response Headers
    Content-Type