Skip to main content

Set Up Materials through API

➡️ See the API Reference documentation 🔗 for detailed information.

Create a Material using the API

Below is an example of the creation of a material returned by POST ​/materials​. Note the ID, the name, the brand, the presentation (i.e. the resource) and the thumbnail.

{
"id": "myId",
"brandID": "my-brand",
"name": "my material",
"uuid": "1b50cb32-15e5-4d8f-a3d0-8a6b851ffa44",
"modelData": {},
"dateUpdate": "2017-12-18 14:58:17",
"isDeleted": false,
"freeTags": [
"mat cat 1",
"mat cat 2"
],
"description": "my description",
"tagIDs": [
1,
15
],
"presentation": {
"model3D": {
"highQualityUrl": "http://XXX/myHQ3D.zip",
"mediumQualityUrl": "http://XXX/myMQ3D.zip",
"lowQualityUrl": "http://XXX/myLQ3D.zip"
},
"model2D": {
"url": "http://XXX/my2D.svg"
},
"thumbnail": {
"largeResolutionUrl": "http://XXX/HRThumbnail.jpeg",
"mediumResolutionUrl": "http://XXX/MRThumbnail.jpeg",
"smallResolutionUrl": "http://XXX/LRThumbnail.jpeg"
}
}
}

Use the Material as Parameter of a Product

Once the material is created, this resource can be used as a parameter possible value of a product. To set up this value, the parameter must be defined with "type 6 - material" and the material is identified by its ID.


"material": {
"ids": [
"material_sample"
],
"tags": [],
"typeID": 6,
"editable": null,
"nullable": false,
"translation": {
"name": {
"2": "material"
}
},
"defaultValue": "material_sample"
}