Skip to main content
Version: 202506

List metafields

GET 

/openapi/2025-06/metafields/:owner_resource/:owner_id

Retrieve a list of metafields for a specific resource.

Request

Path Parameters

    owner_resource stringrequired

    Resource type the metafield is attached to:

    • shop: Shop
    • product: Product
    • product_image: Product image
    • product_variant: Product variant
    • order: Order
    • page: Custom page
    • customer: Customer
    • collection: Collection
    • blog: Blog
    • article: Article
    • app: App
    owner_id stringrequired

    The ID of the resource the metafield is attached to

Query Parameters

    namespace string

    A container for a group of metafields. Grouping metafields within a namespace prevents your metafields from conflicting with other metafields with the same key name. For example, "global"

    key string

    The key of the metafield (unique within the namespace). For example, "color"

    type string

    Field type of the metafield:

    • date: Date
    • date_time: Date and time
    • weight: Weight
    • volume: Volume
    • dimension: Dimension
    • integer: Integer
    • number_decimal: Decimal
    • file_reference: File reference
    • single_line_text_field: Single-line text
    • multi_line_text_field: Multi-line text
    • json: JSON
    • color: Color
    • rating: Rating
    • url: URL
    • boolean: Boolean (true or false)
    page_size int64

    Page size

    cursor uint64

    Cursor for pagination

    create_at_min string

    Filter for metafields whose creation time is not earlier than this point. ISO-8601 format. For example, "2022-12-02T09:46:30Z"

    create_at_max string

    Filter for metafields whose creation time is not later than this point. ISO-8601 format. For example, "2022-12-02T09:46:30Z"

    update_at_min string

    Filter for metafields whose last update time is not earlier than this point. ISO-8601 format. For example, "2022-12-02T09:46:30Z"

    update_at_max string

    Filter for metafields whose last update time is not later than this point. ISO-8601 format. For example, "2022-12-02T09:46:30Z"

    definition_ids uint64[]

    The metafield definition ID list. Example: ?definition_ids=1001&definition_ids=1002

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    metafields object[]

    The list of metafields

  • Array [
  • idstring

    The unique identifier for the metafield

    store_iduint32

    The ID of the store that owns the metafield

    owner_resourcestring

    Resource type the metafield is attached to:

    • shop: Shop
    • product: Product
    • product_image: Product image
    • product_variant: Product variant
    • order: Order
    • page: Custom page
    • customer: Customer
    • collection: Collection
    • blog: Blog
    • article: Article
    • app: App
    owner_idstring

    The ID of the resource the metafield is attached to. For example, the product ID

    namespacestring

    A container for a group of metafields. Grouping metafields within a namespace prevents your metafields from conflicting with other metafields with the same key name. For example, "global"

    keystring

    The key of the metafield (unique within the namespace). For example, "color"

    typestring

    Field type of the metafield:

    • date: Date
    • date_time: Date and time
    • weight: Weight
    • volume: Volume
    • dimension: Dimension
    • integer: Integer
    • number_decimal: Decimal
    • file_reference: File reference
    • single_line_text_field: Single-line text
    • multi_line_text_field: Multi-line text
    • json: JSON
    • color: Color
    • rating: Rating
    • url: URL
    • boolean: Boolean (true or false)
    • string: String
    valueGoogleProtobufValue

    The value of the metafield; its data type is determined by the type field. For example, "red"

    descriptionstring

    A brief description of the metafield. For example, "The color of the product"

    definition_iduint64

    The ID of the associated metafield definition. For example, "123456"

    created_atstring

    The time when the metafield was created, in ISO-8601 format

    updated_atstring

    The time when the metafield was last updated, in ISO-8601 format

  • ]
  • next_cursoruint64

    The pagination cursor for the next page of results

    total_countint32

    The total number of metafields

    has_moreboolean

    Whether there are more records