REST API "PUT" unable to update Product metafield

Shopify Partner
79 3 30

I have tried everything but keep getting "Bad request" when I try to update a product metafield.


I have retrieved the Metafields for the product and selected the Metafield ID for the metafield I'm trying to update (it has an existing value)


My URL is in this format:


My CURL request is in this format:

-H "Content-Type: application/json"
-d { "metafield": { "id": [MetafieldID], "value": "MyText" } )

And I've tried many variations, but I always get the unhelpful response "HTTP/1.1 400 Bad Request"


Does anyone know what I am doing wrong??


Edit: I was able to get a workaround by deleting the old metafield value, which permitted me to re-add the metafield to the product using the PUT command on products/[productid].json

Replies 0 (0)