Attributes
Attributes describe characteristics of items that aren’t already covered by color, material and other descriptive models. For example, tops and dresses may have sleeve length, handbags may have a buckle style, skirts may have a leg length and so on. Any item can have one or many associated attributes.
Attributes Model
Section titled “Attributes Model”type Color = {id: string;name: string;displayName: string;category: Pick<Category, 'name' | 'displayName'>subCategories: Array<Pick<SubCategory, 'name' | 'displayName'>>choices: Array<{name: string; displayName: string;}required: boolean;multi: boolean;enabled: boolean;createdAt: string;updatedAt: string;}Intrinsic values:
Section titled “Intrinsic values:”- 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’
- category : which primary category this attribute applies to
- subCategory : array of valid subCategories that can use this attribute
- choices : array of name/displayName pairs representing valid choices for this attribute
- required : is this attribute required for this category/subCategory combination?
- multi : are multiple choices valid for this attribute?
- enabled
: only items with
enabled: trueare included in API responses - createdAt : item creation timestamp, ISO-8601 string format
- updatedAt : item updated timestamp, ISO-8601 string format
Endpoints
Section titled “Endpoints”$ curl /resources/attributes | jq .[ { "id": "s941kzecf4airxe919qh35p8", "name": "sleeve-length", "displayName": "Sleeve Length", "category": { "name": "clothing", "displayName": "Clothing" }, "subCategories": [ { "name": "dress", "displayName": "Dress" }, { "name": "outerwear", "displayName": "Outerwear" }, { "name": "knitwear", "displayName": "Knitwear" }, { "name": "top", "displayName": "Top / Shirt" }, { "name": "jumpsuit", "displayName": "Jumpsuit" } ], "choices": [ { "name": "long", "displayName": "Long" }, { "name": "short", "displayName": "Short" }, { "name": "sleeveless", "displayName": "Sleeveless" }, { "name": "one-sleeve", "displayName": "One Sleeve" }, { "name": "strapless", "displayName": "Strapless" } ], "required": false, "multi": false, "enabled": true, "createdAt": "2024-06-18 23:00:35.584322+00", "updatedAt": "2024-06-18 23:00:35.584322+00" }, ...]