Solved

Python Product Tag Update - 400 Error - product :Required parameter missing or invalid

TheRealGeek
Shopify Partner
2 1 1

Hello All-

 

Just built my first Shopify store and wanted to use python and API to bulk-update product tags on all our products.

 

However, I've run into a snag on my PUT call.  I keep getting a 400 Response with the message '{"errors":{"product":"Required parameter missing or invalid"}}'.

 

I've seen other people with similar issues on here but none of their solutions seem to be working for me.

I can successfully get the product info using the API and was originally sending the entire JSON payload I got with my updates added back through the API but now I'm keeping it simple and just including "id" and "tags" in the payload but still get the same error. 

 

Here are some screenshots of my code, a printout of the payload, and the error in the response.

Has anyone else run into this problem that can help me figure it out?

 

Code, Payout and Response:

 

TGB-Bulk-Product-Tag-Update-Screenshot.png

TGB-Bulk-Product-Tag-Update-Response-400-Screenshot.png

Accepted Solution (1)

TheRealGeek
Shopify Partner
2 1 1

This is an accepted solution.

We figured it out!

 

It turns out that when we initially created the store we used a domain store name that was misspelled so we created a new domain store name with the correct spelling. However, the original domain store name was not deleted (not even sure it can be), and even though the new domain store name forwards to the original one and allows for GET requests, for PUT requests we had to use the original misspelled domain store name and the PUTs work fine.

 

I figured this out by using fiddler to capture a manual product update via the Shopify website to see what the payload looked like and that's why I noticed the store URL was different than the one we were using.

 

Hope this helps someone with a similar issue! 

View solution in original post

Reply 1 (1)

TheRealGeek
Shopify Partner
2 1 1

This is an accepted solution.

We figured it out!

 

It turns out that when we initially created the store we used a domain store name that was misspelled so we created a new domain store name with the correct spelling. However, the original domain store name was not deleted (not even sure it can be), and even though the new domain store name forwards to the original one and allows for GET requests, for PUT requests we had to use the original misspelled domain store name and the PUTs work fine.

 

I figured this out by using fiddler to capture a manual product update via the Shopify website to see what the payload looked like and that's why I noticed the store URL was different than the one we were using.

 

Hope this helps someone with a similar issue!