Retrieve details of a specific metafield definition using its unique ID.
This API is especially useful for:
- Fetching metadata configuration for a specific resource.
- Inspecting existing metafield definitions for validation.
- Managing and troubleshooting metafield settings.
Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain), ensuring all queries are applied to the correct store.
Request Parameters
Public Request Parameters
Query Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
id | string | Yes | 374034306256875562 | Unique ID of the metafield definition. |
Body Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
description | string | No | "Updated description" | Description of metafield definition. |
name | string | No | "Updated Name" | Name of the metafield definition. |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Example | Description |
|---|---|---|---|
| string |
| Unique identifier for the metafield definition. |
| string |
| Unique key for the metafield. |
| string |
| Name or title of the metafield definition. |
| string |
| Namespace of the metafield definition. |
| string |
| The type of resource that the metafield is attached to. Available resources: |
| string |
| Field type for the metafield. Valid Values for
|
| string |
| Description of the metafield definition. |
| string |
| Timestamp of when the metafield was created. |
| string |
| Timestamp of the last update for the metafield. |
Error Response
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
| Field | Type | Example | Description |
|---|---|---|---|
errors | array | ["No metafield definition found"] | A list of errors encountered during the request processing. |
| Field | Type | Example | Description |
|---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
| Status Code | Message | Possible Reason | Example Response |
|---|---|---|---|
| 400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
| Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
| 422 | empty Metafield definition id | ||
| 404 | Metafield definition id is not found | Metafield definition id is not found | No metafield definition found |
