Organization warehouse

Finish warehouse reservation

This endpoint finishes a specific warehouse reservation. This moves the credits out of the organization's warehouse and into the receiver's wallet, either as retired credits or the credits themselves.

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

Path parameters

idstring required

The organization's id

reservationIdstring required

The reservation id

action'transfer' | 'transfer_retire' required

The action to take. One of transfer, transfer_retire

Headers

x-icr-api-versionstring

API version

Request body

receiverIdstring

The id of organization that will be receiving the credits

receiverAddressstring

The wallet address that will be receiving the credits

transferCommentstring

Comment for the transfer

Example request

{
  "priceInfo": {
    "price": 5,
    "currency": "USD"
  },
  "receiverId": "123e4567-e89b-12d3-a456-426614174000",
  "receiverAddress": "0x51298f2f1142ecb129a2db5e6afd24f34f2e53f1",
  "transferComment": "This is a comment",
  "retirementData": {
    "reason": "Retirement reason",
    "beneficiaryName": "John Doe",
    "comment": "This is a comment"
  }
}

Response

successboolean required
transactionIdstring required
state'processed' | 'failed' | 'pending_queue' | 'pending_onchain' | 'pending_request' | 'rejected' | 'pending_reserved' | 'cancelled' required

The state of the transaction - usually this will be pending_queue in this response and you'll need to query / poll the reservation or transaction endpoint to know whether the transaction failed to process or not.