stations

Record a scan

A worker scanned a parcel. Every order under that tracking number still sitting at ASSIGNED moves to IN_PRODUCTION together, because the floor works a box, not a line.

This is the code the station screen itself runs, so the gate, the status move and the seller's webhook are the same whichever door you come through.

A parcel of more than 20 orders answers with meta.requires_confirmation and moves nothing. Send it again with confirmed: true once a human has agreed — and if you are replaying a queue, carry the answer the operator gave at the time rather than deciding it now.

Idempotency-Key is REQUIRED. This endpoint is built for an unattended replayer, and a retry must not scan twice.

post/stations/scan

Request

  • Base URL: https://0.0.0.0:3000/api/v1
  • URL: https://0.0.0.0:3000/api/v1/stations/scan
  • Auth: API key in header x-api-key

Headers

Idempotency-Keystring required

Required. Any unique string; reuse it for every retry of the same scan.

Request body

modestring required

tracking matches a tracking number; order names one order id and widens to its parcel.

valuestring required

The scanned code. A tracking number is at least 10 characters; an order id is digits.

confirmedboolean

true to go past the 20-order confirmation gate.

occurred_atstring

When the worker scanned, if that is not now — an offline queue replaying. ISO-8601, no more than 5 minutes ahead of our clock and no more than 30 days old. It reaches the seller as occurred_at and is recorded beside our own timestamp, never instead of it.

Response

The parcel as it now stands, with every order in it. meta.requires_confirmation is null unless the gate stopped the scan.

Changes

No recorded changes to this operation across all 1 revision of this API.