Template Docs Commerce APIs Webhooks
Get Started
Get Started

Retrieve all Store Pages

GET https://api.squarespace.com/{api-version}/commerce/store_pages?cursor={c}

Retrieves all Store Page information from a Squarespace store.

The response contains up to 50 StorePages and supports dynamic cursors for pagination. Read the Overview to learn more about this resource.

Parameters

{api-version} string
required

See the Products API Overview page for the current API version.


cursor={c} string

Identifies where the next page of results should begin. {c} should be the value of pagination.nextPageCursor from a previous response. If this parameter is not present or empty, the endpoint returns up to 50 StorePages.

Request example

Read the Making requests guide to learn why specific headers are necessary, and why some are omitted. Every request should also abide by Squarespace rate limits.

curl "https://api.squarespace.com/1.0/commerce/store_pages" \
  -i \
  -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \
  -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION"

Response example

A successful request generates a JSON response with an array of StorePages and a pagination object.

Note: For easier reference between response fields and descriptions, comments were added in the example, though this makes the JSON invalid.

{
  // List of Store Pages
  // If the merchant site doesn't have any Store Pages, this array is empty.
  "storePages": [
    {
      // Unique Store Page id
      "id": "5f05f78ae1f12f343bd07577",
      // Store Page title; title is displayed on merchant site.
      "title": "Homemade Marinades",
      // Specifies whether the Store Page is enabled (i.e., accessible to site visitors).
      "isEnabled": true
    }
  ],
  // Provides pagination details for iterating on the StorePages
  // available from the merchant site.
  "pagination": {
    // Flag; indicates whether another page of data is available.
    "hasNextPage": true,
    // Cursor to use in a subsequent request; retrieves the next page of data.
    "nextPageCursor": "b342f5367c664d3c99aa56f44f95ab0a",
    // A pre-built URL for applications to request the next page of data.
    "nextPageUrl":    
      "https://api.squarespace.com/1.0/commerce/products?cursor=NTA"
  }
}

Status codes and error conditions

200 OK

The request was successful. The message body contains data in the format specified above.


400 BAD REQUEST

Type: INVALID_REQUEST_ERROR

Subtype: null
The cursor parameter contains an invalid value.