Commerce · Commerce

Replace a navigation menu

Replaces a navigation menu. Works with Shopify accounts.

PUThttps://api.pozy.ai/v1/commerce/menus/{menuId}
ShopifyupdateCommerceMenu

Guides: Commerce & blogs, Products and catalog

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the commerce resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
menuIdrequiredstring

Request body

application/json, required

  • accountIdstringrequired
  • titlestringrequired
  • handlestring
  • itemsarray of objectrequired

    Up to 100 items.

    • titlestringrequired
    • typestringrequired

      One of frontpage, collection, collections, product, catalog, page, blog, article, search, shop_policy, http, metaobject, customer_account_page.

    • urlstring
    • resourceIdstring
    • itemsarray of object

      Up to 100 items.

Example

curl -X PUT "https://api.pozy.ai/v1/commerce/menus/624146266c09b8acc3a0ec41" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "title": "Launch day",
  "items": [
    {
      "title": "Launch day",
      "type": "frontpage"
    }
  ]
}'

Response

200 on success

  • menuobject
    • idstring
    • handlestring
    • titlestring
    • itemsarray of object
      6 child fields
      • idstring

        Can be null.

      • titlestring
      • typestring

        One of frontpage, collection, collections, product, catalog, page, blog, article, search, shop_policy, http, metaobject, customer_account_page.

      • urlstring

        Can be null.

      • resourceIdstring

        Can be null.

      • itemsarray of object
200 response
{
  "menu": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "handle": "acme",
    "title": "Launch day",
    "items": [
      {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "title": "Launch day",
        "type": "frontpage",
        "url": "https://pozy.ai/media/example-1.jpg",
        "resourceId": "614ee162b80f1df55c75856d",
        "items": [
          {}
        ]
      }
    ]
  }
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Commerce

GETGet a storeGETList ordersGETGet an orderGETList productsPOSTCreate a productPOSTActivate, deactivate, archive or delete productsGETGet a productPATCHUpdate a productPOSTUpdate variant pricesGETList collectionsPOSTCreate a collectionGETGet a collectionPATCHUpdate a collectionDELDelete a collectionPOSTAdd or remove products in a collectionPOSTAdd variantsDELDelete variantsPOSTAdd optionsDELDelete optionsPOSTAdd imagesDELRemove imagesPOSTReorder imagesPOSTDuplicate a productGETList product metafieldsPUTSet product metafieldsDELDelete product metafieldsPOSTPublish or unpublish a productGETList collection metafieldsPUTSet collection metafieldsDELDelete collection metafieldsPOSTPublish or unpublish a collectionPOSTAdd or remove tags in bulkPOSTReorder products in a collectionGETList pagesPOSTCreate a pageGETGet a pagePATCHUpdate a pageDELDelete a pageGETList locationsGETGet a product's stockPOSTSet or adjust stockGETList sales channelsGETList discountsPOSTCreate a discountGETGet a discountPATCHUpdate a discountDELDelete a discountPOSTActivate or deactivate a discountPOSTAdd codes to a discountGETList URL redirectsPOSTCreate a URL redirectPATCHUpdate a URL redirectDELDelete a URL redirectGETList navigation menusPOSTCreate a navigation menuGETGet a navigation menuDELDelete a navigation menuGETList metaobject definitionsGETList metaobjects of a typePOSTCreate a metaobjectGETGet a metaobjectPATCHUpdate a metaobjectDELDelete a metaobjectGETList marketsGETList price listsPUTSet fixed pricesDELRemove fixed pricesPUTRecord a marketing activityDELDelete a marketing activityPOSTReport daily engagementGETList catalog syncsPOSTSync a store into a Meta catalogGETGet a catalog syncDELStop a catalog syncPOSTRun a catalog sync now