Get Impact Preview
GET/api/cost-changes/:costChange/impact-preview
Returns the side-by-side comparison a reviewer decides from. Each row in periods is one accounting month with what each convention books there: restating puts the delta back where the stock was received (restate_valuation_impact on Inventory for every unit received, then each unit already sold moves from Inventory to cost of goods in the month it shipped, as restate_cogs_impact), while going forward books the whole delta as one dated catch-up (prospective_impact, split into prospective_valuation_impact and prospective_cogs_impact). Both sides add back to the set's total delta. locked and closed mark the period's accounting status; clamped_to is the first open day a locked period's write would be displaced to.
inventory:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
prospective_anchor_options lists the days a going-forward application can anchor on: the day the change was entered, the trigger document's own date (with eligible and a reason when it is not usable), and a custom window (min_date, max_date, lock_date, in_closed_period).
restate_blocked_reason is null when restate is a real option. When it is set, restate is refused for this change everywhere - here, on apply, on switch and in bulk resolve - because one or more original receipt months are behind the accounting lock date; the sentence explains which months and where the ledger would otherwise displace the write.
blocked_by lists older pending sets that must be resolved first because they touch the same FIFO layers. preview_stale is true when another change has moved a layer's base cost since this set was staged. downstream previews stock built or transferred from the affected layers (kits, transfers) that would be re-costed too, splitting each row into the part this change causes and any pre-existing drift; supported is false with an error when the bill of materials is recursive.
Authentication: Requires Bearer token (inventory scope).
Path params:
- costChange: Cost change set ID
Query params:
- prospective_date (optional, Y-m-d): recompute the going-forward side for the day a reviewer is considering. Returns 409 when that day is before the latest original receipt, in the future, or behind the accounting lock.
Request
Responses
- 200
- 401
- 403
- 404
- 409
- 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
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.