We just upgraded one of our private apps from a very old version to the latest version. Now when creating products in shopify, I get the error:
Response code = 400. Response message = Bad Request (publications; expected Array to be a Hash).)
However, I do not set "publications" in my request, nor do I even see a field called this for the product API, nor am I aware that we use this "publications" functionality at all.
The only arrays I see us sending are the list of variants (only one element), and list of metafields (many elements).
Solved! Go to the solution
Hey @parkerjm, Did you ever figure this out? I've seen this a few times randomly also, but no idea why. I'm also not setting the `publications` field at all. 99% of the time I can create products with no problem, but every once in a while this error pops up for no apparent reason.
I am having this problem when trying to create products via the API. I am currently using the API to import around 37k products with variants in to Shopify. After 27k products I am suddenly getting this error. Very strange as nothing has changed in my import script. Every single attempt to add a product now returns this error. I have tried simplifying the product I am sending to only contain the required fields and no variants and I am still getting this error. I am using a supported version of the API. I have also tried deleting the private app and creating a new one but no joy.
Really hoping someone at Shopify can help with this.
|an hour ago|
|an hour ago|