QUANTM7 Docs
Headless APIAPI Reference

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

ParameterTypeDescription
handlestringMenu 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": []
      }
    ]
  }
}
FieldTypeDescription
idintegerMenu ID
public_idstringPublic UUID
titlestringMenu display name
handlestringURL-safe identifier
locationstring or nullPlacement hint (e.g. header, footer, mobile)
itemsarrayTop-level menu items (nested tree)
FieldTypeDescription
idintegerItem ID
titlestringDisplay text
link_typestringLink type (page, product, collection, blog_post, blog_category, url, heading)
link_targetstring or nullURL or path to link to
positionintegerSort order within the current level
depthintegerNesting depth (0 = top level)
open_in_new_tabbooleanWhether to open link in a new tab
badge_textstring or nullBadge label (e.g. "New", "Sale")
badge_colorstring or nullBadge background colour (hex)
featured_image_srcstring or nullImage for the menu item
highlightbooleanWhether to visually highlight this item
mega_menu_enabledbooleanWhether this item opens a mega menu
mega_menu_columnsintegerNumber of columns in the mega menu grid
visibilitystringVisibility rule (always, scheduled)
visible_fromstring or nullStart of visibility window (ISO 8601)
visible_untilstring or nullEnd of visibility window (ISO 8601)
childrenarrayNested 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

HandleTypical use
headerMain site navigation
footerFooter links
mobileMobile navigation
accountCustomer account sidebar

Errors

StatusCodeDescription
404not_foundNo menu with this handle exists

Example

curl https://api.quantm7.com/v1/menus/header \
  -H "Authorization: Bearer q7_pk_your_key"

On this page