Skip to main content

Preview Closed Stock Takes

POST 

/api/inbound-shipments/receive/preview-closed-stock-takes

Dry-run check of whether a receipt is dated before a closed stock take. This endpoint only reads data: it does not create a receipt or move any stock.

Required scope: purchase-orders:write

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

Authentication: Requires Bearer token.

Send the same payload you would post to Receive Shipment. The response lists every closed full count of the default condition, dated on a later day than received_at, that covered a product this receipt adds at the warehouse it lands in. An empty data means Receive Shipment will not refuse the receipt for this reason.

Fields:

  • purchase_order_id (optional): Purchase order being received. Used to infer the warehouse when warehouse_id is omitted.
  • warehouse_id (optional): Warehouse the stock is received into.
  • received_at (required): Date of the hypothetical receipt.
  • receipt_lines (optional): Lines being received. Lines with a negative quantity are ignored. When omitted, every outstanding line on the purchase order is checked.
  • unexpected_items (optional): Unexpected products being received.

Response:

  • data[].stock_take_id: The closed stock take
  • data[].date_count: The day it was counted, in the tenant's timezone
  • data[].warehouse_id, data[].warehouse_name: Where it was counted
  • data[].skus: The receipt's products that the count covered

Request​

Responses​

OK

Response Headers
    Content-Type