ダイナミックNFT更新

ダイナミックNFT更新

updatednft

既存のダイナミックNFTを更新します。

基本情報

プロパティ
詳細

URL

/api/v1/updatednft

Method

POST

リクエストパラメータ

パラメータ
種類
必須
詳細

nft_gdn_id

str

yes

対象NFTのnft_gdn_id

contract_address

str

yes

コレクション(コントラクト)のアドレス

metadata

list

yes

NFTのメタデータ(下記参照)

metadata

NFTのメタデータを定義します。ファイルアップロードが必要な項目は、file_fieldsに指定します。

パラメータ
種類
必須
詳細

title

str

Yes

NFTのタイトル

description

str

Yes

NFTの説明

file_fields

list

Yes

ファイルアップロードが必要なメタデータの項目。KeyとUrlのペアで登録(下記参考)

attribute

list

No

NFTに追加するプロパティ。最大10個。

file_fields

file_fieldskey, urlのペアの配列です。

パラメータ
種類
必須
詳細

key

str

Yes

メタデータのkey。image または animation_url のどちらかを指定。 image は1つ以上必須。

url

str

Yes

画像または動画のURL

attribute

attributetag,valueのペアの配列です。

パラメータ
種類
必須
詳細

tag

str

Yes

プロパティのタグ

value

str

Yes

プロパティの値

URLに指定したファイルがIPFSなどのストレージにアップロードされます。

リクエストのサンプル

{
  "nft_gdn_id": "cf7faf94-a5ec-462c-ad06-1bd772fefe21",
  "contract_address": "0x0000000000000000000000000000000000000000",
  "metadata": [
    {
      "title": "NFT Name1 new",
      "description": "Description of NFT1 new",
      "file_fields": [
        {
          "key": "image",
          "url": "https://my.nftgarden.app/image_new.png"
        }
      ],
      "attribute": [
        {
          "tag": "color",
          "value": "Blue"
        },
        {
          "tag": "price",
          "value": "20000"
        }
      ]
    }
  ]
}

成功した場合のレスポンス例

{
  "message": "Create NFT request accepted",
  "requests": {
    "contract_address": "0x0000000000000000000000000000000000000000",
    "nft_gdn_id": "cf7faf94-a5ec-462c-ad06-1bd772fefe21",
    "metadata": [
      {
        "title": "NFT Name1 new",
        "description": "Description of NFT1 new",
        "file_fields": [
          {
            "key": "image",
            "url": "https://my.nftgarden.app/image_new.png"
          }
        ],
      "attribute": [
          {
            "tag": "color",
            "value": "Blue"
          },
          {
            "tag": "price",
            "value": "20000"
          }
        ]
      }
    ]
  },
  "nfts": [
    {
      "nft_gdn_ids": "cf7faf94-a5ec-462c-ad06-1bd772fefe21",
      "accepted_date": "2025-05-04 07:49:31"
    }
  ]
}

失敗した場合のレスポンス例(ステータスコード400)

{
  "error": {
    "title": "Bad Request",
    "message": "contract_address and blockchain are inconsistent"
  }
}

最終更新