moveInventoryReservation
Moves reservation quantities between a group and its locations, or between locations. The system does not support transfers between groups. In the case of All or Nothing movements, only Group to Location movements are allowed.
Calls the moveReservationQuantity endpoint exposed by SCAPI. *
Signature
export declare function moveInventoryReservation(
props: ReservationMoveParams
): Promise<ReservationMoveResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | ReservationMoveParams | 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 move attempt result.
Referenced Types
ReservationMoveParamsReservationMoveResponse
Examples
Move a reservation.
import { sdk } from '~/sdk.config.ts';
const data: ReservationMoveParams = {
"allOrNothingTransferId": "a14s-4b1c-1a3cbd4",
"records": [
{
"id": "82251928-8863-488e-840b-2aebd10b35ed",
"externalRefId": "7282822-9823-aaa",
"from": {
"location": "warehouse4"
},
"to": {
"location": "warehouse5"
},
"sku": "sku-001",
"quantity": 2.011
},
{
"id": "82251928-8863-488e-840b-2aebd10b57ba",
"externalRefId": "7282822-9823-bbb",
"from": {
"group": "UnitedStates"
},
"to": {
"location": "warehouse5"
},
"sku": "sku-002",
"quantity": 7.132,
"ignoreAvailabilityCheck": true
},
{
"id": "12345-23456-3456-4567-5678-6F6F",
"externalRefId": "1234561-3574-6B6D",
"from": {
"location": "warehouse5"
},
"to": {
"group": "UnitedStates"
},
"sku": "sku1000",
"quantity": 5.417
}
]
};
const result = await sdk.commerce.moveInventoryReservation(data);