return outfits or recommended items for a set of source items

Prev Next
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 Mapp Fashion. 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: api_key
Header parameter namex-api-key
api_key & user_token
API Key: api_key
Header parameter namex-api-key

API Key: user_token
Header parameter namex-dressipi-jwt

The JWT for the user. Optional: requests without a user token return non-personalized results. The header name is unchanged for backwards compatibility.

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 Mapp Fashion 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 Mapp Fashion 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 Mapp Fashion 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)

There is no fallback logic for partial matches: an identifier must match completely, and the first match is used for the response.

ancillary-product-code is an additional, optional product code. When used, it is checked against the product code column for a complete match.

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

Defaultfalse
include_dressipi_ids
boolean

Controls whether Mapp Fashion 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 Mapp Fashion. 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 Mapp Fashion

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

An outfit built around a source garment: the occasion it was built for, the template used and the items it consists of.

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 Mapp Fashion 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. May be null, for example on /items/{id}/complementary, where outfits are not built per occasion

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 Mapp Fashion 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 Mapp Fashion 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
400

One or more parameter values are invalid

Expand All
object

Generic error object

error
object
message
string

A human readable error message

403

Invalid JWT: a user token was supplied but could not be verified. Requests without a user token are not affected - they return non-personalized results

Expand All
object

Generic error object

error
object
message
string

A human readable error message

422

unrecognized product codes

Expand All
object

Generic error object

error
object
message
string

A human readable error message

500

An internal error occurred. Retry the request. If the issue persists, contact Technical Support

Expand All
object

Generic error object

error
object
message
string

A human readable error message