Lookup multiple records based on list of ids

I need to call a lookup multiple times for additional data based on a list of IDs I get from a previous lookup. In the first HTTP lookup I get a list of orders and I need to make another HTTP lookup for additional data for each order based on the ID of that order. The URI of the lookup stays the same I send the Order data inside the request Body. This is the response I get from the first lookup:

{
"page_of_records": [
{
"record": {
"Orders": [
{
"MasterOrderId": 78965,
"PoeOrdersId": 81470,
"CustomerFirstName": "Jane",
"CustomerLastName": "Doe",
"Created": "/Date(1442269250410-0000)/",
"Total": 95.98,
"CurrencyId": "USD"
},
{
"MasterOrderId": 78965,
"PoeOrdersId": 81471,
"CustomerFirstName": "Ploni",
"CustomerLastName": "ben Ploni",
"Created": "/Date(1442269250490-0000)/",
"Total": 160.7,
"CurrencyId": "USD"
},
{
"MasterOrderId": 78965,
"PoeOrdersId": 81472,
"CustomerFirstName": "John Q.",
"CustomerLastName": "Public",
"Created": "/Date(1442269250567-0000)/",
"Total": 59.63,
"CurrencyId": "USD"
},
{
"MasterOrderId": 78965,
"PoeOrdersId": 81473,
"CustomerFirstName": "Richard",
"CustomerLastName": "Roe",
"Created": "/Date(1442269250630-0000)/",
"Total": 208.74,
"CurrencyId": "USD"
},
{
"MasterOrderId": 78965,
"PoeOrdersId": 81474,
"CustomerFirstName": "Nom",
"CustomerLastName": "de Guerre",
"Created": "/Date(1442269250707-0000)/",
"Total": 111.25,
"CurrencyId": "USD"
}
],
"IsSuccess": true,
"ResponseCode": 0,
"LocalizedResponseText": "Success"
}
}
]
}

Hi, @hristinabendeva615. Thanks for posting.

To give you a range of suggestions, we'd have to delve a bit more into the structure of the data in your export. There might be a way to split the array 'Orders' into individual records, which would be easier to handle downstream, though that kind of real-time back and forth is more efficiently done with a support call or in Office Hours.

Without knowing more, your best bet for simplifying the lookup is to select the One-to-many option.

Hi, @stephenbrandt. Thanks for the response.

I did select the one to many option and specified the path to many as Orders but it doesn't work I don't know if I'm setting the path to many the wrong way or if there is another problem.

Also the request body for the API I'm trying to call in the second lookup for additional data for the orders looks like this:

{
"MasterOrderId":78965,
"OrderId":81471,
"ShaSessionGuid": 24455756776452343242,
"ApiKey":"AAAAAAAAAAAA11111111",
"Culture":"en-US"
}

I need to make multiple calls with this lookup depending on the OrderId i get from the Orders List.

Hi @hristinabendeva615,
Our experts at Office Hours should be able to help you with this. It sounds like you're making a custom flow, in which case you'd attend our general Office Hours. However, if you're a partner or working on an integration app, please check this article as general Office Hours don't cover these areas.