Skip to main content
Version: 202201

Create Metafield Definition

POST 

/openapi/2022-01/metafield_definition/:owner_resource

Create a new metafield definition.

Request

Path Parameters

    owner_resource stringrequired

    Owner resource type of meta field definition,for example: product_variant | product | collection

Body

    namespacestringrequired

    Namespace of definition

    keystringrequired

    Key of definition

    typestringrequired

    Definition field type, choose from date date_time weight volume dimension integer number_decimal file_reference single_line_text_field json multi_line_text_field color rating url boolean

    namestringrequired

    Name of definition

    descriptionstring

    Description of definition

Responses

200

Schema
    idstring
    Example: 374034306256875562
    keystring
    Example: key2
    namestring
    Example: Big
    namespacestring
    Example: test
    owner_resourcestring
    Example: product
    typestring
    Example: boolean
    descriptionstring
    Example: boolean
    create_atstring
    Example: 2024-04-28T03:18:59Z
    updated_atstring
    Example: 2024-04-28T03:18:59Z