Retrieve and search top items
    • 1 Minute to read
    • Dark
      Light

    Retrieve and search top items

    • Dark
      Light

    Article summary

    The facetted recommendations API allows the user to retrieve the most recommended garments.
    The result set can be filtered by specifying one or more filters. Optionally, the retrieval of information about the number of hits for other values of the filter is returned

    The currently recognized aggregations are:

    • garment_category

    • brand

    • occasion

    • must_have

    • retailer_labels: Significance dependent on the retailer and the data present in the product feed

    • store: If Mapp Fashion has been provided with per-store availability data, this filters or aggregates on availability by store

    • feature_ids: Mapp Fashion feature IDs

    • not_features_ids: Mapp Fashion feature IDs. This returns results without any of the listed feature IDs

    • price

    • reduced_by: A range filter that accepts values from 0 to 100

    The retailer_labels aggregation allows you to query against fields in the product feed consumed by Mapp Fashion (these should be agreed with Mapp Fashion).

    Dressipi("facetted", "search", {
      facets: [
        {
          name: "retailer_labels", // these should be aggreed with Dressipi ahead of time
          value: ["Womenswear > Dresses"]
        },
        {
          name: "feature_ids", // these are Dressipi 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_DRESSIPI",
      onSuccess: (data) => {
      },
      onFailure: (err) => {},
    });

    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 Dressipi identifier for this item
          dressipi_item_id: 5307387,
        },
        ...
      ],
      pagination: {
        total_pages: 80,
        total_items: 960,
        current_page: 1
      }
    }


    Was this article helpful?

    What's Next
    ESC

    AI Assistant, facilitating knowledge discovery through conversational intelligence