latestOpenAPI 3.0.02026-08-10517386.6 KB

a9f1b102faca

Organization warehouse

Reserve credits from warehouse

This endpoint reserves credits from the organization warehouse. They are reserved for 10 minutes. In the meantime the reserver can be sure that the credits are available for them. This is especially useful for marketplaces that don't want the extra complexity of custody-ing user's credits.

post/organizations/{id}/warehouse/inventory/reservations

Path parameters

idstring required

Query parameters

developmentstring required

Headers

x-icr-api-versionstring

API version

Request body

amountnumber required

The amount of credits to reserve

creditIdstring required

The id of the credit to reserve

Example request

{
  "amount": 10,
  "creditId": "exPost-2-0x51298f2f1142ecb129a2db5e6afd24f34f2e53f1"
}

Response

idstring required

The unique identifier of the reservation, used to finish / cancel it

creditIdstring required

The unique identifier of the credit

serializationstring required

The serialization of the reservation

amountnumber required

The amount reserved

Example response

{
  "id": "d449c665-3100-40c6-91ad-9d3f0a9fd343",
  "creditId": "exPost-2-0x51298f2f1142ecb129a2db5e6afd24f34f2e53f1",
  "serialization": "ICR-ISL-354-78040-14-R-0-2021",
  "amount": 10
}