Search Sample Requests & Responses

Semantic Search

Request

{
  "query": {
    "text": "dress",
    "filters": [
      {
        "field": "categories",
        "values": ["dresses", "tops"]
      },
      {
        "field": "price",
        "min": 100,
        "max": 200
      }
    ],
    "pagination": {
      "numItems": 24,
      "offset": 0
    },
    "user": {
      "active_consent_accepted": true,
      "dyid": "12264556113"
    },
    "session": {
      "dy": "3124353434443123"
    },
    "context": {
      "page": {
        "type": "HOMEPAGE",
        "location": "https://shop.biz/nice-shirt-p76311.html",
        "referrer": "https://google.cz",
        "locale": "en_US"
      }
    },
    "selector": {
      "name": "Semantic Search"
    },
    "options": {
      "returnAnalyticsMetadata": false,
      "isImplicitClientData": false,
      "isImplicitKeywordEvent": true
    }
  }
}

Note: A Visual Search request follows the same structure, except it does not support pagination.

Visual & Semantic Search Response

{
  "id": 24,
  "name": "Visual Search",
  "type": "VISUAL_SEARCH_DECISION",
  "decisionId": "d29ybGQK",
  "variations": [
    {
      "id": 203,
      "payload": {
        "type": "SEARCH",
        "data": {
          "totalNumResults" : 1000,
          "facets": [{
              "column": "color",            
              "valuesType": "string",
              "displayName": "Color",
              "values": [
                {
                  "name": "Black dark",
                  "count": 560
                },
                {
                  "name": "White dusty light",
                  "count": 191
                }
              ]
            }
          }],
          "slots": [
            {
              "slotId": "aGVsbG93b3JsZAo=",
              "sku": "SKU_C",
            },
            {
              "slotId": "d2VsY29tZWR1ZAo=",
              "sku": "SKU_A"
            },
            {
              "slotId": "d2VsY29tZWR1ZAo=",
              "sku": "SKU_B"
            }
          ]
        }
      }
    }
  ]
}