Get sitemap data
const url = 'https://apibase.ecomweb.app/api/v1/public/stores/example/sitemap-data';const options = {method: 'GET', headers: {'x-storefront-api-key': '<x-storefront-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/public/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. The lists currently use the merchant-side shapes of products, collections, pages and blog posts, including fields such as author_id and view_count.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s reference.
Responses
Section titled “Responses”object
Published content pages.
object
HTML content of the page. Null when the page has no content.
What kind of page this is.
When the page was deleted. Always null on pages you can read.
Search engine metadata. Present only when include_seo_metadata is passed; null when the page has none.
object
Page title for search engines, or null when none is set.
Page description for search engines, or null when none is set.
Page ID.
Title of the page.
URL slug, unique within the store.
Whether the page is visible on the storefront.
Manual position among the store’s pages.
When the page was created, as an ISO 8601 timestamp.
When the page was last updated, as an ISO 8601 timestamp.
True while the page still holds the unedited text the store was created with.
Published blog posts, newest first.
object
Post body as HTML, or null when empty.
Table of contents generated from the headings in content.
object
Anchor ID of the heading.
Heading level, from 1 to 6.
Text of the heading.
Position of the heading in the post content.
Short summary shown in listings, or null.
URL of the featured image, or null.
SEO title and description. Present only when requested with include_seo_metadata.
object
Page title for search engines, or null.
Page description for search engines, or null.
Publication status. Only published posts are visible on the storefront list; unlisted posts are reachable by their link.
Categories of the post.
object
ID.
Display name.
URL slug, unique within the store.
Description. Present on categories only; null when none is set.
Hex colour such as #ff6600. Present on categories only; null when none is set.
Manual position in the category list. Present on categories only.
When it was created, as an ISO 8601 timestamp.
When it was last updated, as an ISO 8601 timestamp. Present on categories only.
Tags of the post.
object
ID.
Display name.
URL slug, unique within the store.
Description. Present on categories only; null when none is set.
Hex colour such as #ff6600. Present on categories only; null when none is set.
Manual position in the category list. Present on categories only.
When it was created, as an ISO 8601 timestamp.
When it was last updated, as an ISO 8601 timestamp. Present on categories only.
IDs of the products recommended in the post, in display order. Present on single-post responses.
Post ID.
Title.
URL slug, unique within the store.
Whether the post is marked as featured.
When a scheduled post will be published, as an ISO 8601 timestamp, or null.
When the post was published, as an ISO 8601 timestamp, or null while unpublished.
ID of the user who created the post, or null (for example when created with an API key).
Name or email of the author. Present when the author is known and, on lists, when include_author is set.
Number of storefront views.
Estimated reading time in minutes.
When the post was created, as an ISO 8601 timestamp.
When the post was last updated, as an ISO 8601 timestamp.
When the post was deleted, or null. Deleted posts are not returned.
Blog categories.
object
Description, or null.
Hex colour such as #ff6600, or null.
Manual position in the category list; lower comes first.
Category ID.
Display name.
URL slug, unique within the store.
Number of posts in the category. Present when post counts are included; always present on the paginated list.
When the category was created, as an ISO 8601 timestamp.
When the category was last updated, as an ISO 8601 timestamp.
Blog tags.
object
Tag ID.
Display name.
URL slug, unique within the store.
Number of posts with the tag. Present when post counts are included; always present on the paginated list.
When the tag was created, as an ISO 8601 timestamp.
Active collections.
object
manual collections list products you choose; smart collections select products with search_criteria.
Publication status.
The rules a smart collection selects products with, or null for a manual collection.
object
The facets shoppers can filter the collection by, computed by the store, or null when not yet computed.
object
How products are ordered within the collection.
Product IDs of a manual collection, in display order. Not present on smart collections.
SEO fields. Present only when include_seo_metadata is true.
object
Page title for search engines, or null.
Page description for search engines, or null.
Collection ID.
Collection name.
Collection description, or null.
URL of the collection image, or null.
URL-friendly identifier, unique within the store.
ID of the category this collection was generated from, or null for a collection created by hand.
When the collection was created, as an ISO 8601 timestamp.
When the collection was last updated, as an ISO 8601 timestamp.
Always null; deleted collections are not returned.
Number of products in the collection. Present only when include_product_count is true.
Active products that are listed on the online store.
object
Product images, in display order.
object
Asset ID of the image. Omit it to have the asset looked up from url, which must then be a URL of an asset uploaded to this store.
Image URL: the asset’s public_url or cdn_url
Canva design ID
Canva design edit URL
Canva asset ID
Image alt text
Image caption
Sort order for image display
Whether this is the primary image
Product videos. Always empty unless videos are requested.
object
ID of the uploaded video asset
Video URL
Thumbnail URL
Duration in seconds (1-300 seconds)
Video width in pixels
Video height in pixels
Processing status
Sort order for multiple videos (future use)
Variants. Present only when include_variants is true.
object
deny rejects checkout when stock is short; continue lets stock go negative.
Package dimensions, or null.
object
Images for this variant.
object
Asset ID of the image. Omit it to have the asset looked up from url, which must then be a URL of an asset uploaded to this store.
Image URL: the asset’s public_url or cdn_url
Canva design ID
Canva design edit URL
Canva asset ID
Image alt text
Image caption
Sort order for image display
Whether this is the primary image
Attribute values that define this variant. Present only when combinations are requested.
object
The attribute (axis), or null when it no longer exists.
object
Attribute ID.
Attribute name, such as “Color”.
URL-safe identifier of the attribute, unique within the store.
How values are chosen, such as select.
How the values are ordered, such as manual.
Position of the attribute among the store’s attributes.
When the attribute was created, as an ISO 8601 timestamp.
When the attribute was last updated, as an ISO 8601 timestamp.
Code of the global taxonomy attribute this one maps to, or null for a local attribute.
The chosen value, or null when it no longer exists.
object
Attribute value ID.
ID of the attribute this value belongs to.
Stored value, such as “red”.
Value as shown to shoppers, such as “Red”.
Swatch kind: none, color or image.
Swatch content: a color code or an image URL. Empty when there is no swatch.
Position of the value within its attribute.
When the value was created, as an ISO 8601 timestamp.
When the value was last updated, as an ISO 8601 timestamp.
Code of the global taxonomy value this one maps to, or null.
Active promotions on this variant. Present only when promotions are requested on a single product.
object
Promotion ID.
Promotion name.
Promotion description.
How the promotion is applied, such as automatic or code.
Discount code, for code promotions.
Promotion type.
What the promotion targets, such as product or variant.
How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.
Discount amount or percentage.
Upper bound on the discount amount.
Fixed price the item is sold at, for fixed-price promotions.
Minimum order amount for the promotion to apply.
Minimum quantity for the promotion to apply.
When the promotion starts, as an ISO 8601 timestamp.
When the promotion ends, as an ISO 8601 timestamp.
Price after the promotion.
Price before the promotion.
Amount taken off the original price.
The promotion giving the lowest price, or null. Present only when promotions are requested on a single product.
object
Promotion ID.
Promotion name.
Promotion description.
How the promotion is applied, such as automatic or code.
Discount code, for code promotions.
Promotion type.
What the promotion targets, such as product or variant.
How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.
Discount amount or percentage.
Upper bound on the discount amount.
Fixed price the item is sold at, for fixed-price promotions.
Minimum order amount for the promotion to apply.
Minimum quantity for the promotion to apply.
When the promotion starts, as an ISO 8601 timestamp.
When the promotion ends, as an ISO 8601 timestamp.
Price after the promotion.
Price before the promotion.
Amount taken off the original price.
Variant ID.
ID of the product this variant belongs to.
Store-wide numeric SKU identifier, assigned automatically.
Merchant-assigned SKU, or null.
The variant’s ID in an external system, or null.
Selling price in the store’s currency.
Units available across all locations.
Counter that increases on every stock change.
Stock level at or below which the variant counts as low stock.
Whether stock is tracked. When false the variant never runs out.
Unit cost to the store. Present only when the key holds the read:inventory scope.
Null when no cost is recorded.
Weight, in the store’s weight unit, or null.
Whether this is the product’s default variant.
Variant status, such as active or inactive.
When the variant was created, as an ISO 8601 timestamp.
When the variant was last updated, as an ISO 8601 timestamp.
Price after the best active promotion. Present only when promotions are requested; null when none applies.
Related counts. Present only when include_counts is true.
object
Number of variants.
SEO metadata, or null when none is set. Present only when include_seo_metadata is true.
object
Page title for search engines, or null.
Page description for search engines, or null.
Attributes linked to the product, with their selected values. Present only when include_attributes is true.
object
Tags on the product. Present only when include_tags is true.
object
Tag ID.
Tag name.
URL-safe tag identifier.
When the tag was created, as an ISO 8601 timestamp.
When the tag was last updated, as an ISO 8601 timestamp.
Sales channels the product is published to. Present only when include_channels is true.
object
Channel code, such as online_store.
Whether the product is listed (visible in listings) on this channel.
When the product was published to the channel, as an ISO 8601 timestamp, or null.
Active promotions on the product. Present only when include_promotion is true on a single product.
object
Promotion ID.
Promotion name.
Promotion description.
How the promotion is applied, such as automatic or code.
Discount code, for code promotions.
Promotion type.
What the promotion targets, such as product or variant.
How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.
Discount amount or percentage.
Upper bound on the discount amount.
Fixed price the item is sold at, for fixed-price promotions.
Minimum order amount for the promotion to apply.
Minimum quantity for the promotion to apply.
When the promotion starts, as an ISO 8601 timestamp.
When the promotion ends, as an ISO 8601 timestamp.
Price after the promotion.
Price before the promotion.
Amount taken off the original price.
The promotion giving the lowest price, or null. Present only when include_promotion is true on a single product.
object
Promotion ID.
Promotion name.
Promotion description.
How the promotion is applied, such as automatic or code.
Discount code, for code promotions.
Promotion type.
What the promotion targets, such as product or variant.
How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.
Discount amount or percentage.
Upper bound on the discount amount.
Fixed price the item is sold at, for fixed-price promotions.
Minimum order amount for the promotion to apply.
Minimum quantity for the promotion to apply.
When the promotion starts, as an ISO 8601 timestamp.
When the promotion ends, as an ISO 8601 timestamp.
Price after the promotion.
Price before the promotion.
Amount taken off the original price.
Review statistics. Present only when include_review_stats is true.
object
Services attached to the product. Present only when include_services is true.
object
Product ID.
Product name.
URL slug, unique within the store.
Product description, or null.
Lifecycle status: draft, active or unlisted.
When the product was published, as an ISO 8601 timestamp, or null.
When the product was created, as an ISO 8601 timestamp.
When the product was last updated, as an ISO 8601 timestamp.
When the product was soft-deleted, as an ISO 8601 timestamp. Null for live products.
Code of the global taxonomy category, or null.
Taxonomy release the category was assigned from, or null.
Free-text product type, or null.
Whether the product is featured.
Lowest variant price.
Highest variant price.
simple for a single-variant product, variant when it has options.
The product’s ID in an external system, or null.
Total stock across all variants. Present on reads.
Lowest price after promotions, or null. Present only when include_promotion is true on a single product.
Highest price after promotions, or null. Present only when include_promotion is true on a single product.
Example
{ "content_pages": [ { "page_type": "about" } ], "blog_posts": [ { "status": "draft" } ], "collections": [ { "type": "manual", "status": "draft", "collection_sort": "manual" } ], "products": [ { "images": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://example.com/image.jpg", "design_id": "DABCdefg123", "design_edit_url": "https://canva.com/design/edit/123", "canva_asset_id": "asset123", "alt": "Product image", "caption": "Main product view", "sort_order": 1, "is_primary": true } ], "videos": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://cdn.example.com/videos/product-demo.mp4", "thumbnail_url": "https://cdn.example.com/thumbnails/product-demo-thumb.jpg", "duration": 30, "width": 1280, "height": 720, "status": "processing", "sort_order": 0 } ], "variants": [ { "inventory_policy": "deny", "images": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://example.com/image.jpg", "design_id": "DABCdefg123", "design_edit_url": "https://canva.com/design/edit/123", "canva_asset_id": "asset123", "alt": "Product image", "caption": "Main product view", "sort_order": 1, "is_primary": true } ] } ] } ]}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
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.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}