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.

Editing Customer metafields using new Customer Account API (Jan 2024)

Editing Customer metafields using new Customer Account API (Jan 2024)

ddeniss
Shopify Partner
2 0 0

Hi. I see there is a new Customer Account API available as of Jan 2024. Is it possible to edit Customer metafields using that or any other API?

 

https://shopify.dev/docs/custom-storefronts/building-with-the-storefront-api/customer-accounts

 

I am making a mobile app (iOS / Android app) that uses Mobile Buy SDK and we store some customer data as Customer metafields - we need read and write access to it - i.e. each customer should be able to update their own metafield

Reply 1 (1)

kjchabra
Shopify Partner
26 1 7

@ddeniss natively on Shopify, metafields only have read access on Storefront.

 

We at Clouver ran into a similar problem and decided to create an application that lets your store customers modify their own metafield data through Storefront. It does require you to have an AWS account, however the app handles all the authentication and requests to make the updates possible. Once you do deploy the app, the app displays an endpoint that you can use to make POST requests. The endpoint accepts customerAccessToken as a header value including body data for the metafields value. 

Hope it can help you as well and happy to answer any questions.