I have access to the supplier API which is giving me data in JSON and XML, I would like to connect this to my Shopify store so that when the supplier changes any product details on their site the changes should automatically reflect on my Shopify site as well. I would also like to manipulate some of the supplier data such as adding a markup on their prices when they are getting to my store.
Can someone assist with how I can do that?
Great to hear you're looking to integrate your store with a suppliers API. You can achieve this workflow by implementing middleware that connects the supplier's API with your Shopify store. Here's a general approach:
1. Fetch the Data from the Supplier's API:
First, you would write a script that pulls the JSON data from the supplier's API. This script would need to authenticate with the supplier's API, fetch the data, and then convert it into a format that can be used by Shopify. XML is less supported by Shopify, so if you can use just JSON that will make things easier for you.
2. Parse and Transform the Data:
3. Push the Data to Shopify:
After you've transformed the data, you would push it to your Shopify store using Shopify's API. Check out our documentation on API endpoints for creating and updating products, which you can use for this part of the process.
This approach could be implemented in any programming language that can make HTTP requests and process JSON or XML data. Python, Node.js, Ruby, etc., could all be used for this purpose.
One important thing to note is that Shopify throttles API requests depending on the API you're using, so you may need to rate limit your requests to avoid exceeding Shopify's API limits.
Hope this helps!
Thank's for your info. Could you sugest someone, a developer, to support me in doing all the steps you mentioned? I'm in a similar situation but I don't know any programing code 🙂 Thank you .