**Version: 202701**

# Metafield

Read and write custom metadata (metafields) attached to store resources

Metafields let merchants and apps attach custom, structured data to shop-level records and to resources such as products, orders, customers, collections, and pages, extending the default data model with namespaced key/value pairs.

Provides endpoints to list, get, create, update, delete, and count shop metafields, and to manage metafields attached to other owner resources.

- [List shop metafields](/api/202701/shop-metafields) `GET /openapi/2027-01/metafields-shop`: List metafields attached to the current shop.

- [Create shop metafield](/api/202701/shop-metafield-create) `POST /openapi/2027-01/metafields-shop`: Create a new metafield for the current shop.

- [Get shop metafield](/api/202701/shop-metafield) `GET /openapi/2027-01/metafields-shop/:id`: Get details of a specific shop metafield.

- [Delete shop metafield](/api/202701/shop-metafield-delete) `DELETE /openapi/2027-01/metafields-shop/:id`: Delete a shop metafield by ID.

- [Update shop metafield](/api/202701/shop-metafield-update) `PATCH /openapi/2027-01/metafields-shop/:id`: Update an existing shop metafield.

- [Get shop metafield count](/api/202701/shop-metafield-count) `GET /openapi/2027-01/metafields-shop/count`: Get the total number of shop metafields.

- [List metafields](/api/202701/metafields) `GET /openapi/2027-01/metafields/:owner_resource/:owner_id`: List metafields of a specific resource.

- [Create metafield](/api/202701/metafield-create) `POST /openapi/2027-01/metafields/:owner_resource/:owner_id`: Create a metafield for the specified resource.

- [Get metafield](/api/202701/metafield-detail) `GET /openapi/2027-01/metafields/:owner_resource/:owner_id/:id`: Get a metafield by ID.

- [Delete metafield](/api/202701/metafield-delete) `DELETE /openapi/2027-01/metafields/:owner_resource/:owner_id/:id`: Delete a metafield by ID.

- [Update metafield](/api/202701/metafield-update) `PATCH /openapi/2027-01/metafields/:owner_resource/:owner_id/:id`: Update a metafield of the specified resource.

- [Get metafield count](/api/202701/metafield-count) `GET /openapi/2027-01/metafields/:owner_resource/:owner_id/count`: Get the metafield count of a specific resource.
