Reservations
Search reservations
To search for reservations, execute the following POST request with a JSON body.
POST https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/reservations/search{
"query": {
"tenantArticleId": {
"eq": "11111"
},
"facilityRef": {
"eq": "d083f631-9f4c-463b-85d4-9414fb19239f"
},
"relatedRefs": {
"routingPlanRefs": {
"contains": {
"eq": "85d25d89-f8a7-4600-9082-0d8b2d89a6af"
}
}
}
}
}The example above searches for reservations matching a specific tenantArticleId, facilityRef, and routingPlanRef.
Reservations actions
The reservation actions endpoint uses the following fields to define its scope:
The
reservationSelectorfield selects reservations at a high level, for example, by order.The
reservationPredicatefield refines the selection made by thereservationSelector. This allows for more granular control, such as removing reservations for only specific line items within an order.The response provides insights into the success of the operations for removing reservations and reducing stock.
Remove reservations and reduce stock
To remove reservations and the corresponding reserved stock, use the REMOVE_RESERVATIONS_REDUCE_STOCKS action.
Execute the following POST request with the specified JSON body:
POST https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/reservations/actions{
"name": "REMOVE_RESERVATIONS_REDUCE_STOCKS",
"reservationSelector": {
"orderRefs": [
"order-id-01"
],
"reservationPredicate": {
"and": [
{
"facilityRef": {
"eq": "facility-id-01"
}
},
{
"tenantArticleId": {
"eq": "tenantarticleid-01"
}
}
]
}
}
}A successful request returns a 200 OK response with the following body.
[
{
"reservation": {
"id": "reservation-id-01"
},
"status": "DELETED",
"stockOperations": [
{
"status": "REDUCED",
"stock": {
"id": "stock-id-01",
"version": 1
}
}
]
}
]Remove reservations and keep stock
To remove only the reservations without reducing stock, use the REMOVE_RESERVATIONS_KEEP_STOCKS action. In this transaction, no stock is reduced.
Execute the following POST request with the specified JSON body:
POST https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/reservations/actions{
"name": "REMOVE_RESERVATIONS_KEEP_STOCKS",
"reservationSelector": {
"orderRefs": [
"order-id-01"
],
"reservationPredicate": {
"and": [
{
"facilityRef": {
"eq": "facility-id-01"
}
},
{
"tenantArticleId": {
"eq": "tenantarticleid-01"
}
}
]
}
}
}A successful request returns a 200 OK response with the following body.
[
{
"reservation": {
"id": "reservation-id-01"
},
"status": "DELETED"
}
]Last updated