return outfits or similar items for a single source item

Prev Next
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.

v2 equivalent: this endpoint's methods are available as separate v2 endpoints: /api/v2/items/similar, /api/v2/items/outfits and /api/v2/items/partner_outfits. New integrations should use those.

Security
API Key: api_key
Header parameter namex-api-key
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
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 Mapp Fashion has been provided with curated outfit data for the item

Default[ "outfits", "similar_items" ]
Valid Item values[ "similar_items", "outfits", "partner_outfits" ]
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 your product data & 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 product 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 your product data & 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. If fewer outfits are available, as many as possible are returned

Default2
max_similar_items
integer (int32)

The maximum number of similar items to return.

Default6
stores
array of string

Deprecated. This parameter still returns data, but the logic behind it is no longer maintained and it has no v2 equivalent. Do not rely on it for new integrations.

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

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 your product data 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 your product data
  • sku is the variant identifier (style, color and size)
  • gtin is the barcode, for example EAN-13 or UPC

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", "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
fields
array of string

Deprecated. This parameter still returns data, but the logic behind it is no longer maintained and it has no v2 equivalent. Do not rely on it for new integrations.

A list of garment attributes to fetch. Only supported for garment_format=document or detailed. Retailer specific custom fields are named x-<field> and may be requested in addition to the values listed here - contact Mapp Fashion for details

Valid Item values[ "size", "why", "verdict", "recommendedness", "features", "occasions", "garment_category_id", "owned", "department", "eans" ]
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)

max_reduced_by
integer (int32)

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

Minimum1
Maximum100
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", "currency": "GBP", "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
currency
string | null

The currency the prices in this response are expressed in, resolved from the requested locale (the default currency if no locale is given). Null if your product data contains no currency

ExampleGBP
source
object (BareGarment)
garment_id
string

The item identifier. In v2, it uses the same identifier type as the request (identifier_type), by default the product code. In v1, the type of identifier depends on the request's 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
product_id
string

The product level identifier the item belongs to (Product ID in the Product Catalog), grouping all its colors and sizes. Omitted if your product data contains no Product ID

ExampleTS30165
ancillary_product_code
string

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

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
available_skus
Array of object (AvailableSkus)

The variant SKUs of the recommended items that are still in stock, one entry per item. An empty array when none are known.

Only reliable if the variant IDs are maintained in the Product Catalog and the products have their real product images from the first import on. Products imported with placeholder images or dummy URLs can receive SKUs of other products.

object

The in-stock variant SKUs of one recommended item.

Example{ "garment_id": "TS30165CHARCOALHB", "skus": [ "TS30165CHARCOALHB-S", "TS30165CHARCOALHB-M" ] }
garment_id
string

The item the SKUs belong to, as returned in garment_id

skus
Array of string

The variant SKUs of the item that are still in stock

string
outfits
Array of object (Outfit)

The outfits found containing the source item (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 | null

The occasion for this outfit. May be null

Examplecasual
items
Array of object (BareGarment)

The items making up the outfit

object
garment_id
string

The item identifier. In v2, it uses the same identifier type as the request (identifier_type), by default the product code. In v1, the type of identifier depends on the request's 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
product_id
string

The product level identifier the item belongs to (Product ID in the Product Catalog), grouping all its colors and sizes. Omitted if your product data contains no Product ID

ExampleTS30165
ancillary_product_code
string

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

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

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 | null

The occasion for this outfit. May be null

Examplecasual
items
Array of object (BareGarment)

The items making up the outfit

object
garment_id
string

The item identifier. In v2, it uses the same identifier type as the request (identifier_type), by default the product code. In v1, the type of identifier depends on the request's 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
product_id
string

The product level identifier the item belongs to (Product ID in the Product Catalog), grouping all its colors and sizes. Omitted if your product data contains no Product ID

ExampleTS30165
ancillary_product_code
string

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

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 item identifier. In v2, it uses the same identifier type as the request (identifier_type), by default the product code. In v1, the type of identifier depends on the request's 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
product_id
string

The product level identifier the item belongs to (Product ID in the Product Catalog), grouping all its colors and sizes. Omitted if your product data contains no Product ID

ExampleTS30165
ancillary_product_code
string

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

ExampleA1B2C3
user
object (User)
style_quiz_complete
boolean

Whether the user has completed the Mapp Fashion signup quiz

first_name
string

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

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

garment not found

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