Update NFT Collection

You can update the configuration details of an NFT collection by sending a PATCH request to the /nft/<nft_collection_name> endpoint.

Update the details of an NFT collection.

PATCH https://api.playfix.io/nft/<nft_collection_name>

Path Parameters

Name
Type
Description

nft_collection_name*

String

A unique name of the NFT collection, automatically generated by Playfix. It begins with "nfts/" followed by a ULID.

Headers

Name
Type
Description

Authorization*

String

Bearer <your_access_token>

Request Body

Name
Type
Description

project

String

The name of the project that will contain the NFT collection.

network

String

Name of the blockchain network where the NFT collection contract will be deployed.

config.ownerAddress

String

Wallet address of the contract owner, which receives the NFT collection.

config.pausable

String

Set to true to allow pausing of NFT transfer.

config.burnable

String

Set to true to allow NFT burning.

config.itemPrice

String

A non-negative number representing the mint price of an NFT in this NFT collection.

config.name

String

Name of the token.

config

String

Configuration options for the NFT collection.

imageCoverCid

String

IPFS CID for the image to use as the NFT collection cover image when displayed in the user interface.

description

String

Short description of the NFT collection.

title

String

The title of the NFT collection.

standard

String

The token creation standard all NFTs in this collection will follow. Set it to any of the following values:

NFT_STANDARD_ERC721

or

NFT_STANDARD_ERC1155

config.symbol

String

A shorthand symbol to refer to the NFT collection. Choose a short, uppercase word between 3-5 characters that is unique within your project.

{
  "name": "nfts/01gg72h0znfjggmnq7dyaek0r2",
  "project": "<project_name>",
  "standard": "NFT_STANDARD_UNSPECIFIED",
  "title": "Carz",
  "description": "NFT Car Collection",
  "itemCount": "0",
  "imageCoverUrl": "https://ipfs-gateway.playfix.io/ipfs/QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
  "imageCoverCid": "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
  "config": {
    "name": "Carzz",
    "symbol": "CRS",
    "itemPrice": 0.02,
    "baseUri": "",
    "burnable": true,
    "pausable": true,
    "ownerAddress": "<your_wallet_address>"
    },
  "network": "NETWORK_POLYGON_MUMBAI",
  "contractAddress" : "",
  "deployTxHash": ""
}

Example cURL API Call

curl --request POST \
  --url https://api.playfix.io/nft/<nft_collection_name> \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "project": "<project_name>",
    "standard": "NFT_STANDARD_ERC1155",
    "title": "Carzz",
    "description": "NFT Car Collection",
    "imageCoverCid": "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
    "config": {
        "name": "Carz",
        "symbol": "CRS",
        "itemPrice": 0.02,
        "burnable": true,
        "pausable": true,
        "ownerAddress": "<your_wallet_address>"
    },
    "network": "NETWORK_POLYGON_MUMBAI"
}'

Example Python API Call

import requests
import json

payload = {
    "project": "<project_name>",
    "standard": "NFT_STANDARD_ERC1155",
    "title": "Carz",
    "description": "NFT Car Collection",
    "imageCoverCid": "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
    "config": {
        "name": "Carzz",
        "symbol": "CRS",
        "itemPrice": 0.02,
        "burnable": True,
        "pausable": True,
        "ownerAddress": "<your_wallet_address>"
        },
    "network": "NETWORK_POLYGON_MUMBAI"
    }

r = requests.post(
    "https://api.playfix.io/nft/<nft_collection_name>",
    headers = {
        "Authorization": "Bearer <your_access_token>",
        "Accept": "application/json",
        "Content-Type": "application/json"
        },
    data = json.dumps(payload)
    )

print(r.text)

Response

{
  "name": "nfts/01gg72h0znfjggmnq7dyaek0r2",
  "project": "<project_name>",
  "standard": "NFT_STANDARD_UNSPECIFIED",
  "title": "Carz",
  "description": "NFT Car Collection",
  "itemCount": "0",
  "imageCoverUrl": "https://ipfs-gateway.playfix.io/ipfs/QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
  "imageCoverCid": "QmbAVZQhTmRwy57pr4NWuDMhxAC9yzU21GtaGP1f6bay8W",
  "config": {
    "name": "Carzz",
    "symbol": "CRS",
    "itemPrice": 0.02,
    "baseUri": "",
    "burnable": true,
    "pausable": true,
    "ownerAddress": "<your_wallet_address>"
    },
  "network": "NETWORK_POLYGON_MUMBAI",
  "contractAddress" : "",
  "deployTxHash": ""
}

You can ony update the details of an NFT collection if you are yet to deploy it.

Last updated