External Rest API Integration with Shopify Store

External Rest API Integration with Shopify Store

2 0 2

Shopify Community,

We have a Shopify store and an external Rest API. We have full control over our Rest API and can make updates to it to support whatever authentication method may be necessary. We would like to pull data from our Rest API into our Shopify store and use that data in business logic and display some of the data as well. We feel this is something that many Shopify stores must be currently doing. What are the best practices for integrating a Shopify Store with an external Rest API that returns JSON or XML. We've found information that's piecemeal but can't seem to get clarity on the whole picture. The links below are what we've found so far. Has anyone been successful in calling an external API?

Replies 5 (5)

50 0 6

Hello -


Depending on what you are trying to do, there might be a few options. However, the question is unclear on what you are trying to update from the external API. But here are some approaches that you may consider.


Option A

You can create a private app that calls the external URL and updates the Shopify API. If it is only a minor updates and you dont need to run it often, this might be an option.


Option B:

You can write a simple console app on your server that calls your API and then updates Shopify APIs. If you want to do many updates and add scheduled updates for inventory products, etc., this might be the best route. In this case, you will have to maintain the sync app on your servers and maintain APIs changes, but you have a lot more control over this and can scale up down as needed.


Option C

You can use an automation and integration tool like ours to create a flow that can accomplish this. With this option, you can schedule it to run every x hours once it is set up, and you don't have to maintain the local app or maintain Shopify API changes.


Here is an example of how you would do this on our platform. 

The example below is creating or updating a product in Shopify from an external API.


  1. First, makes an HTTP request to the your external API.
  2. Loop through the API Response
  3. If the product is New - Create it in Shopify
  4. If the product exists - then update it with new info

The example above is super simple, and you can add all kinds of logic and conditions based on what you are trying to do to extend it. 


If you need help, you can reach out to me at hello@pandaflow.ioproduct_updates.png

2 0 2

In addition to receiving the response from the external API, we would like to be able to manipulate liquid code based on the response of a third party API. Any insight the community could provide on how to do that would be greatly appreciated.

Shopify Partner
4 0 3

Hey, @wearekbs did you figure it out? I need to do the same. Thanks. 

Shopify Partner
4 0 2

@wearekbs@alejopa  Did you end up finding out how to receive a response from an external API? I need to do the same.

Shopify Partner
3 0 0

Hi ! Did you find out ? I need to do the same I would be very grateful if you could answer.