This function copies an existing to either a new page/layout or an existing page/layout.
Description#
This function copies an existing to either a new page/layout or an existing page/layout.
Request Body Parameters#
| Parameter | Type | Description |
|---|---|---|
Source_Page_IDSource_Page_Code |
Number String |
The id of the page being copied from The code of the page being copied from |
Dest_Page_IDDest_Page_Code |
Number String |
The id of the existing page being copied to (when Dest_Page_Create is false)The code of the page being copied to |
Dest_Page_Name |
String | The name of the destination page |
Dest_Page_Create |
Boolean | Whether to create a new page (true) or copy into an existing page (false) |
Dest_Page_Layout |
Boolean | Whether the destination page is a layout |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
data |
Object | The resulting page object |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Page_Copy",
"Source_Page_Code": "SFNT",
"Dest_Page_Code": "SFNT_NEW",
"Dest_Page_Name": "New Storefront",
"Dest_Page_Create": true,
"Dest_Page_Layout": false
}
Or, identifying the source page by ID instead of code:
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Page_Copy",
"Source_Page_ID": 719,
"Dest_Page_Code": "SFNT_NEW",
"Dest_Page_Name": "New Storefront",
"Dest_Page_Create": true,
"Dest_Page_Layout": false
}
Example Response#
{
"success": 1,
"data": {
"id": 107,
"admin": false,
"layout": false,
"secure": true,
"code": "SFNT_NEW",
"name": "New Storefront",
"title": "",
"ui_id": 0,
"templ_id": 719,
"cache": "anonempty"
}
}