Get a builder page
Endpoint: https://api.youcan.shop/pages/{id}/builder
Method: GET
Returns the content of a page builder page.
Required Scopes
read-pages
Parameters
| Param Name | Param Type | Description | Required |
|---|---|---|---|
outline | boolean | With 1, you get only id, name, label and children for each section | no |
Response
[200]
json
{
"id": "8b6d1a24-5c4e-4a5f-9d1e-0f2c3b4a5d6e",
"name": "Summer collection",
"slug": "summer-collection",
"visibility": "1",
"public_url": null,
"type": "landing",
"settings": {
"page-direction": "ltr"
},
"sections": [
{
"id": "hero",
"name": "html-editor",
"label": "Hero",
"blocks": {
"parameters": { "htmlText": "<div class=\"kb-hero\"><h1>Summer collection</h1></div>" },
"style": {}
},
"children": []
}
]
}type is landing or thankyou.
With outline=1, you get this sections tree:
json
"sections": [
{ "id": "hero", "name": "html-editor", "label": "Hero", "children": [] }
]Read the page without outline before you send Update a builder page. All sections are replaced on an update.
[404] Not Found
The page does not exist.
[422] Unprocessable Entity
The page is an HTML page. Use Get a page for it.
json
{
"errors": {
"page": ["is not a page builder page, use the pages endpoint for HTML pages"]
}
}