--- title: "Outfits and Similar Items (Standalone)" slug: "mapp-fashion-outfits-and-similar-items-standalone" description: "Request outfits and partner outfits easily via JavaScript or HTTP. Learn about item assembly and API usage for optimal results." tags: ["Outfit Requests", "JavaScript Client", "API Integration"] updated: 2026-09-16T14:19:08Z published: 2026-09-16T14:19:08Z canonical: "docs.mapp.com/mapp-fashion-outfits-and-similar-items-standalone" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Outfits and Similar Items (Standalone) ## Overview You can request outfits, partner outfits (also known as "model wears"; available only when enabled), and/or similar items in a single call via the browser JavaScript client library or by direct HTTP request. For what outfits are and how they are assembled, see [How outfits work](/v1/docs/mapp-fashion-introduction) in the Integration Overview. > [!NOTE] > **Important:** > > - Follow the [Interaction Tracking guide](/v1/docs/interaction-tracking-1) and do not change the order or grouping of items returned. > - Partner outfits are available only if Dressipi/Mapp Fashion has the necessary data. --- ## Endpoint (HTTP) ```http GET https://api.your-domain.com/api/items/{item_id}/related ``` > [!NOTE] > Note > > The exact domain depends on your Mapp Fashion environment and is supplied during onboarding. There is no shared API host. All properties on the request object are translated into query string parameters. Unrecognized keys are passed through (e.g., `locale`). ```javascript Dressipi("related", "items", {  item_id: "YOUR_PRODUCT_CODE_OR_SKU",  placement_id: "A_UUID_PROVIDED_BY_DRESSIPI",  response_format: "detailed",  methods: ["outfits", "partner_outfits", "similar_items"], // should be an array, amend as required  try_all_methods: true, // if false (the default), the methods listed are attempted until one succeeds  onSuccess: (data) => {},  onFailure: (err) => {}, }); ``` **Common query params** - `methods` – comma-separated list of methods to request - `garment_format` – maps from `response_format` (see below) - `try_all_methods` – boolean --- ## Request Parameters | Key | Type | Required | Description | | --- | --- | --- | --- | | `item_id` | `string` | Yes | ID of the anchor item to retrieve related content for. | | `methods` | `RelatedItemsMethod \| RelatedItemsMethod[]` | No | Methods to include: `outfits`, `partner_outfits`, `similar_items`. | | `try_all_methods` | `boolean` | No | If true, tries all methods, falling back if one fails. Default: `false`. | | `response_format` | `RequestedResponseFormat` | No | Format of returned item data. Maps to URL param `garment_format`. Default: `detailed`. | | `outfits_per_occasion` | `number` | No | Max number of outfits per occasion. | | `max_similar_items` | `number` | No | Max number of similar items. | | `max_reduced_by` | `number` | No | Max price reduction threshold (percentage). | | `identifier_type` | `IdentifierType` | No | Controls the interpretation of `item_id`. | | `locale` | `string` | No | e.g., `en`. Passed through to the endpoint even if not typed in the JavaScript client library. | | `onSuccess` | `(res) => void` | No | Success callback. | | `onFailure` | `(err) => void` | No | Error callback. | > [!NOTE] > **Pass-through behavior**: > > Any additional keys you include (e.g., `locale`) will be forwarded as URL parameters. --- ## IdentifierType | Value | Description | | --- | --- | | `dressipi-id` | Internal Dressipi item identifier. | | `ean` | EAN barcode. | | `product-code` | Merchant’s product code. | | `sku` | Stock Keeping Unit. | --- ## RequestedResponseFormat | Value | Description | | --- | --- | | `detailed` | Full detailed data for each item. | | `document` | Minimal metadata document format. | | `retailer_ids` | Only retailer item IDs. | --- ## Config Key - URL Parameter Mapping | JavaScript Client Library Key | URL Parameter | | --- | --- | | `response_format` | `garment_format` | | `methods` | `methods` (comma-separated) | | `try_all_methods` | `try_all_methods` | | `outfits_per_occasion` | `outfits_per_occasion` | | `max_similar_items` | `max_similar_items` | | `max_reduced_by` | `max_reduced_by` | | `identifier_type` | `identifier_type` | | `locale` | `locale` | --- ## Example Requests **HTTP** ```http GET https://api.your-domain.com/api/items/123456/related?methods=outfits,similar_items&garment_format=detailed ``` **JavaScript Client Library** ```json Dressipi("related", "items", {  item_id: "123456",  response_format: "detailed",  methods: ["outfits", "similar_items"],  try_all_methods: false,  onSuccess: (data) => console.log(data),  onFailure: (err) => console.error(err), }); ``` --- ## Response The top-level structure depends on which `methods` are requested. If multiple are requested, each appears by key. If a single method is requested (e.g., `outfits`), you may receive that section directly. **Combined methods** ```typescript {  response_id: string;  outfits?: Outfit[];  partner_outfits?: Outfit[];  similar_items?: {    content_id: string;    items: Item[] | DetailedItem[];  }; } ``` JSON Example: ```json {  "response_id": "b3c1b6b0-9c2e-4a8b-9f1a-1234567890ab",  "outfits": [    {      "content_id": "65dfa7",      "items": [        {          "dressipi_item_id": 1322,          "id": "REDDRESS01"        }      ],      "occasion": "casual"    }  ],  "partner_outfits": [    {      "content_id": "65dfa7",      "items": [        {          "dressipi_item_id": 1322,          "id": "REDDRESS01"        }      ],      "occasion": null    }  ],  "similar_items": {    "content_id": "65dfa7",    "items": [      {        "dressipi_item_id": 35122,        "id": "602849501492"      }    ]  } } ``` **Outfits-only** ```typescript {  response_id: string;  outfits: Outfit[]; } ``` JSON Example: ```json {  "response_id": "b3c1b6b0-9c2e-4a8b-9f1a-1234567890ab",  "outfits": [    {      "content_id": "65dfa7",      "occasion": "casual",      "items": [        { "dressipi_item_id": 1322, "id": "REDDRESS01" }      ]    }  ] } ``` ### Types ```typescript // Minimal item interface Item {  id: string;  dressipi_item_id: number; } // Detailed item interface DetailedItem extends Item {  name: string;  price?: string;  old_price?: string;  brand_name: string;  url: string;  category_name?: string;  category_id?: number;  images: string[];  image_url: string;  best_model_image?: string | null;  best_product_image?: string | '' | null;  thumbnail_image_url?: string;  has_outfits: boolean;  status: 'in stock' | 'out of stock';  style_id?: string; } interface Outfit {  content_id: string;  occasion: string | null;  items: DetailedItem[] | Item[]; } ``` --- ## Cookies `_pantheon2-dressipi_session` – Rails session cookie on responses. --- ## Implementation Notes & Best Practices - Prefer `response_format` in JavaScript Client Library calls; it maps to `garment_format` in the URL. - Preserve item order and grouping as returned. - If `try_all_methods` is `true`, the JavaScript Client Library will attempt fallbacks across the methods list. - When using `identifier_type`, ensure the provided `item_id` aligns (e.g., `sku`). - You can pass through `locale` and other non-typed params as needed. v