delete https://{shopdomain}.myshoplaza.com/openapi/2022-01///metafields/
The Delete Metafield API removes an existing metafield associated with a specific resource.
This API is especially useful for:
- Removing outdated or incorrect metafields.
- Cleaning up unused metafield data for resources.
- Managing resource metadata efficiently.
Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain
), ensuring all updates are applied to the correct store.
Request Parameters
Public Request Parameters
Path Parameters
Field | Type | Required | Description | Example |
---|---|---|---|---|
resource | string | Yes | The type of resource that the metafield is attached to. Available resources include: shop , product , product_image , product_variant , order , page , customer , collection , blog , article . | product |
resource_id | string | Yes | The unique ID of the resource that the metafield is attached to. | a1a88be0-a1d4-47e4 |
id | string | Yes | The unique ID of the metafield to be deleted. | 374087540346466346 |
Response Explanation
Public Response Parameters
Successful Response
Status Code | Description | Example Response |
---|---|---|
200 OK | Address deleted successfully. | {} |
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 |