Skip to main content

CMS Page API

Overview

The CMS Page API provides endpoints for managing static content pages in your EverShop store. CMS pages are useful for creating informational content such as About Us, Contact Us, Terms and Conditions, Privacy Policy, and other content that doesn't fit within the product catalog structure.

Endpoints

Create a CMS Page

Creates a new content page in the system. You can specify the page content, layout, and SEO metadata.

Request Schema (application/json)
Field NameField TypeRequired
statusstring or integer ('0', '1', 0, 1)Yes
layoutstring (oneColumn, twoColumnsLeft, twoColumnsRight, threeColumns)Yes
namestringYes
contentstringYes
url_keystringYes
meta_titlestringYes
meta_descriptionstringYes
meta_keywordsstringYes
POST/api/pages
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/pages
Sample Of Response
{
"data": {
"cms_page_id": 14,
"uuid": "e15da567a66c11edb46b60d819134f39",
"layout": "oneColumn",
"status": 1,
"created_at": "2023-02-07 10:15:32",
"updated_at": "2023-02-07 10:15:32",
"cms_page_description_id": 15,
"cms_page_description_cms_page_id": 14,
"url_key": "about-us",
"name": "About Our Company",
"content": "<h1>About Us</h1><p>Welcome to our company. We specialize in providing high-quality products and exceptional customer service.</p>",
"meta_title": "About Us | Our Company Story",
"meta_keywords": "about us, company history, our story, mission",
"meta_description": "Learn about our company's history, mission, and values. Discover why customers choose us for their shopping needs.",
"links": [
{
"rel": "cmsPageGrid",
"href": "/admin/pages",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "edit",
"href": "/admin/pages/edit/e15da567a66c11edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "view",
"href": "/page/about-us",
"action": "GET",
"types": [
"text/xml"
]
}
]
}
}

Update a CMS Page

Modifies an existing content page. You can update any of the page attributes, including content, layout, and SEO metadata.

Request Schema (application/json)
Field NameField TypeRequired
statusstring or integer ('0', '1', 0, 1)No
layoutstring (oneColumn, twoColumnsLeft, twoColumnsRight, threeColumns)No
namestringYes
contentstringNo
url_keystringNo
meta_titlestringNo
meta_descriptionstringNo
meta_keywordsstringNo
PATCH/api/pages/433ba97f-8be7-4be9-be3f-a9f341f2b89f
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/pages/433ba97f-8be7-4be9-be3f-a9f341f2b89f
Sample Of Response
{
"data": {
"cms_page_id": 14,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"layout": "oneColumn",
"status": 1,
"created_at": "2023-02-07 10:15:32",
"updated_at": "2023-02-07 14:18:05",
"cms_page_description_id": 15,
"cms_page_description_cms_page_id": 14,
"url_key": "contact-us",
"name": "Contact Us",
"content": "<h1>Contact Us</h1><p>We'd love to hear from you! Please use the form below to get in touch with our customer service team.</p><form>...</form>",
"meta_title": "Contact Us | Customer Support",
"meta_keywords": "contact, customer service, support, help",
"meta_description": "Contact our customer support team for assistance with orders, returns, or product questions.",
"links": [
{
"rel": "cmsPageGrid",
"href": "/admin/pages",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "edit",
"href": "/admin/pages/edit/433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "view",
"href": "/page/contact-us",
"action": "GET",
"types": [
"text/xml"
]
}
]
}
}

Delete a CMS Page

Permanently removes a content page from the system.

Request Schema (application/json)
No request body required
DELETE/api/pages/433ba97f-8be7-4be9-be3f-a9f341f2b89f
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/pages/433ba97f-8be7-4be9-be3f-a9f341f2b89f
Sample Of Response
{
"data": {
"cms_page_id": 14,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"layout": "twoColumnsLeft",
"status": 1,
"created_at": "2023-02-07 10:15:32",
"updated_at": "2023-02-07 14:18:05",
"cms_page_description_id": 15,
"cms_page_description_cms_page_id": 14,
"url_key": "contact-us",
"name": "Contact Us",
"content": "<h1>Contact Us</h1><p>We'd love to hear from you! Please use the form below to get in touch with our customer service team.</p><form>...</form>",
"meta_title": "Contact Us | Customer Support",
"meta_keywords": "contact, customer service, support, help",
"meta_description": "Contact our customer support team for assistance with orders, returns, or product questions."
}
}

Get a CMS Page

Retrieves detailed information about a specific content page.

Request Schema (application/json)
No request body required
GET/api/pages/433ba97f-8be7-4be9-be3f-a9f341f2b89f
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/pages/433ba97f-8be7-4be9-be3f-a9f341f2b89f
Sample Of Response
{
"data": {
"cms_page_id": 14,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"layout": "oneColumn",
"status": 1,
"created_at": "2023-02-07 10:15:32",
"updated_at": "2023-02-07 14:18:05",
"cms_page_description_id": 15,
"cms_page_description_cms_page_id": 14,
"url_key": "contact-us",
"name": "Contact Us",
"content": "<h1>Contact Us</h1><p>We'd love to hear from you! Please use the form below to get in touch with our customer service team.</p><form>...</form>",
"meta_title": "Contact Us | Customer Support",
"meta_keywords": "contact, customer service, support, help",
"meta_description": "Contact our customer support team for assistance with orders, returns, or product questions."
}
}

List All CMS Pages

Retrieves a paginated list of all content pages in the system.

Request Schema (application/json)
No request body required
GET/api/pages
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/pages
Sample Of Response
{
"data": [
{
"cms_page_id": 12,
"uuid": "d15da567a66c11edb46b60d819134f39",
"layout": "oneColumn",
"status": 1,
"created_at": "2023-02-06 10:15:32",
"updated_at": "2023-02-06 10:15:32",
"name": "About Us",
"url_key": "about-us",
"content": "<h1>About Us</h1><p>Welcome to our company...</p>"
},
{
"cms_page_id": 13,
"uuid": "d35da567a66c11edb46b60d819134f39",
"layout": "twoColumnsRight",
"status": 1,
"created_at": "2023-02-06 11:20:15",
"updated_at": "2023-02-06 11:20:15",
"name": "Terms and Conditions",
"url_key": "terms-and-conditions",
"content": "<h1>Terms and Conditions</h1><p>Please read our terms carefully...</p>"
},
{
"cms_page_id": 14,
"uuid": "e15da567a66c11edb46b60d819134f39",
"layout": "oneColumn",
"status": 1,
"created_at": "2023-02-07 10:15:32",
"updated_at": "2023-02-07 14:18:05",
"name": "Contact Us",
"url_key": "contact-us",
"content": "<h1>Contact Us</h1><p>We'd love to hear from you...</p>"
}
],
"links": {
"first": "/api/pages?page=1",
"last": "/api/pages?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "/api/pages",
"per_page": 20,
"to": 3,
"total": 3
}
}

Error Handling

All endpoints may return the following error responses:

Status CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
404Not Found - CMS page doesn't exist
500Server Error - Something went wrong

Error responses follow this format:

{
"error": {
"status": 404,
"message": "CMS page not found"
}
}

Page Layouts

EverShop provides several page layout options for CMS pages:

Layout OptionDescription
oneColumnFull-width content area
twoColumnsLeftContent area with a left sidebar
twoColumnsRightContent area with a right sidebar
threeColumnsContent area with both left and right sidebars