If you are yet to deploy an NFT collection, you can modify the details of its NFT items. To accomplish this, send a PATCH request to the /nft/<nft_item_name>
endpoint.
200: OK Successfully updated the NFT item.
Copy {
"name" : "nftitems/01ggdqqd0mkkt7hz57a1g130yq"
"nft" : "<nft_collection_name>" ,
"title" : "Fast Car" ,
"number" : "1" ,
"description" : "blazing fast car" ,
"imageUrl" : "https://ipfs-gateway.playfix.io/ipfs/QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W" ,
"imageCid" : "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W" ,
"attributes" : [
{
"property" : {
"name" : "eyes" ,
"value" : "brown"
}
}
] ,
"mintingTransactionHash" : ""
}
Copy curl --request PATCH \
--url 'https://api.playfix.io/nft/<nft_item_name>' \
--header 'Authorization: Bearer <your_access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"nft": "<nft_collection_name>",
"title": "Fastest Car",
"number": "1",
"description": "blazing fast car",
"imageCid": "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
"attributes": [
{
"property": {
"name": "eyes",
"value": "brown"
}
}
]
}'
Copy import requests
import json
payload = {
"nft" : "<nft_collection_name>" ,
"title" : "Fastest Car" ,
"number" : "1" ,
"description" : "blazing fast car" ,
"imageCid" : "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W" ,
"attributes" : [
{
"property" : {
"name" : "eyes" ,
"value" : "brown"
}
}
]
}
r = requests . patch (
"https://api.playfix.io/token/<token_name>" ,
headers = {
"Authorization" : "Bearer <your_access_token>" ,
"Accept" : "application/json" ,
"Content-Type" : "application/json"
},
data = json. dumps (payload)
)
print (r.text)
Copy {
"name" : "nftitems/01ggdqqd0mkkt7hz57a1g130yq"
"nft" : "<nft_collection_name>" ,
"title" : "Fast Car" ,
"number" : "1" ,
"description" : "blazing fast car" ,
"imageUrl" : "https://ipfs-gateway.playfix.io/ipfs/QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W" ,
"imageCid" : "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W" ,
"attributes" : [
{
"property" : {
"name" : "eyes" ,
"value" : "brown"
}
}
] ,
"mintingTransactionHash" : ""
}