Keyword-based Widget API

This API allows you to fetch a keyword-based widget response.

Endpoints

Production: https://pathways.dxpapi.com/api/v2/widgets/keyword/{widget_id}
Staging: https://pathways-staging.dxpapi.com/api/v2/widgets/keyword/{widget_id}

The widget_id can be found in the Widget Configurator in the Dashboard.

How do facets appear in the Pathways API response?

Facets can be returned in the Pathways API response by setting the parameter facet=true. Note that the facets in the Pathways API response are structured differently compared to in the Search API response in order to not depend on Javascript implementations.

{
  "response": {
    "numFound": 256,
    "start": 0,
    "docs": []
  },
  "metadata": {
    "widget": {
      "id": "abcdef",
      "name": "Homeoasis Brand Highlight",
      "description": "Highlights Homeoasis products",
      "type": "search",
      "rid": "aaaabbbbccccddddeeeeffff11112222"
    },
    "query": {},
    "response": {
      "personalized_results": false,
      "fallback": "",
      "recall": "pure"
    }
  },
  "facet": {
    "category": [
      {
        "cat_id": "cat12345678",
        "cat_name": "Bedsheets",
        "count": 30,
        "children": []
      },
      ...
    ],
    "fields": [
      {
        "key": "Color",
        "value": [
          {
            "count": 10,
            "name": "Blue"
          },
          {
            "count": 10,
            "name": "Black"
          },
          {
            "count": 10,
            "name": "White"
          }
        ]
      },
      {  
        "key": "Price",
        "value": [
          {
            "count": 10,
            "name": "19.99"
          },
          {
            "count": 10,
            "name": "29.99"
          },
          {
            "count": 10,
            "name": "39.99"
          }
        ]
      }
    ],
    "ranges": [
      {
        "key": "Price",
        "value": [
          {
            "count": 10,
            "start": "*",
            "end": 20
          },
          {
            "count": 20,
            "start": 20.01,
            "end": 40
          }
        ]
      }
    ],
    "query": {}
  }
}

📘

For more detailed information of any of the following API parameters, refer to the Recommendations and Pathways parameters reference.

Language
Click Try It! to start a request and see the response here!