Retrieve styling
/v1/datasets/{datasetId}/stylingHow the stylist puts this store's pieces together and how its looks are drawn: the settings of the dataset's Styling tab. A store that never changed them gets the defaults, with every rule on.
Rules
Every rule is on unless its id is in off. Rules for choosing pieces:
printLeads (one print leads each look), palette (colours that
belong together), sets (matching sets stay together), materials
(fabrics that match) and occasion (one occasion per look). Rules for
the picture: tuckAsShown (tops worn the way the store's photos show
them) and plainBackground (a plain studio background).
House basics
basics are plain pieces the store styles with but does not sell, like
dark jeans or boots. The stylist can finish a look with one rather than
force in another print, and shoppers see them listed as not sold here.
Sizing
sizing.brandSizes says how the stylist finds a shopper's size here.
With enabled on (the default) it asks what they wear at other brands,
on a card of brand tiles, and works out their size in this store from
that; with it off, it asks for their measurements and reads the store's
size guide. logos shows other brands' logos on the card (else their
names), and excludedBrands lists brands the card leaves out and the
stylist never uses as a reference. The store's own brand is always left
out.
Path parameters
1The dataset's id, as returned when it was created.
Response
A store's styling settings, as the dataset's Styling tab edits them.
Ids of the rules switched off. Every other rule is on.
printLeadspalettesetsmaterialsoccasiontuckAsShownplainBackgroundHouse basics, at most 8.
The store's own rules for choosing pieces, one per line. At most 1,200 characters.
The store's own rules for how looks are drawn, one per line. At most 1,200 characters.
Whether shoppers may see a look on their own photo (userPhotoUrl on POST /v2/agent/looks). Left out of an update, it is on.
How the stylist finds a shopper's size in this store.
Sizes they wear at other brands.
Errors
20Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
Dataset not found.No dataset with this datasetId belongs to the key's organization.
curl -X GET "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID/styling" \
-H "Authorization: Bearer $STYLOR_API_KEY"{
"styling": {
"off": [
"tuckAsShown"
],
"basics": [
{
"text": "Dark-wash straight-leg jeans",
"slot": "bottom"
},
{
"text": "Brown leather cowboy boots",
"slot": "footwear"
}
],
"choosing": "Denim pieces are always the base of a look.",
"picture": ""
},
"sizing": {
"brandSizes": {
"enabled": true,
"logos": true,
"excludedBrands": [
"boohoo"
]
}
}
}