updateInventoryReservation
Use for either the canceling of a reservation or for adding items to an existing reservation document. This endpoint references the reservation document directly, marking it as cancelled or adding the items, and then adjusting the reservation and inventory counts based on the details of the reservation document.
Calls the updateReservation endpoint exposed by SCAPI. *
Signature
export declare function updateInventoryReservation(
props: ReservationUpdateParams
): Promise<ReservationUpdateResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | ReservationUpdateParams | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
Returns a representation of the reservation update attempt result.
Referenced Types
ReservationUpdateParamsReservationUpdateResponse
Examples
Cancel a reservation.
import { sdk } from '~/sdk.config.ts';
const data: ReservationUpdateParams = {
"reservationId": "12345-23456-3456-4567-5678",
"status": "CANCELLED",
};
const result = await sdk.commerce.updateInventoryReservation(data);