Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Error customer metafield API (Status code: 502)

Error customer metafield API (Status code: 502)

H1R0
Shopify Partner
7 0 0

Hi!

 

I'm develop an Shopify App and that app to create a metafield for customers.

However, when I tried to create a metafield using a webhook from one of the stores, I got an error.

 

If necessary, you can also provide a request header etc.

 

Thanks!

Replies 2 (2)

Jason
Shopify Partner
11206 226 2315

What call are you making? 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
H1R0
Shopify Partner
7 0 0

Hi Jason.

The request is as follows

Request method: POST

Request URL:  https://xxx.myshopify.com/admin/api/2019-10/customers/{customerId}/metafields.json

Request header: { "X-Shopify-Access-Token": "shpat_xxx" }

Request body: { "metafield": { "namespace": "joolen", "key":"points", "value":0, "value_type": "integer" } }

 

Regards.