Requires write_page access scope.
For more info, refer to:
PUT https://{handle}.myshopline.com/admin/openapi/v20260301/store/page/customize.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Update a specified custom page for the store.
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • reqobject required
    Request parameters.
    • Parameters not provided or passed with null will retain their existing values.
    • Parameters passed with empty strings ("") will have their values cleared.
  • body_html string
    Custom page body content, including HTML tags.
    Example: <p>We love to hear from you.</p>
  • handle string
    A unique semantic identifier for the custom page.
    Example: contact-us
  • page_id string required
    The unique ID of the custom page.
    Example: 6743314731912662424
  • published_at string
    The publication time of the custom page, which must not be earlier than the current time. This field should be specified when published_status is false. Format: yyyy-MM-dd HH:mm:ss.SSS.
    Example: 2023-09-11 16:49:35.120
  • published_status boolean
    Whether to publish the custom page.
    • true: Publish immediately.
    • false: Do not publish or scheduled to publish. To schedule, the published_at field must be specified.
    Defaults value: true
  • template_name string
    Template name used for the custom page.
    Example: templates/page.contact.json
  • template_type integer
    The template type used by the custom page. Valid values are:
    • 0: Default theme template.
    • 1: Public template, available for all themes.
    • 2: App-defined theme template, only effective for the current theme.
  • title string
    Title of the custom page.
    Maximum length: 255
    Example: Contact us
  • updater string required
    The ID or name of the updater for the custom page.
    Example: Alvin
  • url string
    Relative path of the custom page URL. Refer to Customize your URL for details on URL customization.
    Maximum length: 512
    Example: /pages/contact_us
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • dataobject
    Response information.
  • author string
    The ID or name of the author for the custom page.
    Example: Alvin
  • body_html string
    The body content of the custom page, formatted in HTML.
    Example: <p>We love to hear from you.</p>
  • handle string
    A unique semantic identifier for the custom page.
    Example: contact-us
  • id string
    The unique ID of the custom page.
    Example: 6743314731912662424
  • published_at string
    Publication time of the custom page. Format: yyyy-MM-dd HH:mm:ss.SSS.
    Example: 2023-09-11 16:49:35.120
  • published_status boolean
    Whether the custom page has been published.
    • true: Already published.
    • false: Not yet published.
  • template_name string
    Template name used for the custom page.
    Example: templates/page.contact.json
  • title string
    Title of the custom page.
    Example: Contact us
  • msg string
    Response information, including the reason for success or failure.
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "req": {
    "body_html": "<p>We love to hear from you.</p>",
    "handle": "contact-us",
    "page_id": "6743314731912662424",
    "published_at": "2023-09-11 16:49:35.120",
    "published_status": null,
    "template_name": "templates/page.contact.json",
    "template_type": null,
    "title": "Contact us",
    "updater": "Alvin",
    "url": "/pages/contact_us"
  }
}

Language

curl --request PUT \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/store/page/customize.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Update a custom page
Request
{
"req": {
"author": "shopline",
"body_html": "MY CUSTOM PAGE CONTENT",
"handle": "my-custom-page-5",
"page_id": "6933242399154775415",
"published_at": "2023-09-07 17:17:02.868",
"published_status": "true",
"template_name": "templates/page.json",
"template_type": 2,
"title": "MY CUSTOM PAGE 5",
"updater": "3400001642"
}
}
Response
{
"data": {
"author": "shopline",
"body_html": "MY CUSTOM PAGE CONTENT",
"handle": "my-custom-page-5",
"id": "6933242399154775415",
"template_name": "templates/page.json",
"title": "MY CUSTOM PAGE 5"
},
"msg": "success"
}
Was this article helpful to you?