Menus
Fetch navigation menus with nested items from the QUANTM7 API.
Menus hold the links that make up your site nav, footer, and mobile drawer. Each menu is a tree of items. Top-level items can have children, and children can have their own children. The API returns the full tree in one call so you can render it with a simple loop.
Get a menu
Returns a menu by its handle with a nested tree of items. The handle tells the API which menu to fetch (e.g. "header" for the main nav).
GET /v1/menus/{handle}Auth: Publishable or secret key
Path parameters
| Parameter | Type | Description |
|---|---|---|
handle | string | Menu handle (e.g. header, footer, mobile) |
Response
{
"data": {
"id": 1,
"public_id": "01J2GHI...",
"title": "Main Navigation",
"handle": "header",
"location": "header",
"items": [
{
"id": 10,
"title": "Shop",
"link_type": "collection",
"link_target": "/browse/all",
"position": 1,
"depth": 0,
"open_in_new_tab": false,
"badge_text": null,
"badge_color": null,
"featured_image_src": null,
"highlight": false,
"mega_menu_enabled": true,
"mega_menu_columns": 4,
"visibility": "always",
"visible_from": null,
"visible_until": null,
"children": [
{
"id": 11,
"title": "New Arrivals",
"link_type": "collection",
"link_target": "/browse/new-arrivals",
"position": 1,
"depth": 1,
"open_in_new_tab": false,
"badge_text": "New",
"badge_color": "#ef4444",
"featured_image_src": null,
"highlight": false,
"mega_menu_enabled": false,
"mega_menu_columns": 0,
"visibility": "always",
"visible_from": null,
"visible_until": null,
"children": []
}
]
},
{
"id": 20,
"title": "About",
"link_type": "page",
"link_target": "/info/about-us",
"position": 2,
"depth": 0,
"open_in_new_tab": false,
"badge_text": null,
"badge_color": null,
"featured_image_src": null,
"highlight": false,
"mega_menu_enabled": false,
"mega_menu_columns": 0,
"visibility": "always",
"visible_from": null,
"visible_until": null,
"children": []
}
]
}
}Menu fields
| Field | Type | Description |
|---|---|---|
id | integer | Menu ID |
public_id | string | Public UUID |
title | string | Menu display name |
handle | string | URL-safe identifier |
location | string or null | Placement hint (e.g. header, footer, mobile) |
items | array | Top-level menu items (nested tree) |
Menu item fields
| Field | Type | Description |
|---|---|---|
id | integer | Item ID |
title | string | Display text |
link_type | string | Link type (page, product, collection, blog_post, blog_category, url, heading) |
link_target | string or null | URL or path to link to |
position | integer | Sort order within the current level |
depth | integer | Nesting depth (0 = top level) |
open_in_new_tab | boolean | Whether to open link in a new tab |
badge_text | string or null | Badge label (e.g. "New", "Sale") |
badge_color | string or null | Badge background colour (hex) |
featured_image_src | string or null | Image for the menu item |
highlight | boolean | Whether to visually highlight this item |
mega_menu_enabled | boolean | Whether this item opens a mega menu |
mega_menu_columns | integer | Number of columns in the mega menu grid |
visibility | string | Visibility rule (always, scheduled) |
visible_from | string or null | Start of visibility window (ISO 8601) |
visible_until | string or null | End of visibility window (ISO 8601) |
children | array | Nested child items (same shape, recursive) |
Timed items
Some menu items only show up at certain times. For example, a "Black Friday" link might appear from Nov 25 to Nov 30. The API checks the clock and hides items that are outside their window. You do not need to filter them on your end. If an item is in the response, it is safe to show.
Common menu handles
| Handle | Typical use |
|---|---|
header | Main site navigation |
footer | Footer links |
mobile | Mobile navigation |
account | Customer account sidebar |
Errors
| Status | Code | Description |
|---|---|---|
| 404 | not_found | No menu with this handle exists |
Example
curl https://api.quantm7.com/v1/menus/header \
-H "Authorization: Bearer q7_pk_your_key"