How to fix payload parameters error in Shopify API with Python?

How to fix payload parameters error in Shopify API with Python?

lkfield9
Visitor
1 0 0

Hi I am techy savy, but not very code intelligent person. I have used CHATGPT to help me create a python code that archives/drafts products when I enter the sku. It seems like I have gotten almost everything to work, my code even finds the correct item id. But there seems to be an issue with the payload I cannot get past. I continuously get this error in the terminal: 

 

Payload being sent: {'product': {'id': 8047613051133, 'status': 'draft'}}
Failed to set product with SKU: 100075 to draft. Error: {"errors":{"product":"Required parameter missing or invalid"}}

 

Can anyone help? I assume its something to do with the phrasing of 'product', 'status', or 'draft' but as I said I am not extremely fluent with python so I would not know. Thank you.

Replies 0 (0)