cloneLayout
post
/ccadmin/v1/layouts/{id}
Clone Layout. Clones a layout from the specified id
Request
Supported Media Types
- application/json
Path Parameters
-
id(required): string
ID of the layout.
Header Parameters
-
X-CC-Workset: string
The ID of the workset that this change will appear in. If this header is missing, the change will be made in the default workset.
Root Schema : cloneLayout_request
Type:
Show Source
object
-
properties(required):
object properties
The properties to be saved with this layout
Example:
{
"properties":{
"defaultPage":true,
"notes":"Testing new layout",
"displayName":"New Cart Layout"
}
}
Nested Schema : properties
Type:
object
The properties to be saved with this layout
Show Source
-
defaultPage:
boolean
whether or not this layout should be the default for the layout type
-
displayName(required):
string
the display name of the layout
-
notes(required):
string
the notes associated with this layout
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : cloneLayout_response
Type:
Show Source
object
-
defaultPage:
boolean
Default page set or not
-
displayName:
string
New Cart Layout
-
layout:
object layout
Layout Information
-
name:
string
New Cart Layout
-
pageType:
string
cart
-
pageTypeItem:
object pageTypeItem
Page Type Item
-
repositoryId:
string
repository id
-
route:
string
New Cart Layout
Nested Schema : layout
Type:
object
Layout Information
Show Source
-
displayName:
string
New Cart Layout
-
name:
string
Shopping CartSummary Page Layout
-
repositoryId:
string
repository id
Nested Schema : pageTypeItem
Type:
object
Page Type Item
Show Source
-
repositoryId:
string
shopping Cart Summary Page Type
Example Response (application/json)
{
"layout":{
"displayName":"New Cart Layout",
"name":"ShoppingCartSummaryPageLayout",
"repositoryId":"pl400002"
},
"defaultPage":true,
"pageType":"cart",
"route":"/New Cart Layout",
"displayName":"New Cart Layout",
"name":"New Cart Layout",
"repositoryId":"pa100001",
"pageTypeItem":{
"repositoryId":"shoppingCartSummaryPageType"
}
}
400 Response
Following model is returned when layout id does not exist.
Root Schema : cloneLayout_failureResponse
Type:
Show Source
object
-
errorCode:
string
Default Value:
32010
Error code for message -
message:
string
Default Value:
The specified layout {layoutId} does not exist
Message explaining the error -
status:
string
Default Value:
400
HTTP status code for the error
Example Response (application/json)
{
"errorCode":"32010",
"message":"The specified layout {id} does not exist",
"status":"400"
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|32016|Error cloning layout. ({0})|
|32003|Error updating the configuration of a layout.|
|32001|Error retrieving the layout by its ID.|
|20032|No product id specified on item|
|32010|The specified layout does not exist|
|25100|Internal Error|
|20030|internal Error|
|32020|The specified page address {0} must be unique.|
|32019|The specified display name must be unique|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code