Get a layout
get
/ccstore/v1/pages/layout/{path: .*}
This returns the layout data for a specific page. This data is used by the client to arrange how the page is displayed.
You can use additional request parameters to tailor what information is returned.
This endpoint can perform specific functionality that only works when running the storefront on a preview server. See Store Preview for more information. You can configure this behavior using the request parameters.
Request
Supported Media Types
- application/json
Path Parameters
-
path: .*: string
The page to get the layout of.
Query Parameters
-
disableMinify(optional): string
Applicable to preview only. Boolean flag to return minified or non minified Javascript links in layout information (for example disableMinify=true).Default Value:
false
-
layoutsRendered(optional): string
Contains the list of layout Ids already rendered on the client. If any ID in it matches the requested page's layout ID, then only region Ids are returned.
-
pageParam(optional): string
The page param (for example pageParam=cat90016).
-
usePageId(optional): string
Applicable to preview only. Specifies the ID for a page to preview, rather than the default.
-
usePreviewData(optional): string
Applicable to preview only. Boolean flag to determine whether to use preview data.Default Value:
false
Response
Supported Media Types
- application/json
200 Response
The following model is returned when the operation is successful:
Root Schema : getLayout_response
Type:
Show Source
object
-
description(optional):
string
The page description.
-
isPreview(optional):
boolean
Whether the server is in preview mode.
-
keywords(optional):
string
The keywords for the page.
-
layout(optional):
string
The layout id.
-
regions(optional):
array regions
The region data for all the regions of a page.
-
route(optional):
string
The page route.
-
title(optional):
string
The page title.
Example Response (application/json)
{
"layout":"homePageLayout",
"regions":[
{
"id":"headerRegionHomePage"
},
{
"id":"megaMenuRegionHomePage"
},
{
"id":"footerRegionHomePage"
},
{
"id":"globalWidgetsRegion0"
}
],
"route":"/home",
"isPreview":true,
"keywords":"",
"viewports":"",
"metaTags":[
],
"description":"",
"title":"Commerce Cloud Site"
}
Default Response
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
Error Code | Description | Possible Fix |
---|---|---|
32010 | Invalid layout ID | Check the layout ID is correct and the layout exists. |
32001 | Internal server error. | See returned error messages for more information. |
The following model is returned when an operation is unsuccessful:
The error response:Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
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(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code