Skip to main content

VTEX Headless CMS (0.31.2)

The VTEX Headless CMS is a no-code management system for storefront content. That means you can store your content as structured data in a layer decoupled from the frontend and use the VTEX Headless CMS to access and deliver your content to your storefront project.

Notice that the VTEX Headless CMS typically works with FastStore projects only. In this case, you can use this API to fetch data using SSR (NextJS and Gatsby v4+) or SSG (NextJS).

Servers

  • https://{account}.myvtex.com/
  • https://{workspace}--{account}.myvtex.com/

Server variables

  • accountName: Name of your VTEX account.
  • workspace: Name of your VTEX workspace.

Get all CMS pages

Gets all data from all CMS pages.

path Parameters
builderId
required
string
Example: faststore

Builder ID specified in the settings of the CMS app.

Responses

Response samples

Content type
application/json
{
  • "contentTypes": [
    ]
}

Get CMS page

Gets all data from a given page or Content Type.

Usage

Check the following suggestions on how to use this endpoint:

Use filters on the URL to get only what you need.

  • Filter by props on the first level of the document: /_v/cms/api/faststore/plp?filters[status]=published
  • Filter results by nested props
    • SEO Slug: /_v/cms/api/faststore/plp?filters[parameters.collection.seo.slug]=/summer
    • SEO Title: /_v/cms/api/faststore/plp?filters[parameters.collection.seo.title]=Summer%20Deals
    • Category ID: /_v/cms/api/faststore/plp?filters[parameters.collection.categoryId]=25
  • Filter by multiple fields: /_v/cms/api/faststore/plp?filters[parameters.collection.clusterId]=1970&filters[name]=Summer
path Parameters
builderId
required
string
Example: faststore

Builder ID specified in the settings of the CMS app.

content-type
required
string
Example: plp

Content Type ID defined in the FastStore project.

document-id
string
Example: 5af643b5-9a6d-48f2-9b34-919dd762c908

Document ID presented in the URL path of a CMS preview.

query Parameters
versionId
string
Example: versionId=e7263fc8-bc68-4052-9e25-dd5a2572d3bb

Version ID presented in the URL path of a CMS preview.

releaseId
string
Example: releaseId=6196c277c6dce15f9709a2a7

Release ID presented in the URL path of a CMS preview.

filters[status]
string
Example: filters[status]=draft&filters[status]=published&filters[status]=publishing&filters[status]=unpublishing

Filter by the status of the page.

filters[parameters.collection.seo.slug]
string
Example: filters[parameters.collection.seo.slug]=Summer%20Deals

Filter by the SEO slug of a collection.

filters[parameters.collection.seo.title]
string
Example: filters[parameters.collection.seo.title]=Summer%20Deals

Filter by the SEO title of a collection.

filters[parameters.collection.categoryId]
string
Example: filters[parameters.collection.categoryId]=25

Filter by the category ID of a collection.

filters[name]
string
Example: filters[name]=Summer

Filter by the page name.

Responses

Response samples

Content type
application/json
{}