Warehouse
Last updated
Last updated
The organization warehouse is where an organization can deposit their credits and give apps access to the warehouse inventory where they can transfer them without asking for permission to do so each time.
But to move credits from the warehouse they first need to be put into the reservation queue, where they are reserved for the app that put them in the queue. This is so that the app can verify off platform data / actions before finalizing a transfer / retirement action. This can be very handy for marketplaces that do not wish to hold the credits themselves and instead use the warehouse system to reserve and transfer the credits when an actual buyer / retiree has been found.
This returns a list of all the credits in the organization's warehouse. Ids for the projects that issued those credits are also in place so using this endpoint in conjunction with the projects or project endpoints is handy.
Callable by any access token with permissions "organization_warehouse:read".
Returns a paginated list of all reservations, and the state of those reservations, made against the organization's warehouse.
Callable by any access token with permissions "organization_warehouse:read".
Reserving credits from a warehouse for later transfer. They are reserved for up to 10 minutes before they are moved back into the warehouse.
Callable by any access token with permissions "organization_warehouse:write".
Gets a specific reservation made.
Callable by any access token with permissions "organization_warehouse:read".
Cancels an outstanding reservation your app made.
Callable by any access token with permissions "organization_warehouse:write".
This can only be called withing 10minutes from the creation of the reservation.
Callable by any access token with permissions "organization_warehouse:write".
This endpoint returns a paginated list of the organization's warehouse inventory.
/organizations/{id}/warehouse/inventory
API version
This endpoint returns a paginated list of ALL of the organization's warehouse reservations. Both active, expired and finished.
/organizations/{id}/warehouse/inventory/reservations
The amount of items to return
10
The page to return
0
The organization's id
1b0e4f37-59ca-489a-8a23-ee3152812cb8
API version
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.
/organizations/{id}/warehouse/inventory/reservations
API version
The amount of credits to reserve
10
The id of the credit to reserve
exPost-2-0x51298f2f1142ecb129a2db5e6afd24f34f2e53f1
This endpoint returns a specific warehouse reservation. It can be used to check if a reservation is still active or not.
/organizations/{id}/warehouse/inventory/reservations/{reservationId}
The organization's id
1b0e4f37-59ca-489a-8a23-ee3152812cb8
The reservation id
123e4567-e89b-12d3-a456-426614174000
API version
This endpoint cancels a specific warehouse reservation. If the reservation is active the credits will be immediately made available in the organization's warehouse.
/organizations/{id}/warehouse/inventory/reservations/{reservationId}
API version
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.
/organizations/{id}/warehouse/inventory/reservations/{reservationId}//{action}
The organization's id
1b0e4f37-59ca-489a-8a23-ee3152812cb8
The reservation id
123e4567-e89b-12d3-a456-426614174000
The action to take. One of transfer, transfer_retire
transfer
transfer
, transfer_retire
API version
The id of organization that will be receiving the credits
123e4567-e89b-12d3-a456-426614174000
The wallet address that will be receiving the credits
0x51298f2f1142ecb129a2db5e6afd24f34f2e53f1
Comment for the transfer
This is a comment
Price information for the transfer. If the transfer / retirement is caused by a purchase, this is required.
Retirement data - only required if action is transfer_retire or retire