Create Template API
As a brand, you wish to create a digital passport template to pair your physical products with digital passports.
URL
To create and import your template on your NFT Management Platform, use api/smartAssetTemplate
.
POST - https://{url}/smartAssetTemplate
Body
To create your template, you must build:
- Header: metadata and content of the digital passport.
- Attributes: form fields.
1. Create the template header
Parameter | Type | Mandatory | Definition |
---|---|---|---|
blockchainProperties | Object | ✅ | Transfer settings: - isTransferable : Set true if the digital passport is claimable.- showTransferableOption : Set true to display the Transferable option on the app. |
metadata | Object | ✅ | Metadata of the template: - name : Name of the product.- icon : Product icon displayed in the app. |
content | String | ❌ | Json Schema with the template content. After doing the JSON content, stringify it. |
[
{
"deleted": false,
"blockchainProperties": {
"isTransferable": true,
"showTransferableOption": true
},
"metadata": {
"name": "Product name",
"icon": "https://www.arianee.com/content/dam/ap/com/products/watches/importer"
},
"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.
2. Create template attributes
Field | Type | Mandatory | 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. 💡 freeEntry are temporarily saved for the duration of the current form. The value will no longer be available in the template. |
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. |
"attributes": [
{
"field": "%size%",
"label": "Diameter",
"freeEntry": true,
"required": true,
"searchable": true,
"type": "select",
"options": [
{
"label": "40mm",
"value": "40mm"
},
{
"label": "40mm",
"value": "40mm"
}
]
},
{
"field": "%serialNumber%",
"label": "Serial number",
"freeEntry": false,
"required": true,
"type": "text",
"options": []
}
]
3. Complete Body
[{
"deleted":false,
"blockchainProperties": {
"isTransferable": true,
"showTransferableOption":true
},
"metadata": {
"name": "Product name",
"icon": "https://www.arianee.com/content/dam/ap/com/products/watches/importer"
},
"content": "{\n \"$schema\": \"https://cert.arianee.org/version2/ArianeeProductCertificate-i18n.json\",\n \"language\": \"fr-FR\",\n \"name\": \"ROYAL OAK GRANDE COMPLICATION SQUELETTE\",\n \"category\": \"accessory\",\n \"subCategory\": \"watch\",\n \"serialnumber\": [\n {\n \"type\": \"serialnumber\",\n \"value\": \"%serialnumber%\"\n },\n {\n \"type\": \"casenumber\",\n \"value\": \"%casenumber%\"\n }\n ],\n \"model\": \"Royal Oak\",\n \"description\": \"\\nCombinant les 3 catégories de complications horlogères (mesure des temps courts, mécanismes de sonnerie et indications astronomiques), ce modèle entraîné par le calibre %calibre% a été entièrement fabriqué à la main par un seul et même maître-horloger de l’atelier Grandes Complications Audemars Piguet.\\n\\nBoîte de %diameter% en %caseMaterial% avec lunette acier, glace et fond saphir, couronne vissée\\n\\nCadran saphir, compteurs fumés, aiguilles Royal Oak en %aiguilleMaterial% avec dépôt luminescent, aiguilles compteurs/seconde/rattrapante blanches, réhaut noir avec minuterie blanche, mouvement couleur ardoise.\",\n \"externalContents\": [\n {\n \"type\": \"website\",\n \"title\": \"Audemars Piguet Website\",\n \"url\": \"https://www.audemarspiguet.com/com/fr/home.html\"\n }\n ],\n \"medias\": [\n {\n \"mediaType\": \"picture\",\n \"type\": \"product\",\n \"url\": \"https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpmain.png\"\n },\n {\n \"mediaType\": \"picture\",\n \"type\": \"brandItemBackgroundPicture\",\n \"url\": \"https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpfeaturedcase.png\"\n },\n {\n \"mediaType\": \"picture\",\n \"type\": \"product\",\n \"url\": \"https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpfeatureddial.png\"\n }\n ]\n}",
"attributes": [
{
"field": "%serialnumber%",
"label": "Serial number",
"freeEntry": false,
"required": true,
"type": "text",
"options": []
},
{
"field": "%casenumber%",
"label": "Case number",
"freeEntry": false,
"required": true,
"type": "text",
"options": []
},
{
"field": "%diameter%",
"label": "Diameter",
"freeEntry": false,
"required": true,
"type": "select",
"options": [{
"label": "42mm",
"value": "42mm"
}, {
"label": "44mm",
"value": "44mm"
}
]
},
{
"field": "%caseMaterial%",
"label": "Case material",
"freeEntry": false,
"required": true,
"type": "select",
"options": [{
"label": "Or rose 18k",
"value": "Or rose 18k"
},{
"label": "Or jaune 18k",
"value": "Or jaune 18k"
}
]
},
{
"field": "%aiguilleMaterial%",
"label": "Needle material",
"freeEntry": false,
"required": true,
"type": "select",
"options": [{
"label": "Or rose 24k",
"value": "Or rose 24k"
},{
"label": "Or jaune 24k",
"value": "Or jaune 24k"
}
]
}
]
}]
Return Payload
Status Code | Description |
---|---|
200 | The template data are returned. |
[
{
"attributes": [
{
"field": "%serialnumber%",
"label": "Serial number",
"freeEntry": false,
"required": true,
"type": "text",
"options": []
},
{
"field": "%casenumber%",
"label": "Case number",
"freeEntry": false,
"required": true,
"type": "text",
"options": []
},
{
"field": "%diameter%",
"label": "Diameter",
"freeEntry": false,
"required": true,
"type": "select",
"options": [
{
"label": "42mm",
"value": "42mm"
},
{
"label": "44mm",
"value": "44mm"
}
]
},
{
"field": "%caseMaterial%",
"label": "Case material",
"freeEntry": false,
"required": true,
"type": "select",
"options": [
{
"label": "Or rose 18k",
"value": "Or rose 18k"
},
{
"label": "Or jaune 18k",
"value": "Or jaune 18k"
}
]
},
{
"field": "%aiguilleMaterial%",
"label": "Needle material",
"freeEntry": false,
"required": true,
"type": "select",
"options": [
{
"label": "Or rose 24k",
"value": "Or rose 24k"
},
{
"label": "Or jaune 24k",
"value": "Or jaune 24k"
}
]
}
],
"_id": "63a5cfee94ea7835457d5800",
"deleted": false,
"blockchainProperties": {
"isTransferable": true,
"showTransferableOption": true
},
"metadata": {
"name": "ROYAL OAK GRANDE COMPLICATION SQUELETTE",
"icon": "https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpmain.png"
},
"content": "{\n \"$schema\": \"https://cert.arianee.org/version2/ArianeeProductCertificate-i18n.json\",\n \"language\": \"fr-FR\",\n \"name\": \"ROYAL OAK GRANDE COMPLICATION SQUELETTE\",\n \"category\": \"accessory\",\n \"subCategory\": \"watch\",\n \"serialnumber\": [\n {\n \"type\": \"serialnumber\",\n \"value\": \"%serialnumber%\"\n },\n {\n \"type\": \"casenumber\",\n \"value\": \"%casenumber%\"\n }\n ],\n \"model\": \"Royal Oak\",\n \"description\": \"\\nCombinant les 3 catégories de complications horlogères (mesure des temps courts, mécanismes de sonnerie et indications astronomiques), ce modèle entraîné par le calibre %calibre% a été entièrement fabriqué à la main par un seul et même maître-horloger de l’atelier Grandes Complications Audemars Piguet.\\n\\nBoîte de %diameter% en %caseMaterial% avec lunette acier, glace et fond saphir, couronne vissée\\n\\nCadran saphir, compteurs fumés, aiguilles Royal Oak en %aiguilleMaterial% avec dépôt luminescent, aiguilles compteurs/seconde/rattrapante blanches, réhaut noir avec minuterie blanche, mouvement couleur ardoise.\",\n \"externalContents\": [\n {\n \"type\": \"website\",\n \"title\": \"Audemars Piguet Website\",\n \"url\": \"https://www.audemarspiguet.com/com/fr/home.html\"\n }\n ],\n \"medias\": [\n {\n \"mediaType\": \"picture\",\n \"type\": \"product\",\n \"url\": \"https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpmain.png\"\n },\n {\n \"mediaType\": \"picture\",\n \"type\": \"brandItemBackgroundPicture\",\n \"url\": \"https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpfeaturedcase.png\"\n },\n {\n \"mediaType\": \"picture\",\n \"type\": \"product\",\n \"url\": \"https://www.audemarspiguet.com/content/dam/ap/com/products/watches/MTR003700.00/importer/watch.png.transform.appdpfeatureddial.png\"\n }\n ]\n}",
"__v": 0,
"id": "63a5cfee94ea7835457d5800"
}
]
Updated about 1 month ago