Delete Metafield

Delete a metafield by its ID

The Delete Metafield API allows developers to delete an existing metafield by specifying its unique identifier.

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredDescriptionExample
owner_resourcestringyesThe type of resource the metafield is attached to. Available values: shop, product, product_image, product_variant, order, page, customer, collection, blog, articleproduct
owner_idstringyesThe unique ID of the resource to which the metafield is attachedprod_12345
idstringyesThe unique identifier for the metafield to be deletedmeta_67890

Response Explanation

Public Response Parameters

📘

Successful Response

FieldTypeExampleDescription
codestring"Success"Response status (e.g., "Success").
messagestring""Response message.
data.metafield.idstring"mf_001"Unique ID of the metafield.
data.metafield.store_idinteger12345ID of the store that owns the metafield.
data.metafield.owner_resourcestring"product"Resource type that owns the metafield (e.g., "product").
data.metafield.owner_idstring"prod_001"ID of the owner resource.
data.metafield.namespacestring"global"Namespace of the metafield.
data.metafield.keystring"color"Key of the metafield.
data.metafield.typestring"string"Type of the metafield ("json" or "string").
data.metafield.descriptionstring"Product color"Description of the metafield.
data.metafield.definition_idstring"df_001"ID of the metafield definition.
data.metafield.created_atstring"2023-01-15T10:00:00Z"Timestamp when the metafield was created (ISO 8601 format).
data.metafield.updated_atstring"2023-06-20T14:30:00Z"Timestamp when the metafield was last updated (ISO 8601 format).

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!