Skip to content

Materials

All items can have one or more associated materials:

Material
type Material = {
id: string;
name: string;
displayName: string;
userSubmitted: boolean;
enabled: boolean;
createdAt: string;
updatedAt: string;
}
  • id : a unique id in CUID format (generated by paralleldrive)
  • name : a unique-within-family internal name, no whitespace i.e. ‘rose-gold’
  • displayName : Title-cased name for UI / Display, i.e. ‘Rose Gold’
  • hexValue : color value in hex format (optional) i.e. ‘#FFC67D’
  • hslValue : color value in HSL format (optional) i.e. ‘29, 90%, 75%’
  • userSubmitted : was the value submitted by a user? defaults to false
  • enabled : only items with enabled: true are included in API responses
  • createdAt : item creation timestamp, ISO-8601 string format
  • updatedAt : item updated timestamp, ISO-8601 string format

All materials belong to one or more Material Families:

Material Family
type MaterialFamily = {
id: string;
name: string;
displayName: string;
enabled: boolean;
createdAt: string;
updatedAt: string;
materials: Array<Material>;
}
  • id : a unique id in CUID format (generated by paralleldrive)
  • name : a unique-within-family internal name, no whitespace i.e. ‘rose-gold’
  • displayName : Title-cased name for UI / Display, i.e. ‘Rose Gold’
  • userSubmitted : was the value submitted by a user? defaults to false
  • enabled : only items with enabled: true are included in API responses
  • createdAt : item creation timestamp, ISO-8601 string format
  • updatedAt : item update
  • ** materials** : the array of associated Materials
Material Families Endpoint
$ curl /resources/material-families | jq .
[
{
"id": "yw1ogcul087ucjmn52vdzbyt",
"name": "natural",
"displayName": "Natural Fibers",
"enabled": true,
"createdAt": "2024-06-18 23:00:34.013908+00",
"updatedAt": "2024-06-18 23:00:34.013908+00",
"materials": [
{
"id": "ig0zpz11la234gc9ygqa6vxq",
"name": "silk",
"displayName": "Silk",
"userSubmitted": false,
"createdAt": "2024-06-18T23:00:34.014596+00:00",
"updatedAt": "2024-06-18T23:00:34.014596+00:00"
},
{
"id": "g8thy3ctax4ggct0a4t3uhip",
"name": "cotton",
"displayName": "Cotton",
"userSubmitted": false,
"createdAt": "2024-06-18T23:00:34.015688+00:00",
"updatedAt": "2024-06-18T23:00:34.015688+00:00"
},
],
...
},
]