# Menus

Create, read, update, and delete navigation menus and their item trees — including the atomic whole-menu save — through the Store API.

Menus are named trees of navigation items. Reads require `read_menus`; writes require `write_menus`. Only documented request fields are accepted.

Start with `GET /menus/{menuId}?include_items=false` to obtain metadata, `item_count` and the current `revision` at any menu size. Full menu requests and responses are limited to 4 MiB of serialized JSON; larger documents return HTTP 413 `MENU_PAGE_ITEMS_REQUIRED`. Page root items and children through `GET /menus/{menuId}/items`, using `parent_id`, `page` and `limit`. Read live limits from `/menus/limits` (`item_page_size` and `item_search_page_size` are the page sizes for reading item levels and searching items; `max_items` caps a menu at 750 items); supported stored capacity and transport size are separate limits. Numeric resource IDs are decimal strings in `link_value`.

Save with the revision you edited. Send exactly one of a complete `items` tree or ordered `ops`; keep item IDs to preserve translations. Use `before_id` or `after_id` to move relative to a sibling, including on later pages. A move keeps the item's parent unless it sends `parent_id` (an empty string for the root) or `parent_temp_id`; `sort_order` is the item's 0-based position among its new siblings. An item id may appear only once in a full tree (`MENU_ITEM_DUPLICATE_ID`). Link types without a target (`requires_value: false`) store no `link_value` or `link_label`, and a blank label is stored as none. Every save refusal has its own code and names the `field` to fix, as listed on each endpoint. Never send a visible page index as a global position or coalesce interleaved moves. `child_count` and `subtree_count` include unloaded descendants. Empty operations preserve items; an empty full tree deletes them. Revision conflicts retain local edits until you choose how to reconcile.

Each item has `id`, `title`, `link_type`, `link_value` and `link_label` (types with a target), `open_in_new_tab`, `parent_id`, `sort_order` and `children`; paged reads add `child_count` and `subtree_count`. An item whose target shoppers cannot open carries `link_status`: `unpublished` (products, collections, blog posts, pages and policies that are not published; vendors and brands being deleted) or `missing` (deleted). Your storefront theme decides how many levels each menu shows. Labels have no destination. Menu item images and promotion slots are not supported. Resource links resolve current published slugs and hide unavailable leaves; surviving children keep a heading. Custom URLs do not follow destination renames or deletion.

Renaming reserves the old handle for the same menu. Up to 20 historical handles are retained; another menu cannot claim them, and a handle generated for a new menu is numbered past them. `handle_aliases` and backend-resolved `handle_history` expose reservations. Existing references never expire blindly.

CSV imports add or update items in existing menus. They do not create menu definitions or preserve empty menus and are not a complete backup. A staged preview expires after 24 hours or relevant source-version changes; diagnostics are paginated in a results dialog and operation feedback is backend-resolved. Menu import/export outcomes reach owners and staff with `menus:read`.

Only item titles translate. Use [Menu item translations](/store-api/translations/menus) with item IDs and the corresponding menu and translation scopes. Menu names, handles, destinations and structure do not translate.

## Endpoints

## Menu limits

`GET /api/2025-01/menus/limits`

Returns field maximum lengths, tree-shape caps (total items, children per parent, nesting depth), pagination caps, and the full link-type vocabulary with per-type value requirements. Build item forms from `link_types` — the set is server-owned. `max_per_store` is this store's plan cap, `count` is how many exist now, and `usage` is the label as Tringify shows it, in English.

Scope: `read_menus`

```curl
curl 'https://api-store.tringify.com/api/2025-01/menus/limits' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "count": 1,
    "custom_url_max_length": 2048,
    "full_menu_max_bytes": 4194304,
    "handle_max_length": 255,
    "item_page_size": 100,
    "item_search_page_size": 50,
    "item_title_max_length": 255,
    "link_types": [
      {
        "label": "Home",
        "requires_value": false,
        "search_resource": "",
        "value": "home"
      },
      {
        "label": "Shop",
        "requires_value": false,
        "search_resource": "",
        "value": "shop"
      },
      {
        "label": "Product",
        "requires_value": true,
        "search_resource": "product",
        "value": "product"
      },
      {
        "label": "Category",
        "requires_value": true,
        "search_resource": "category",
        "value": "category"
      },
      {
        "label": "All Categories",
        "requires_value": false,
        "search_resource": "",
        "value": "category_list"
      },
      {
        "label": "Collection",
        "requires_value": true,
        "search_resource": "collection",
        "value": "collection"
      },
      {
        "label": "All Collections",
        "requires_value": false,
        "search_resource": "",
        "value": "collection_list"
      },
      {
        "label": "Blog Post",
        "requires_value": true,
        "search_resource": "blog_post",
        "value": "blog_post"
      },
      {
        "label": "All Blog Posts",
        "requires_value": false,
        "search_resource": "",
        "value": "blog_list"
      },
      {
        "label": "Vendor",
        "requires_value": true,
        "search_resource": "vendor",
        "value": "vendor"
      },
      {
        "label": "All Vendors",
        "requires_value": false,
        "search_resource": "",
        "value": "vendor_list"
      },
      {
        "label": "Brand",
        "requires_value": true,
        "search_resource": "brand",
        "value": "brand"
      },
      {
        "label": "All Brands",
        "requires_value": false,
        "search_resource": "",
        "value": "brand_list"
      },
      {
        "label": "Page",
        "requires_value": true,
        "search_resource": "page",
        "value": "page"
      },
      {
        "label": "Policy",
        "requires_value": true,
        "search_resource": "policy",
        "value": "policy"
      },
      {
        "label": "Blog Category",
        "requires_value": true,
        "search_resource": "blog_category",
        "value": "blog_category"
      },
      {
        "label": "Wishlist",
        "requires_value": false,
        "search_resource": "",
        "value": "wishlist"
      },
      {
        "label": "Cart",
        "requires_value": false,
        "search_resource": "",
        "value": "cart"
      },
      {
        "label": "My Account",
        "requires_value": false,
        "search_resource": "",
        "value": "account"
      },
      {
        "label": "Search",
        "requires_value": false,
        "search_resource": "",
        "value": "search"
      },
      {
        "label": "Track Order",
        "requires_value": false,
        "search_resource": "",
        "value": "track_order"
      },
      {
        "label": "Delivery help",
        "requires_value": false,
        "search_resource": "",
        "value": "delivery"
      },
      {
        "label": "Gift Card balance",
        "requires_value": false,
        "search_resource": "",
        "value": "gift_card"
      },
      {
        "label": "Label (no link)",
        "requires_value": false,
        "search_resource": "",
        "value": "label"
      },
      {
        "label": "Custom URL",
        "requires_value": true,
        "search_resource": "",
        "value": "custom_url"
      },
      {
        "label": "Custom content entry",
        "requires_value": true,
        "search_resource": "metaobject",
        "value": "metaobject"
      },
      {
        "label": "Custom content list",
        "requires_value": true,
        "search_resource": "metaobject_definition",
        "value": "metaobject_list"
      }
    ],
    "list_max_limit": 100,
    "list_page_size": 20,
    "max_children_per_parent": 750,
    "max_handle_aliases": 20,
    "max_items": 750,
    "max_nesting_depth": 3,
    "max_per_store": 3,
    "name_max_length": 255,
    "page_size_options": [
      20,
      50,
      100
    ],
    "rendering_guidance": "Your theme decides how many levels each menu shows. Menu images and promotions are not supported. Custom URLs do not follow destination changes. Translate item titles in Translations.",
    "search_max_length": 100,
    "sort_columns": [
      "name",
      "created_at",
      "updated_at"
    ],
    "usage": "Menus 1 of 3"
  },
  "success": true
}
```

## List menus

`GET /api/2025-01/menus`

Returns paginated menus with item counts. Use `search` to filter by name or handle. `total` counts matching menus; `store_total` counts all menus in the store and can be compared with `max_per_store` from the limits response. Invalid sort parameters are rejected instead of silently defaulted.

Scope: `read_menus`

```curl
curl 'https://api-store.tringify.com/api/2025-01/menus?limit=20&page=1&search=main&sort_by=created_at&sort_direction=asc' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "limit": 20,
    "menus": [
      {
        "created_at": "2026-01-05T12:00:00-04:00",
        "handle": "main-menu",
        "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
        "item_count": 4,
        "name": "Main Menu",
        "updated_at": "2026-01-05T12:00:00-04:00"
      }
    ],
    "page": 1,
    "sort_by": "created_at",
    "sort_direction": "asc",
    "store_total": 1,
    "total": 1
  },
  "success": true
}
```

## Get a menu

`GET /api/2025-01/menus/{menuId}`

Returns the menu, its `revision` (send it back when saving), and its nested item tree. An item whose linked resource shoppers cannot open carries `link_status`: `unpublished` (storefronts leave it out until shoppers can open it: a product, collection, blog post or page that is not published, a policy that is not published with readable text, a draft custom content entry, or a custom content entry or list whose type is a draft or has its web pages turned off) or `missing` (the linked resource was deleted; the link is removed from menus shortly after. Deleting a custom content entry or type removes its menu links in the same change, so those are not left missing). Use `include_items=false` for metadata and a revision at any stored size. Full reads are limited to 4 MiB of serialized JSON; larger reads return `MENU_PAGE_ITEMS_REQUIRED`. Page one level at a time using the items endpoint.

Scope: `read_menus`

```curl
curl 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10?include_items=false' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "created_at": "2026-01-05T12:00:00-04:00",
    "handle": "main-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 1,
    "items": [
      {
        "children": [],
        "created_at": "2026-01-05T12:00:00-04:00",
        "id": "1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0",
        "link_type": "shop",
        "open_in_new_tab": false,
        "sort_order": 0,
        "title": "Shop"
      }
    ],
    "name": "Main Menu",
    "revision": "2026-01-05T06:30:00.123456Z",
    "updated_at": "2026-01-05T12:00:00-04:00"
  },
  "success": true
}
```

## List menu items

`GET /api/2025-01/menus/{menuId}/items`

Returns one paginated level — root items, or the children of `parent_id`. Each node carries `child_count` and exact `subtree_count`, including unloaded descendants. Use sibling IDs (`before_id`/`after_id`) for positional moves; page indexes are not global ranks. Fetch the next page only when `has_more` is true.

Scope: `read_menus`

```curl
curl 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10/items?limit=20&page=1&parent_id=1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "has_more": false,
    "items": [
      {
        "child_count": 0,
        "created_at": "2026-01-05T12:05:00-04:00",
        "id": "706044d9-8f58-4ce8-ac03-01e6a90ef52d",
        "link_label": "Blue shirt",
        "link_type": "product",
        "link_value": "42",
        "open_in_new_tab": false,
        "parent_id": "1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0",
        "sort_order": 0,
        "subtree_count": 1,
        "title": "Blue shirt"
      }
    ],
    "total": 1
  },
  "success": true
}
```

## Search menu items

`GET /api/2025-01/menus/{menuId}/items/search`

Finds items by title or link label anywhere in the tree. Each hit includes its root-to-parent `ancestor_ids` and `ancestor_titles` so clients can expand-to-reveal without walking the tree.

Scope: `read_menus`

```curl
curl 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10/items/search?limit=20&page=1&q=shop' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "has_more": false,
    "items": [
      {
        "ancestor_ids": [],
        "ancestor_titles": [],
        "child_count": 0,
        "id": "1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0",
        "link_type": "shop",
        "open_in_new_tab": false,
        "sort_order": 0,
        "subtree_count": 1,
        "title": "Shop"
      }
    ],
    "total": 1
  },
  "success": true
}
```

## Create a menu

`POST /api/2025-01/menus`

Creates an empty menu. `handle` is optional — when omitted it is generated from the name and numbered past every handle another menu uses or keeps as an old handle; a provided handle that collides is rejected. Fires `menus/create`.

Scope: `write_menus`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/menus' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "handle": "main-menu",
  "name": "Main Menu"
}'
```

Response:

```json
{
  "code": "MENU_CREATED",
  "data": {
    "created_at": "2026-01-05T12:00:00-04:00",
    "handle": "main-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 0,
    "items": [],
    "name": "Main Menu",
    "revision": "2026-01-05T06:30:00.123456Z",
    "updated_at": "2026-01-05T12:00:00-04:00"
  },
  "message": "Menu 'Main Menu' created.",
  "success": true
}
```

## Update a menu

`PUT /api/2025-01/menus/{menuId}`

Updates provided fields; omitted fields are unchanged. A handle change is validated and checked for uniqueness. This metadata response includes the new revision and `items: null`. Read the menu to retrieve its tree. Emits `menus/update`.

Scope: `write_menus`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "handle": "footer-menu",
  "name": "Footer Menu"
}'
```

Response:

```json
{
  "code": "MENU_UPDATED",
  "data": {
    "created_at": "2026-01-05T12:00:00-04:00",
    "handle": "footer-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 1,
    "items": null,
    "name": "Footer Menu",
    "revision": "2026-01-05T06:35:00.123456Z",
    "updated_at": "2026-01-05T12:05:00-04:00"
  },
  "message": "Menu 'Footer Menu' updated.",
  "success": true
}
```

## Save a menu atomically

`PUT /api/2025-01/menus/{menuId}/save`

Save metadata and item changes together, all or nothing. Send the `revision` from the menu you edited; if the menu changed since, the save is rejected with `MENU_SAVE_CONFLICT` so nobody's changes are overwritten — fetch it again and reapply. Send exactly one of `items` or `ops`. With `items`, send the complete tree: keep existing item IDs to preserve translations, omit items to delete them, and omit IDs for new items. An empty `items` array clears the tree. Full request/response JSON has a 4 MiB limit. With `ops`, send ordered create, update, delete, and move operations; an empty array preserves every item. Create a parent before referencing its unique `temp_id` in a later operation. A move keeps the item's parent unless it sends `parent_id` (an empty string for the root) or `parent_temp_id`. Link types without a target (`requires_value: false`) store no `link_value` or `link_label`. Linked resources must belong to the store. Cycles and changes that exceed tree limits are rejected. A tree save returns the saved tree; an operations save returns `items: null`, so read the menu when you need the resulting items. Emits `menus/update`.

Scope: `write_menus`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10/save' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "handle": "main-menu",
  "items": [
    {
      "children": [],
      "link_type": "shop",
      "title": "Shop"
    }
  ],
  "name": "Main Menu",
  "revision": "2026-01-05T06:30:00.123456Z"
}'
```

Response:

```json
{
  "code": "MENU_UPDATED",
  "data": {
    "created_at": "2026-01-05T12:00:00-04:00",
    "handle": "main-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 1,
    "items": [
      {
        "children": [],
        "created_at": "2026-01-05T12:05:00-04:00",
        "id": "706044d9-8f58-4ce8-ac03-01e6a90ef52d",
        "link_type": "shop",
        "open_in_new_tab": false,
        "sort_order": 0,
        "title": "Shop"
      }
    ],
    "name": "Main Menu",
    "revision": "2026-01-05T06:35:00.123456Z",
    "updated_at": "2026-01-05T12:05:00-04:00"
  },
  "message": "Menu 'Main Menu' updated.",
  "success": true
}
```

## Create a menu item

`POST /api/2025-01/menus/{menuId}/items`

Creates one item. `link_type` comes from the limits vocabulary; types with a target require `link_value` (ids are existence-validated), types without one (`requires_value: false`) store no `link_value` or `link_label`. `parent_id` places it in the tree, subject to the nesting-depth cap. Fires `menus/update`.

Scope: `write_menus`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10/items' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "link_label": "Blue shirt",
  "link_type": "product",
  "link_value": "42",
  "open_in_new_tab": false,
  "parent_id": "1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0",
  "sort_order": 0,
  "title": "Blue shirt"
}'
```

Response:

```json
{
  "code": "MENU_ITEM_CREATED",
  "data": {
    "children": [],
    "created_at": "2026-01-05T12:00:00-04:00",
    "id": "706044d9-8f58-4ce8-ac03-01e6a90ef52d",
    "link_label": "Blue shirt",
    "link_type": "product",
    "link_value": "42",
    "open_in_new_tab": false,
    "parent_id": "1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0",
    "sort_order": 0,
    "title": "Blue shirt"
  },
  "message": "Menu item 'Blue shirt' created.",
  "success": true
}
```

## Update a menu item

`PUT /api/2025-01/menus/{menuId}/items/{itemId}`

Updates provided fields. A link type without a target (`requires_value: false`) stores no `link_value` or `link_label`. `parent_id` reparents the item (cycle- and depth-guarded); an empty string moves it to the root. The response includes the item's `children`. Fires `menus/update`.

Scope: `write_menus`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10/items/1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "link_type": "collection_list",
  "open_in_new_tab": true,
  "title": "Shop all"
}'
```

Response:

```json
{
  "code": "MENU_ITEM_UPDATED",
  "data": {
    "children": [],
    "created_at": "2026-01-05T12:00:00-04:00",
    "id": "1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0",
    "link_type": "collection_list",
    "open_in_new_tab": true,
    "sort_order": 0,
    "title": "Shop all"
  },
  "message": "Menu item 'Shop all' updated.",
  "success": true
}
```

## Delete a menu item

`DELETE /api/2025-01/menus/{menuId}/items/{itemId}`

Deletes the item and all of its children. Fires `menus/update`.

Scope: `write_menus`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10/items/1d2b7c44-93cf-4f2f-9f6a-5f4a1e2ce8d0' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "code": "MENU_ITEM_DELETED",
  "message": "Menu item deleted.",
  "success": true
}
```

## Delete a menu

`DELETE /api/2025-01/menus/{menuId}`

Deletes the menu and all of its items. Fires `menus/delete`. If a storefront theme uses the menu, the first request returns `CONFIRMATION_REQUIRED` with warnings listing each storefront place that goes empty; repeat it with `confirmed` and the returned token to delete.

Scope: `write_menus`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/menus/9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "confirmed": false
}'
```

Response:

```json
{
  "code": "MENU_DELETED",
  "message": "Menu deleted.",
  "success": true
}
```

## Fields

| Field | Type | Create | Update | Required | Translatable |
| --- | --- | --- | --- | --- | --- |
| `name` | string | Yes | Yes | create | No |
| `handle` | string | Yes | Yes | - | No |
| `item_count` | integer | No | No | - | No |
| `created_at` | string (RFC 3339) | No | No | - | No |
| `updated_at` | string (RFC 3339) | No | No | - | No |

## Webhook events

Subscribe to these events to keep your integration in sync with menus. Each event shows the required Store API scope and store permission, the available payload fields, and an example payload. Subscription setup is validated against those permissions; delivery is always restricted to the subscription's store.

## Menu created

Event: `menus/create` · App scope: `read_menus` · Staff permission: `menus:read`

Fired when a navigation menu is created.

```json
{
  "menu": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "handle": "main-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 5,
    "name": "Main menu",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Menu updated

Event: `menus/update` · App scope: `read_menus` · Staff permission: `menus:read`

Fired when a navigation menu or one of its items is updated.

```json
{
  "changed_fields": [
    "name",
    "items"
  ],
  "menu": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "handle": "main-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 5,
    "name": "Main menu",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Menu deleted

Event: `menus/delete` · App scope: `read_menus` · Staff permission: `menus:read`

Fired when a navigation menu is deleted.

```json
{
  "menu": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "handle": "main-menu",
    "id": "9a7f04c2-6f3e-4b58-a2ce-b9d3f43f6f10",
    "item_count": 5,
    "name": "Main menu",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

