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 parameter | Description |
---|---|
user_uid | The unique identifier of the user for this app (ex. 813231035224). |
Response
You will receive the asset details including the following fields:
Response fields | Type | Description | Condition |
---|---|---|---|
uid | String | The UID for the asset. | Mandatory |
name | String | The name of the asset. | Mandatory |
asset_external_id | String | The unique ID by which you identify this asset in your system. | Mandatory |
collection_uid | String | The UID identifying the collection to which the asset belongs. | Mandatory |
collection_name | String | The name identifying the collection to which the asset belongs. | Mandatory |
token_id | Integer | The token ID assigned to this asset upon minting. | Mandatory |
created_at | String (Timestamp) | The timestamp at which the asset as been created. | Mandatory |
is_minted | Boolean | Indicates wether the asset has been minted on the blockchain already or not. | Mandatory |
is_burned | Boolean | Indicates wether the asset has been burned (removed from the circulation) or not. | Mandatory |
is_transferring | Boolean | Indicates wether the asset has been requested to be transferred or not (this status is temporary). | Mandatory |
is_transferable | Boolean | Indicates wether the asset can be transferred or not. i.e: an asset is_minted is false can't be transferred. | Mandatory |
is_editing | Boolean | Indicates wether the asset has been requested to be edited or not (this status is temporary). | Mandatory |
mint_for_user_uid | String | The user's UID the asset has been minted for. | Mandatory |
mint_for_address | String | The blockchain address for which the asset was minted for (while wallets are created asynchronously, this field can be empty). | Mandatory |
owner_user_uid | String | The user's UID the asset currently belongs to. Can be null if does not belong to a user of the App. | Mandatory |
owner_address | String | The user's address the asset belongs to. | Mandatory |
metadata | Object | The metadata of the asset. See table below for fields list. | Mandatory |
explorer_url | String (URL) | The explorer URL (PolygonScan) of the asset. It can be used to see all blockchain related informations. | Mandatory |
token_uri | String | The Asset's (token) uri containing the Metadata stored on IPFS. It is based on the metadata_cid . | Mandatory |
Response metadata fields | Type | Description | Condition |
---|---|---|---|
name | String | The name of the asset. | Mandatory |
image | String (URL) | The image url of the asset. | Mandatory |
attributes | Object | Additional attributes describing the asset. See below table for the fields list. | Optional |
description | String | The description of the asset. | Optional |
original_id | String | The UID for the asset. | Mandatory |
external_url | String (URL) | An external URL for additional information. | Optional |
org_image_url | String (URL) | The image_url provided when Asset was created. (Different if image is stored on IPFS). | Mandatory |
Response Metadata Attributes fields | Type | Description | Condition |
---|---|---|---|
trait_type | String | The type of trait or attribute. | Mandatory |
value | String | The value of the trait or attribute. | Mandatory |
display_type | String | The 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",
"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",
"mint_for_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"owner_user_uid": "272806259405",
"owner_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"metadata": {
"name": "test_with_attribute",
"image": "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",
"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",
"mint_for_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"owner_user_uid": "272806259405",
"owner_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"metadata": {
"name": "test41",
"image": "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"
Updated about 2 months ago