OverviewPlatformsAPI ReferenceResources
Commerce

Replace a navigation menu

PUThttps://zernio.com/api/v1/commerce/menus/{menuId}

Replaces the title and the whole item tree.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

menuIdstringRequired

Platform-native id.

Body

application/json

What every request needs

accountIdstringRequired
titlestringRequired
itemsarray of CommerceMenuItemInputRequired
titlestringRequired
typestringRequiredOne of frontpage | collection | collections | product | catalog | page | blog | article | search | shop_policy | http | metaobject | customer_account_page
Optional parameters4 fields
handlestring
items[].urlstring

For http items.

items[].resourceIdstring

For product, collection, page, blog, article and metaobject items.

items[].itemsarray of CommerceMenuItemInput

Responses

Success· the request worked

Errors· the request failed

PUT/v1/commerce/menus/{menuId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.updateCommerceMenu({  path: {    menuId: 'menu_abc123',  },  body: {    accountId: 'account_abc123',    title: 'Example',    items: [      {        title: 'Example',        type: 'frontpage',      },    ],  },});console.log(data);
{  "menu": {    "id": "string",    "handle": "string",    "title": "string",    "items": [      {        "id": "string",        "title": "string",        "type": "frontpage",        "url": "string",        "resourceId": "string",        "items": [          {}        ]      }    ]  }}
OpenAPI specification
Was this page helpful?