Skip to main content

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.

Required scope: inventory:write

Grant 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-dated
  • proposed_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

OK

Response Headers
    Content-Type