Get list of asset(s) by user uid

🚧

Important:

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

Get list of asset(s) by uid

Endpoint

GET /asset?user_uid={uid}

Returns the list of asset(s) details for a given user_uid associated with the given App (set by the X-API-KEY).

Parameters

Query parameters

Query parameterDescription
user_uidThe unique identifier of the user for this app (ex. 813231035224).

Response

You will receive the asset details including the following fields:

Response fieldsTypeDescriptionCondition
uidStringThe UID for the asset.Mandatory
nameStringThe name of the asset.Mandatory
asset_external_idStringThe unique ID by which you identify this asset in your system.Optional
client_idStringThis field has been deprecated. You should now use asset_external_id.Deprecated
collection_uidStringThe UID identifying the collection to which the asset belongs.Mandatory
collection_nameStringThe name identifying the collection to which the asset belongs.Mandatory
token_idIntegerThe token ID assigned to this asset upon minting.Mandatory
created_atString
(Timestamp)
The timestamp at which the asset as been created.Mandatory
is_mintedBooleanIndicates wether the asset has been minted on the blockchain already or not.Mandatory
is_burnedBooleanIndicates wether the asset has been burned (removed from the circulation) or not.Mandatory
is_transferringBooleanIndicates wether the asset has been requested to be transferred or not (this status is temporary).Mandatory
is_transferableBooleanIndicates wether the asset can be transferred or not. i.e: an asset is_minted is false can't be transferred.Mandatory
is_editingBooleanIndicates wether the asset has been requested to be edited or not (this status is temporary).Mandatory
mint_for_user_uidStringThe user's UID the asset has been minted for.Mandatory
owner_user_uidStringThe user's UID the asset currently belongs to. Can be null if does not belong to a user of the App.Mandatory
owner_addressStringThe user's address the asset belongs to.Mandatory
metadataObjectThe metadata of the asset. See table below for fields list.Mandatory
explorer_urlString (URL)The explorer URL (PolygonScan) of the asset. It can be used to see all blockchain related informations.Mandatory
token_uriStringThe Asset's (token) uri containing the Metadata stored on IPFS. It is based on the metadata_cid.Mandatory
Response metadata fieldsTypeDescriptionCondition
nameStringThe name of the asset.Mandatory
image_urlString (URL)The image url of the asset.Mandatory
attributesObjectAdditional attributes describing the asset. See below table for the fields list.Optional
descriptionStringThe description of the asset.Optional
original_idStringThe UID for the asset.Mandatory
external_urlString (URL)An external URL for additional information.Optional
org_image_urlString (URL)The image_url provided when Asset was created. (Different if image is stored on IPFS).Mandatory
Response Metadata Attributes fieldsTypeDescriptionCondition
trait_typeStringThe type of trait or attribute.Mandatory
valueStringThe value of the trait or attribute.Mandatory
display_typeStringThe display type for the attribute value.Optional

Response example

You will receive the list of asset(s) details including the following fields:

{
    "success": true,
    "data": [
        {
            "uid": "813231035224",
            "name": "test_with_attribute",
            "asset_external_id": "asset_external_id_1",
            "client_id": "asset_external_id_1", // Deprecated
            "collection_uid": "221489259774",
            "collection_name": "newContract",
            "token_id": 4,
            "created_at": "2023-09-11T09:42:18.526793Z",
            "is_minted": true,
            "is_burned": false,
            "is_transferring": false,
            "is_transferable": true,
            "mint_for_user_uid": "272806259405",
            "owner_user_uid": "272806259405",
            "owner_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "metadata": {
                "name": "test_with_attribute",
                "image_url": "ipfs://QmaJbYbdH8bbPXVAsehbHy8qyrGSvxDiJ11RrE6WK4VAmd",
                "attributes": [
                    {
                        "value": "Starfish",
                        "trait_type": "Base"
                    }
                ],
                "description": "description",
                "original_id": "813231035224",
                "external_url": "http://example.com",
                "org_image_url": "https://www.publicdomainpictures.net/pictures/490000/nahled/transparent-easter-egg-png-16758277143Db.png"
            },
            "explorer_url": "https://amoy.polygonscan.com/token/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?a=4",
            "token_uri": "ipfs://QmbMzYnigdxkfG8PpnqpAt5YQGYA8Y2GGw2hSaKr46XKr6"
        },
        {
            "uid": "313231035225",
            "name": "test41",
            "asset_external_id": "asset_external_id_2",
            "client_id": "asset_external_id_2", // Deprecated
            "collection_uid": "221489259774",
            "collection_name": "newContract",
            "token_id": 3,
            "created_at": "2023-09-06T15:58:55.218194Z",
            "is_minted": true,
            "is_burned": false,
            "is_transferring": false,
            "is_transferable": true,
            "mint_for_user_uid": "272806259405",
            "owner_user_uid": "272806259405",
            "owner_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "metadata": {
                "name": "test41",
                "image_url": "ipfs://QmfHSmteWakkKxZanrPKs5vUK5f8xe1pqcyKcM5u9FXCxh",
                "description": "description",
                "original_id": "313231035225",
                "org_image_url": "https://www.publicdomainpictures.net/pictures/490000/nahled/transparent-easter-egg-png-16758277143Db.png"
            },
            "explorer_url": "https://amoy.polygonscan.com/token/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?a=3",
            "token_uri": "ipfs://QmWQrK9XGF1JGAMuofUAu5aNoEhheEK5t85RRdKxAmpaSi"
        }
    ]
}

📘

Note:

Considering that the request for creating an asset is partly asynchronous - the response for retrieving an asset's details will immediately return the asset uid and will mint the asset to the user's wallet asynchronously.

This means that:

  • If you perform a 'create asset' followed by a 'get assets by user', the is_minted can be false in the response.
  • If you perform a 'create user' followed by a 'create asset' for this user and a 'get assets by user', the owner_address can be empty in the response.

Example

The following example fetches the assets details for user 111111111111.

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

curl -i \
  -X GET \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: API_KEY" \
  -H "Authorization: Bearer TOKEN" \
  "https://api.getoriginal.com/v1/asset?user_uid=111111111111"