Set and clear an owner's metafields together
PUT
/ admin/ v1/ stores/ {store_id}/ metafieldsSet and clear an owner's metafields together, by namespace.key. Every value is checked against its definition before anything is saved. Requires the permission that edits the owner.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
owner_typeenumrequiredWhat a metafield belongs to.
- product
- variant
- collection
- customer
- order
- store
valuesobjectrequiredowner_idstring · or nullLeft out for the store.
Returns
200 The owner's metafields after the change.
Errors
- 403
forbiddenMissing the owner's write permission. - 404
not_foundNo such owner. - 422
validation_failedA value does not fit its definition, refers to something the store does not have, or has no definition; seeerrors[].field(values.{namespace.key}).