return outfits or recommended items for a set of source items
  • 5 Minutes to read
  • Dark
    Light

return outfits or recommended items for a set of source items

  • Dark
    Light

Article summary

Get
/items/{id}/complementary

Fetches related recommendations or outfits (items which as a set complement the source item(s)) based on business rules agreed with Dressipi. Depending on the items passed and these rules, the result might be related to some, all or none of the items specified

For example this could be used on the checkout page to show recommendations based on the content of the user's basket.

This is the api equivalent of the shopping basket widget

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

The JWT for the user

Path parameters
id
arrayRequired

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

Query parameters
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
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.

excluded_ids
array of string

List of product identifiers to be excluded from the results

Responses
200

Information about the recommended garments

Expand All
object

Fetches related recommendations or outfits (items which as a set complement the source item(s)) based on business rules agreed with Dressipi. Depending on the items passed and these rules, the result might be related to some, all or none of the items specified

For example this could be used on the checkout page to show recommendations based on the content of the user's basket.

This is the api equivalent of the shopping basket widget

Example{ "event_id": "5afd8cbabb81a40059000060", "source": "recommendations", "reparentable": true, "garment_data": [], "outfits": [ { "content_id": "5afd8cf2bb81a40059000063", "garment_id": "09AC030MDE", "template_id": "aC8M5ce8", "occasion": "casual", "items": [ { "garment_id": "09AC030MDE", "raw_garment_id": 4530107, "ancillary_product_code": "111" }, { "garment_id": "07AC070BLA", "raw_garment_id": 4519879, "ancillary_product_code": "222" }, { "garment_id": "10AC005GRY", "raw_garment_id": 4470201, "ancillary_product_code": "333" }, { "garment_id": "06AC030CIV", "raw_garment_id": 4511409, "ancillary_product_code": "444" } ], "saved": true }, { "content_id": "5afd8cf2bb81a40059000064", "garment_id": "09AC030MDE", "template_id": "QJndP9N2", "occasion": "casual", "items": [ { "garment_id": "09AC030MDE", "raw_garment_id": 4530107, "ancillary_product_code": "555" }, { "garment_id": "32115WHI", "raw_garment_id": 4511570, "ancillary_product_code": "666" }, { "garment_id": "61035ANP", "raw_garment_id": 4527621, "ancillary_product_code": "777" }, { "garment_id": "08AC042BUW", "raw_garment_id": 4528351, "ancillary_product_code": "888" } ], "saved": false } ], "recommendations": { "content_id": "5afd8cbabb81a40059000061", "items": [ { "garment_id": "06M32PGY", "raw_garment_id": 4469710, "ancillary_product_code": "777" }, { "garment_id": "06AB015CDG", "raw_garment_id": 4469645, "ancillary_product_code": "888" }, { "garment_id": "06AB006IVO", "raw_garment_id": 4469628, "ancillary_product_code": "999" }, { "garment_id": "06AB006ZBO", "raw_garment_id": 4469630, "ancillary_product_code": "10111" }, { "garment_id": "06M05NWH", "raw_garment_id": 4469705, "ancillary_product_code": "10222" }, { "garment_id": "12AA017BGM", "raw_garment_id": 4470211, "ancillary_product_code": "10333" }, { "garment_id": "06AB013HEA", "raw_garment_id": 4469642, "ancillary_product_code": "10444" }, { "garment_id": "07AB044LME", "raw_garment_id": 4469849, "ancillary_product_code": "10555" }, { "garment_id": "12L12GML", "raw_garment_id": 4508554, "ancillary_product_code": "10666" }, { "garment_id": "03AC031WHI", "raw_garment_id": 4511383, "ancillary_product_code": "10777" }, { "garment_id": "07AC056EBW", "raw_garment_id": 4511433, "ancillary_product_code": "10888" }, { "garment_id": "07AA034BLA", "raw_garment_id": 4524976, "ancillary_product_code": "10999" } ] } }
event_id
string

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

Example5a621005c2c9adc12e1192b7
source
string

The method used to generate responses. Exact values will depend on business rules agreed with Dressipi

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

object
outfits
Array of object (Outfit)

The outfits to be displayed (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
recommendations
object (Recommendations)
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 recommended 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
422

unrecognized product codes

Expand All
object

Generic error object

error
object
message
string

A human readable error message


Was this article helpful?