Description#
This function creates a new page.
Request Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
Page_Code |
String | Yes | Required. Code of the new page. Must be unique. |
Page_Name |
String | Yes | Required. Name of the page, up to 100 characters. |
Page_Title |
String | No | Title of the page, up to 254 characters. |
Page_Template |
String | No | Template content for the page. |
Page_Layout |
Boolean | No | Whether the page is a layout. Defaults to false. A page can’t be both a layout and a fragment. |
Page_Fragment |
Boolean | No | Whether the page is a fragment. Defaults to false. |
Page_Secure |
Boolean | No | Whether the page is secure. Defaults to false. |
Page_Public |
Boolean | No | Whether the page is public. Defaults to false. |
Page_Cache |
String | No | Cache setting. One of never, provisional, anonempty, allempty or always. Defaults to anonempty. |
Page_URI |
String | Yes | Canonical URI for the page. Can’t be set for layout or fragment pages. If omitted, a URI is generated for the page. |
Changeset_Notes |
String | No | Notes for the changeset that creates the page. |
CustomField_Values |
Object | Object keyed by custom field module code. Each module’s value is an object of custom field code and value pairs. | |
Branch_IDEdit_BranchBranch_Name |
Integer String String |
ID of the branch to create the page in Name of the branch Name of the branch |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Page_Insert",
"Page_Code": "black-friday-promo",
"Page_Name": "Black Friday Promotion"
}
Example Response#
{
"success": 1,
"data": {
"id": 105,
"admin": false,
"layout": false,
"secure": false,
"code": "black-friday-promo",
"name": "Black Friday Promotion",
"title": "",
"ui_id": 0,
"templ_id": 714,
"cache": "anonempty"
}
}