Skip to content

Get a content page by slug

GET
/public/stores/{storeRef}/content-pages/{slug}
curl --request GET \
--url 'https://apibase.ecomweb.app/api/v1/public/stores/example/content-pages/example?page_type=about&include_seo_metadata=false' \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns one published content page by its URL slug, with its metafields. The body is empty when no published page has that slug. A valid preview_token shows a page that is not published yet.

slug
required
string

The page’s URL slug.

storeRef
required
string

The store’s ref, as returned by GET /stores.

page_type
string
Allowed values: about privacy terms faq contact shopping_guide return_policy shipping_policy warranty home_page default

Only pages of this type

is_published
string

Only published (true) or only draft (false) pages

search
string
<= 255 characters

Search the title, slug and content

id
number

Only the page with this ID

include_seo_metadata
boolean

Example

true

Include each page’s search engine metadata as seo_metadata

preview_token
string

Signed preview token from the preview link route; lets a draft page be returned

The page, or an empty body when no page matches.

Media typeapplication/json
object
content

HTML content of the page. Null when the page has no content.

string
nullable
page_type
required

What kind of page this is.

string
Allowed values: about privacy terms faq contact shopping_guide return_policy shipping_policy warranty home_page default
deleted_at

When the page was deleted. Always null on pages you can read.

string
nullable
seo_metadata

Search engine metadata. Present only when include_seo_metadata is passed; null when the page has none.

object
meta_title
required

Page title for search engines, or null when none is set.

string
nullable
meta_description
required

Page description for search engines, or null when none is set.

string
nullable
metafields
required

The page’s metafields that are visible to the storefront, keyed by namespace.key.

object
key
additional properties
object
value
required

The value in the form its type defines. A reference type resolves to the referenced resource’s public data.

nullable
One of:
string
type
required

The metafield’s type, such as single_line_text_field or list.number_integer.

string
id
required

Page ID.

number
title
required

Title of the page.

string
slug
required

URL slug, unique within the store.

string
is_published
required

Whether the page is visible on the storefront.

boolean
sort_order

Manual position among the store’s pages.

number
created_at

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

string
updated_at

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

string
is_template_content

True while the page still holds the unedited text the store was created with.

boolean

Example

{
"page_type": "about"
}

The request is malformed or failed validation.

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 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"
}