it has been a couple of days since I started to struggle with trying to import data from an external API and save it to 2 different tables.
I’ll try to be more specific.
I’m getting data about flights and itineraries, each itinerary can have multiple flights. My data structure looks like this:
Each flight should be connected with its own itinerary through the field itinerary. In this way, I’ll be able to retrieve and display the single flight information as well as the total cost (and other information I’ll add later on) of the itinerary.
To populate those data I’m using an API service settled up like this:
The Json structure I’m retrieving is like this:
As you can see I’ve my itinerary information under the data (list) and my flight information under the segment (list).
I’m connecting the API Action with a button and sending the result in a API workflow on a schedule API workflow on a list:
The schedule API workflow runs on the itineraries list:
While all this let me save correctly the itineraries in the DB. I’m doing a lot of tests to understand how can I parse for each itinerary all the flights and save them in the DB structure correctly connecting it with their itinerary.
I’m really losing my mind trying to solve this. My idea was to add a field as API CALL DATA in the itineraries, save for each itinerary the itinerary JSON, and parse it as an API workflow on a list adding all the flights in that itinerary. This in theory works (at least in my mind) but in the parameters, I can’t see the proper type:
But here I can’t find the API CALL DATA format.
Any idea how to solve this?
thanks a lot to everyone willing to help