I am updating a product using shopify api, getting error "Unprocessable Entity", I had spent a lot of time for finding the reason for it, all data seems to be correct. Can anybody please check logs and let me know what is the issue. My request id (found in headers) : a3ab65ba-39a2-4a72-8536-e3c7e2fca149
Solved! Go to the solution
Hi there @codechefkk,
It looks like your variant ID's are not exactly matched up with the existing options on the product. For example you are passing:
Variant ID: 29890067693665 for "Style 002", but "Style 002" actually belongs to ID 29890067726433, which your API call has listed as "Style 003". For the most part it seems like each style is off by one of their actual IDs.
The 422 root cause is that the "Style 002" already exists etc, since the IDs you are providing don't line up with the names the API is trying to create new variants, which already exist.
Hope that helps,