Skip to main content

Storefront API

Use the read-only Storefront API to fetch a menu for a headless or custom storefront.

Request a menu

Send a POST request to:

https://megamenu.hypaapps.com/megamenubuilder/{store_hash}/{menu_code}
Path parameterTypeDescription
store_hashstringYour BigCommerce store hash, such as abc123. It appears in BigCommerce admin URLs as store-abc123.
menu_codestringThe menu code shown on the menu's Settings tab in Mega Menu Builder.

Send this header:

Accept: application/json
info

The endpoint does not require authentication. It is read-only and returns public storefront navigation data.

For example:

curl --request POST \
--header "Accept: application/json" \
"https://megamenu.hypaapps.com/megamenubuilder/abc123/main-menu"

Response fields

A successful response contains a data array of menu items. Child items use the same structure recursively.

FieldTypeDescription
idnumberUnique menu item ID.
namestringDisplay name.
descriptionstring or nullOptional supporting text.
activebooleanWhether the item is active.
visibilitystringDevice visibility: responsive, desktop-only or mobile-only.
codestringUnique item code.
urlstringDestination URL.
imagestringDesktop image URL, or an empty string.
image_altstring or nullAlternative text for the desktop image.
mobile_imagestringMobile image URL, or an empty string.
mobile_image_altstring or nullAlternative text for the mobile image.
tagsstringComma-separated values from the item's CSS classes field.
has_childrenbooleanWhether the item contains children.
colsnumber or nullNumber of grid columns the item spans.
rowsnumber or nullNumber of grid rows the item spans.
column_designstring or nullColumn design applied to the item.
wrap_contentbooleanWhether child content wraps across the layout.
customer_groupsnumber[]Customer group IDs that can see the item.
new_tabbooleanWhether the link opens in a new tab.
childrenMenuItem[]Nested child menu items.

Example response

{
"data": [
{
"id": 1234,
"name": "Outdoors",
"description": null,
"active": true,
"visibility": "responsive",
"code": "outdoors",
"url": "/outdoors.html",
"image": "",
"image_alt": null,
"mobile_image": "",
"mobile_image_alt": null,
"tags": "",
"has_children": true,
"cols": null,
"rows": null,
"column_design": null,
"wrap_content": false,
"customer_groups": [2, 1],
"new_tab": false,
"children": []
}
]
}