Resolve a Host header to the store (and, for a custom domain, the domain) it belongs to. The one public route with no publishable-key requirement: it is how the storefront's server discovers which store, and therefore which key, a request is for.
Exactly one of host and store_id is required. store_id exists
for the checkout origin, which is one hostname in front of every
store and so has no Host header to resolve; the store id
travels on the checkout, return and magic-link URLs instead. It
returns the same payload, minus any custom-domain match.
host?stringThe Host header to resolve. Required unless store_id is given.
store_id?stringResolve by store id instead of by hostname, for the checkout origin.
uuidThe resolved store.
application/jsonstore*domain?publishable_key*stringThe store's active spk_… key, so the storefront's server-side rendering can call every other key-gated public route. Server-side use only: never log this value, and it is never echoed back on any other route.
domains*array<string>The store's verified, serving custom hostnames, for building frame-ancestors from the store's own domains.
curl -X GET 'https://api.sorai.ai/v1/public/resolve'{ "store": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "slug": "string", "name": "string", "locale": "string", "currency": "str", "theme": { "colors": { "property1": "string", "property2": "string" }, "fontFamily": "string", "bodyFontFamily": "string", "headingWeight": "regular", "headingCase": "sentence", "headingTracking": "tight", "scale": "compact", "radius": "string", "blocks": { "paddingY": "none", "heroLayout": "split", "band": "tint" } }, "pixels": { "meta_pixel_id": "string", "tiktok_pixel_id": "string", "ga4_id": "string", "gtm_id": "string" }, "domains": [ "string" ], "hide_branding": true, "logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33" }, "domain": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "hostname": "string", "status": "pending", "tls_status": "string" }, "publishable_key": "string", "domains": [ "string" ]}