Skip to main content

Record one scan on a package journey (RecordScan)

POST 

/journeys/:trackingNumber/scans

RecordScan over REST. Scans apply in time order; an older scan is stored but does not move the state (409 scan-out-of-order, the scan is kept with applied=false). A scan whose scanType has no edge from the current state is stored with applied=false and answers 409 illegal-transition. A known scanId answers 409 duplicate-scan and stores nothing. A closed journey answers 409 journey-closed. The two refusals that keep the scan (scan-out-of-order, illegal-transition) are stored under the Idempotency-Key together with the scan, so a retry under the same key replays the refusal and never answers duplicate-scan.

Request​

Responses​

Scan applied; the journey after the scan.

Response Headers
    Idempotency-Replayed

    Present, with the value true, only when the response is a replay of the answer stored for the Idempotency-Key.