To create a breadcrumb navigation, you need to fetch all items from the current page up to the root page (the ancestors):
https://pagible.com/cms/pages/01993e44-f1b1-7bf8-09ff-f1f0f5f7fdf5?include=ancestors
Then, they are referenced in the relationships of the current page added in the included section of the response:
"relationships": {
"ancestors": {
"data": [
{
"type": "navs",
"id": "0198a4b2-3c5e-7f1a-8d2b-e4f6a8c0d2e4"
},
{
"type": "navs",
"id": "0198d0f8-8c1e-75fc-b7fd-e5d9f3a7c1e3"
}
]
}
}
They are ordered from the root page to the direct parent of the current page. Each ancestor page item is contained in the included section:
"included": [
{
"type": "navs",
"id": "0198a4b2-3c5e-7f1a-8d2b-e4f6a8c0d2e4",
"attributes": {
"parent_id": null,
"lang": "en",
"name": "Home",
"path": "",
"title": "PagibleAI CMS",
"to": "",
"domain": "",
"tag": "root",
"theme": "",
"type": null,
"cache": 5,
"has": true,
"status": 1,
"createdAt": "2025-07-29T09:00:58.000000Z",
"updatedAt": "2025-08-20T22:46:15.000000Z"
},
"links": {
"self": "https:\/\/pagible.com\/cms\/pages\/0198a4b2-3c5e-7f1a-8d2b-e4f6a8c0d2e4"
}
},
{
"type": "navs",
"id": "0198d0f8-8c1e-75fc-b7fd-e5d9f3a7c1e3",
"attributes": {
"parent_id": "0198a4b2-3c5e-7f1a-8d2b-e4f6a8c0d2e4",
"lang": "en",
"name": "Blog",
"path": "blog",
"title": "Blog | PagibleAI CMS",
"to": "",
"domain": "",
"tag": "blog",
"theme": "",
"type": null,
"cache": 5,
"has": true,
"status": 1,
"createdAt": "2025-07-29T09:00:58.000000Z",
"updatedAt": "2025-07-29T09:00:58.000000Z"
},
"links": {
"self": "https:\/\/pagible.com\/cms\/pages\/0198d0f8-8c1e-75fc-b7fd-e5d9f3a7c1e3"
}
}
]
To construct the breadcrumb, iterate over the ancestors list and match each entry with the corresponding item in the included section by type and id.