Metadata schema registration

❗️

Mainnet only

This functionality is only relevant for users building on .

To create and update collections and metadata schema in RopstenRopsten - An Ethereum test network, used for testing, experimenting and debugging prior to deployment on Mainnet, the main Ethereum network., follow the guides here.

For users who have previously registered a collection via online form submission in either mainnet or ropsten , submit a request here containing the information specified below, depending on your request.

Overview

Submit a request here containing the information specified below, depending on the request you would like to make.

Register the Collection (Contract) L2 metadata filters

📘

How to get the Contract Address

Call the collections API: https://api.x.immutable.com/v1/collections. You can just paste this in the browser address bar. Then find the address you wish to use on the next set of API requests.

🚧

Filterable Text is not allowed

If passing both "filterable": true and the "type": "text", this API call will return an error.

The rationale is that metadata like name exists for all NFTs and if there are millions of NFTs, it would not make sense to have each NFT name as filterable. There will be a million NFTs showing up in the Marketplace filters under name.

📘

How to structure the metadata schema JSON

For an example metadata-schema data payload check out Asset Metadata

Provide the following details along with your request.

{
  "metadata": [
    {
      "name": "some-metadata-name",
      "type": "discrete",
      "filterable": true
    },
    {
      "name": "rare",
      "type": "boolean",
      "filterable": true
    },
    {
      "name": "image_url"
    }
  ]
}

name

yes

text

type

no ("text")

https://docs.x.immutable.com/docs/asset-metadata#property-type-mapping

filterable

no (false)

boolean

If set to true, then the particular metadata's "name" will show up in the Marketplace filters.

To add missing attributes that were not submitted in the original request you can execute this call multiple times. Just add the missing attributes and they shall be appended.

Submitting the same metadata schema attribute will cause the error:

{"code":"metadata_key_already_exists","message":"Metadata key(s) already exist"}

Update the Collection (Contract) L2 metadata "filterable" attribute

📘

How to get the Contract Address

Call the collections API: https://api.x.immutable.com/v1/collections. You can just paste this in the browser address bar. Then find the address you wish to use on the next set of API requests.

🚧

Expensive API call on "filterable": true

This API call may take from a few seconds to a few minutes as it will trigger a re-scan of all the NFTs for the {{contract-address}} to get the up to date the filter values.

Provide the following details along with your request.

{
  "filterable": true
}

Update the Collection (Contract) L2 metadata "name" attribute

📘

How to get the Contract Address

Call the collections API: https://api.x.immutable.com/v1/collections. You can just paste this in the browser address bar. Then find the address you wish to use on the next set of API requests.

🚧

Multi word metadata name

If the metadata name consists of 2 or more words, it is advised to URL encode the spaces with %20. In Postman, spaces in the name does work without the use of %20.

Provide the following details along with your request.

{
  "name": "<THE-NEW-NAME>"
}

Update the Collection (Contract) L2 metadata "type" attribute

📘

How to get the Contract Address

Call the collections API: https://api.x.immutable.com/v1/collections. You can just paste this in the browser address bar. Then find the address you wish to use on the next set of API requests.

🚧

Filterable Text is not allowed

If passing both "filterable": true and the "type": "text", this API call will return an error.
This error will also be triggered when passing "filterable": true and the metadata "type" is already "text".

Provide the following details along with your request.

{
  "type": "<ONE-OF: enum text boolean continuous discrete>"
}

Did this page help you?