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
Parameter | Type | Definition |
---|---|---|
metadata | Object | Metadata of the template: - name : Name of the product.- icon : Product icon displayed in the app. |
blockchainProperties | Object | Transfer setting: - isTransferable : Set true if the digital passport is claimable.- showTransferableOption : Set true to display the Transferable option on the app. |
content | String | Json 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
Parameter | Type | Definition |
---|---|---|
field | %value% | Field replaced by the digital passport content. |
label | String | Label displayed in the app. |
freeEntry | Boolean | The user can manually add values in the app. |
required | Boolean | Set to true so the user cannot pass the step. |
searchable | Boolean | Set 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.
Updated about 1 year ago