Retrieve styling

get/v1/datasets/{datasetId}/styling

How 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.

Private keyapi.v1.datasets.styling.retrieveNo demo

Path parameters

1
datasetIdstring (uuid)required

The dataset's id, as returned when it was created.

Response

200The styling settings, every gap filled with its default.
DatasetStylingrequired

A store's styling settings, as the dataset's Styling tab edits them.

offarray<string>required

Ids of the rules switched off. Every other rule is on.

One ofprintLeadspalettesetsmaterialsoccasiontuckAsShownplainBackground
array<object>required

House basics, at most 8.

maxItems: 8
choosingstringrequired

The store's own rules for choosing pieces, one per line. At most 1,200 characters.

maxLength: 1200
picturestringrequired

The store's own rules for how looks are drawn, one per line. At most 1,200 characters.

maxLength: 1200
tryOnboolean

Whether shoppers may see a look on their own photo (userPhotoUrl on POST /v2/agent/looks). Left out of an update, it is on.

default: true
DatasetSizingrequired

How the stylist finds a shopper's size in this store.

object

Sizes they wear at other brands.

Errors

20

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

404
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"
Response · 200
{
  "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"
      ]
    }
  }
}