Overview
The facetted recommendations API allows you to retrieve the most recommended garments, filtered and refined by various dimensions (facets). It supports both single and multiple filters, range queries, and pagination.
The API can also return metadata about hits for other filter values (facetted counts), making it suitable for building guided product discovery experiences.
Filter Dimensions / Aggregations
The following dimensions are supported (sometimes called aggregations or filter dimensions):
garment_categorybrandoccasionmust_haveretailer_labels: Depends on the data present in the product feed. Theretailer_labelsaggregation allows you to query against fields in the product feed consumed (these should be agreed with Mapp).store: If Mapp has been provided with per-store availability data, this filters or aggregates on availability by storefeature_ids: Mapp Fashion feature IDsnot_features_ids: Exclude results with these feature IDs.price: supports rangesreduced_by: Percentage discount filter (0–100).
Making Requests
Endpoint
POST /api/recommendations/facetted?per_page=10&page=2&garment_format=detailedParameters
Key | Required | Description |
|---|---|---|
| Optional | Page number for pagination |
| Optional | Number of results per page |
| Optional | Test/experiment variation |
| Fixed | Hardcoded to |
Post Body (Facets)
Single Filter Facet
{
"name": "brand",
"value": ["Nike", "Adidas"]
}Field | Type | Description |
|---|---|---|
| Dimension | The dimension being filtered |
| Array | Array of allowed values |
Multi Filter Facet
{
"name": "price",
"filters": [
{ "from": 20, "to": 50 },
{ "from": 70 }
]
}Field | Type | Description |
|---|---|---|
| Dimension | The dimension being filtered |
| Array | List of value or range filters (e.g., multiple price ranges) |
Dressipi("facetted", "search", {
facets: [
{
name: "retailer_labels", // these should be aggreed with Mapp ahead of time
value: ["Womenswear > Dresses"]
},
{
name: "feature_ids", // these are Mapp Fashion feature ids
filters: [
{"value": [1,2]},
{"value": [3,4]}
]
},
{
name: "price",
filters: [
{
from: 50,
to: 100
}
],
ranges: [ // alternatively, multiple ranges can be present as follows:
{to: 50},
{from: 50, to: 100},
{from: 100}
]
}
],
placement_id: "A_UUID_PROVIDED_BY_MAPP",
onSuccess: (data) => {
},
onFailure: (err) => {},
});Response Structure
High-level Example
Here's an example of the data you'll receive in the onSuccess callback. You should ignore fields not specified below.
{
recommendations: [
{
// this is the the retailer identifier for this item
id: "TKBETTYMERINOWOOLBlackBlack",
// this is the Mapp Fashion identifier for this item
dressipi_item_id: 5307387,
},
...
],
pagination: {
total_pages: 80,
total_items: 960,
current_page: 1
}
}Detailed Response (FacettedResponse)
Field | Type | Description |
|---|---|---|
| String | Unique ID for the request |
| String | Tracking ID for context/content |
| Array | List of recommended items |
| Object | Pagination metadata |
| String | Present only in raw response |
Pagination Metadata
Field | Type | Description |
|---|---|---|
| Number | Total number of pages |
| Number | Current page number |
| Number | Total number of available items |
DetailedItem
Field | Type | Description |
|---|---|---|
| String | External item ID (retailer identifier) |
| Number | Internal Mapp Fashion item ID |
| String | Product name |
| String | Brand name |
| String | Product URL |
| String | An array of image URLs |
| String | Primary image URL |
| Boolean | Indicates if the item has outfit associations |
| String | in stock / out of stock |
| String | Current price |
| String | Previous price (if discounted) |