Forum Documentation Showcase Pricing Learn more

Workflow API List of Lists

I have a data type called Partial Bid which looks like this:

I additionally have another data type called Bid which looks like this:

Notice that a Bid contains a list of Partial Bids

I am connecting to an external API (which I have created and own) in order to get a list of Bids via a GET request. It returns a JSONS structure that looks like this:

‘Bids’: [
‘Count’: ‘123’,
‘Partial Bid Text List’: [‘987’,‘876’,‘765’],
‘quote_id’: ‘1565034746835x180169299354189820’,
‘TotalCost’: ‘3500’
‘Count’: ‘321’,
‘Partial Bid Text List’: [‘123’,‘234’,‘345’],
‘quote_id’: ‘1565034746835x180169299354189820’,
‘TotalCost’: ‘4000’

the ‘Partial Bid Text’ contains a list of Partial Bids unique IDs. (Partial Bid unique ID 1: 123, Partial Bid unique ID 2: 234, …)

Using this data I want to create the Bids in the database with their corresponding Partial Bids List that actually match with the Partial Bids that already exist in the database.

In psuedocode this is what I want:

for bid in json:
partialBidList = []
for item in bid’s Partial Bid Text List:
do a search for Partial Bid where unique Id = item --> current partial bid
add current partial bid to partialBidList
create bid: add list partialBidList

I have tried using API Workflows to do this but have not been able to figure it out. If someone could help walk me through it I would be forever grateful! Thanks!