List menus
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/menus?ref=header-menu&name=Header&include_items=false&limit=20&offset=0&sort_order=asc';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://apibase.ecomweb.app/api/v1/stores/example/menus?ref=header-menu&name=Header&include_items=false&limit=20&offset=0&sort_order=asc' \ --header 'x-api-key: <x-api-key>'Returns the store’s menus, newest first by default. Filter by ref or name, sort with sort_by and sort_order, and pass include_items=true to get each menu’s item tree. Paginated with limit and offset.
Required scopes: read:menus
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Example
header-menuFilter by menu ref
Example
HeaderFilter by menu name (partial match)
Example
trueInclude menu items in response
Example
20Number of items per page
Example
0Number of items to skip
Admin list-view filters, a JSON array of {field, operator, values}. Store menus define no filter fields, so any clause is rejected.
Field to sort by: name, ref, created_at, updated_at or id. Defaults to created_at.
Sort direction. Defaults to desc when no sort field is given and asc otherwise.
Responses
Section titled “Responses”object
object
When the menu was deleted. Always null on menus you can read.
The menu’s top-level items, each with its nested children. Present only when items are included in the response.
object
ID of the parent item, or null for a top-level item.
What the link points at: product, category, collection, blog_post, blog_category, content_page, search, home, orders, profile or custom. Null for a plain URL.
ID of the referenced record, as a string. Null when the link has no target record.
Slug of the referenced record. Filled in for product, collection, blog_post, blog_category and content_page links; absent otherwise.
URL for external or custom links. Null when the link points at a record.
How the link opens: _self, _blank, _parent or _top.
Description of the referenced record, filled in together with entity_slug.
Item ID.
ID of the menu the item belongs to.
Text shown for the link.
When the item was created, as an ISO 8601 timestamp.
When the item was last updated, as an ISO 8601 timestamp.
Menu ID.
Menu name.
Reference used to look the menu up, unique within the store, such as header-menu.
When the menu was created, as an ISO 8601 timestamp.
When the menu was last updated, as an ISO 8601 timestamp.
object
Total number of items matching the request.
Maximum number of items in this page.
Number of items skipped before this page.
Current page number, starting at 1.
Total number of pages.
Whether a next page exists.
Whether a previous page exists.
Example generated
{ "data": [ { "deleted_at": "example", "menu_items": [ { "parent_id": 1, "entity_type": "example", "entity_id": "example", "entity_slug": "example", "custom_url": "example", "target": "example", "children": [], "description": "example", "id": 1, "menu_id": 1, "label": "example", "created_at": "example", "updated_at": "example" } ], "id": 1, "name": "example", "ref": "example", "created_at": "example", "updated_at": "example" } ], "meta": { "total": 1, "limit": 1, "offset": 1, "page": 1, "totalPages": 1, "hasNext": true, "hasPrev": true }}The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}