Skip to content

Get sitemap data

GET
/storefront/stores/{ref}/sitemap-data
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/storefront/stores/example/sitemap-data \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns everything a sitemap lists in one response: published content pages, published blog posts, blog categories and tags, active collections and active products on the online store. Every list is empty while the store is coming soon. Each entry carries only what a sitemap needs: the slug and updated_at, and the page_type of a content page.

ref
required
string

The store’s reference.

Media typeapplication/json
object
content_pages
required

Published content pages.

Array<object>
object
updated_at
required

When it was last updated, as an ISO 8601 timestamp, or null.

string
nullable
page_type
required

The page’s type, such as about, contact or faq, or null.

string
nullable
slug
required

URL slug.

string
blog_posts
required

Published blog posts, newest first.

Array<object>
object
updated_at
required

When it was last updated, as an ISO 8601 timestamp, or null.

string
nullable
slug
required

URL slug.

string
blog_categories
required

Blog categories.

Array<object>
object
updated_at
required

When it was last updated, as an ISO 8601 timestamp, or null.

string
nullable
slug
required

URL slug.

string
blog_tags
required

Blog tags.

Array<object>
object
updated_at
required

When it was last updated, as an ISO 8601 timestamp, or null.

string
nullable
slug
required

URL slug.

string
collections
required

Active collections.

Array<object>
object
updated_at
required

When it was last updated, as an ISO 8601 timestamp, or null.

string
nullable
slug
required

URL slug.

string
products
required

Active products that are listed on the online store.

Array<object>
object
updated_at
required

When it was last updated, as an ISO 8601 timestamp, or null.

string
nullable
slug
required

URL slug.

string

Example generated

{
"content_pages": [
{
"updated_at": "example",
"page_type": "example",
"slug": "example"
}
],
"blog_posts": [
{
"updated_at": "example",
"slug": "example"
}
],
"blog_categories": [
{
"updated_at": "example",
"slug": "example"
}
],
"blog_tags": [
{
"updated_at": "example",
"slug": "example"
}
],
"collections": [
{
"updated_at": "example",
"slug": "example"
}
],
"products": [
{
"updated_at": "example",
"slug": "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 on a Storefront route that needs a secret key, 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"
}