Skip to content

List menus

GET
/stores/{storeRef}/menus
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

storeRef
required
string

The store’s ref, as returned by GET /stores.

ref
string

Example

header-menu

Filter by menu ref

name
string

Example

Header

Filter by menu name (partial match)

include_items
boolean

Example

true

Include menu items in response

limit
number
default: 20 >= 1 <= 10000

Example

20

Number of items per page

offset
number
0

Example

0

Number of items to skip

filters
string

Admin list-view filters, a JSON array of {field, operator, values}. Store menus define no filter fields, so any clause is rejected.

sort_by
string

Field to sort by: name, ref, created_at, updated_at or id. Defaults to created_at.

sort_order
string
Allowed values: asc desc

Sort direction. Defaults to desc when no sort field is given and asc otherwise.

Media typeapplication/json
object
data
required
Array<object>
object
deleted_at

When the menu was deleted. Always null on menus you can read.

string
nullable
menu_items

The menu’s top-level items, each with its nested children. Present only when items are included in the response.

Array<object>
object
parent_id

ID of the parent item, or null for a top-level item.

number
nullable
entity_type

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.

string
nullable
entity_id

ID of the referenced record, as a string. Null when the link has no target record.

string
nullable
entity_slug

Slug of the referenced record. Filled in for product, collection, blog_post, blog_category and content_page links; absent otherwise.

string
nullable
custom_url

URL for external or custom links. Null when the link points at a record.

string
nullable
target

How the link opens: _self, _blank, _parent or _top.

string
nullable
children
Array<object> recursive
description

Description of the referenced record, filled in together with entity_slug.

string
nullable
id
required

Item ID.

number
menu_id
required

ID of the menu the item belongs to.

number
label
required

Text shown for the link.

string
created_at
required

When the item was created, as an ISO 8601 timestamp.

string
updated_at
required

When the item was last updated, as an ISO 8601 timestamp.

string
id
required

Menu ID.

number
name
required

Menu name.

string
ref
required

Reference used to look the menu up, unique within the store, such as header-menu.

string
created_at
required

When the menu was created, as an ISO 8601 timestamp.

string
updated_at
required

When the menu was last updated, as an ISO 8601 timestamp.

string
meta
required
object
total
required

Total number of items matching the request.

number
limit
required

Maximum number of items in this page.

number
offset
required

Number of items skipped before this page.

number
page
required

Current page number, starting at 1.

number
totalPages
required

Total number of pages.

number
hasNext
required

Whether a next page exists.

boolean
hasPrev
required

Whether a previous page exists.

boolean

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.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

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.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}