Reserve a variant in a physical store (« Réservation en boutique »)
Reserves ONE variant (e.g. a shoe size) in ONE store of ONE vendor; the shopper collects and pays in the store. No online payment, no stock decrement (ERP stock is read-only).
The server re-checks what the product page showed, via the same resolution as GET /public/variant-availability: the vendor offers the variant, the vendor shows store stock (showsStoreStock = per-depot feed AND the store_stock offer capability), the store is listed for that variant with a status other than out_of_stock, and the warehouse is active and belongs to the vendor. Otherwise 409 STORE_UNAVAILABLE. The seller's product must also be ACTIVELY listed on this marketplace (not paused, rejected or retired, vendor not suspended or terminated), otherwise 404 NOT_FOUND.
productId / variantId may be the seller's own pair (vendors[].productId / vendors[].variantId from variant-availability) or the page's canonical pair; the reservation always stores the seller's own variant. unitPrice is a snapshot of the seller's selling price (same pricer as checkout, never the raw price column).
Holds 48 h from creation; when the store marks it ready, 48 h from then. Overdue pending/confirmed/ready reservations become expired (15-minute sweep). At most 3 active reservations per phone number per vendor (429 RESERVATION_LIMIT). Phone: Tunisian, 8 digits; +216 / 00216 / 216 prefixes, spaces, dots and dashes accepted; stored as +216XXXXXXXX.
Guest-friendly: a customer Bearer links the reservation to that customer (never a body field). Per-IP rate limit. Optional Idempotency-Key header: a repeat returns the existing reservation with 200.
Notifies the vendor (bell + email, store_reservation_created) and emails the shopper when email is given.
Errors: { ok:false, error:{ code, message }, message }.
Auth: Bearer JWT optional (guest-friendly).
Authorizations
Jeton client obtenu par POST /auth/login (ou /auth/register), renouvelé par POST /auth/refresh.
Parameters
Header Parameters
Replays the reservation already created for this marketplace/key (200) instead of creating a duplicate.
Request Body
Responses
Idempotent replay — the reservation already existed for this Idempotency-Key