Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How do I resolve customer metafield API rest issue?

How do I resolve customer metafield API rest issue?

klaus-vennik
Shopify Partner
2 0 1

222.png

Hello,

I need assistance with Shopify's metafields. I am trying to update a metafield associated with a customer, but I believe there's an issue with my request body. The authorization, customer ID, and metafield ID are accurate as I've successfully tested them with other store requests in Postman. However, when I try to update this specific customer's metafield, I encounter an error.

 

Get info: 

{
"metafield": {
"id": 34804595097793,
"namespace": "custom",
"key": "test1",
"value": "hola",
"description": null,
"owner_id": 7298900361409,
"created_at": "2023-10-20T15:51:59-04:00",
"updated_at": "2023-10-20T22:22:25-04:00",
"owner_resource": "customer",
"type": "single_line_text_field",
"admin_graphql_api_id": "gid://shopify/Metafield/34804595097793"
}
}

 

Reply 1 (1)

EasifyApps-Zoe
Shopify Partner
582 15 49

Hi @klaus-vennik,

For creating a single line text field, I recommend using the Easify Product Options app. It already includes the text field option in its Free plan, and you won't need to deal with any coding. This will save you time and effort compared to using metafields 🤗.

 

EasifyAppsZoe_0-1698036187553.pngEasifyAppsZoe_1-1698036231346.pngEasifyAppsZoe_2-1698036251493.png
EASIFY - MAKING SHOPIFY SIMPLE & SWEET!
Easify Product Options: Create custom product options 10X faster & easier!
Easify Product Attachments: Effortlessly add downloadable PDF files (or any other format) to Shopify pages!
Try for Free | 24/7 Live Chat Support