What-if calculation

POST/api/v1/inventory/production/runs/{run_id}/calculate

Recalculate costs without persisting. Override total_units and/or unit_sale_price.

Operation ID: calculate_run_api_v1_inventory_production_runs__run_id__calculate_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Path

run_idstringrequired

Request body

total_unitsinteger
unit_sale_priceinteger

Responses

201Successful Response

successboolean
messagestring
codestring
dataCostBreakdown

404Not Found - Resource does not exist

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject