Update Metafield
Metafields
Update Metafield
Update value or type of an existing metafield by id
PUT
Update Metafield
Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Update Metafield
Updates the value (and optionally type) of a metafield owned by your app. The metafield is matched by id andappId — you cannot update
metafields written by other apps or by merchants.
Request
Required scope
write_metafields
Path parameters
The metafield’s UUID (the
id field from list/create responses).Body parameters
The new value. Scalars sent as-is; compounds sent as JSON. Must validate
against the (current or new)
type.Optional new type. The new value must validate against it.
namespace, key, ownerType, and ownerId cannot be changed.
Create a new metafield and delete the old one if you need to move it.Examples
Change a scalar value
Update a compound value
Update a list
Response
Cache invalidation
A successful update automatically expires the storefront caches for the owning resource. The next render sees the new value.Error codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have write_metafields scope |
NOT_FOUND | Metafield does not exist, or wasn’t written by your app |
VALIDATION_ERROR | Value doesn’t match the (new) type or its validations |