Menus
Navigation menus. main-menu is the storefront's header and footer its footer.
Endpoints#
- GET
/menus.jsonList menus - GET
/menus/{id}.jsonGet a menu - POST
/menus.jsonCreate a menu - PUT
/menus/{id}.jsonUpdate a menu - DELETE
/menus/{id}.jsonDelete a menu
Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.
The menu object#
What the endpoints below return for one menu.
{
"id": "cm2menu0001",
"title": "Main menu",
"handle": "main-menu",
"items_count": 3,
"items": [
{
"id": "cm2item0001",
"title": "Shop all",
"type": "catalog",
"resource_id": null,
"url": "https://juniper.example/products",
"position": 1,
"items": []
},
{
"id": "cm2item0002",
"title": "Wardrobe",
"type": "collection",
"resource_id": "cm2coll0001",
"url": "https://juniper.example/collections/wardrobe",
"position": 2,
"items": [
{
"id": "cm2item0003",
"title": "Linen shirt",
"type": "product",
"resource_id": "cm2product01",
"url": "https://juniper.example/products/linen-shirt",
"position": 1,
"items": []
}
]
}
],
"created_at": "2026-09-01T09:00:00.000Z",
"updated_at": "2026-10-20T08:00:00.000Z"
}List menus#
/menus.jsonread_contentEvery navigation menu with its items. main-menu is the storefront header and footer is the footer.
curl "https://store.weftgrid.com/api/admin/2026-10/menus.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "menus": [ … ] }Get a menu#
/menus/{id}.jsonread_contentThe menu with its items nested.
curl "https://store.weftgrid.com/api/admin/2026-10/menus/$MENU_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"menu": {
"id": "cm2menu0001",
"title": "Main menu",
"handle": "main-menu",
"items_count": 3,
"items": [
{ "id": "cm2item0001", "title": "Shop all", "type": "catalog", "resource_id": null, "url": "https://juniper.example/products", "position": 1, "items": [] },
{ "id": "cm2item0002", "title": "Wardrobe", "type": "collection", "resource_id": "cm2coll0001", "url": "https://juniper.example/collections/wardrobe", "position": 2, "items": [
{ "id": "cm2item0003", "title": "Linen shirt", "type": "product", "resource_id": "cm2product01", "url": "https://juniper.example/products/linen-shirt", "position": 1, "items": [] }
] }
],
"created_at": "2026-09-01T09:00:00.000Z",
"updated_at": "2026-10-20T08:00:00.000Z"
}
}Create a menu#
/menus.jsonwrite_contentitems is the full tree, up to 3 levels deep (nest with items). Each item has a title and a type: home, catalog, search, collection, product, page, blog, article, policy (resource_id refund, privacy, terms, shipping or contact) or url (with url: https://…, mailto:, tel: or a /path). collection, product, page, blog and article items take the resource's id as resource_id. Send an item's id to keep it. In responses, url is the item's address on the storefront, or null when its target was deleted or isn't published (those items are hidden from shoppers).
{
"menu": {
"title": "Sidebar",
"items": [
{ "title": "New in", "type": "collection", "resource_id": "cm2coll0001" },
{ "title": "Returns", "type": "policy", "resource_id": "refund" },
{ "title": "Instagram", "type": "url", "url": "https://instagram.com/juniper" }
]
}
}curl -X POST "https://store.weftgrid.com/api/admin/2026-10/menus.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"menu": {
"title": "Sidebar",
"items": [
{ "title": "New in", "type": "collection", "resource_id": "cm2coll0001" },
{ "title": "Returns", "type": "policy", "resource_id": "refund" },
{ "title": "Instagram", "type": "url", "url": "https://instagram.com/juniper" }
]
}
}'Example responseShowHide
{
"menu": {
"id": "cm2menu0001",
"title": "Main menu",
"handle": "main-menu",
"items_count": 3,
"items": [
{ "id": "cm2item0001", "title": "Shop all", "type": "catalog", "resource_id": null, "url": "https://juniper.example/products", "position": 1, "items": [] },
{ "id": "cm2item0002", "title": "Wardrobe", "type": "collection", "resource_id": "cm2coll0001", "url": "https://juniper.example/collections/wardrobe", "position": 2, "items": [
{ "id": "cm2item0003", "title": "Linen shirt", "type": "product", "resource_id": "cm2product01", "url": "https://juniper.example/products/linen-shirt", "position": 1, "items": [] }
] }
],
"created_at": "2026-09-01T09:00:00.000Z",
"updated_at": "2026-10-20T08:00:00.000Z"
}
}Update a menu#
/menus/{id}.jsonwrite_contentSend items to replace all of the menu's items in one go; leave it out to keep them. items is the full tree, up to 3 levels deep (nest with items). Each item has a title and a type: home, catalog, search, collection, product, page, blog, article, policy (resource_id refund, privacy, terms, shipping or contact) or url (with url: https://…, mailto:, tel: or a /path). collection, product, page, blog and article items take the resource's id as resource_id. Send an item's id to keep it. In responses, url is the item's address on the storefront, or null when its target was deleted or isn't published (those items are hidden from shoppers). The handles main-menu and footer can't be changed.
{
"menu": {
"items": [
{ "title": "Shop all", "type": "catalog" },
{ "title": "Collections", "type": "catalog", "items": [
{ "title": "Wardrobe", "type": "collection", "resource_id": "cm2coll0001" }
] },
{ "title": "About", "type": "page", "resource_id": "cm2page0001" }
]
}
}curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/menus/$MENU_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"menu": {
"items": [
{ "title": "Shop all", "type": "catalog" },
{ "title": "Collections", "type": "catalog", "items": [
{ "title": "Wardrobe", "type": "collection", "resource_id": "cm2coll0001" }
] },
{ "title": "About", "type": "page", "resource_id": "cm2page0001" }
]
}
}'Example responseShowHide
{
"menu": {
"id": "cm2menu0001",
"title": "Main menu",
"handle": "main-menu",
"items_count": 3,
"items": [
{ "id": "cm2item0001", "title": "Shop all", "type": "catalog", "resource_id": null, "url": "https://juniper.example/products", "position": 1, "items": [] },
{ "id": "cm2item0002", "title": "Wardrobe", "type": "collection", "resource_id": "cm2coll0001", "url": "https://juniper.example/collections/wardrobe", "position": 2, "items": [
{ "id": "cm2item0003", "title": "Linen shirt", "type": "product", "resource_id": "cm2product01", "url": "https://juniper.example/products/linen-shirt", "position": 1, "items": [] }
] }
],
"created_at": "2026-09-01T09:00:00.000Z",
"updated_at": "2026-10-20T08:00:00.000Z"
}
}Delete a menu#
/menus/{id}.jsonwrite_contentThe main-menu and footer menus can't be deleted.
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/menus/$MENU_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{}