Skip to main content

Preview Catch-Up Stock Takes

POST 

/api/inventory/debt/claims/stock-take-preview

Read-only preview of the catch-up stock takes that Create Catch-Up Stock Takes would raise, without raising them.

Required scope: inventory:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

A stock take cannot span warehouses, so one catch-up run fans out into ONE STOCK TAKE PER WAREHOUSE: a selection covering three warehouses produces three separate counts to review and finalise. This endpoint reports that fan-out up front, along with the exact product lines and quantities each count would carry.

Nothing is written. The preview and the create action share the same planning logic, so what is described here is what gets raised.

Request body:

  • claim_ids (array of integer, required, 1-200) - the claims to preview

Response 200:

  • data.warehouse_count (integer) - stock takes that would be created
  • data.claim_count (integer) - outstanding claims in the selection
  • data.total_units (number) - units that would be counted in overall
  • data.stock_takes[] (array) - one entry per warehouse
    • warehouse_id (integer)
    • warehouse_name (string, nullable)
    • claim_count (integer) - claims rolled into this count
    • line_count (integer) - distinct products on this count
    • total_units (number) - units counted in at this warehouse
    • lines[] (array)
      • product_id (integer)
      • sku (string, nullable)
      • product_name (string, nullable)
      • quantity (number) - positive; brings the owed units into stock

Response 422 when none of the selected claims are outstanding, so there is nothing to count in.

Request

Responses

OK

Response Headers
    Content-Type