Preview Lot Write-Off Impact
GET/api/inventory-expiry/lots/:fifoLayer/write-off-impact
Preview the demotion and label-void impact of writing off a lot before committing the write-off. Read-only — mutates nothing.
Returns one row per product the write-off would consume stock for. shortfall_quantity is how much MORE than available the write-off removes (stock goes negative if greater than zero). unallocated_quantity / soft_allocated_quantity / hard_allocated_quantity split the consumed quantity into free / soft-reserved / hard-allocated (label-printed). affected_allocations[] lists the order allocations that would be consumed, highest priority first; allocation_type is soft or hard. For hard rows, fulfillment_id / carrier identify the printed shipping label and carrier_void_supported / voidable_status (voidable, or otherwise) indicate whether it can be voided through the API.
Authentication: Requires Bearer token. Scope: scope.rw:inventory + permission inventory.adjust.
Path param: fifoLayer — the FIFO layer (lot) id, route-model-bound. Query param: quantity (optional) — the portion to write off; omit to preview writing off the layer's full remaining available quantity.
Request
Responses
- 200
- 401
- 403
- 404
- 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 — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
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.