Skip to navigation

Create a reservation

Books an arrival window in a zone for one retailer order and opens the runner task that carries the order to your bot. The window must start in the future, no more than 24 hours ahead, and run 5 to 120 minutes (deployment defaults, tunable per environment). A stall is assigned by soft hold: the active stall with the fewest open reservations overlapping your window. Capacity never rejects a booking.

The reservation is confirmed synchronously: the 201 already carries status confirmed, and a reservation.status_changed webhook with confirmed follows. It is not a duplicate.

Send Idempotency-Key to make retries safe. A retry with a key you already used returns the stored reservation with 200. A retry whose body differs from the stored reservation is 422 IDEMPOTENCY_KEY_REUSED; the arrival window is exempt, since PATCH can change it, and payload_limit is compared bound by bound. Optional retailer_pickup_ref is what the runner says at the counter (order_number when absent); optional payload_limit turns on a size and weight check before the runner collects.

Authentication

AuthorizationBearer

API key generated in the Autolane Portal. Keys are organization-scoped, carry granular permissions, and are environment-specific: a sandbox key only works against the sandbox host, and a production key only against the production host.

Headers

Idempotency-KeystringOptional1-255 characters
Retry key, 1 to 255 characters. Unique per reservation you intend to create.

Request

This endpoint expects an object.
zone_idstringRequiredformat: "uuid"
retailer_idstringRequiredformat: "uuid"

Must be actively supported in the zone (see GET /rs/v1/retailers)

order_numberstringRequired1-64 characters
end_user_namestringRequired1-120 characters
end_user_phonestringRequiredformat: "^\+[1-9]\d{6,14}$"
arrival_window_startdatetimeRequired
arrival_window_enddatetimeRequired
retailer_pickup_refstringOptional1-64 characters

What the runner says at the retailer counter to collect the order. Falls back to order_number when absent.

payload_limitobjectOptional

Size and weight the bot compartment accepts. Sent on create and echoed on every read; its presence turns on the runner’s pre-collect check at the counter. Every measure is positive and at most 1000 (kilograms or centimetres).

Response

Idempotent replay: this Idempotency-Key already created a reservation, which is returned unchanged

successboolean
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error