Commerce
Get a metaobject
One metaobject with its fields. Shopify only. Needs metaobjects.read.
PlatformsShopify
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
metaobjectId*string
Platform-native id.
Query Parameters
accountId*string
Connected store SocialAccount id.
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.getCommerceMetaobject({ path: { metaobjectId: 'metaobject_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{ "metaobject": { "id": "string", "type": "string", "handle": "string", "displayName": "string", "fields": [ { "key": "string", "type": "string", "value": "string" } ] }}Was this page helpful?
List metaobjects of a type
The metaobjects of one `type` (a definition handle from GET /v1/commerce/metaobject-definitions), cursor-paginated with `limit` and `cursor`. Shopify only. Needs metaobjects.read.
Create a metaobject
Creates a metaobject of `type` with its `fields` (key and string value, up to 100) and an optional `handle`, and returns it with status 201. Shopify only. Needs metaobjects.write.