I am trying to update a price of a variant.
I am PUTting to:
My body is:
I simply get the following error as a response:
P.S. Presuming I can get the above working, how would I go about updating the cost price as well?
Solved! Go to the solution
That call looks like it should work, can you kindly provide the X-Request-ID value from the response headers of your failed call? I'll use this to check the logs and see if there's more information to be found there. As well, please add the parameter
?debug=true to the URL before making the call as this will give us more info in the logs.
cost field for variants lives on the inventory_item object, so you need to call the Inventory API to update this field.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Here's an X-Request-ID to trace: 0ca8d656-7c07-4531-913b-875858b679e9
What's odd this morning is that I can actually get the call to work in Postman but not my app (whereas yesterday both seemed to be failing). No doubt it's probably something simple my end, but i'm tiring of looking at the code.