---
title: "Get metafields for a resource"
description: >
  Get a list of metafields for a resource. Specify query parameters to limit and filter the results.
doc_type: openapi
doc_category: openapi
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/shopline-metafields/metafields/resource-metafields/get-metafields-for-a-resource'
  md: 'https://developer.shopline.com/docs/admin-rest-api/shopline-metafields/metafields/resource-metafields/get-metafields-for-a-resource.md'
---
# Get metafields for a resource

Get a list of metafields for a resource. Specify query parameters to limit and filter the results.

- **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` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Request

### Path Parameters

* `resource`

  string (required)

  The type of the resource to which the metafield belongs. Valid values are:  
  - `products`: products 
  - `variants`: product variants  
  - `collections`: product collections
  - `customers`: customers
  - `orders`: orders
  - `pages`: pages  
  - `blogs`: blogs collections
  - `articles`: blogs
  - `shop`: store

* `owner_id`

  string (required)

  The ID of the resource to which the metafield belongs. For example, when adding a metafield to product A with an ID of `1605898661`, the metafield's `owner_id` is `1605898661`.  
  Maximum length: 128

### Query Parameters

* `page_info`

  string (optional)

  The unique identifier for pagination queries, used to locate a specific page. 
  
  This parameter value is obtained from the `link` value in the response header of this API after you have queried the pagination information. 
  
  For example, if the `link` value you obtained is `<https://{handle}.myshopline.com/admin/openapi/{version}/:resource/:owner_id/metafields.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next"` , the value of `page_info` is `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9` . 
  
  For more information on how to use pagination, refer to [Paging Mechanism](https://developer.shopline.com/docs/apps/api-instructions-for-use/paging-mechanism.md).

* `since_id`

  string (optional)

  The ID of a specific metafield. Start querying metafields from this specified ID. 

* `created_at_max`

  string (optional)

  Specify the cutoff creation date and time for metafields to query. Metafields created on and before this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

* `fields`

  string (optional)

  Specify the fields to be returned, with multiple fields separated by `,`. Available fields include `id`, `key`, `namespace`, `owner_id`, `created_at` and `updated_at`.

* `namespace`

  string (optional)

  The namespace of the metafield. A metafield can be uniquely identified by its `key` and `namespace`.
  Only letters, numbers, hyphens, and underscores are supported.                                         
  Minimum length: 2  
  Maximum length: 50   
  

* `updated_at_max`

  string (optional)

  Specify the cutoff update date for metafields to query. Metafields updated on and before this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

* `limit`

  string (optional)

  The maximum number of metafields to return.   
  Value range: 1-250   
  Default value: `50`

* `type`

  string (optional)

  The data type for the metafield. Valid values are:     
  - `single_line_text_field`: A single-line text field 
  - `list.single_line_text_field`: Multiple single-line text fields  
  - `multi_line_text_field`: Multi-line text field    
  - `color`: A single color  
  - `list.color`: Multiple colors 
  - `date`: A single date 
  - `list.date`: Multiple dates  
  - `date_time`: A single date and time. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).   
  - `list.date_time`: Multiple dates and times. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). 
  - `url`: A single URL  
  - `list.url`: Multiple URLs  
  - `file_reference`: A single file. Support a PDF or image file within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.     
  - `list.file_reference`: Multiple files. Support PDF or image files and each file must be within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.  
  - `json`: JSON     
  - `weight`: A single weight with a unit   
  - `list.weight`: Multiple weights with units   
  - `volume`: A single volume with a unit   
  - `list.volume`: Multiple volumes with units   
  - `dimension`: A single size with a unit    
  - `list.dimension`: Multiple sizes with units   
  - `number_integer`: A single integer   
  - `list.number_integer`: Multiple integers   
  - `number_decimal`: A single decimal   
  - `list.number_decimal`: Multiple decimals  
  - `rating`: A single rating    
  - `list.rating`: Multiple ratings 
  - `page_reference`: A single page  
  - `list.page_reference`: Multiple pages   
  - `product_reference`: A single product    
  - `list.product_reference`: Multiple products  
  - `variant_reference`: A single product variant  
  - `list.variant_reference`: Multiple product variants    
  - `collection_reference`: A single product collection  
  - `list.collection_reference`: Multiple product collections      
  - `boolean`: Boolean type. Valid values are `true` and `false`.
  - `money`: Amount with a currency   
  
  For more information about metafields, refer to [Guide to Using Metafields Feature](https://help.shopline.com/hc/en-001/articles/7095355017113).

* `updated_at_min`

  string (optional)

  Specify the initial update date for metafields to query. Metafields updated on and after this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

* `created_at_min`

  string (optional)

  Specify the initial creation date and time for metafields to query. Metafields created on and after this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
  

* `key`

  string (optional)

  A unique identifier for a metafield  within its `namespace`. Only letters, numbers, hyphens, and underscores are supported.     
  Minimum length: 3        
  Maximum length: 30       

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `link`

  The URL link that provides the pagination data. You can obtain `page_info` from this parameter for subsequent pagination requests. 
  
  This parameter is returned when the requested page has a previous or next page. 
  
  For more information on how to use pagination, refer to [Paging Mechanism](https://developer.shopline.com/docs/apps/api-instructions-for-use/paging-mechanism.md).

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `metafields`

  array<object>

  List of metafields.

  * `owner_resource`

    string

    The type of the resource to which the metafield belongs. Valid values are:  
    - `products`: products 
    - `variants`: product variants  
    - `collections`: product collections
    - `customers`: customers
    - `orders`: orders
    - `pages`: pages  
    - `blogs`: blogs collections
    - `articles`: blogs
    - `shop`: store

  * `type`

    string

    The data type for the metafield. Valid values are:     
    - `single_line_text_field`: A single-line text field 
    - `list.single_line_text_field`: Multiple single-line text fields  
    - `multi_line_text_field`: Multi-line text field    
    - `color`: A single color  
    - `list.color`: Multiple colors 
    - `date`: A single date 
    - `list.date`: Multiple dates  
    - `date_time`: A single date and time. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).   
    - `list.date_time`: Multiple dates and times. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). 
    - `url`: A single URL  
    - `list.url`: Multiple URLs  
    - `file_reference`: A single file. Support a PDF or image file within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.     
    - `list.file_reference`: Multiple files. Support PDF or image files and each file must be within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.  
    - `json`: JSON     
    - `weight`: A single weight with a unit   
    - `list.weight`: Multiple weights with units   
    - `volume`: A single volume with a unit   
    - `list.volume`: Multiple volumes with units   
    - `dimension`: A single size with a unit    
    - `list.dimension`: Multiple sizes with units   
    - `number_integer`: A single integer   
    - `list.number_integer`: Multiple integers   
    - `number_decimal`: A single decimal   
    - `list.number_decimal`: Multiple decimals  
    - `rating`: A single rating    
    - `list.rating`: Multiple ratings 
    - `page_reference`: A single page  
    - `list.page_reference`: Multiple pages   
    - `product_reference`: A single product    
    - `list.product_reference`: Multiple products  
    - `variant_reference`: A single product variant  
    - `list.variant_reference`: Multiple product variants    
    - `collection_reference`: A single product collection  
    - `list.collection_reference`: Multiple product collections      
    - `boolean`: Boolean type. Valid values are `true` and `false`.
    - `money`: Amount with a currency   
    
    For more information about metafields, refer to [Guide to Using Metafields Feature](https://help.shopline.com/hc/en-001/articles/7095355017113).

  * `value`

    object

    The data stored in the metafield. 

  * `created_at`

    string

    The date and time when the metafield was created. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). 

  * `description`

    string

    The description of the metafield.  

  * `id`

    long

    The ID of the metafield.

  * `key`

    string

    A unique identifier for a metafield within its `namespace`.  

  * `namespace`

    string

    The namespace of the metafield.

  * `owner_id`

    string

    The resource ID to which the metafield belongs.

  * `updated_at`

    string

    The date and time when the metafield was updated. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). 


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "tags": [
    "Get metafields for a resource"
  ],
  "description": "Get a list of metafields for a resource. Specify query parameters to limit and filter the results.",
  "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": "page_info",
      "in": "query",
      "description": "The unique identifier for pagination queries, used to locate a specific page. \n\nThis parameter value is obtained from the `link` value in the response header of this API after you have queried the pagination information. \n\nFor example, if the `link` value you obtained is `<https://{handle}.myshopline.com/admin/openapi/{version}/:resource/:owner_id/metafields.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel=\"next\"` , the value of `page_info` is `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9` . \n\nFor more information on how to use pagination, refer to [Paging Mechanism](https://developer.shopline.com/docs/apps/api-instructions-for-use/paging-mechanism.md).",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "page_info",
        "description": "The unique identifier for pagination queries, used to locate a specific page.   \nThis parameter value is obtained from the `link` value in the response header of this API after you have queried the pagination information. \nFor example, if the `link` value you obtained is `<https://{handle}.myshopline.com/admin/openapi/{version}/products/products.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel=\"next\"`, the value of `page_info` is `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9`.   \nFor more information on how to use pagination, refer to [Paging Mechanism](https://developer.shopline.com/docs/apps/api-instructions-for-use/paging-mechanism.md?lang=en).",
        "type": "string"
      },
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "since_id",
      "in": "query",
      "description": "The ID of a specific metafield. Start querying metafields from this specified ID. ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "since_id",
        "description": "The ID of a specific metafield. Start querying metafields from this specified ID. ",
        "type": "string",
        "example": 1
      },
      "example": 1,
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "created_at_max",
      "in": "query",
      "description": "Specify the cutoff creation date and time for metafields to query. Metafields created on and before this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "created_at_max",
        "description": "Specify the cutoff creation date and time for metafields to query. Metafields created on and before this time are returned. Format: [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": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "fields",
      "in": "query",
      "description": "Specify the fields to be returned, with multiple fields separated by `,`. Available fields include `id`, `key`, `namespace`, `owner_id`, `created_at` and `updated_at`.",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "fields",
        "description": "Specify the fields to be returned, with multiple fields separated by `,`. Available fields include `id`, `key`, `namespace`, `owner_id`, `created_at` and `updated_at`.",
        "type": "string",
        "example": "key,updated_at"
      },
      "example": "key,updated_at",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "namespace",
      "in": "query",
      "description": "The namespace of the metafield. A metafield can be uniquely identified by its `key` and `namespace`.\nOnly letters, numbers, hyphens, and underscores are supported.                                         \nMinimum length: 2  \nMaximum length: 50   \n",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "namespace",
        "description": "The namespace of the metafield. A metafield can be uniquely identified by its `key` and `namespace`.\nOnly letters, numbers, hyphens, and underscores are supported.                                         \nMinimum length: 2  \nMaximum length: 50   \n",
        "type": "string",
        "example": "my_fields-11"
      },
      "example": "my_fields-11",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "updated_at_max",
      "in": "query",
      "description": "Specify the cutoff update date for metafields to query. Metafields updated on and before this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "updated_at_max",
        "description": "Specify the cutoff update date for metafields to query. Metafields updated on and before this time are returned. Format: [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": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "limit",
      "in": "query",
      "description": "The maximum number of metafields to return.   \nValue range: 1-250   \nDefault value: `50`",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "The maximum number of metafields to return.   \nValue range: 1-250   \nDefault value: `50`",
        "type": "string"
      },
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "type",
      "in": "query",
      "description": "The data type for the metafield. Valid values are:     \n- `single_line_text_field`: A single-line text field \n- `list.single_line_text_field`: Multiple single-line text fields  \n- `multi_line_text_field`: Multi-line text field    \n- `color`: A single color  \n- `list.color`: Multiple colors \n- `date`: A single date \n- `list.date`: Multiple dates  \n- `date_time`: A single date and time. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).   \n- `list.date_time`: Multiple dates and times. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). \n- `url`: A single URL  \n- `list.url`: Multiple URLs  \n- `file_reference`: A single file. Support a PDF or image file within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.     \n- `list.file_reference`: Multiple files. Support PDF or image files and each file must be within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.  \n- `json`: JSON     \n- `weight`: A single weight with a unit   \n- `list.weight`: Multiple weights with units   \n- `volume`: A single volume with a unit   \n- `list.volume`: Multiple volumes with units   \n- `dimension`: A single size with a unit    \n- `list.dimension`: Multiple sizes with units   \n- `number_integer`: A single integer   \n- `list.number_integer`: Multiple integers   \n- `number_decimal`: A single decimal   \n- `list.number_decimal`: Multiple decimals  \n- `rating`: A single rating    \n- `list.rating`: Multiple ratings \n- `page_reference`: A single page  \n- `list.page_reference`: Multiple pages   \n- `product_reference`: A single product    \n- `list.product_reference`: Multiple products  \n- `variant_reference`: A single product variant  \n- `list.variant_reference`: Multiple product variants    \n- `collection_reference`: A single product collection  \n- `list.collection_reference`: Multiple product collections      \n- `boolean`: Boolean type. Valid values are `true` and `false`.\n- `money`: Amount with a currency   \n\nFor more information about metafields, refer to [Guide to Using Metafields Feature](https://help.shopline.com/hc/en-001/articles/7095355017113).",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "type",
        "description": "The data type for the metafield. Valid values are:     \n- `single_line_text_field`: A single-line text field \n- `list.single_line_text_field`: Multiple single-line text fields  \n- `multi_line_text_field`: Multi-line text field    \n- `color`: A single color  \n- `list.color`: Multiple colors \n- `date`: A single date \n- `list.date`: Multiple dates  \n- `date_time`: A single date and time. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).   \n- `list.date_time`: Multiple dates and times. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). \n- `url`: A single URL  \n- `list.url`: Multiple URLs  \n- `file_reference`: A single file. Support a PDF or image file within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.     \n- `list.file_reference`: Multiple files. Support PDF or image files and each file must be within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.  \n- `json`: JSON     \n- `weight`: A single weight with a unit   \n- `list.weight`: Multiple weights with units   \n- `volume`: A single volume with a unit   \n- `list.volume`: Multiple volumes with units   \n- `dimension`: A single size with a unit    \n- `list.dimension`: Multiple sizes with units   \n- `number_integer`: A single integer   \n- `list.number_integer`: Multiple integers   \n- `number_decimal`: A single decimal   \n- `list.number_decimal`: Multiple decimals  \n- `rating`: A single rating    \n- `list.rating`: Multiple ratings \n- `page_reference`: A single page  \n- `list.page_reference`: Multiple pages   \n- `product_reference`: A single product    \n- `list.product_reference`: Multiple products  \n- `variant_reference`: A single product variant  \n- `list.variant_reference`: Multiple product variants    \n- `collection_reference`: A single product collection  \n- `list.collection_reference`: Multiple product collections      \n- `boolean`: Boolean type. Valid values are `true` and `false`.\n- `money`: Amount with a currency   \n\nFor more information about metafields, refer to [Guide to Using Metafields Feature](https://help.shopline.com/hc/en-001/articles/7095355017113).",
        "type": "string",
        "example": "single_line_text_field"
      },
      "example": "single_line_text_field",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "updated_at_min",
      "in": "query",
      "description": "Specify the initial update date for metafields to query. Metafields updated on and after this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "updated_at_min",
        "description": "Specify the initial update date for metafields to query. Metafields updated on and after this time are returned. Format: [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": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "created_at_min",
      "in": "query",
      "description": "Specify the initial creation date and time for metafields to query. Metafields created on and after this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).\n",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "created_at_min",
        "description": "Specify the initial creation date and time for metafields to query. Metafields created on and after this time are returned. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).\n",
        "type": "string",
        "example": "2023-04-25T16:15:47-04:00"
      },
      "example": "2023-04-25T16:15:47-04:00",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "key",
      "in": "query",
      "description": "A unique identifier for a metafield  within its `namespace`. Only letters, numbers, hyphens, and underscores are supported.     \nMinimum length: 3        \nMaximum length: 30       ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "key",
        "description": "A unique identifier for a metafield  within its `namespace`. Only letters, numbers, hyphens, and underscores are supported.     \nMinimum length: 3        \nMaximum length: 30       ",
        "type": "string",
        "example": "key_123"
      },
      "example": "key_123",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "resource",
      "in": "path",
      "description": "The type of the resource to which the metafield belongs. Valid values are:  \n- `products`: products \n- `variants`: product variants  \n- `collections`: product collections\n- `customers`: customers\n- `orders`: orders\n- `pages`: pages  \n- `blogs`: blogs collections\n- `articles`: blogs\n- `shop`: store",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "resource",
        "description": "The type of the resource to which the metafield belongs. Valid values are:  \n- `products`: products \n- `variants`: product variants  \n- `collections`: product collections\n- `customers`: customers\n- `orders`: orders\n- `pages`: pages  \n- `blogs`: blogs collections\n- `articles`: blogs\n- `shop`: store",
        "type": "string",
        "example": "products"
      },
      "example": "products",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "owner_id",
      "in": "path",
      "description": "The ID of the resource to which the metafield belongs. For example, when adding a metafield to product A with an ID of `1605898661`, the metafield's `owner_id` is `1605898661`.  \nMaximum length: 128",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "owner_id",
        "description": "The ID of the resource to which the metafield belongs. For example, when adding a metafield to product A with an ID of `1605898661`, the metafield's `owner_id` is `1605898661`.  \nMaximum length: 128",
        "type": "string",
        "example": "16015223514512351235"
      },
      "example": "16015223514512351235",
      "examples": {
        "Get metafields for a resource": {
          "value": ""
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "link": {
          "description": "The URL link that provides the pagination data. You can obtain `page_info` from this parameter for subsequent pagination requests. \n\nThis parameter is returned when the requested page has a previous or next page. \n\nFor more information on how to use pagination, refer to [Paging Mechanism](https://developer.shopline.com/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": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "metafields": {
                "name": "metafields",
                "description": "List of metafields.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "owner_resource": {
                      "name": "owner_resource",
                      "description": "The type of the resource to which the metafield belongs. Valid values are:  \n- `products`: products \n- `variants`: product variants  \n- `collections`: product collections\n- `customers`: customers\n- `orders`: orders\n- `pages`: pages  \n- `blogs`: blogs collections\n- `articles`: blogs\n- `shop`: store",
                      "type": "string"
                    },
                    "type": {
                      "name": "type",
                      "description": "The data type for the metafield. Valid values are:     \n- `single_line_text_field`: A single-line text field \n- `list.single_line_text_field`: Multiple single-line text fields  \n- `multi_line_text_field`: Multi-line text field    \n- `color`: A single color  \n- `list.color`: Multiple colors \n- `date`: A single date \n- `list.date`: Multiple dates  \n- `date_time`: A single date and time. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).   \n- `list.date_time`: Multiple dates and times. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). \n- `url`: A single URL  \n- `list.url`: Multiple URLs  \n- `file_reference`: A single file. Support a PDF or image file within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.     \n- `list.file_reference`: Multiple files. Support PDF or image files and each file must be within 10 MB. Supported image formats: JPG, JPEG, PNG, and GIF.  \n- `json`: JSON     \n- `weight`: A single weight with a unit   \n- `list.weight`: Multiple weights with units   \n- `volume`: A single volume with a unit   \n- `list.volume`: Multiple volumes with units   \n- `dimension`: A single size with a unit    \n- `list.dimension`: Multiple sizes with units   \n- `number_integer`: A single integer   \n- `list.number_integer`: Multiple integers   \n- `number_decimal`: A single decimal   \n- `list.number_decimal`: Multiple decimals  \n- `rating`: A single rating    \n- `list.rating`: Multiple ratings \n- `page_reference`: A single page  \n- `list.page_reference`: Multiple pages   \n- `product_reference`: A single product    \n- `list.product_reference`: Multiple products  \n- `variant_reference`: A single product variant  \n- `list.variant_reference`: Multiple product variants    \n- `collection_reference`: A single product collection  \n- `list.collection_reference`: Multiple product collections      \n- `boolean`: Boolean type. Valid values are `true` and `false`.\n- `money`: Amount with a currency   \n\nFor more information about metafields, refer to [Guide to Using Metafields Feature](https://help.shopline.com/hc/en-001/articles/7095355017113).",
                      "type": "string"
                    },
                    "value": {
                      "name": "value",
                      "description": "The data stored in the metafield. ",
                      "type": "object"
                    },
                    "created_at": {
                      "name": "created_at",
                      "description": "The date and time when the metafield was created. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). ",
                      "type": "string"
                    },
                    "description": {
                      "name": "description",
                      "description": "The description of the metafield.  ",
                      "type": "string"
                    },
                    "id": {
                      "name": "id",
                      "description": "The ID of the metafield.",
                      "type": "long"
                    },
                    "key": {
                      "name": "key",
                      "description": "A unique identifier for a metafield within its `namespace`.  ",
                      "type": "string"
                    },
                    "namespace": {
                      "name": "namespace",
                      "description": "The namespace of the metafield.",
                      "type": "string"
                    },
                    "owner_id": {
                      "name": "owner_id",
                      "description": "The resource ID to which the metafield belongs.",
                      "type": "string"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "The date and time when the metafield was updated. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). ",
                      "type": "string"
                    }
                  },
                  "example": {
                    "description": null,
                    "key": null,
                    "owner_id": null,
                    "owner_resource": null,
                    "created_at": null,
                    "id": null,
                    "namespace": null,
                    "type": null,
                    "updated_at": null,
                    "value": null
                  }
                },
                "example": [
                  {
                    "value": null,
                    "created_at": null,
                    "id": null,
                    "key": null,
                    "owner_id": null,
                    "type": null,
                    "updated_at": null,
                    "description": null,
                    "namespace": null,
                    "owner_resource": null
                  }
                ]
              }
            },
            "example": {
              "metafields": [
                {
                  "namespace": null,
                  "id": null,
                  "owner_id": null,
                  "owner_resource": null,
                  "type": null,
                  "updated_at": null,
                  "value": null,
                  "created_at": null,
                  "description": null,
                  "key": null
                }
              ]
            }
          },
          "examples": {
            "Get metafields for a resource": {
              "description": "Paging query product metafields",
              "value": {
                "metafields": [
                  {
                    "description": "My description",
                    "id": 397923258691,
                    "key": "key_123",
                    "owner_id": "16015223514512351235",
                    "updated_at": "2022-12-28T09:39:36+00:00",
                    "value": "1241412342341341234123",
                    "created_at": "2022-12-28T09:39:35+00:00",
                    "namespace": "namespace_123",
                    "owner_resource": "products",
                    "type": "single_line_text_field"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "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` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Get metafields for a resource",
    "version": "v20260901"
  }
}
```