A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I have an Excel VBA macro that updates products using the PUT https://{myshopname}/myshopify.com/admin/api/2021-07/products/{productid}.json call and it works fine. When I try and create a product using POST https://{myshopname}/myshopify.com/admin/api/2021-07/products.json it fails. It returns HTML code in the response body. The same product JSON package can create a product making the same call in Postman.
Any suggestions on why it may not work in Excel VBA yet PUT works in Excel VBA?
Thanks,
John
I found a message that was a similar issue, and it appears cookies prevent the POST from working in VBA.
The solution (with VBA code) is found in the message below.
Thanks,
John
Hi John,
I am ok with Excel and VBA but have no idea how I can use these tools to connect with my Shopify data and make updates to it. As an expert in this field, can you point me to a handy tutorial on this topic that would at least get me started?
Many thanks in advance,
pete
Hi Pete,
Here is a decent video to get you started with calling REST APIs from Excel using VBA and parsing its JSON response (https://www.youtube.com/watch?v=pHWopg_XxMc). You will also need to learn a tool like Postman to test calls to Shopify's API and see the resulting JSON response. That will help you code the parsing of the JSON.
The Excel workbook mentioned above, we have found saves us significant time to update our products. It has saved much more time then the time we put in building it. We are considering selling the spreadsheet for other Shopify Merchants to use.
John