Create a JSON to use inside another JSON [send to API node]

Hi! Let’s see if someone can help me. I am calling an API that creates a Sals order. Inside that sales order I need to include the list of “items” in the order.

The API call looks like this.

Order data
Order data
-- Items
--- item 1 data
----- item data
----- item data
--- item 2 data
----- item data
Order data.

Is there any way to generate the “item” part of the API call in another node and then add it to the “send to API node”?

Hope this makes any sense.

Any help will be appreciated!

Hi @reuben :wave:

If I understand you correctly, are you trying to merge all of your items into a single row grouped by order? If so, check this post by another Parabola user.

The “Insert Text Column” step can be used to format each item as a JSON object in a single row. The “Merge duplicate rows” step can be used to merge the items together and group them by a unique identifier.

In your case, you may be able to use a unique Order Id or Order Name to group your items. Your final JSON might look like this:

Order data
Order data
  "items": [
    {Merged Items Column}
Order data
1 Like

very interesting, I will test it out! Thanks a lot!