Edit List NFT

To retrieve the details of an NFT listing, use the editTokenListingMutation API. This API allows you to fetch the current listing details and make modifications, such as updating the listing price. Once the price is updated, initiate the transaction using the frontend, leveraging a wallet like Phantom or Backpack. After executing and confirming the edit transaction on the blockchain, finalize the process by calling the updateTokenListing API to save the updated listing details.

Sample mutation

mutation editTokenListingMutation($orgId: UUID1!, $nftTokenId: UUID1!, $fixedPrice: Float!) {
  editTokenListing(
    orgId: $orgId
    nftTokenId: $nftTokenId
    fixedPrice: $fixedPrice
  ) {
    seller
    sellerTokenAccount
    mintAccount
    metadataId
    listingReceipt
    systemProgram
    tokenProgram
    rent
    bubblegumProgram
    compressionProgram
    treeAuthority
    leafOwner
    previousLeafDelegate
    newLeafDelegate
    logWrapper
    merkleTree
    listDiscriminator
    bubblegumListArg {
      root
      proof
      price
      isCnft
      isVin
      dataHash
      creatorHash
      nonce
      index
      isUpdate
      __typename
    }
    __typename
  }
}
mutation updateTokenListingMutation($orgId: UUID1!, $nftTokenId: UUID1!, $fixedPrice: Float!, $signature: String!) {
  updateTokenListing(
    orgId: $orgId
    nftTokenId: $nftTokenId
    fixedPrice: $fixedPrice
    signature: $signature
  )
}

Sample variable

{
  "orgId": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
  "nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
  "fixedPrice": 1
}
{
  "orgId": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
  "nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
  "fixedPrice":2,
  "signature": "ZBXS6fqVHK6L7QzfZhpmAQRiU1DSXL7zJjU5vUF9Qeyq8qo9HBeoWanBsxL6WRCV4ffZUYpvNx2LpkojVfZCqHr"
}

Sample response

{
  "data": {
    "editTokenListing": {
      "seller": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
      "sellerTokenAccount": "",
      "mintAccount": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
      "metadataId": "Zv2vv8roKtLuqQTFT14NpbhhjWVmu3qhqgiwaG8RrpF",
      "listingReceipt": "9JJFzSxGDGaWNBuL5szb26YNTSLuPZNmUFnnpTfnuZeY",
      "systemProgram": "11111111111111111111111111111111",
      "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
      "rent": "SysvarRent111111111111111111111111111111111",
      "bubblegumProgram": "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
      "compressionProgram": "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK",
      "treeAuthority": "DnuWkN8zJAk2H5PwaYkEPRyQkVZb3LN7BtoLzXykRQf5",
      "leafOwner": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
      "previousLeafDelegate": "9VmqpuzWwfEh4qBmV1bhKBMnMJZp6HgR26GsZFiLX3uc",
      "newLeafDelegate": "4aRpxWDMLu9ZfYYFYPng2PnyUancWcZipkFhVHRxLREY",
      "logWrapper": "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
      "merkleTree": "4iCY74wJcHPfskyoJaYh788Y8nPKY78DagE7Z2X1er2y",
      "listDiscriminator": [
        88,
        221,
        93,
        166,
        63,
        220,
        106,
        232
      ],
      "bubblegumListArg": {
        "root": "9mmsqqMU6UCMqh5eXggwSWxtfL8qEMc5bjwuizcgsN8E",
        "proof": [
          "EVpnpyr76cRj9hsbanRPPHe3Xy68Gs6X2Z2BwAtwWFTn",
          "BWJVP3XGfLCUHxWsYV3fJB5VpxgTbDikWX1w5WuFHXqz",
          "DUPLo4PDHx9zDwMAkzr5go9PRvAN8kA9B9HejTK62HSm",
          "8WkbxHTtzURPaXrj2U57TKmcQLzYk9ubre7co3vkPeBT",
          "GSz87YKd3YoZWcEKhnjSsYJwv8o5aWGdBdGGYUphRfTh",
          "zLUDhASAn7WA1Aqc724azRpZjKCjMQNATApe74JMg8C",
          "ABnEXHmveD6iuMwfw2po7t6TPjn5kYMVwYJMi3fa9K91",
          "JDh7eiWiUWtiWn623iybHqjQ6AQ6c2Czz8m6ZxwSCkta",
          "BFvmeiEuzAYcMR8YxcuCMGYPDpjcmP5hsNbcswgQ8pMc",
          "EvxphsdRErrDMs9nhFfF4nzq8i1C2KSogA7uB96TPpPR",
          "HpMJWAzQv9HFgHBqY1o8V1B27sCYPFHJdGivDA658jEL",
          "HjnrJn5vBUUzpCxzjjM9ZnCPuXei2cXKJjX468B9yWD7",
          "4YCF1CSyTXm1Yi9W9JeYevawupkomdgy2dLxEBHL9euq",
          "E3oMtCuPEauftdZLX8EZ8YX7BbFzpBCVRYEiLxwPJLY2",
          "7DiCkBhs5HQLPEsKY6EjfNd3oBswnfRk9UAZcHqczL7m",
          "FhsNgK6GGU1cRPFbmPhrEZ95Zj8vorjK6GmhFuwmZsUm",
          "3e2oBSLfSDVdUdS7jRGFKa8nreJUA9sFPEELrHaQyd4J",
          "GCXyEHiFMtRFTNFT5LNHwxiXZfooBpUMGSkjyz7pfcS5",
          "752CmMF5k7acEFEmJA7oE3aobbWj7CAZVm3KpDR6HiRV",
          "D9GGr1ycBmgRbHJyJzmxMk5aoKZmjdezB4NpxopAcgpP"
        ],
        "price":2000000000,
        "isCnft": true,
        "isVin": true,
        "dataHash": "923Pyist1hp5sAQLwTHrJnsDs4eHf2cR3UhuhyagYzUh",
        "creatorHash": "E85ZyyjjrrsKAgeGeqBE2RSkfzs94FTdfEtefJpnJHrp",
        "nonce": 6,
        "index": 6,
        "isUpdate": true,
        "__typename": "bubblegumListArg"
      },
      "__typename": "bubblegumListInfo"
    }
  }
}
{
  "data": {
    "updateTokenListing": "NFT Listing updated."
  }
}

Fields

The table below provides an explanation of each variable in the respective column.

EditListing:

NameTypeDescription
orgIdUUID1The organization ID.
nftTokenIdUUID1The NFT token ID.
fixedPriceFloatThe token edit listing price.

UpdateListing:

NameTypeDescription
orgIdUUID1The organization ID.
nftTokenIdUUID1The NFT token iD.
fixedPriceFloatThe updated listing price
signatureStringThe update solana token listing transaction hash.