Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-shop
string
required

Shopify store URL. Resolves the shop for the request (headless does not accept ?shop=).

Example:

"shop.myshopify.com"

Body

application/json

Request body

Live Elasticsearch facet counts for a query + applied filters.

collection

Collection id to scope aggregation. String or integer.

tree
integer

Explicit filter tree id.

query
string
default:""

Search term to aggregate against. May be empty.

applied_filters
object[]

Currently applied filter selections.

facets
object[]

Which facets to aggregate.

locale
string
default:en-US

BCP-47 locale.

market
integer

Shopify market id.

options
object

Aggregation options.

visitor_id
string

Anonymous device/browser UID (the gl_s_uid cookie). The primary personalization key; stays stable when a customer logs in.

client_id
string

Per-session / per-device identifier.

customer_id
string

Shopify customer id. Present only when the shopper is logged in; enables customer-level personalization.

Response

Filter aggregations

Live facet counts (buckets + stats) for the current query and applied filters.

aggregations
object

Live counts keyed by filter key.

facets
object[]

Facet descriptors for the aggregated filters.

tree
object | null

Resolved tree summary, or null.

metadata
object

Response metadata.