Create Template via API

Create a digital passport template for your product pairing in The Forge app by using the NFT Management Platform.

Before you begin

As a brand, you wish to create a digital passport template to pair your physical products with digital passports.

Let's start 🚀

Create the template header

ParameterTypeDefinition
metadataObjectMetadata of the template:
- name: Name of the product.
- icon: Product icon displayed in the app.
blockchainPropertiesObjectTransfer setting:
- isTransferable: Set true if the digital passport is claimable.
- showTransferableOption: Set true to display the Transferable option on the app.
contentStringJson Schema with the template content.
After doing the JSON content, stringify it.

Example:

[
	{
    "deleted": false,
    "blockchainProperties": {
      "isTransferable": true,
      "showTransferableOption": true
    },
    "metadata": {
	     "name": "Arianee Cap",
	     "icon": "https://media.istockphoto.com/vectors/baseball-cap-isolated-on-white-vector-id1219165217?k=20&m=1219165217&s=612x612&w=0&h=aPOZSrKxwe9Ytg5VMtEDpYkJ3j6gOLtlHAMJf-rnMIE="
		},
    "content": "{\n  \"$schema\": \"https://cert.arianee.org/version2/ArianeeProductCertificate-i18n.json\",\n  \"name\": \"Mon NFT TEST\",\n  \"serialNumber\": [{\n    \"type\": \"serialNumber\",\n    \"value\": \"%serialNumber%\"\n    }],\n  \"description\": \"this is the NFT %description%. With Size = %size% and a %color% color\"\n}",
	}
]
{
  "$schema": "https://cert.arianee.org/version2/ArianeeProductCertificate-i18n.json",
  "name": "Mon NFT TEST",
  "serialNumber": [{
    "type": "serialNumber",
    "value": "%serialNumber%"
    }],
	"diameter": [{
    "type": "diameter",
    "value": "%diameter%"
    }],
  "description": "Technical Details : Diameter: %diameter%, Case Material: %caseMaterial%, Dial Color: %dialColor%, Bracelet Material: %braceletMaterial%, Caliber: %caliber%"
}
"{\n  \"$schema\": \"https://cert.arianee.org/version2/ArianeeProductCertificate-i18n.json\",\n  \"name\": \"Mon NFT TEST\",\n  \"serialNumber\": [{\n    \"type\": \"serialNumber\",\n    \"value\": \"%serialNumber%\"\n    }],\n  \"description\": \"Technical Details : Diameter: %diameter%, Case Material: %caseMaterial%, Dial Color: %dialColor%, Bracelet Material: %braceletMaterial%, Caliber: %caliber%\"\n}"

💡

%value%: values which will be entered in the app.

Create template attributes

ParameterTypeDefinition
field%value%Field replaced by the digital passport content.
labelStringLabel displayed in the app.
freeEntryBooleanThe user can manually add values in the app.
requiredBooleanSet to true so the user cannot pass the step.
searchableBooleanSet to true to integrate a search bar to search options available.
type“select” / “text”Identifies the type of component to be displayed.
options[ {”label”: string, “value”: string}, {”label”: string, “value”: string}, … ]For inputs with the "select" type concerns the set of values that will be proposed.

💡

freeEntry are temporarily saved for the duration of the current form. The value will no longer be available in the template.

Example:

"attributes": [
// TYPE SELECT
      {
        "field": "%size%",
        "label": "Diameter",
        "freeEntry": true,
        "required": true,
        "searchable": true,
        "type": "select",
        "options": [
          {
            "label": "40mm",
            "value": "40mm"
          },
          {
            "label": "40mm",
            "value": "40mm"
          }
        ]
      },
// TYPE TEXT
      {
        "field": "%serialNumber%",
        "label": "Serial number",
        "freeEntry": false,
        "required": true,
        "type": "text",
        "options": []
      }
    ]

Import the template to the app

Import your freshly created template in your NFT Management Platform, use the api/smartAssetTemplate.

🎉

Your template is now available. To start pairing your products to a digital passport, log in to the Forge app with your API key scan.