How can I manage products and orders from an external API?

Dears,

My supplier provided me with some APIs docs for importing and creating orders.

I thought this was an easy task to implement but I’m struggling to find the right approach and I hope some of you have a better idea then mine.

My current idea was to run a python server in Flask for fetching the products and creating them in Shopify ( one-time task ).

The main concern is about products because in my shop there will be products which I own and products which are retrieved from the external supplier, and as soon as a new order is created we should be able to identify if the customer purchased a product from the external supplier a separate order create an order via API.

My idea to solve this last task is to run a daily job in python which takes all the orders and checks if a specific product was imported from the external API and then create the order.

Of course this last solution will need an external database where we store all the products imported and all the order analyzed in order to do not process the same order twice.

Is there any better approach with event listeners and so on? Should I move to Node.js?