Reservations

More reservations API information can be found here: REST API documentation – Reservations.

Search reservations

Search reservations by executing the following POST call with the JSON body:

POST https://{YOUR-TENANT-NAME}.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 searches reservations for a specific tenantArticleId, facilityRef, and routingPlanRef.

More information on the search can be found under Basics – Search.

Reservations actions

  • In the reservationSelector, the reservations that should be removed can be selected on a higher level (e.g., order).

  • In the reservationPredicate, the selection made in the reservationSelector can be refined. This can be helpful if, for example, only reservations for certain line items in the order should be removed.

  • The results give insights into the success of the operations of removing reservations (and reducing stocks).

Remove reservations and stocks

Use the action REMOVE_RESERVATIONS_REDUCE_STOCKS to remove reservations and the respective reserved stock.

Remove reservations and stocks by executing the following POST call with the JSON body.

POST https://{YOUR-TENANT-NAME}.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"
                    }
                }
            ]
        }
    }
}

If the request is successful, a 200 OK response is received with the below body.

[
    {
        "reservation": {
            "id": "reservation-id-01"
        },
        "status": "DELETED",
        "stockOperations": [
            {
                "status": "REDUCED",
                "stock": {
                    "id": "stock-id-01",
                    "version": 1
                }
            }
        ]
    }
]

Remove reservations but keep stocks

Use the action REMOVE_RESERVATIONS_KEEP_STOCKS to remove only reservations. No stock is reduced in this transaction.

Remove reservations by executing the following POST call with the JSON body:

POST https://{YOUR-TENANT-NAME}.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"
                    }
                }
            ]
        }
    }
}

If the request is successful, a 200 OK response is received with the below body.

[
    {
        "reservation": {
            "id": "reservation-id-01"
        },
        "status": "DELETED"
    }
]

Last updated