Pages API
Manage the content for a site's home page and info pages. The home page holds
hero and SEO text. Info pages hold the body content for standard storefront
pages such as About, Shipping, and Returns.
Endpoints
Home page:
- Get Home Page -
GET /api/v1/sites/{site_id}/pages/home/ - Update Home Page -
PUT /api/v1/sites/{site_id}/pages/home/
Info pages:
- List Info Pages -
GET /api/v1/sites/{site_id}/pages/ - Get Info Page -
GET /api/v1/sites/{site_id}/pages/{page_type}/ - Update Info Page -
PUT /api/v1/sites/{site_id}/pages/{page_type}/ - Delete Info Page -
DELETE /api/v1/sites/{site_id}/pages/{page_type}/
Get Home Page
Retrieve the home page settings for a site.
Endpoint: GET /api/v1/sites/{site_id}/pages/home/
Permission Required: Read
Request
curl -X GET "https://studio.easel.engineering/api/v1/sites/sit_d0b6fmv28q6vn14peun0/pages/home/" \
-H "Authorization: Bearer your_api_key_here"
Response
Status: 200 OK
{
"hero_content": "Handmade in California",
"seo_title": "My Store",
"seo_description": "Handmade goods for everyday use."
}
Update Home Page
Update the home page settings for a site.
Endpoint: PUT /api/v1/sites/{site_id}/pages/home/
Permission Required: Write
Request Body
{
"hero_content": "Handmade in California",
"seo_title": "My Store",
"seo_description": "Handmade goods for everyday use."
}
| Field | Type | Required | Description |
|---|---|---|---|
hero_content |
string | Yes | Hero copy shown on the home page |
seo_title |
string | Yes | Page title for search engines |
seo_description |
string | Yes | Meta description for search engines |
Request
curl -X PUT "https://studio.easel.engineering/api/v1/sites/sit_d0b6fmv28q6vn14peun0/pages/home/" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id-12345" \
-d '{
"hero_content": "Handmade in California",
"seo_title": "My Store",
"seo_description": "Handmade goods for everyday use."
}'
Response
Status: 204 No Content
List Info Pages
Retrieve the info pages that have content for a site. This endpoint is not
paginated.
Endpoint: GET /api/v1/sites/{site_id}/pages/
Permission Required: Read
Request
curl -X GET "https://studio.easel.engineering/api/v1/sites/sit_d0b6fmv28q6vn14peun0/pages/" \
-H "Authorization: Bearer your_api_key_here"
Response
Status: 200 OK
{
"data": [
{
"page_type": "about",
"content": "We make things by hand.",
"updated_at": "2023-01-01T10:00:00Z"
}
]
}
Get Info Page
Retrieve a single info page by its type.
Endpoint: GET /api/v1/sites/{site_id}/pages/{page_type}/
Permission Required: Read
Path Parameters
| Parameter | Type | Description |
|---|---|---|
page_type |
string | One of the page types listed below |
Request
curl -X GET "https://studio.easel.engineering/api/v1/sites/sit_d0b6fmv28q6vn14peun0/pages/about/" \
-H "Authorization: Bearer your_api_key_here"
Response
Status: 200 OK
{
"page_type": "about",
"content": "We make things by hand.",
"updated_at": "2023-01-01T10:00:00Z"
}
Error Responses
Invalid page type
Status: 400 Bad Request
{
"error": "Invalid page type",
"code": "INVALID_FIELD"
}
Page not found
Status: 404 Not Found
{
"error": "Resource not found",
"code": "NOT_FOUND"
}
Update Info Page
Create or update an info page for a site.
Endpoint: PUT /api/v1/sites/{site_id}/pages/{page_type}/
Permission Required: Write
Request Body
{
"content": "We make things by hand."
}
| Field | Type | Required | Description |
|---|---|---|---|
content |
string | Yes | Page body content |
Request
curl -X PUT "https://studio.easel.engineering/api/v1/sites/sit_d0b6fmv28q6vn14peun0/pages/about/" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id-67890" \
-d '{"content": "We make things by hand."}'
Response
Status: 204 No Content
Delete Info Page
Delete an info page's content.
Endpoint: DELETE /api/v1/sites/{site_id}/pages/{page_type}/
Permission Required: Write
Request
curl -X DELETE "https://studio.easel.engineering/api/v1/sites/sit_d0b6fmv28q6vn14peun0/pages/about/" \
-H "Authorization: Bearer your_api_key_here"
Response
Status: 204 No Content
Home Page Object
Fields
| Field | Type | Description |
|---|---|---|
hero_content |
string | Hero copy shown on the home page |
seo_title |
string | Page title for search engines |
seo_description |
string | Meta description for search engines |
Info Page Object
Fields
| Field | Type | Description |
|---|---|---|
page_type |
string | Page type |
content |
string | Page body content |
updated_at |
string | ISO 8601 timestamp |
Page Types
aboutshippingreturnstermsprivacycontactorder_confirmationannouncement_bar