return outfits or similar items for a single source item
  • 7 Minutes to read
  • Dark
    Light

return outfits or similar items for a single source item

  • Dark
    Light

Article summary

Get
/items/{id}/related

Fetches either similar items (items which are related to the source item by common features) or outfits (items which as a set complement the source item).'

This is the api equivalent of the outfits widget.

Security
API Key
Header parameter namex-api-key
API Key
Header parameter namex-dressipi-jwt

The JWT for the user

Path parameters
id
stringRequired

An identifier for the source item. The interpretation of this item is controlled by the identifier_type parameter

Query parameters
methods
array of string

The methods through which related items should be generated. These are attempted in order.

The partner_outfits method is only available if Dressipi has been provided with curated outfit data for the item

try_all_methods
boolean

If false (the default), the methods listed are attempted until one succeeds and only results for that method are returned.

If true, results for all successful methods are returned

locale
string

A locale parameter describing what stock information to use and what language to return text in (if applicable). This parameter will only function if the corresponding information is in the product feed & processed accordingly. If stock local and UI language are not the same, specify the language parameter in addition to this one.

language
string

Allows you to specify a locale used for feed attributes such as product name that should be localized using a different locale to price & stock information. This parameter will only function if the corresponding information is in the product feed & processed accordingly.

exclude_source_garment
boolean

Whether to exclude the source item from any returned outfits or not

Defaulttrue
outfits_per_occasion
integer (int32)

The number of outfits to attempt to return per occasion. In the case of a single occasion garment, this limit is doubled internally

Default2
max_similar_items
integer (int32)

The maximum number of similar items to return.

Default6
max_reduced_by
integer (int32)

The maximum price reduction (in percent) of any returned items

stores
array of string

List of stores to filter recommendations by. An item must be available in at least one of the specified stores in order to be returned.

This requires that per-store availability data is shared with dressipi

garment_format
string

The desired response format.

The response includes a description of the outfits / similar items but no data on the items themselves: since these may be repeated within the response, garment data is provided separately in the response.

The detailed format includes the most amount of item metadata (name, description, price etc).

The document format only includes item identifiers, and if requested dressipi generated information about the item, such as predicted size.

The retailer_ids format only returns the item identifiers.

Valid values[ "detailed", "document", "retailer_ids" ]
Default"retailer_ids"
identifier_type
string

How dressipi should interpret the item id. Not all of these may be available, depending on the information in the product feed and how it is processed. Contact dressipi for examples of these types for your specific integration.

In general

  • product-code is the style + color identifier from the feed
  • sku is style without color or size (can be supplemented with an extra parameter specifying the color + size variant)
Valid values[ "dressipi-id", "ean", "gtin", "product-code", "sku", "ancillary-product-code" ]
Default"product-code"
pretty
boolean

If true, pretty print Json output. This increases response size and should usually be off in production environments

include_dressipi_ids
boolean

Controls whether Dressipi garment ids (raw_garment_id) are included in response

Defaulttrue
fields
array of string

A list of garment attributes to fetch. Only supported for garment_format=document or detailed. Custom fields may be available - contact Dressipi for details

sku_refinement
string

When identifier_type is set to sku, identifies the particular size+color variant

excluded_ids
array of string

List of product identifiers to be excluded from the results. The interpretation of this item is controlled by the identifier_type parameter

include_user_data
boolean

Include information about the user in the response (if known)

Responses
200

Information about the related garments

Expand All
object

Fetches either similar items (items which are related to the source item by common features) or outfits (items which as a set complement the source item).'

This is the api equivalent of the outfits widget.

Example{ "event_id": "57fe1f6f44b3a71e07000018", "reparentable": false, "outfits": [ { "content_id": "5a586e000e345073dc005d80", "garment_id": "EH602-cobalt", "items": [ { "garment_id": "EH602-cobalt", "raw_garment_id": 4086212 }, { "garment_id": "BS691-silver", "raw_garment_id": 4407754 }, { "garment_id": "JA112-silver", "raw_garment_id": 4407761 }, { "garment_id": "JA025-grey", "raw_garment_id": 4412237 } ], "occasion": "occasion", "template_id": "gcHg-zQI", "saved": true }, { "content_id": "5a586e040e345073d9006d74", "garment_id": "EH602-cobalt", "items": [ { "garment_id": "XD007-ivory", "raw_garment_id": 4406224 }, { "garment_id": "EH602-cobalt", "raw_garment_id": 4086212 }, { "garment_id": "BL806-black", "raw_garment_id": 4429859 }, { "garment_id": "JA654-black", "raw_garment_id": 4428429 } ], "occasion": "occasion", "template_id": "MSnOF6ML", "saved": false } ], "similar_items": { "content_id": "5a586e040e345073d9006d75", "items": [ { "garment_id": "XQ164-blue", "raw_garment_id": 4415997, "ancillary_product_code": "XB-111" }, { "garment_id": "TK866-purple", "raw_garment_id": 4126091, "ancillary_product_code": "TP-222" }, { "garment_id": "FM799-ultraviolet", "raw_garment_id": 4167941, "ancillary_product_code": "FU-333" }, { "garment_id": "GL075-cobalt", "raw_garment_id": 4298227, "ancillary_product_code": "GC-444" }, { "garment_id": "MP208-zebra-print", "raw_garment_id": 4125958, "ancillary_product_code": "MZP-555" }, { "garment_id": "GL038-navy-spot", "raw_garment_id": 4421750, "ancillary_product_code": "GLS-666" } ] }, "partner_outfits": [], "garment_data": [], "source": { "garment_id": "EH602-cobalt", "raw_garment_id": 4086212, "ancillary_product_code": "EC-123" }, "user": { "style_quiz_complete": true, "first_name": "Jane" } }
event_id
string

An event id. This should be used when posting events relating to this dataset.

Example5a621005c2c9adc12e1192b7
source
object (BareGarment)
garment_id
string

The garment_id. The type of identifier used depends on the requests garment_format

ExampleABC-123
raw_garment_id
integer (int32)

The internal dressipi id for the garment. This may be omitted depending on garment_format

Example123456
ancillary_product_code
string

An alternative identifier to identify the product, hidden when not provided in feed

ExampleA1B2C3
reparentable
boolean

If true, the eventid should be posted to /events//reparent

garment_data
Array of object

Extra data about the garments in the response. Only present for detailed and document response formats. Do not rely on this for the correct ordering of results (use the similar_items or outfits key as appropriate)

object
outfits
Array of object (Outfit)

The outfits found containing the source item (if any)

object

Create a saved outfit from the provided parameters. Requires that a user be authenticated.

For example to save an outfit submit either raw_garment_ids:

{
  "occasion": "work",
  "garments": [
    {raw_garment_id: 123456, main: true},
    {raw_garment_id: 654321},
    ...
  ],
  "template_id": "7yJG6NcV"
}

or garment_ids:

{
  "occasion": "work",
  "garments": [
    {garment_id: "123-ABC", main: true},
    {garment_id: "ABC-123"},
    ...
  ],
  "template_id": "7yJG6NcV"
}
content_id
string

An opaque identifier identifying this section of the response. This should be used when posting posting events relating to an item in this outfit.

Example5a621005c2c9adc12e1192b7
garment_id
string

The garment id for which the outfit was constructed

ExampleABC-123
raw_garment_id
integer (int32)

The internal dressipi id for the main garment. This may be omitted depending on garment_format

Example123456
template_id
string

A string identifying the template from which the outfit was constructed

ExamplexyzAbc
occasion
string

The occasion for this outfit

Examplecasual
items
Array of object (BareGarment)

The items making up the outfit

object
garment_id
string

The garment_id. The type of identifier used depends on the requests garment_format

ExampleABC-123
raw_garment_id
integer (int32)

The internal dressipi id for the garment. This may be omitted depending on garment_format

Example123456
ancillary_product_code
string

An alternative identifier to identify the product, hidden when not provided in feed

ExampleA1B2C3
id
string

The saved outfit id

saved
boolean

Indicate whether the user saved the outfit or not

ExampleTrue
partner_outfits
Array of object (Outfit)

The partner_outfits found containing the source item (if any). template_id will always be partner_outfit for these outfits

object

Create a saved outfit from the provided parameters. Requires that a user be authenticated.

For example to save an outfit submit either raw_garment_ids:

{
  "occasion": "work",
  "garments": [
    {raw_garment_id: 123456, main: true},
    {raw_garment_id: 654321},
    ...
  ],
  "template_id": "7yJG6NcV"
}

or garment_ids:

{
  "occasion": "work",
  "garments": [
    {garment_id: "123-ABC", main: true},
    {garment_id: "ABC-123"},
    ...
  ],
  "template_id": "7yJG6NcV"
}
content_id
string

An opaque identifier identifying this section of the response. This should be used when posting posting events relating to an item in this outfit.

Example5a621005c2c9adc12e1192b7
garment_id
string

The garment id for which the outfit was constructed

ExampleABC-123
raw_garment_id
integer (int32)

The internal dressipi id for the main garment. This may be omitted depending on garment_format

Example123456
template_id
string

A string identifying the template from which the outfit was constructed

ExamplexyzAbc
occasion
string

The occasion for this outfit

Examplecasual
items
Array of object (BareGarment)

The items making up the outfit

object
garment_id
string

The garment_id. The type of identifier used depends on the requests garment_format

ExampleABC-123
raw_garment_id
integer (int32)

The internal dressipi id for the garment. This may be omitted depending on garment_format

Example123456
ancillary_product_code
string

An alternative identifier to identify the product, hidden when not provided in feed

ExampleA1B2C3
id
string

The saved outfit id

saved
boolean

Indicate whether the user saved the outfit or not

ExampleTrue
similar_items
object (SimilarItems)
content_id
string

An opaque identifier identifying this section of the response. This should be used when posting events relating to an item in this outfit.

Example5a621005c2c9adc12e1192b7
items
Array of object (BareGarment)

The similiar items

object
garment_id
string

The garment_id. The type of identifier used depends on the requests garment_format

ExampleABC-123
raw_garment_id
integer (int32)

The internal dressipi id for the garment. This may be omitted depending on garment_format

Example123456
ancillary_product_code
string

An alternative identifier to identify the product, hidden when not provided in feed

ExampleA1B2C3
user
object (User)
style_quiz_complete
boolean

Whether the user has completed the dressipi signup quiz

first_name
string

The user's first name, if they have supplied it

422

garment not found

Expand All
object

Generic error object

error
object
message
string

A human readable error message


Was this article helpful?