Apply Cost Change
POST/api/cost-changes/:costChange/apply
Applies a cost change awaiting review, writing the staged deltas onto the affected FIFO layers, re-costing anything built or transferred from them, and posting the revaluations to the ledger. The cost is re-derived from the live documents at apply time, so a stale preview never produces a stale write.
inventory:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
resolution chooses the dating: restate records each layer's delta on its original receipt date, re-reporting those months; prospective books the whole delta on a single day going forward.
For prospective, prospective_anchor picks that day: entered (the day the change was entered - the default), document (the trigger document's own date, only when it is later than the latest original receipt) or custom (a day you choose in prospective_date, which must be on or after the latest original receipt, not in the future and after the accounting lock). Each layer is still clamped to no earlier than its own receipt.
Responds 422 when resolution is restate and any of the set's original receipt months are behind the accounting lock date - the message is the same restate_blocked_reason the listing and previews show - or when an older pending change touches the same FIFO layers and must be resolved first. Responds 409 when the change is not awaiting review, or the chosen posting day is outside the allowed window.
Authentication: Requires Bearer token (inventory scope) and permission to resolve cost changes.
Path params:
- costChange: Cost change set ID
Body fields:
- resolution (required): restate or prospective
- prospective_anchor (optional): entered, document or custom; defaults to entered. Ignored for restate
- prospective_date (optional, Y-m-d): required when prospective_anchor is custom
- notes (optional, max 2000 chars): recorded on the decision
Request
Responses
- 200
- 401
- 403
- 404
- 409
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Conflict
Response Headers
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.