Transfer asset

🚧

Important:

Request headers are required. See API basics introduction for more information.

Transfer asset

Endpoint

POST /transfer

  • Creates a new Transfer request for an asset that is owned by a given user UID (set by the X-API-KEY), to a specific wallet address.
  • Returns a new Transfer (transfer uid) associated.

πŸ“˜

Note:

The transfer request is partly asynchronous - this will immediately return the transfer uid and perform the transfer of the underlying NFT on the blockchain asynchronously.

To know when the transfer has been executed on the blockchain, you can subscribe to the Webhook events or poll any of the Get transfer details endpoints.

🚧

Important:

For executing a transfer, the following conditions must have been filled:

  • The asset must be minted.
  • The asset must be transferable (not already transferring or burned).
  • The asset must be owned by the specified user.

Request body

Request body fieldsTypeDescriptionRequired/Optional
asset_uidStringThe UID of the asset to be transferred.Required
from_user_uidStringThe UID of the user who is transferring the asset.Required
to_addressStringThe recipient's wallet address.Required

Request example

Sample: request body

{
  "asset_uid": "764893807463",
  "from_user_uid": "110985463782",
  "to_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

Response

Response example

Sample: 201 Transferred Response

You will receive a uid which refers to the transfer details uid:

{
  "success": true,
  "data": {
    "uid": "324167489835", // (transfer uid)
  }
}

You can use this uid to call and reference the other Transfer endpoints. For example GET /transfer/{uid} with this uid will return the transfer details.

Example

The following example creates a transfer for the asset 123123123123 from user 111111111111 to the address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045.

# API_KEY is your api key
# TOKEN is the access token generated with your api key secret

curl -i \
  -X POST \ 
  -d "{\"asset_uid\":\"123123123123\",\"from_user_uid\":\"111111111111\",\"to_address\":\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\"}" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: API_KEY" \
  -H "Authorization: Bearer TOKEN" \
  "https://api.getoriginal.com/v1/transfer"