Preview Chain Re-date
POST/api/v2/inventory/fifo-chain/preview-redate
Preview the FIFO chain impact of RE-DATING existing stock layers to a proposed date (e.g. editing a receipt's or adjustment's date). Reports which later transactions would be re-anchored to keep true chronological FIFO, per affected product/warehouse/condition pool.
inventory:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Advisory only — it never blocks a save.
Request fields:
fifo_layer_ids[](required, min 1) — the stock layers being re-datedproposed_date(required) — the new date (ISO date)
Response: same row shape as Preview Chain Discrepancy.
locked_period_until (date|null) — the accounting lock date when locked_period_blocked is true; the affected transactions carry accounting entries in the locked period and cannot be rechained until the lock date is moved earlier.
Each changes_preview row also carries in_locked_period (bool - the transaction's accounting entries fall inside the locked period), movement_id (the consuming inventory movement), movement_type, and parent_link_id/detail_link_id (the underlying document ids, e.g. the sales order for a sales order line) so clients can link each affected transaction to its source document.
Request
Responses
- 200
- 401
- 403
- 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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.