I am trying tp update customer SMS consent values using Shopify API
https://<mystore>.myshopify.com/admin/api/2021-10/customers/<customer id>.json
Method: PUT
Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Shopify-Access-Token': accessToken}
Body: {'customer': {'sms_marketing_consent': {'state': 'not_subscribed', 'opt_in_level': 'single_opt_in'}}}
But getting this error message:
{‘status’: 400, ‘error’: ‘The json provided is not formatted correctly: Error occurred while parsing request parameters’}
Kindly suggest if I am missing something or share me details if you were able to update SMS consent value for a customer using Shopify REST api