Create a reservation

Books an arrival window in a zone for one retailer order. A stall is assigned by soft hold: the active stall holding the fewest reservations that overlap your window and are not yet completed or canceled. Capacity never rejects a booking, so a busy zone stacks reservations on its least loaded stall. Arrival windows must start in the future, start no more than 24 hours ahead, and be between 5 and 120 minutes wide; those three limits are deployment defaults and can be tuned per environment. In this version a reservation is confirmed synchronously, so the response already carries status "confirmed". That confirm is a real status change, so a successful create also fires a reservation.status_changed webhook carrying status "confirmed" for the reservation you just got a 201 for. Expect it; it is not a duplicate. Send the optional Idempotency-Key header to make retries safe: a retry with a key you already used returns the stored reservation with 200 instead of creating a second one. A retry whose zone, retailer, order number, end user name, end user phone, or open link differs from the stored reservation is rejected with 422 IDEMPOTENCY_KEY_REUSED; the arrival window is excluded from that comparison because it can be changed later with PATCH.

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

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

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