Browse the API docs

Menus

Navigation menus. main-menu is the storefront's header and footer its footer.

Endpoints#

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.

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#

GET/menus.jsonread_content

Every navigation menu with its items. main-menu is the storefront header and footer is the footer.

Request
curl "https://store.weftgrid.com/api/admin/2026-10/menus.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "menus": [ … ] }

Get a menu#

GET/menus/{id}.jsonread_content

The menu with its items nested.

Request
curl "https://store.weftgrid.com/api/admin/2026-10/menus/$MENU_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "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#

POST/menus.jsonwrite_content

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).

Request body
{
  "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" }
    ]
  }
}
Request with curl
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 responseShow
{
  "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#

PUT/menus/{id}.jsonwrite_content

Send 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.

Request body
{
  "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" }
    ]
  }
}
Request with curl
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 responseShow
{
  "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#

DELETE/menus/{id}.jsonwrite_content

The main-menu and footer menus can't be deleted.

Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/menus/$MENU_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{}