---
title: "Update a custom page"
description: "Update a specified custom page for the store."
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/online-store/page/update-a-custom-page'
  md: 'https://developer.shopline.com/docs/admin-rest-api/online-store/page/update-a-custom-page.md'
---
# Update a custom page

Update a specified custom page for the store.

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_page`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
PUT /store/page/customize.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `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` .

## Required Permissions

* `write_page`

## Request

### 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](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

### Request Body

* `req`

  object

  Request parameters.
  
  - Parameters not provided or passed with `null` will retain their existing values.
  - Parameters passed with empty strings (`""`) will have their values cleared.

  * `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.

  * `url`

    string

    Relative path of the custom page URL. Refer to [Customize your URL](https://help.shopline.com/hc/en-001/articles/33749590631961-Customizing-Your-URL-Structure-Limited-Access) for details on URL customization.
    
    Maximum length: 512

  * `page_id`

    string

    The unique ID of the custom page.

  * `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`.

  * `title`

    string

    Title of the custom page. 
    
    Maximum length: 255

  * `updater`

    string

    The ID or name of the updater for the custom page.

  * `body_html`

    string

    Custom page body content, including HTML tags.

  * `handle`

    string

    A unique semantic identifier for the custom page.

  * `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. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### 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

#### 200

* `data`

  object

  Response information.

  * `id`

    string

    The unique ID of the custom page.

  * `published_at`

    string

    Publication time of the custom page. 
    Format: `yyyy-MM-dd HH:mm:ss.SSS`.

  * `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.

  * `title`

    string

    Title of the custom page.

  * `author`

    string

    The ID or name of the author for the custom page.

  * `body_html`

    string

    The body content of the custom page, formatted in HTML. 

  * `handle`

    string

    A unique semantic identifier for the custom page.

* `msg`

  string

  Response information, including the reason for success or failure.


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "tags": [
    "Update a custom page"
  ],
  "description": "Update a specified custom page for the store.",
  "externalDocs": {
    "description": "Permission point used by the interface is `write_page` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": "| Error Code | HTTP Status Code | Error Description |\n|------------|------------------|-------------------|\n| PATH_EXISTED | 422 | The path already exists. |\n| REDIRECT_PATH_RISK_CONTROLLED | 422 | The redirect path is risk controlled. |\n| PATH_FAILED_TO_REDIRECT | 422 | The path failed to create a redirect. |\n| PATH_INVALID | 200 | The path is invalid. |\n| SUCCESS | 200 | request success |\n| DATA_IS_NOT_EXIST | 406 | The requested data does not exist. |\n| INVALID_ARGUMENT | 422 | T-OFC-A-INVALID_ARGUMENT |\n"
  },
  "operationId": "OXPSKTaX",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "name": "body",
          "description": "Body location parameters",
          "type": "object",
          "properties": {
            "req": {
              "name": "req",
              "description": "Request parameters.\n\n- Parameters not provided or passed with `null` will retain their existing values.\n- Parameters passed with empty strings (`\"\"`) will have their values cleared.",
              "type": "object",
              "properties": {
                "template_type": {
                  "name": "template_type",
                  "description": "The template type used by the custom page. Valid values are:\n- `0`: Default theme template.\n- `1`: Public template, available for all themes.\n- `2`: App-defined theme template, only effective for the current theme.",
                  "type": "integer"
                },
                "url": {
                  "name": "url",
                  "description": "Relative path of the custom page URL. Refer to [Customize your URL](https://help.shopline.com/hc/en-001/articles/33749590631961-Customizing-Your-URL-Structure-Limited-Access) for details on URL customization.\n\nMaximum length: 512",
                  "type": "string",
                  "example": "/customurl/contact_us"
                },
                "page_id": {
                  "name": "page_id",
                  "description": "The unique ID of the custom page.",
                  "type": "string",
                  "example": "6743314731912662424"
                },
                "published_at": {
                  "name": "published_at",
                  "description": "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`.",
                  "type": "string",
                  "example": "2023-09-11 16:49:35.120"
                },
                "title": {
                  "name": "title",
                  "description": "Title of the custom page. \n\nMaximum length: 255",
                  "type": "string",
                  "example": "Contact us"
                },
                "updater": {
                  "name": "updater",
                  "description": "The ID or name of the updater for the custom page.",
                  "type": "string",
                  "example": "Alvin"
                },
                "body_html": {
                  "name": "body_html",
                  "description": "Custom page body content, including HTML tags.",
                  "type": "string",
                  "example": "<p>We love to hear from you.</p>"
                },
                "handle": {
                  "name": "handle",
                  "description": "A unique semantic identifier for the custom page.",
                  "type": "string",
                  "example": "contact-us"
                },
                "published_status": {
                  "name": "published_status",
                  "description": "Whether to publish the custom page.\n- `true`: Publish immediately.\n- `false`: Do not publish or scheduled to publish. To schedule, the `published_at` field must be specified.\n\nDefaults value: `true`",
                  "type": "boolean"
                },
                "template_name": {
                  "name": "template_name",
                  "description": "Template name used for the custom page. ",
                  "type": "string",
                  "example": "templates/page.contact.json"
                }
              },
              "required": [
                "updater",
                "page_id"
              ],
              "example": {
                "template_type": null,
                "title": "Contact us",
                "updater": "Alvin",
                "url": "/customurl/contact_us",
                "body_html": "<p>We love to hear from you.</p>",
                "published_at": "2023-09-11 16:49:35.120",
                "published_status": null,
                "template_name": "templates/page.contact.json",
                "handle": "contact-us",
                "page_id": "6743314731912662424"
              }
            }
          },
          "required": [
            "req"
          ],
          "example": {
            "req": {
              "body_html": "<p>We love to hear from you.</p>",
              "handle": "contact-us",
              "published_status": null,
              "template_type": null,
              "title": "Contact us",
              "page_id": "6743314731912662424",
              "published_at": "2023-09-11 16:49:35.120",
              "template_name": "templates/page.contact.json",
              "updater": "Alvin",
              "url": "/customurl/contact_us"
            }
          }
        },
        "examples": {
          "Update a custom page": {
            "description": "Update a custom page",
            "value": {
              "req": {
                "author": "shopline",
                "body_html": "MY CUSTOM PAGE CONTENT",
                "published_at": "2023-09-07 17:17:02.868",
                "published_status": "true",
                "template_name": "templates/page.json",
                "template_type": 2,
                "handle": "my-custom-page-5",
                "page_id": "6933242399154775415",
                "title": "MY CUSTOM PAGE 5",
                "updater": "3400001642"
              }
            }
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "data": {
                "name": "data",
                "description": "Response information.",
                "type": "object",
                "properties": {
                  "id": {
                    "name": "id",
                    "description": "The unique ID of the custom page.",
                    "type": "string",
                    "example": "6743314731912662424"
                  },
                  "published_at": {
                    "name": "published_at",
                    "description": "Publication time of the custom page. \nFormat: `yyyy-MM-dd HH:mm:ss.SSS`.",
                    "type": "string",
                    "example": "2023-09-11 16:49:35.120"
                  },
                  "published_status": {
                    "name": "published_status",
                    "description": "Whether the custom page has been published. \n- `true`: Already published.\n- `false`: Not yet published.",
                    "type": "boolean"
                  },
                  "template_name": {
                    "name": "template_name",
                    "description": "Template name used for the custom page.",
                    "type": "string",
                    "example": "templates/page.contact.json"
                  },
                  "title": {
                    "name": "title",
                    "description": "Title of the custom page.",
                    "type": "string",
                    "example": "Contact us"
                  },
                  "author": {
                    "name": "author",
                    "description": "The ID or name of the author for the custom page.",
                    "type": "string",
                    "example": "Alvin"
                  },
                  "body_html": {
                    "name": "body_html",
                    "description": "The body content of the custom page, formatted in HTML. ",
                    "type": "string",
                    "example": "<p>We love to hear from you.</p>"
                  },
                  "handle": {
                    "name": "handle",
                    "description": "A unique semantic identifier for the custom page.",
                    "type": "string",
                    "example": "contact-us"
                  }
                },
                "example": {
                  "published_status": null,
                  "template_name": "templates/page.contact.json",
                  "title": "Contact us",
                  "author": "Alvin",
                  "body_html": "<p>We love to hear from you.</p>",
                  "handle": "contact-us",
                  "id": "6743314731912662424",
                  "published_at": "2023-09-11 16:49:35.120"
                }
              },
              "msg": {
                "name": "msg",
                "description": "Response information, including the reason for success or failure.",
                "type": "string"
              }
            },
            "example": {
              "data": {
                "published_at": "2023-09-11 16:49:35.120",
                "published_status": null,
                "template_name": "templates/page.contact.json",
                "title": "Contact us",
                "author": "Alvin",
                "body_html": "<p>We love to hear from you.</p>",
                "handle": "contact-us",
                "id": "6743314731912662424"
              },
              "msg": null
            }
          },
          "examples": {
            "Update a custom page": {
              "description": "Update a custom page",
              "value": {
                "data": {
                  "body_html": "MY CUSTOM PAGE CONTENT",
                  "handle": "my-custom-page-5",
                  "id": "6933242399154775415",
                  "template_name": "templates/page.json",
                  "title": "MY CUSTOM PAGE 5",
                  "author": "shopline"
                },
                "msg": "success"
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "put",
  "path": "/store/page/customize.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`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` ."
        }
      }
    }
  ],
  "info": {
    "title": "Update a custom page",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_page"
  ]
}
```