OverviewPlatformsAPI ReferenceResources
Commerce

Update a metaobject

PATCHhttps://zernio.com/api/v1/commerce/metaobjects/{metaobjectId}

Sets the given field values; fields left out keep theirs.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

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

Path parameters

metaobjectIdstringRequired

Platform-native id.

Body

application/json

What every request needs

accountIdstringRequired
fieldsarray of objectRequired
keystringRequired
valuestringRequired
Optional parameters1 field
handlestring

Responses

Success· the request worked

Errors· the request failed

PATCH/v1/commerce/metaobjects/{metaobjectId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.updateCommerceMetaobject({  path: {    metaobjectId: 'metaobject_abc123',  },  body: {    accountId: 'account_abc123',    fields: [      {        key: 'tok_abc123',        value: 'string',      },    ],  },});console.log(data);
{  "metaobject": {    "id": "string",    "type": "string",    "handle": "string",    "displayName": "string",    "fields": [      {        "key": "string",        "type": "string",        "value": "string"      }    ]  }}
OpenAPI specification
Was this page helpful?