Headless Search Init
Session bootstrap for the search suite. Call once per session (the @glood/hydrogen GloodProvider runs it automatically on mount) before instant/full search. Resolves the visitor, returns their history (browsed / cart / purchased product ids), a lean feature-flag config (no filter definitions, no filter tree, no templates), the Shopify storefront token and a fresh visit_id. Auth: Authorization: Bearer <gl_sf_...> + x-shop.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Shopify store URL. Resolves the shop for the request (headless does not accept ?shop=).
"shop.myshopify.com"
Body
Session context. All fields optional.
Search session bootstrap input (from initSchema). Every field is optional; send the identity triple you have so the visitor profile and history resolve correctly.
Type of the page the session starts on. Used only for context/attribution.
product_page, collection, home, cart, order_confirm, blog, ajax_cart, 404, checkout, returns, search, other Full URL of the page the session starts on.
Browsing-session id (defaulted from the SDK session cookie). Ties the visit to a session for analytics.
BCP-47 locale for locale-aware indexes and the echoed metadata.
"en-US"
Shopify market id for market-aware pricing / catalog.
Anonymous device/browser UID (the gl_s_uid cookie). The primary personalization key; stays stable when a customer logs in.
Per-session / per-device identifier.
Shopify customer id. Present only when the shopper is logged in; enables customer-level personalization.
Response
Visitor context, history, lean config and token
Session bootstrap payload (from getHeadlessInitResponse): identity, visitor history, lean feature config, storefront token and a fresh visit id. Unlike the config endpoint it carries NO filter definitions and NO filter tree.
Fresh UUID identifying this search session. Echo it as session_id when sending events for this session.
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
Anonymous visitor id echoed from the request (null if none was sent). Persist it on the client.
Client/device identifier echoed from the request, or null.
Shopify customer id echoed from the request when the shopper is authenticated, or null.
The visitor's recent activity, used to seed personalization.
Lean feature-flag config (same shape as the config endpoint's config, produced by the same getHeadlessConfigResponse). No filter definitions, no filter tree, no templates.
Shopify storefront access token for direct Storefront API calls, or null.
Response metadata.