After install, use your app token (tpat_ or tast_) against the Store API. Value endpoints address definitions by namespace and key, never by raw definition IDs.
Discover definitions (read-only)#
GET /api/2025-01/metafield-definitions?owner_type={owner} lists definitions visible to your token: definitions your app owns, merchant-owned definitions, and another app's definitions only when app_access is shared. Use this when you need to enumerate keys at runtime — not to create schema.
Write values#
PUT on the owner resource accepts an array of {namespace, key, value} entries. Send null or an empty string as value to delete a value. Access is re-checked on every write: your app can set values only on definitions it owns. app_access=shared grants reads to other appropriately scoped apps, not writes.
Owner |
Value endpoints |
Typical scopes |
|---|---|---|
Product |
|
|
Variant |
|
|
Customer |
|
|
Collection |
|
|
Category |
|
|
Page |
|
|
Brand |
|
|
Vendor |
|
|
Order |
|
|
Order line |
|
|
Store (shop) |
|
|
Example: set a product metafield#
{
"metafields": [
{
"namespace": "app:my-app",
"key": "material",
"value": "organic-cotton"
}
]
}
Call PUT /api/2025-01/products/{product_id}/metafields with the JSON body above. Replace app:my-app with your live namespace (app:{slug}) and material with your declared key.
Further reference#
See the Metafield definitions Store API page for the discovery response shape, owner-type to scope mapping, and visibility matrix. Each owner resource guide (Products, Customers, …) documents its metafield list/set endpoints, translation routes where applicable, and webhook topics for value changes.