List available genders

get/v1/datasets/genders

Returns which of mens and womens have at least one item across all of your organization's active datasets. Use it to decide whether to show a gender toggle in your storefront, or to pick a sensible default for chat and outfit requests.

This is a public-key endpoint and answers CORS preflight requests with Access-Control-Allow-Origin: *, so it can be called straight from a browser. It is also available in demo mode.

Good to know

  • Only mens and womens are ever reported. Unisex items are counted under whichever gender the catalogue assigned them and do not produce a third value.
  • An organization with no active datasets gets an empty array, not an error.
  • The answer is read from a precomputed index of the catalogue, so a dataset that finished ingesting moments ago may not be reflected yet.
Public keyapi.v1.datasets.gendersDemo key OK

Response

200The genders with stock.
availableGendersarray<string>required

Subset of mens and womens that have at least one item. May be empty.

One ofmenswomens

Errors

17

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

This endpoint has no errors of its own beyond the shared set below.

curl -X GET "https://stylor.ai/api/v1/datasets/genders" \
  -H "Authorization: Bearer $STYLOR_API_KEY"
Response · 200
{
  "availableGenders": [
    "mens",
    "womens"
  ]
}