iotoms Docs

Release a stock reservation

PATCH
/api/v1/inventory/reservations/{id}/release

Releases a reservation with a reason, making the stock available again. Fails if the reservation is already fulfilled, released or expired.

How to use it

  1. Take the reservation id from List reservations for a reference.
  2. Send a reason; reservations already fulfilled, released or expired cannot be released.
  3. The status becomes RELEASED with the time and reason recorded, and the quantity is available to others again.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

Request Body

application/json
  1. body
reason*string

Why the stock is being released, e.g. CART_REMOVED or a short note. Stored on the reservation.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was handled, ERROR otherwise.

message*string

Short human-readable message describing the outcome, e.g. which record was fetched or saved.

data?

The stock reservation.

Example Request
curl -X PATCH 'https://beta.iotoms.com/api/v1/inventory/reservations/497f6eca-6276-4993-bfeb-53cbbbba6f08/release' \  -H 'Content-Type: application/json' \  -d '{  "reason": "string"}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "itemId": "string",    "itemName": "string",    "quantity": 0,    "reservationType": "CART",    "referenceId": "8502eb05-558d-4480-8511-c1011710b340",    "customerId": "string",    "status": "ACTIVE",    "expiresAt": "2019-08-24T14:15:22Z",    "confirmedAt": "2019-08-24T14:15:22Z",    "releasedAt": "2019-08-24T14:15:22Z",    "releaseReason": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}