Page

Page represents the structure and data of the published page displayed through commercetools Frontend.

Get page structure and data

Response Representation: PageDataResponse. It returns the structure and data of the published page displayed from commercetools Frontend. Fetched using the getPage method in the frontend SDK.

GET
https://PROJECT_NAME-COMPANY_NAME.frontastic.TLD/frontastic/page

Returns the structure and data of the published page displayed from commercetools Frontend.

Path parameters:
PROJECT_NAME
String

Project Name

COMPANY_NAME
String

Company Name

TLD
String

The top-level domain for the environment, which includes .live, .io, and .rocks. For more information, see Hosts.

Request headers:
Accept
String

application/json

Commercetools-Frontend-Extension-Version
String
Frontastic-Path
String

Path to the page folder.

Pattern: ^/.*$
Frontastic-Locale

Locale of the page folder.

Response:
200PageDataResponseasapplication/json
Request Example:cURL
curl --get https://PROJECT_NAME-COMPANY_NAME.frontastic.TLD/frontastic/page -i \
--header 'Accept: ${ACCEPT}'\
--header 'Commercetools-Frontend-Extension-Version: ${COMMERCETOOLS_FRONTEND_EXTENSION_VERSION}'\
--header 'Frontastic-Path: ${FRONTASTIC_PATH}'\
--header 'Frontastic-Locale: ${FRONTASTIC_LOCALE}'
200 Response Example: PageDataResponsejson
{
"page": {
"pageId": "4e530bb93d40a78d11a26e2b04271rk3",
"sections": {
"footer": {
"sectionId": "footer",
"layoutElements": []
},
"head": {
"sectionId": "head",
"layoutElements": []
},
"main": {
"sectionId": "main",
"layoutElements": [
{
"layoutElementId": "bfe4d755-e641-4791-9c57-d1010eacec84",
"configuration": {
"size": 12,
"mobile": true,
"tablet": true,
"desktop": true
},
"tastics": [
{
"tasticId": "48185ef7-2cd2-4593-ac82-1909d0f64731",
"tasticType": "example/star-wars/character-search",
"configuration": {
"mobile": true,
"tablet": true,
"desktop": true,
"data": null
}
}
]
}
]
}
},
"state": "default"
},
"pageFolder": {
"pageFolderId": "4e830bb93d40a78011a26e2f04223532",
"isDynamic": false,
"pageFolderType": "landingpage",
"configuration": {
"path": "star-wars",
"pathTranslations": []
},
"dataSourceConfigurations": [],
"name": "star-wars",
"ancestorIdsMaterializedPath": "/4e530bb9fd40a78011a26e7b041e8cc3",
"depth": 1,
"sort": 0
},
"data": {
"dataSources": {}
}
}