GET https://{handle}.myshopline.com/admin/openapi/v20270301/:p_resource/:p_owner_id/:resource/:owner_id/metafields/:id.json
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 .
Get a metafield for a resource.
DEPRECATED
This API is deprecated from API version v20250601. Use the Get a metafield for a resource API instead.
Path Parameters
  • id string required
    Metafield's id
    Example: 398100698691
  • owner_id string required
    Secondary resource id
    Example: 1802351351232521351351
  • p_owner_id string required
    First class resource id
    Example: 16024213413413412341234
  • p_resource string required
    First class resources , like products
    Example: products
  • resource string required
    Secondary resources such as variants
    Example: variants
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 to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • 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
  • metafieldobject
    metafield
  • description string
    description
    Example: desc
  • id long
    metafield's id
    Example: 398100698691
  • key string
    A unique identifier for a metafield within its namespace.
    Example: key_123
  • owner_id string
    The ID of the resource.
    Example: 1802351351232521351351
  • owner_resource string
    resource
    Example: variants
  • value object
    The data stored in the metafield.
  • created_at string
    created time
    Example: 2022-12-28T09:48:09+00:00
  • namespace string
    The namespace of the metafield.
    Example: namespace_123
  • type string
    type
    Example: single_line_text_field
  • updated_at string
    update time
    Example: 2022-12-28T09:48:09+00:00
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20270301

ParamOptions

path required
path required
path required
path required
path required
header required

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20270301/p_resource/p_owner_id/resource/owner_id/metafields/id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
metafield does not exist
Response
{}
Was this article helpful to you?