Docs

Replace Reservation

POST /Reservations/{reservationId}/replace

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

FieldTypeRequiredDescription
reservationIduuidRequired

Request Body

FieldTypeRequiredDescription
outgoingStatusstringOptional
swapAtdate-timeRequired
resourceIduuidOptional
orgResourceIduuidOptional

Response

FieldTypeDescription
reservationIduuid
coveringsAddReservationResponseCovering[]| null
outsideWindowboolean

AddReservationResponseCovering

FieldTypeDescription
orderIduuid
orderLineItemIduuid
procurementResourceIduuid