List Site Pages
GET /v2/sites/{site_id}/pages
Lists all pages for a Square Online site. This operation returns files under pages
in the site
directory of the site.
Permissions: ONLINE_STORE_CUSTOM_THEME_READ
Path parameters
Name | Type | Description |
---|---|---|
site_id | string | Required The ID of the site. |
Query parameters
Name | Type | Description |
---|---|---|
cursor | string | A pagination cursor returned by previous calls to ListSitePages . This cursor is used to retrieve the next set of query results. For more information, see Pagination. |
Response fields
Name | Type | Description |
---|---|---|
errors | Error [ ] | Any errors that occurred during the request. |
pages | SitePage | All custom pages on the site or an empty object ({ } ) if none are found. |
cursor | string | A pagination cursor returned by previous calls to ListSitePages . Send this cursor in the next request to retrieve the next page of results. For more information, see Pagination. |
Example request
curl https://connect.squareup.com/v2/sites/site_id0/pages \
-H 'Square-Version: 2023-09-25' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Example request
{
"pages": [
{
"id": "site_page_7e4e68a8-fde2-11ee-be56-0242ac120002",
"name": "Home",
"route": "lightning-home",
"properties": "{\"props\": {\"main\": [{\"props\": {\"heading\": \"Featured products\", \"products\": {\"filters\": {\"ids\": [\"164\", \"165\", \"166\", \"167\", \"168\", \"169\"], \"square_online_id\": true}}}, \"template\": \"featured\"}], \"footer\": {\"props\": []}, \"header\": {\"props\": []}}, \"layout\": \"layouts/brisk\", \"template\": \"templates/pages/home\"}",
"site_id": "site_2780752764889218352",
"created_at": "2020-06-18T17:45:13.000000Z",
"updated_at": "2020-11-23T02:19:10.000000Z"
}
]
}