return similar items for a single source item

Prev Next
Get
/v2/items/similar

Fetches similar items: items which are related to the source garment by common features.

This is the v2 equivalent of /items/{id}/related?methods=similar_items. It uses the same service objects and retry/fallback logic.

The response contains only the similar_items key: unlike the v1 related response there are no outfits or partner_outfits keys, and no user object.

If similar items cannot be generated for a garment, a fallback recommendation is returned rather than an error. The 404 below occurs if similar items are not configured for the requested department.

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.

Query parameters
id
stringRequired

The garment identifier the recommendations are requested for. The interpretation of this value is controlled by the identifier_type parameter

identifier_type
string

How Mapp Fashion should interpret id and excluded_ids. 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

The v1 value ancillary-product-code is intentionally not available in v2: the number of selectable identifier types was reduced to avoid ambiguity during onboarding. The ancillary_product_code attribute is still returned on garments.

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

Valid values[ "product-code", "sku", "fashion-id", "gtin" ]
Default"product-code"
exclude_source_garment
boolean

Whether to exclude the source item from the returned results.

Defaulttrue
excluded_ids
array of string

List of garment identifiers to be excluded from the recommendations. Must be of the same type as id Pass a comma separated list, for example excluded_ids=A,B. Bracketed array syntax is not accepted.

max_items
integer (int32)

The maximum number of items to return

Minimum1
Maximum20
Default6
max_reduced_by
integer (int32)

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

Minimum1
Maximum100
garment_format
string

The desired response format.

If simple, only basic garment identifiers are returned. If detailed, more comprehensive garment metadata (name, description, price etc.) is included.

simple is equivalent to the v1 value retailer_ids. The v1 value document is not available in v2.

With detailed, garment attributes are returned in garment_data as GarmentDetail objects. The v1 fields parameter has no v2 equivalent: the set of attributes is fixed and depends on your product data.

Valid values[ "simple", "detailed" ]
Default"simple"
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 locale 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.

pretty
boolean

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

Defaultfalse
include_fashion_ids
boolean

Controls whether Mapp Fashion garment ids (raw_garment_id) are included for the recommended items. source.raw_garment_id is returned regardless of this parameter.

Note that this defaults to false, whereas the v1 equivalent defaults to true.

Defaultfalse
Responses
200

Information about the similar garments

Expand All
object

The response of /api/v2/items/similar.

Unlike the v1 related response, only the key that applies to this endpoint is returned: there are no outfits or partner_outfits keys, and no user object.

Example{ "event_id": "6a959a3a5e29c89df1d8ddbe", "currency": "GBP", "source": { "garment_id": "TS30165MIDNIGHTNAVYHB", "raw_garment_id": 5762729, "ancillary_product_code": "TS30165" }, "garment_data": [], "similar_items": { "content_id": "6aaa509ae30e2296b0409d85", "items": [ { "garment_id": "TS30165CHARCOALHB", "ancillary_product_code": "TS30165" }, { "garment_id": "TS30420VICUNA", "ancillary_product_code": "TS30420" } ] }, "available_skus": [ { "garment_id": "TS30165CHARCOALHB", "skus": [ "TS30165CHARCOALHB-S", "TS30165CHARCOALHB-M" ] } ] }
event_id
string

An event id. Use it when posting events relating to this dataset

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
garment_data
Array of object (GarmentDetail)

Attributes of the garments in the response. Empty unless garment_format=detailed

object

An entry in garment_data, returned when garment_format=detailed.

Note that this object is not the same shape as Garment (used by the v1 recommendations endpoints): it carries the product and media attributes of the garment and identifies it via id and product_code rather than garment_id.

The set of attributes present depends on the endpoint and on what your product data contains, so individual attributes may be absent, empty or null. The v1 fields parameter has no v2 equivalent.

Do not rely on the order of this array. It does not necessarily match the order of the recommendations, which is authoritative for display.

Example{ "id": 5251640, "product_code": "TS30165CHARCOALHB", "product_id": "TS30165", "partner": "examplepartner", "retailer": "ExamplePartner", "brand_name": "Example Brand", "name": "Men's Raglan Sleeve British Tweed Coat", "price": "345.00", "old_price": "", "url": "https://www.example.com/raglan-sleeve-tweed-coat-ts30165charcoalhb/", "garment_category_id": 84, "garment_category_name": "Outerwear", "department": "male", "feed_image_urls": [ "https://media.example.com/products/TS30165CHARCOALHB.jpg" ], "image_url": "https://cdn.example.net/garment-5251640-9331038.jpg", "thumbnail_image_url": "https://cdn.example.net/thumbnail-5251640-9331038.jpg", "why": [], "has_outfits": true, "garment_status": "in stock" }
id
integer (int32)

The internal Mapp Fashion id for the garment

product_code
string

The product code from your product data

product_id
string

The product level identifier the product code belongs to (Product ID in the Product Catalog)

partner
string

The partner identifier

retailer
string

The retailer name

brand_name
string

The brand name

name
string

The product name

price
string

The current price as it appears in your product data. Formatting follows your product data and does not necessarily include a currency

old_price
string

The previous price as it appears in your product data. Empty if the garment is not reduced

rating
number | null

Product rating. May be null if your product data does not provide one

url
string

The URL of the product detail page

garment_category_id
integer (int32)

The category id for the product

garment_category_name
string

The category name for the product

department
string

The garment department

feed_image_urls
Array of string

All image URLs present in your product data

string
image_url
string

Mapp Fashion hosted image for the garment

thumbnail_image_url
string

Mapp Fashion hosted thumbnail for the garment

best_model_image
string

The product image judged to be the best model shot. May be empty

best_product_image
string

The product image judged to be the best product shot. May be null

why
Array of string

Human readable reasons for the recommendation. Only populated if the profile has shape data

string
has_outfits
boolean

Whether outfits can be generated for the garment

garment_status
string

The stock status of the garment

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

404

No similar items model is configured for the requested department. This occurs when similar items have been enabled for some departments only - for example when a request is made for kidswear while only womenswear is configured

Expand All
object

Generic error object

error
object
message
string

A human readable error message

422

Garment not found. Rare: for most garments a fallback recommendation is returned instead

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

503

The request was queued for too long because of high load. Retry the request later

Expand All
object

Generic error object

error
object
message
string

A human readable error message