Skip to content

Find a store by domain

GET
/public/stores/domain/{domain}
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/public/stores/domain/example \
--header 'x-store-preview: example' \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Resolves a store’s subdomain or custom domain to the store, so a storefront served on that host can learn its ref. A value with a dot is a custom domain, which resolves only once its ownership is verified; a value without one is a subdomain. The body is empty when no store has that domain. A store that is suspended, disabled or still coming soon answers with an error instead.

domain
required
string

The subdomain, such as my-shop, or the custom domain, such as shop.example.com.

x-store-preview
required
string

The store, or an empty body when no store has that domain.

Media typeapplication/json
object
description

Store description, or null.

string
nullable
coming_soon

Whether visitors see the coming soon page instead of the storefront.

boolean
first_opened_at

When the store was first opened to the public, as an ISO 8601 timestamp, or null.

string
nullable
config

The store’s domains.

object
subdomain
required

The store’s subdomain on the platform domain, or null.

string
nullable
custom_domain
required

The store’s custom domain, or null.

string
nullable
verified

Whether ownership of the custom domain is verified. Present only when the store was looked up by domain.

boolean
storefront_url
required

For a store that runs on an external theme, the site its hosts redirect to; otherwise null.

string
nullable
ref
required

The store’s reference, used as storeRef in every other route.

string
name
required

Store name.

string
status
required

The store’s status; only active stores are returned.

string
created_at
required

When the store was created, as an ISO 8601 timestamp.

string
updated_at
required

When the store was last updated, as an ISO 8601 timestamp.

string

Example generated

{
"description": "example",
"coming_soon": true,
"first_opened_at": "example",
"config": {
"subdomain": "example",
"custom_domain": "example",
"verified": true
},
"storefront_url": "example",
"ref": "example",
"name": "example",
"status": "example",
"created_at": "example",
"updated_at": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}