Reservations API Routes
A reservation is unavailable quantity of an inventory item in a location.
A reservation is created automatically for variants in an order whose manage_inventory is enabled. Admin users can also create reservations manually.
These API routes allow admin users to manage reservations.
GET /admin/reservations#
List Reservations
Retrieve a list of reservations. The reservations can be filtered by fields such as id. The reservations can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.location_idstring | string[]Optionalinventory_item_idstring | string[]Optionalline_item_idstring | string[]Optionalcreated_bystring | string[]Optionaldescriptionstring | objectOptionalq query parameter instead. Accepts the filter operators.created_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptionalwith_deletedbooleanOptionalqstringOptionalquantityobjectOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberreservationsobject[]The list of reservations.
reservationsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/reservations#
Create Reservation
Create a reservation.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
line_item_idstringOptionallocation_idstringinventory_item_idstringquantitynumberdescriptionstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
reservationobjectThe reservation's details.
reservationobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
reservation-item.created: Emitted when reservations are created.
GET /admin/reservations/{id}#
Get a Reservation
Retrieve a reservation by its ID. You can expand the reservation's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
reservationobjectThe reservation's details.
reservationobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/reservations/{id}#
Update a Reservation
Update a reservation's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
location_idstringOptionalquantitynumberOptionaldescriptionstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
reservationobjectThe reservation's details.
reservationobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
reservation-item.updated: Emitted when reservations are updated.
DELETE /admin/reservations/{id}#
Delete a Reservation
Delete a reservation.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "reservation"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
reservation-item.deleted: Emitted when reservations are deleted.