Delete Metafield Definition

Deletes a specific metafield definition by its unique ID.

This API is especially useful for:

  1. Removing outdated or unnecessary metafield definitions.
  2. Cleaning up unused metafield definitions for better resource organization.
  3. Ensuring only relevant metadata definitions remain active.

Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain), ensuring all deletions are applied to the correct store.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredExampleDescription
idstringYes374034306256875562Unique ID of the metafield definition.

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

Status CodeDescriptionExample Response
200 OKAddress 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.

FieldTypeExampleDescription
errorsarray["Id is required"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
500Id is not foundMetafield definition id id not foundinvalid value, should be pointer to struct or slice

API Structure Overview

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