curl --request GET \
--url https://cdn.xm.fabric.inc/api/menu \
--header 'x-site-context: <x-site-context>'
{
"status_code": 200,
"status": "List of menus",
"data": {
"menus": [
{
"_id": "61110b8d3e136500082f5d42",
"channel": [
12
],
"channels": [],
"name": "Gifts + Holiday",
"label": "Gifts + Holiday",
"path": "/c/gifts",
"isActive": true,
"images": [],
"videos": [],
"params": [
{
"_id": "61110bba873a390008d3a2fe",
"kind": "context",
"value": "gifts"
}
],
"order": 1,
"createdAt": "2021-08-09T11:03:41.984Z",
"updatedAt": "2021-10-05T17:28:39.582Z",
"__v": 0,
"children": [
{
"_id": "61110bcb3e136500082f5d48",
"channel": [
12
],
"channels": [],
"name": "Gifts by Price",
"label": "Gifts by Price",
"parent": "61110b8d3e136500082f5d42",
"path": "/c/gifts/gifts-by-price",
"isActive": true,
"images": [],
"videos": [],
"params": [
{
"_id": "61110bdd873a390008d3a303",
"kind": "context",
"value": "gifts_gifts-by-price"
}
],
"order": 1,
"createdAt": "2021-08-09T11:04:43.526Z",
"updatedAt": "2021-08-09T11:11:57.833Z",
"__v": 0
}
]
},
{
"_id": "61138c153f658a00085e2eba",
"channel": [
12
],
"channels": [],
"name": "Bedroom",
"label": "Bedroom",
"path": "/",
"isActive": false,
"images": [],
"videos": [],
"params": [],
"order": 2,
"createdAt": "2021-08-11T08:36:37.823Z",
"updatedAt": "2021-10-05T17:28:39.650Z",
"__v": 0,
"children": []
}
]
}
}
Returns a list of all the menus and its immediate sub-menus
curl --request GET \
--url https://cdn.xm.fabric.inc/api/menu \
--header 'x-site-context: <x-site-context>'
{
"status_code": 200,
"status": "List of menus",
"data": {
"menus": [
{
"_id": "61110b8d3e136500082f5d42",
"channel": [
12
],
"channels": [],
"name": "Gifts + Holiday",
"label": "Gifts + Holiday",
"path": "/c/gifts",
"isActive": true,
"images": [],
"videos": [],
"params": [
{
"_id": "61110bba873a390008d3a2fe",
"kind": "context",
"value": "gifts"
}
],
"order": 1,
"createdAt": "2021-08-09T11:03:41.984Z",
"updatedAt": "2021-10-05T17:28:39.582Z",
"__v": 0,
"children": [
{
"_id": "61110bcb3e136500082f5d48",
"channel": [
12
],
"channels": [],
"name": "Gifts by Price",
"label": "Gifts by Price",
"parent": "61110b8d3e136500082f5d42",
"path": "/c/gifts/gifts-by-price",
"isActive": true,
"images": [],
"videos": [],
"params": [
{
"_id": "61110bdd873a390008d3a303",
"kind": "context",
"value": "gifts_gifts-by-price"
}
],
"order": 1,
"createdAt": "2021-08-09T11:04:43.526Z",
"updatedAt": "2021-08-09T11:11:57.833Z",
"__v": 0
}
]
},
{
"_id": "61138c153f658a00085e2eba",
"channel": [
12
],
"channels": [],
"name": "Bedroom",
"label": "Bedroom",
"path": "/",
"isActive": false,
"images": [],
"videos": [],
"params": [],
"order": 2,
"createdAt": "2021-08-11T08:36:37.823Z",
"updatedAt": "2021-10-05T17:28:39.650Z",
"__v": 0,
"children": []
}
]
}
}
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Successful operation
200 response object
Was this page helpful?