POST
/
v2
/
product-listing
Authorization
Body
curl --request POST \
  --url https://api.depict.ai/v2/product-listing \
  --header 'Content-Type: application/json' \
  --data '{
  "cursor": "<string>",
  "dsid": "<string>",
  "filters": [
    {
      "data": "true",
      "field": "<string>",
      "id": "<string>",
      "meta": {
        "max": 123,
        "min": 123
      },
      "op": "eq"
    }
  ],
  "limit": 50,
  "market": "<string>",
  "metadata": {},
  "query_id": "<string>",
  "session_id": "<string>",
  "sort": {
    "field": "<string>",
    "meta": {
      "title": "<string>"
    },
    "order": "asc"
  },
  "tenant": "<string>",
  "type": "category",
  "user_id": "<string>"
}'
{
   "n_hits": 1,
   "displays": [
     {
         "product_id": "foobar",
         "title": "Foobar"
     }
   ],
   "sorts": [
     {
       "field": "_relevance",
       "order": "desc",
       "meta": {
         "title": "Relevance",
         "values": [
           "desc"
         ],
         "names": [
           "Relevance"
         ]
       }
     },
     {
       "field": "title",
       "order": "asc",
       "meta": {
         "title": "Title",
         "values": [
           "asc",
           "desc"
         ],
         "names": [
           "A-Z",
           "Z-A"
         ]
       }
     }
   ],
   "filters": [
     {
       "field": "sale_price",
       "op": "inrange",
       "data": [
         0,
         2500
       ],
       "meta": {
         "group_title": "Price",
         "type": "range",
         "min": 0,
         "max": 2500,
         "currency": "EUR"
       },
       "id": "price0"
     },
     {
       "field": "color_name",
       "op": "in",
       "meta": {
         "group_title": "Color",
         "type": "checkbox",
         "values": [
           "Blue",
           "Black",
           "Brown"
         ]
       },
       "id": "colors1"
     }
   ],
   "product_listing_request_id": "1a278f4a-16eb-4d95-a002-88bd305493d4",
   "cursor": "eyJjIjogMSwgInIiOiAwfQ=="
 }

Authorizations

api_key
string
queryrequired

Body

application/json
cursor
string

Used for cursor-based pagination. Set it to the cursor from the last response. If not set, will return the first results.

dsid
string

Populated for integrations performed by Depict.ai only. Depict.ai Session Id

filters
object[]

List of filters to apply to the results.

limit
integer

Maximum number of results per response.

market
string
required
metadata
object

Metadata that can be used to modify the behaviour of the search.

query_id
string
required

ID of the page to get products for. This is typically the slug, for example hoodies-and-sweaters.

session_id
string

Session identifier

sort
object

Specifies the sorting method. By default, the results are ordered by relevance. To find the possible values for this field, query the endpoint and look at the sorts field.

tenant
string
required
type
enum<string>

The type of query. If not set the endpoint will look up query id in the following type order: collections, categories.

Available options:
category,
collection
user_id
string

User identifier

Response

200 - application/json
breadcrumb
object[]

Breadcrumb for the current page. Ordered from less to more specific, where the last element is the current page.

cursor
string

Cursor that can be used in the next request to get subsequent results. If this is not set, there are no more results.

displays
object[]
required

The products to be shown on the product listing page.

filters
object[]

Available filters that can be used for filtering in the subsequent request.

n_hits
integer
required

Total number of results for this query. Not necessarily exact.

product_listing_request_id
string
required
quick_links
object[]

List of pages that can be used as quick links. Will return child pages if they exist, otherwise sibling pages.

sorts
object[]

Available methods for sorting the response. Any element from this list can be sent as sort in subsequent requests.