Skip to content

API Guide

Jeremy Raines edited this page Mar 11, 2018 · 12 revisions

#Intro

The Stylitics API supports http or https requests, and is CORS enabled. Outfit results are cached, and the cache is refreshed hourly. When editing outfits on the Stylitics outfitting platform, be aware that the changes will take up to an hour to be reflected in the API results. Only published outfits will appear in API results.

#Endpoints

GET /api/outfits

Params

username

  • The username give to you by Stylitics. This will scope the request to any accounts you have with Stylitics (for example, if you have more than one, like yourcompany-men and yourcompany-women you will just pass yourcompany

total

  • The max number of outfit results to return. You should set this even if making a request for a gallery-type implementation -- it can be arbitrarily high if you definitely want all published outfits matching your other request params

item_number

  • Only return outfits containing the item identified in Stylitics by the parameter value. In the Stylitics outfitting platform, this field is called remote_id. It typically represent a colorway-level identifier for your product.

tags

  • A comma separated list of tags. The outfit results will contain outfits matching any of the provided tags

all_tags

  • A comma separated list of tags. The outfit results will contain outfits matching all of the provided tags.

callback

  • If present, the API request will be considered a JSONP request and the response will be returned wrapped as a function call to the function provided as the value of this param.

gender

  • Outfits returned will only be those containing items matching the specified gender. Eligible values are male and female, case sensitive.

region

  • Not applicable for most clients. This scopes the results to items from a specific region. If you haven't discussed functionality around this with Stylitics, assume this field is not set for your items.

Other params listed in the API Explorer are either used only by Stylitics' drop-in widget, or are deprecated.

GET /api/outfits/:id

Get a single outfit by its Stylitics ID

Redirects

See our Email Guide for using this part of the API

Clone this wiki locally