return top curated recommendations for a user based on their basket items

Prev Next
Get
/items/basket

Returns personalized curated recommendations for a user, like /items/top. It does not return items similar to the garments in the basket. The department is taken from the garments in the basket, and these garments are excluded from the recommendations. The basket can be empty.

v2 equivalent: /api/v2/items/basket. New integrations should use it.

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
ids
array of string

List of garment identifiers representing the user's basket, for example ids=A,B. Identifiers that cannot be resolved are ignored. The basket garments are excluded from the recommendations, and the department is taken from them. If the list is empty or none of the identifiers can be resolved, recommendations are still returned.

excluded_ids
array of string

List of garment identifiers to be excluded from the recommendations.

identifier_type
string

The type of garment identifiers provided in ids and excluded_ids.

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

In general, product-code is the style + color identifier from your product data, sku is the variant identifier (style, color and size) and gtin is the barcode, for example EAN-13 or UPC.

Valid values[ "product-code", "sku", "dressipi-id", "gtin" ]
max_items
integer (int32)

The desired number of recommended items to return.

max_reduced_by
integer (int32)

The maximum price reduction (in percent) of any returned item. Requires that discount data is shared with the API.

Minimum1
Maximum100
sort
string

The attribute to sort results by. Currently only 'price' is supported.

Valid values[ "price" ]
direction
string

The direction to sort results by.

Valid values[ "asc", "desc" ]
Default"desc"
garment_format
string

The desired response format. If 'simple', only basic garment identifiers are returned. If 'detailed', more comprehensive garment metadata is included.

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

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

If true, user information will be included in the response where applicable

Responses
200

Information about the curated recommendations

Expand All
object

The basket recommendations endpoint returns curated recommendations for a user profile based on the garments in their basket (which can be empty).

This endpoint provides personalized item recommendations based on the user's profile and preferences.

Example{ "event_id": "1234567890abcdef", "currency": "GBP", "recommendations": [ { "garment_id": "Q10G10NEME", "raw_garment_id": 4532078, "ancillary_product_code": "Q-111" }, { "garment_id": "Q05R85NYLW", "raw_garment_id": 4532040, "ancillary_product_code": "Q-222" } ], "garment_data": [], "user": { "style_quiz_complete": true, "first_name": "Jane" } }
event_id
string

The unique event ID for tracking purposes

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
recommendations
Array of object (BareGarment)

The recommended items for the current basket

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

Metadata for the garments in the response

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

404

No recommender is available for this partner

Expand All
object

Generic error object

error
object
message
string

A human readable error message

422

The recommendation service reported an error. The response contains its message

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