Display product content from third-party Rest API

Hi everyone!

Firstly, I’m sorry, if I’ve selected the wrong topic for this issue or my question has already been asked before. I’m new in working with shopify and it’s my very first question here.

I need to display the content of existing products in shopify, like the title, description, images etc., from another 3rd-party RestAPI. The contents of these products may change frequently. Therefore, the product data from the 3rd-party service should be updated at least every 24 hours.

I’ve read about the admin API for products, which seems to be the right way to update existing products in shopify (https://shopify.dev/api/admin-rest/2022-10/resources/product).

As mentioned above, since I’m absolutely new to shopify, I would like to explain the plan that I would like to stick with and ask for feedback, best practices, examples or other possibilities of an implementation for this kind of requirement, since it seems like a common use case for a web shop to me.

My plan is to create an app with a script, which iterates through all existing products in the database, request the data from the 3rd party API and update all related fields via the admin products Rest API. Ideally, the script gets triggered once a day.

Is there a cron/scheduler function in shopify to trigger the app and run the script?

Are there any code examples or libraries, that meet these requirements?

Or maybe there are alternatives in shopify (perhaps out-of-the-box), to integrate content from a third party API?

Thanks in advance!

1 Like

Hello. Shopify does not provide a cron mechanism as you describe. You can independently organize the mechanism on your server, for example in the form of an application. You already described the logic itself:
Once a day, your code is run for execution. In the code, you get shopify products with all the necessary data via RestAPI or GraphQL and go through each product one by one, making a request to a third-party API for each and updating the product data in shopify if necessary.

You only need to decide on the programming language, shopify has several libraries for different programming languages ​​that make it easy to work with the Shopify API.

1 Like