Place an in-store hold (réservation)
Sets aside a quantity of a sellable unit for a customer (réservation) until holdUntil (sent as an ISO 8601 string). The hold is an INTENT to reserve stock — the actual stock decrement lives in inventory/checkout, never here. The CALLER supplies the reservation id — it must be unique, so choose a stable, collision-free identifier (a duplicate is rejected with a 409, never silently merged). Created in the held state; the actor and held-at instant are stamped server-side. 409s on a duplicate id; 422s when holdUntil is not in the future.
Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Body
Caller-supplied unique reservation (réservation) id; a duplicate 409s.
1The sellable unit (SKU) being held.
^[0-9a-f]{64}$Customer the unit is held for.
1Store the hold is placed in.
1Number of units to set aside (positive).
0 < x <= 9007199254740991ISO 8601 hold deadline; must be in the future.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Optional reference to the acompte securing the hold.
1Response
The placed hold at status held.
The placed hold at status held.
-9007199254740991 <= x <= 9007199254740991^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$held, fulfilled, cancelled, expired ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
