> For the complete documentation index, see [llms.txt](https://docs.developer.playdapp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.developer.playdapp.com/api-reference/basic.md).

# Basic

### Mint NFT

Mint NFT by user's wallet address

Refer to diagram

## Mint NFT by user's wallet address

<mark style="color:green;">`POST`</mark> `https://{itemManagerHost}/v1/nfts`

#### Headers

| Name                                          | Type   | Description                                                                                                                                                                                               |
| --------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| svc-api-key<mark style="color:red;">\*</mark> | String | svc-api-key is issued for each registered service(ex> game) of partner.                                                                                                                                   |
| signature<mark style="color:red;">\*</mark>   | String | <p>The result of an API request signed by a secret kregistered service(ex> game) of partner.<br>For more details, refer to <a href="/pages/ZpcuBd5DL9Dl3Encf1XR"><strong>Authentication</strong></a>.</p> |
| timestamp<mark style="color:red;">\*</mark>   | String | The time at which the request was sent, set to a Unix Epoch Timestamp value.                                                                                                                              |
| nonce<mark style="color:red;">\*</mark>       | String | Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request.                                          |

#### Request Body

| Name                                                | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| walletAddress<mark style="color:red;">\*</mark>     | String | User's wallet address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| serviceContractId<mark style="color:red;">\*</mark> | Number | The contract ID registered for the item transaction for the registered service(ex> game) of partner                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| metadata<mark style="color:red;">\*</mark>          | Object | <p>{</p><p>  name?: String</p><p>  image?: String</p><p>  description?: String</p><p>  attributes!: Array\<Attribute></p><p>}</p><p></p><p>name (optional)</p><p>: The name for the item.<br>If omitted, the name entered when registering the item on the PlayDapp Developers Console is used.</p><p></p><p>image (optional)</p><p>: The image url for the item.<br>If omitted, the image url entered when registering the item on the PlayDapp Developers Console is used.</p><p></p><p>description (optional)</p><p>: The description for the item.<br>If omitted, the description entered when registering the item on the PlayDapp Developers Console is used.</p><p></p><p>attributes  (required)</p><p>: Define attributes (skills, levels, etc.) to be given to items registered through PlayDapp Developers Console. These attributes are used as metadata for the NFT. </p><p>Metadata follows OpenSea standard type, please refer to <a href="https://docs.opensea.io/docs/metadata-standards#attributes"><strong>Attributes topic in the OpenSea Metadata document.</strong></a></p> |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "result": true,
  "data": {
    "nftId": 1,  // NFT ID for the mint request
    "walletAddress": "0x9cea32...",  // User's wallet address
    "serviceContractId": 1,  // The contract ID registered for the item transaction for the game
    "metadata": {
      "name": "BRAM SR",  // Name of item registered in PlayDapp Developers Console
      "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr.png",  // Image of item registered in PlayDapp Developers Console
      "description": "this item is BRAM SR for pet!",  // Description of item registered in PlayDapp Developers Console
      "attributes": [  // Attributes to be used as NFT metadata 
        {
          "trait_type": "Base", 
          "value": "Starfish"
        }
      ]
    },
    "status": "minting"  // available values: 'minting', 'nft'
  }
}
```

{% endtab %}
{% endtabs %}

### List NFTs

List all NFT information mapped to the user.

## List NFT info

<mark style="color:blue;">`GET`</mark> `https://{itemManagerHost}/v1/nfts`

#### Query Parameters

| Name          | Type   | Description           |
| ------------- | ------ | --------------------- |
| walletAddress | String | User's wallet address |
| offset        | number | Default: 0            |
| limit         | number | Default: 100          |

#### Headers

| Name                                          | Type   | Description                                                                                                                                                                                                             |
| --------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| svc-api-key<mark style="color:red;">\*</mark> | String | svc-api-key is issued for each registered service(ex> game) of partner.                                                                                                                                                 |
| signature<mark style="color:red;">\*</mark>   | String | <p>The result of an API request signed by a secret key issued per registered service(ex> game) of partner.<br>For more details, refer to <a href="/pages/ZpcuBd5DL9Dl3Encf1XR"><strong>Authentication</strong></a>.</p> |
| timestamp<mark style="color:red;">\*</mark>   | String | The time at which the request was sent, set to a Unix Epoch Timestamp value.                                                                                                                                            |
| nonce<mark style="color:red;">\*</mark>       | String | Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request.                                                        |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "result": true,
  "data": {
    "total": 2,
    "list": [
      {
        "nftId": 1,  // NFT ID for the mint request
        "walletAddress": "0x9cea32...",  // User's wallet address
        "serviceContractId": 1,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
        "metadata": {
          "name": "BRAM SR",  // Name of item registered in PlayDapp Developers Console
          "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr.png",  // Image of item registered in PlayDapp Developers Console
          "description": "this item is BRAM SR for pet!",  // Description of item registered in PlayDapp Developers Console
          "attributes": [  // Attributes to be used as NFT metadata 
            {
              "trait_type": "Base", 
              "value": "Starfish"
            }
          ]
        },
        "status": "nft",  // available values: 'minting', 'nft'
        "network": "polygon",  // This field is passed if "status": "nft" (nft mint transaction completed).
        "tokenId": "294923",  // This field is passed if "status": "nft" (nft mint transaction completed).
        "transactionHash": "0xb0a5ec48449ef17b...",  // This field is passed if "status": "nft" (nft mint transaction completed).
        "marketUrl": "https://playdapp.com/item/polygon/0xc58C5A1c.../294923"  // This field is passed if "status": "nft" (nft mint transaction completed).
      },
      {
        "nftId": 2,  // NFT ID for the mint request
        "walletAddress": "0x9cea32...",  // User's wallet address
        "serviceContractId": 1,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
        "metadata": {
          "name": "BRAM SR 2",  // Name of item registered in PlayDapp Developers Console
          "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr_2.png",  // Image of item registered in PlayDapp Developers Console
          "description": "this item is BRAM SR 2 for pet!",  // Description of item registered in PlayDapp Developers Console
          "attributes": [  // Attributes to be used as NFT metadata 
            {
              "trait_type": "Base", 
              "value": "Starfish"
            }
          ]
        },
        "status": "minting"  // available values: 'minting', 'nft'
      }
    ],
    "offset": 0,
    "limit": 10
  }
}
```

{% endtab %}
{% endtabs %}

### Get NFT Item

Get the specific NFT information.

## Get the specific NFT info

<mark style="color:blue;">`GET`</mark> `https://{itemManagerHost}/v1/nfts/{nftId}`

#### Path Parameters

| Name                                    | Type   | Description                 |
| --------------------------------------- | ------ | --------------------------- |
| nftId<mark style="color:red;">\*</mark> | String | NFT ID for the mint request |

#### Headers

| Name                                          | Type   | Description                                                                                                                                                                                                             |
| --------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| svc-api-key<mark style="color:red;">\*</mark> | String | svc-api-key is issued for each registered service(ex> game) of partner.                                                                                                                                                 |
| signature<mark style="color:red;">\*</mark>   | String | <p>The result of an API request signed by a secret key issued per registered service(ex> game) of partner.<br>For more details, refer to <a href="/pages/ZpcuBd5DL9Dl3Encf1XR"><strong>Authentication</strong></a>.</p> |
| timestamp<mark style="color:red;">\*</mark>   | String | The time at which the request was sent, set to a Unix Epoch Timestamp value.                                                                                                                                            |
| nonce<mark style="color:red;">\*</mark>       | String | Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request.                                                        |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "result": true,
  "data": {
    "nftId": 1,  // NFT ID for the mint request
    "walletAddress": "0x9cea32...",  // User's wallet address
    "serviceContractId": 1,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
    "metadata": {
      "name": "BRAM SR",  // Name of item registered in PlayDapp Developers Console
      "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr.png",  // Image of item registered in PlayDapp Developers Console
      "description": "this item is BRAM SR for pet!",  // Description of item registered in PlayDapp Developers Console
      "attributes": [  // Attributes to be used as NFT metadata 
        {
          "trait_type": "Base", 
          "value": "Starfish"
        }
      ]
    },
    "status": "nft",  // available values: 'minting', 'nft'
    "network": "polygon",  // This field is passed if "status": "nft" (nft mint transaction completed).
    "tokenId": "294923",  // This field is passed if "status": "nft" (nft mint transaction completed).
    "transactionHash": "0xb0a5ec48449ef17b...",  // This field is passed if "status": "nft" (nft mint transaction completed).
    "marketUrl": "https://playdapp.com/item/polygon/0xc58C5A1c.../294923"  // This field is passed if "status": "nft" (nft mint transaction completed).
  }
}
```

{% endtab %}
{% endtabs %}
