POST/Reservations/{reservationId}/replace
Swaps who fills a slot in one call, ending the outgoing reservation as NoShow or Released at swapAt and reserving
its successor on the same need; returns the successor's id. Use it when someone no-shows or leaves; an order hold
changes through its order instead.
swapAt (flat UTC, required) must fall inside the outgoing's shift window: the outgoing keeps its shifts before it
and loses its unedited seeded blocks after it, and the successor's shifts start there. NoShow marks the outgoing's
unrecorded shifts no-show; a goods hold can only be Released. A Planning successor is reserved through the
outgoing's order (its line grows by the successor's units), which needs Order.Edit on that order and is refused on
a closed or payload-locked order. On a need with no schedule blocks the successor takes the outgoing's reservation
spans from swapAt on, and the swap is refused when none reach past swapAt. Name the successor with
resourceId or orgResourceId, or send neither for an unnamed hold (of 1 for a named slot, of the same quantity for
a quantity hold, which takes a name only when it holds 1). Naming a Planning successor needs organization access
(403 with an event token alone). Ids come from Reservations_GetReservations. coverings
and outsideWindow are as for Reservations_AddReservation, for the successor.
Path Parameters
| Field | Type | Required | Description |
|---|
| reservationId | uuid | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| outgoingStatus | string | Optional | |
| swapAt | date-time | Required | |
| resourceId | uuid | Optional | |
| orgResourceId | uuid | Optional | |
Response
| Field | Type | Description |
|---|
| reservationId | uuid | |
| coverings | AddReservationResponseCovering[]| null | |
| outsideWindow | boolean | |
AddReservationResponseCovering
| Field | Type | Description |
|---|
| orderId | uuid | |
| orderLineItemId | uuid | |
| procurementResourceId | uuid | |