Skip to main content

Streamlined Metaobject API

It’s now easier to work with metaobjects.

With the new values property, you can fetch all fields of a metaobject in a single call without handling deserialization in your app. The API returns a JSON-compatible object that’s ready to use directly.

You can also use values when creating or updating metaobjects. Provide a JSON-style object that matches your metaobject’s field keys, and the API handles serialization for you. Optional fields are straightforward as well: any fields defined on the Metaobject that you omit from values are cleared.

You can continue to use field and fields if you need additional details about a field (such as type), or if you prefer patch-style behavior when mutating metaobjects, where any unspecified fields are left as-is.

Was this section helpful?