---
title: "批量查询元字段"
description: "查询某一资源下的元字段列表。指定查询参数以定义查询范围。"
doc_type: openapi
doc_category: openapi
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/shopline-metafields/metafields/resource-metafields/get-metafields-for-a-resource'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/shopline-metafields/metafields/resource-metafields/get-metafields-for-a-resource.md'
---
# 批量查询元字段

查询某一资源下的元字段列表。指定查询参数以定义查询范围。

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **API Version:** v20260901
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /:resource/:owner_id/metafields.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Request

### Path Parameters

* `owner_id`

  string (required)

  元字段所归属的资源 ID。例如，商品 A 的 ID  是 `1605898661`，当对商品 A 新增元字段时，此时 `owner_id` 是 `1605898661`。  
  最大长度限制：128

* `resource`

  string (required)

  元字段定义所归属的资源类型。有效枚举值包含：  
  - `products`：商品 
  - `variants`：商品款式  
  - `collections`：商品分类
  - `customers`：客户
  - `orders`：订单
  - `pages`：页面  
  - `blogs`：博客集合
  - `articles`：博客
  - `shop`：店铺

### Query Parameters

* `updated_at_max`

  string (optional)

  要查询元字段的截止更新日期和时间。在此日期和此日期之前更新的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

* `fields`

  string (optional)

  指明需要返回的字段，多个字段用 `,` 分隔。可指定的字段有：`id`，`key`，`namespace`，`owner_id`，`created_at` 和 `updated_at`。
  

* `updated_at_min`

  string (optional)

  要查询元字段的起始更新日期和时间。在此日期和此日期之后更新的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

* `since_id`

  string (optional)

  元字段 ID 的起始查询点。传入该值后，将返回元字段 ID 大于该值的记录。

* `type`

  string (optional)

  元字段支持的数据类型，有效枚举值包含：
  
  - `single_line_text_field`：单个单行文本
  - ` list.single_line_text_field`：多个单行文本
  - `multi_line_text_field`：多行文本
  - `color`：单个颜色
  - `list.color`：多个颜色
  - `date`：单个日期
  - `list.date`：多个日期
  - `date_time`：单个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。
  - `list.date_time`：多个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。
  - `url`：单个 URL
  - `list.url`：多个 URL
  - `file_reference`：单个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。
  - `list.file_reference`：多个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。
  - `json`：JSON 类型
  - `weight`：单个重量，带单位
  - `list.weight`：多个重量，带单位
  - `volume`：单个体积，带单位
  - `list.volume`：多个体积，带单位
  - `dimension`：单个尺寸，带单位
  - `list.dimension`：多个尺寸，带单位
  - `number_integer`：单个整数
  - `list.number_integer`：多个整数
  - `number_decimal`：单个小数
  - `list.number_decimal`：多个小数
  - `rating`：单个等级
  - `list.rating`：多个等级
  - `page_reference`：单个页面
  - `list.page_reference`：多个页面
  - `product_reference`：单个商品
  - `list.product_reference`：多个商品
  - `variant_reference`：单个商品款式
  - `list.variant_reference`：多个商品款式
  - `collection_reference`：单个商品分类
  - `list.collection_reference`：多个商品分类
  - `boolean`：布尔类型，有效值包括 `true` 和 `false`。
  - `money`：资金，带币种单位    
      
  关于更多元字段信息，参考 [元字段功能使用指南](https://help.shopline.com/hc/zh-cn/articles/7095355017113)。              

* `created_at_max`

  string (optional)

  要查询元字段截止创建的日期和时间。在此日期和此日期之前创建的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

* `created_at_min`

  string (optional)

  要查询元字段初始创建的日期和时间。在此日期和此日期之后创建的元字段定会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

* `key`

  string (optional)

  元字段在其 `namespace` 下的唯一标识符。仅支持字母、数字、连字符和下划线字符。  
  最小长度限制：3  
  最大长度限制：30  

* `limit`

  string (optional)

  该查询中要返回的元字段的最大个数。        
  取值范围：1-250   
  默认值：`50`   

* `page_info`

  string (optional)

  分页查询的唯一标识，用于定位特定页面。
  
  该字段值需要在你已经查询完分页信息后，在该接口响应头中的 `link` 字段值中获取。例如，你获取到的 `link` 的值为 `<https://{handle}.myshopline.com/admin/openapi/{version}/:resource/:owner_id/metafields.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next"` ，那么 `page_info `的值为 `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9` 。
  
  关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。

* `namespace`

  string (optional)

  元字段的命名空间。通过 `key` 和 `namespace` 可以唯一确定元字段。    
  仅支持字母、数字、连字符和下划线字符。  
  最小长度限制：2    
  最大长度限制：50       

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `link`

  提供分页数据的 URL 链接。你可以获取该字段值中的 `page_info` 信息用于下一次分页请求中。
  
  当你请求的页面存在上一页或下一页的时候，该字段会被返回。关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `metafields`

  array<object>

  元字段列表。

  * `owner_id`

    string

    元字段所归属的资源 ID。

  * `updated_at`

    string

    元字段更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

  * `value`

    object

    存储在元字段中的数据。

  * `created_at`

    string

    元字段创建的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

  * `description`

    string

    元字段的描述。  

  * `namespace`

    string

    元字段的命名空间。

  * `owner_resource`

    string

    元字段定义所归属的资源类型。有效枚举值包含：  
    - `products`：商品 
    - `variants`：商品款式  
    - `collections`：商品分类
    - `customers`：客户
    - `orders`：订单
    - `pages`：页面  
    - `blogs`：博客集合
    - `articles`：博客
    - `shop`：店铺

  * `type`

    string

    元字段支持的数据类型，有效枚举值包含：
    
    - `single_line_text_field`：单个单行文本
    - ` list.single_line_text_field`：多个单行文本
    - `multi_line_text_field`：多行文本
    - `color`：单个颜色
    - `list.color`：多个颜色
    - `date`：单个日期
    - `list.date`：多个日期
    - `date_time`：单个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。
    - `list.date_time`：多个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。
    - `url`：单个 URL
    - `list.url`：多个 URL
    - `file_reference`：单个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。
    - `list.file_reference`：多个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。
    - `json`：JSON 类型
    - `weight`：单个重量，带单位
    - `list.weight`：多个重量，带单位
    - `volume`：单个体积，带单位
    - `list.volume`：多个体积，带单位
    - `dimension`：单个尺寸，带单位
    - `list.dimension`：多个尺寸，带单位
    - `number_integer`：单个整数
    - `list.number_integer`：多个整数
    - `number_decimal`：单个小数
    - `list.number_decimal`：多个小数
    - `rating`：单个等级
    - `list.rating`：多个等级
    - `page_reference`：单个页面
    - `list.page_reference`：多个页面
    - `product_reference`：单个商品
    - `list.product_reference`：多个商品
    - `variant_reference`：单个商品款式
    - `list.variant_reference`：多个商品款式
    - `collection_reference`：单个商品分类
    - `list.collection_reference`：多个商品分类
    - `boolean`：布尔类型，有效值包括 `true` 和 `false`。
    - `money`：资金，带币种单位    
        
    关于更多元字段信息，参考 [元字段功能使用指南](https://help.shopline.com/hc/zh-cn/articles/7095355017113)。              

  * `id`

    long

    元字段 ID。

  * `key`

    string

    元字段定义在其 `namespace` 下的唯一标识符。


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "批量查询元字段"
  ],
  "description": "查询某一资源下的元字段列表。指定查询参数以定义查询范围。",
  "externalDocs": {
    "url": "",
    "errorTableDescription": "| Error Code | HTTP Status Code | Error Description |\n|------------|------------------|-------------------|\n| DATA_NOT_EXIST | 404 | The requested data does not exist. |\n| INTERNAL_ERROR | 500 | An internal error occured. |\n| INVALID_PARAMETER | 400 | The provided parameter is invalid. |\n| SUCCESS | 200 | request success |\n"
  },
  "operationId": "t4CoaRPN",
  "parameters": [
    {
      "name": "updated_at_max",
      "in": "query",
      "description": "要查询元字段的截止更新日期和时间。在此日期和此日期之前更新的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "updated_at_max",
        "description": "要查询元字段的截止更新日期和时间。在此日期和此日期之前更新的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
        "type": "string",
        "example": "2024-04-25T16:16:47-04:00"
      },
      "example": "2024-04-25T16:16:47-04:00",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "fields",
      "in": "query",
      "description": "指明需要返回的字段，多个字段用 `,` 分隔。可指定的字段有：`id`，`key`，`namespace`，`owner_id`，`created_at` 和 `updated_at`。\n",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "fields",
        "description": "指明需要返回的字段，多个字段用 `,` 分隔。可指定的字段有：`id`，`key`，`namespace`，`owner_id`，`created_at` 和 `updated_at`。\n",
        "type": "string",
        "example": "key,updated_at"
      },
      "example": "key,updated_at",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "updated_at_min",
      "in": "query",
      "description": "要查询元字段的起始更新日期和时间。在此日期和此日期之后更新的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "updated_at_min",
        "description": "要查询元字段的起始更新日期和时间。在此日期和此日期之后更新的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
        "type": "string",
        "example": "2024-04-25T16:15:47-04:00"
      },
      "example": "2024-04-25T16:15:47-04:00",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "since_id",
      "in": "query",
      "description": "元字段 ID 的起始查询点。传入该值后，将返回元字段 ID 大于该值的记录。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "since_id",
        "description": "元字段 ID 的起始查询点。传入该值后，将返回元字段 ID 大于该值的记录。",
        "type": "string",
        "example": 1
      },
      "example": 1,
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "type",
      "in": "query",
      "description": "元字段支持的数据类型，有效枚举值包含：\n\n- `single_line_text_field`：单个单行文本\n- ` list.single_line_text_field`：多个单行文本\n- `multi_line_text_field`：多行文本\n- `color`：单个颜色\n- `list.color`：多个颜色\n- `date`：单个日期\n- `list.date`：多个日期\n- `date_time`：单个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n- `list.date_time`：多个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n- `url`：单个 URL\n- `list.url`：多个 URL\n- `file_reference`：单个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。\n- `list.file_reference`：多个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。\n- `json`：JSON 类型\n- `weight`：单个重量，带单位\n- `list.weight`：多个重量，带单位\n- `volume`：单个体积，带单位\n- `list.volume`：多个体积，带单位\n- `dimension`：单个尺寸，带单位\n- `list.dimension`：多个尺寸，带单位\n- `number_integer`：单个整数\n- `list.number_integer`：多个整数\n- `number_decimal`：单个小数\n- `list.number_decimal`：多个小数\n- `rating`：单个等级\n- `list.rating`：多个等级\n- `page_reference`：单个页面\n- `list.page_reference`：多个页面\n- `product_reference`：单个商品\n- `list.product_reference`：多个商品\n- `variant_reference`：单个商品款式\n- `list.variant_reference`：多个商品款式\n- `collection_reference`：单个商品分类\n- `list.collection_reference`：多个商品分类\n- `boolean`：布尔类型，有效值包括 `true` 和 `false`。\n- `money`：资金，带币种单位    \n    \n关于更多元字段信息，参考 [元字段功能使用指南](https://help.shopline.com/hc/zh-cn/articles/7095355017113)。              ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "type",
        "description": "元字段支持的数据类型，有效枚举值包含：\n\n- `single_line_text_field`：单个单行文本\n- ` list.single_line_text_field`：多个单行文本\n- `multi_line_text_field`：多行文本\n- `color`：单个颜色\n- `list.color`：多个颜色\n- `date`：单个日期\n- `list.date`：多个日期\n- `date_time`：单个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n- `list.date_time`：多个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n- `url`：单个 URL\n- `list.url`：多个 URL\n- `file_reference`：单个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。\n- `list.file_reference`：多个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。\n- `json`：JSON 类型\n- `weight`：单个重量，带单位\n- `list.weight`：多个重量，带单位\n- `volume`：单个体积，带单位\n- `list.volume`：多个体积，带单位\n- `dimension`：单个尺寸，带单位\n- `list.dimension`：多个尺寸，带单位\n- `number_integer`：单个整数\n- `list.number_integer`：多个整数\n- `number_decimal`：单个小数\n- `list.number_decimal`：多个小数\n- `rating`：单个等级\n- `list.rating`：多个等级\n- `page_reference`：单个页面\n- `list.page_reference`：多个页面\n- `product_reference`：单个商品\n- `list.product_reference`：多个商品\n- `variant_reference`：单个商品款式\n- `list.variant_reference`：多个商品款式\n- `collection_reference`：单个商品分类\n- `list.collection_reference`：多个商品分类\n- `boolean`：布尔类型，有效值包括 `true` 和 `false`。\n- `money`：资金，带币种单位    \n    \n关于更多元字段信息，参考 [元字段功能使用指南](https://help.shopline.com/hc/zh-cn/articles/7095355017113)。              ",
        "type": "string",
        "example": "single_line_text_field"
      },
      "example": "single_line_text_field",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "created_at_max",
      "in": "query",
      "description": "要查询元字段截止创建的日期和时间。在此日期和此日期之前创建的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "created_at_max",
        "description": "要查询元字段截止创建的日期和时间。在此日期和此日期之前创建的元字段会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
        "type": "string",
        "example": "2023-04-25T16:15:47-04:00"
      },
      "example": "2023-04-25T16:15:47-04:00",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "created_at_min",
      "in": "query",
      "description": "要查询元字段初始创建的日期和时间。在此日期和此日期之后创建的元字段定会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "created_at_min",
        "description": "要查询元字段初始创建的日期和时间。在此日期和此日期之后创建的元字段定会被返回。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
        "type": "string",
        "example": "2023-04-25T16:15:47-04:00"
      },
      "example": "2023-04-25T16:15:47-04:00",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "key",
      "in": "query",
      "description": "元字段在其 `namespace` 下的唯一标识符。仅支持字母、数字、连字符和下划线字符。  \n最小长度限制：3  \n最大长度限制：30  ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "key",
        "description": "元字段在其 `namespace` 下的唯一标识符。仅支持字母、数字、连字符和下划线字符。  \n最小长度限制：3  \n最大长度限制：30  ",
        "type": "string",
        "example": "key_123"
      },
      "example": "key_123",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "limit",
      "in": "query",
      "description": "该查询中要返回的元字段的最大个数。        \n取值范围：1-250   \n默认值：`50`   ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "该查询中要返回的元字段的最大个数。        \n取值范围：1-250   \n默认值：`50`   ",
        "type": "string"
      },
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "page_info",
      "in": "query",
      "description": "分页查询的唯一标识，用于定位特定页面。\n\n该字段值需要在你已经查询完分页信息后，在该接口响应头中的 `link` 字段值中获取。例如，你获取到的 `link` 的值为 `<https://{handle}.myshopline.com/admin/openapi/{version}/:resource/:owner_id/metafields.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel=\"next\"` ，那么 `page_info `的值为 `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9` 。\n\n关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "page_info",
        "description": "分页查询的唯一标识，用于定位特定页面。  \n该字段值需要在你已经查询完分页信息后，在该接口响应头中的 `link` 字段值中获取。例如，你获取到的 `link` 的值为 `<https://{handle}.myshopline.com/admin/openapi/{version}/products/products.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel=\"next\"`，那么 `page_info` 的值为 `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9`。  \n关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md?)。",
        "type": "string"
      },
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "namespace",
      "in": "query",
      "description": "元字段的命名空间。通过 `key` 和 `namespace` 可以唯一确定元字段。    \n仅支持字母、数字、连字符和下划线字符。  \n最小长度限制：2    \n最大长度限制：50       ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "namespace",
        "description": "元字段的命名空间。通过 `key` 和 `namespace` 可以唯一确定元字段。    \n仅支持字母、数字、连字符和下划线字符。  \n最小长度限制：2    \n最大长度限制：50       ",
        "type": "string",
        "example": "my_fields-11"
      },
      "example": "my_fields-11",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "owner_id",
      "in": "path",
      "description": "元字段所归属的资源 ID。例如，商品 A 的 ID  是 `1605898661`，当对商品 A 新增元字段时，此时 `owner_id` 是 `1605898661`。  \n最大长度限制：128",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "owner_id",
        "description": "元字段所归属的资源 ID。例如，商品 A 的 ID  是 `1605898661`，当对商品 A 新增元字段时，此时 `owner_id` 是 `1605898661`。  \n最大长度限制：128",
        "type": "string",
        "example": "16015223514512351235"
      },
      "example": "16015223514512351235",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "resource",
      "in": "path",
      "description": "元字段定义所归属的资源类型。有效枚举值包含：  \n- `products`：商品 \n- `variants`：商品款式  \n- `collections`：商品分类\n- `customers`：客户\n- `orders`：订单\n- `pages`：页面  \n- `blogs`：博客集合\n- `articles`：博客\n- `shop`：店铺",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "resource",
        "description": "元字段定义所归属的资源类型。有效枚举值包含：  \n- `products`：商品 \n- `variants`：商品款式  \n- `collections`：商品分类\n- `customers`：客户\n- `orders`：订单\n- `pages`：页面  \n- `blogs`：博客集合\n- `articles`：博客\n- `shop`：店铺",
        "type": "string",
        "example": "products"
      },
      "example": "products",
      "examples": {
        "批量查询元字段": {
          "value": ""
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "link": {
          "description": "提供分页数据的 URL 链接。你可以获取该字段值中的 `page_info` 信息用于下一次分页请求中。\n\n当你请求的页面存在上一页或下一页的时候，该字段会被返回。关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。",
          "example": "\\<https://{handle}.myshopline.com/admin/openapi/{version}/:resource/:owner_id/metafields.json?limit=20&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel='previous',<https://{handle}.myshopline.com/admin/openapi/{version}/:resource/:owner_id/metafields.json?limit=20&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJwcmUiLCJsaW1pdCI6MX0=\\>; rel='next'"
        },
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "metafields": {
                "name": "metafields",
                "description": "元字段列表。",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "owner_id": {
                      "name": "owner_id",
                      "description": "元字段所归属的资源 ID。",
                      "type": "string"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "元字段更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                      "type": "string"
                    },
                    "value": {
                      "name": "value",
                      "description": "存储在元字段中的数据。",
                      "type": "object"
                    },
                    "created_at": {
                      "name": "created_at",
                      "description": "元字段创建的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
                      "type": "string"
                    },
                    "description": {
                      "name": "description",
                      "description": "元字段的描述。  ",
                      "type": "string"
                    },
                    "namespace": {
                      "name": "namespace",
                      "description": "元字段的命名空间。",
                      "type": "string"
                    },
                    "owner_resource": {
                      "name": "owner_resource",
                      "description": "元字段定义所归属的资源类型。有效枚举值包含：  \n- `products`：商品 \n- `variants`：商品款式  \n- `collections`：商品分类\n- `customers`：客户\n- `orders`：订单\n- `pages`：页面  \n- `blogs`：博客集合\n- `articles`：博客\n- `shop`：店铺",
                      "type": "string"
                    },
                    "type": {
                      "name": "type",
                      "description": "元字段支持的数据类型，有效枚举值包含：\n\n- `single_line_text_field`：单个单行文本\n- ` list.single_line_text_field`：多个单行文本\n- `multi_line_text_field`：多行文本\n- `color`：单个颜色\n- `list.color`：多个颜色\n- `date`：单个日期\n- `list.date`：多个日期\n- `date_time`：单个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n- `list.date_time`：多个日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n- `url`：单个 URL\n- `list.url`：多个 URL\n- `file_reference`：单个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。\n- `list.file_reference`：多个文件，支持 10M 以内的 PDF 和图片文件，图片支持 JPG、JPEG、PNG 和 GIF 格式。\n- `json`：JSON 类型\n- `weight`：单个重量，带单位\n- `list.weight`：多个重量，带单位\n- `volume`：单个体积，带单位\n- `list.volume`：多个体积，带单位\n- `dimension`：单个尺寸，带单位\n- `list.dimension`：多个尺寸，带单位\n- `number_integer`：单个整数\n- `list.number_integer`：多个整数\n- `number_decimal`：单个小数\n- `list.number_decimal`：多个小数\n- `rating`：单个等级\n- `list.rating`：多个等级\n- `page_reference`：单个页面\n- `list.page_reference`：多个页面\n- `product_reference`：单个商品\n- `list.product_reference`：多个商品\n- `variant_reference`：单个商品款式\n- `list.variant_reference`：多个商品款式\n- `collection_reference`：单个商品分类\n- `list.collection_reference`：多个商品分类\n- `boolean`：布尔类型，有效值包括 `true` 和 `false`。\n- `money`：资金，带币种单位    \n    \n关于更多元字段信息，参考 [元字段功能使用指南](https://help.shopline.com/hc/zh-cn/articles/7095355017113)。              ",
                      "type": "string"
                    },
                    "id": {
                      "name": "id",
                      "description": "元字段 ID。",
                      "type": "long"
                    },
                    "key": {
                      "name": "key",
                      "description": "元字段定义在其 `namespace` 下的唯一标识符。",
                      "type": "string"
                    }
                  },
                  "example": {
                    "namespace": null,
                    "owner_id": null,
                    "owner_resource": null,
                    "updated_at": null,
                    "value": null,
                    "created_at": null,
                    "description": null,
                    "id": null,
                    "key": null,
                    "type": null
                  }
                },
                "example": [
                  {
                    "id": null,
                    "type": null,
                    "value": null,
                    "description": null,
                    "key": null,
                    "namespace": null,
                    "owner_id": null,
                    "owner_resource": null,
                    "updated_at": null,
                    "created_at": null
                  }
                ]
              }
            },
            "example": {
              "metafields": [
                {
                  "created_at": null,
                  "description": null,
                  "id": null,
                  "owner_id": null,
                  "type": null,
                  "updated_at": null,
                  "value": null,
                  "key": null,
                  "namespace": null,
                  "owner_resource": null
                }
              ]
            }
          },
          "examples": {
            "批量查询元字段": {
              "description": "分页查询商品元字段",
              "value": {
                "metafields": [
                  {
                    "description": "My description",
                    "id": 397923258691,
                    "key": "key_123",
                    "namespace": "namespace_123",
                    "owner_id": "16015223514512351235",
                    "value": "1241412342341341234123",
                    "created_at": "2022-12-28T09:39:35+00:00",
                    "owner_resource": "products",
                    "type": "single_line_text_field",
                    "updated_at": "2022-12-28T09:39:36+00:00"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/:resource/:owner_id/metafields.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "批量查询元字段",
    "version": "v20260901"
  }
}
```