关于 页面 ​
访问范围
需要多个访问范围—请参阅每个端点以了解访问范围要求。
需要访问受保护的客户数据。
在店铺内创建页面,用于承载一些静态内容,比如:“关于我们”页面、“联系我们”页面等。
页面 对象 ​
Page(页面)资源用于存储 HTML 内容,主要用于维护商店中的网页,适合用于更新频率较低的静态内容。
属性 ​
pageobject
页面对象。
- 收起属性
titlestring
页面标题。
seoTitlestring
搜索优化标题,默认值为页面的标题。
handlestring
页面handle。
contentstring
页面内容。
seoDescriptionstring
搜索优化描述,默认为空。
templateNamestring
页面关联的主题模板名称。
visibleboolean
页面是否可见。
publishTimestring
页面发布时间。
bash
{
"page": {
"publishTime": "2024-11-11T10:05:19.421Z",
"visible": "true",
"templateName": "contact",
"seoDescription": "Learn more about Brand – our values, mission, and the team behind the scenes.",
"handle": "about-us",
"title": "About Us - Our Story and Mission",
"seoTitle": "About Us | Brand Name",
"content": "<h1>Welcome to Our Company</h1><p>We are dedicated to providing the best service.</p>"
}
}
POST
创建自定义页面 ​
创建自定义页面.
访问范围
需要以下任意访问权限: write_content
接口
POST
/api/202412/pages
请求参数
pageobject
页面详情。
- 收起属性
publishTimestring
页面发布时间(ISO 8601格式)。
visiblestring
页面是否可见。
templateNamestring
页面关联的主题模板名称。
seoDescriptionstring
搜索优化描述, 默认为空。
contentstring
自定义页面内容。
handlestring
页面handle,取值来源由产品定义。
titlestring
自定义页面标题。
seoTitlestring
搜索优化标题,默认值为页面的标题。
coverByHandleboolean
是否根据 handle 覆盖系统中已有的数据。
响应数据
pageobject
页面详情。
- 收起属性
handlestring
页面 handle。
idstring
页面 ID。
titlestring
页面标题。
templateNamestring
页面关联的主题名称。
contentstring
页面内容。
publishTimestring
页面发布时间(ISO 8601格式)。
visibleboolean
页面可见性。
seoTitlestring
搜索优化标题。
seoDescriptionstring
搜索优化描述。
bash
curl -X POST \
https://{shop}.genmystore.com/api/202412/pages" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"page":{
"coverByHandle":"true",
"publishTime":"2025-01-10T11:00:00-05:00",
"visible":"true",
"templateName":"custom",
"seoDescription":"This is a custom page demo",
"handle":"demo",
"title":"Custom page demo",
"seoTitle":"Custom page title",
"content":"<div class=\"rfq_form_page\"><div class=\"loader\"></div></div>"
}
}'
json
HTTP/1.1 200 OK
{
"page": {
"publishTime": "2025-01-10T11:00:00-05:00",
"visible": "true",
"templateName": "custom",
"seoDescription": "This is a custom page demo",
"handle": "demo",
"id": "1",
"title": "Custom page demo",
"seoTitle": "Custom page title",
"content": "<div class=\"rfq_form_page\"><div class=\"loader\"></div></div>"
}
}
PUT
更新自定义页面 ​
更新自定义页面。
访问范围
需要以下任意访问权限: write_content
接口
PUT
/api/202412/pages/{page_id}
请求参数
pageobject
页面详情。
- 收起属性
publishTimestring
页面发布时间(ISO 8601格式)。
visiblestring
页面是否可见。
templateNamestring
页面关联的主题模板名称。
seoDescriptionstring
搜索优化描述,默认值为空。
contentstring
自定义页面内容。
handlestring
页面handle,取值来源由产品定义。
titlestring
自定义页面名称。
seoTitlestring
搜索优化标题,,默认值为页面标题。
响应数据
pageobject
页面详情。
- 收起属性
publishTimestring
页面发布时间(ISO 8601格式)。
visiblestring
页面可见性。
templateNamestring
页面主题名称。
seoDescriptionstring
搜索优化描述。
handlestring
页面handle。
idstring
页面ID。
titlestring
页面标题。
seoTitlestring
搜索优化标题。
contentstring
页面内容。
bash
curl -X PUT \
https://{shop}.genmystore.com/api/202412/pages/{page_id}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"page":{
"publishTime":"2025-01-10T11:00:00-05:00",
"visible":"true",
"templateName":"custom",
"seoDescription":"This is a custom page demo.",
"handle":"demo",
"title":"Custom page demo",
"seoTitle":"Custom page title",
"content":"<div class=\"rfq_form_page\"><div class=\"loader\"></div></div>"
}
}'
json
HTTP/1.1 200 OK
{
"page": {
"publishTime": "2025-01-10T11:00:00-05:00",
"visible": "true",
"templateName": "custom",
"seoDescription": "This is a custom page demo.",
"handle": "demo",
"id": "1",
"title": "Custom page demo",
"seoTitle": "Custom page title",
"content": "<div class=\"rfq_form_page\"><div class=\"loader\"></div></div>"
}
}
关于 页面
访问范围
需要多个访问范围—请参阅每个端点以了解访问范围要求。
需要访问受保护的客户数据。
在店铺内创建页面,用于承载一些静态内容,比如:“关于我们”页面、“联系我们”页面等。
页面 对象
Page(页面)资源用于存储 HTML 内容,主要用于维护商店中的网页,适合用于更新频率较低的静态内容。
属性
POST
创建自定义页面
创建自定义页面.
访问范围
需要以下任意访问权限: write_content
接口
POST
/api/202412/pages
PUT
更新自定义页面
更新自定义页面。
访问范围
需要以下任意访问权限: write_content
接口
PUT
/api/202412/pages/{page_id}