Is with possible with api

So I have a couple of suppliers each of them serve their data is different ways.
Is there a way with api to join them so for example I can get a list of products from both suppliers at the same time to be be displayed?
if so is there a video on this?

Hi Peter

Two APi connections is no problem but I don’t believe there is a way to perform a join between two API’s directly. Possibly some way of doing it with local array storage via App connect but it is going to be messy.
Do they need to be merged or could they be in different display containers?

On top of that, do those suppliers even have an API you can tap into?

Yes you can but I dont know direct and simple way

Create mysql temp table (if wappler support otherwise you can use mysql tables)

Fetch all rows from api 1 and api 2
Insert to temp table
Then read

1 Like

No need it to be all merged @Hyperbytes as its products with different information.

yes I have access to api link with with them. just got to work out how to make it work. :slight_smile:

If no merge needed then no problem, just make separate API connections and treat them just like you would standard server connections

No I DO need it merging, which is where I think the issue is going to come in

Without doubt the issue, there is no current way to join APIs like you would data tables.

The only way that comes to mind is to write to a data table as suggested above or use the new array component to merge and sort but frankly i don’t even like to think of how problematical that could be.
I assume this will be a real time request in some sort of store front end so will be constantly changing? How often is the API source updated?

You could do a synchronisation between the API sources merging them into a single local table at periodic intervals and then just query the table.

I use a similar process on one of my websites where a table is reordered ever 15 minutes via a scheduled event (cron job) simulating the effect of ORDER BY random()

Where do you want to merge it, you want the output of the server action to be a single array or you want to join them on the client for a repeater or so? Are the properties/fields from both APIs the same or are they different?

They would be different as they are from different suppliers

Give a case scenario giving an example of the data you want to merge for instance:

25 Total Fish Orders > split between > 5 customers.

So warehouse can retrieve x number of fishes for each user with their unique shipping and order tracking addresses?

Now you can join two different data sources: