How to connect a nested JSON to my app using the API connector

Greetings,
I am trying to create a shipment using an API, but the tutorial I get doesn’t show how I can do it when the POST request’s JSON is nested. it requires the collection_address and other fields.
I was hoping if I can get it right, then I will use the same process for other nested fields.

the image below shows what I am trying to do.

I don’t know whether my explanation will make sense as I don’t have much knowledge and vocabulary about API’s

Hi @setlhapo.8,

Can you send the documentation of the API?

Hi @johnny , thanks for your response… here

https://api-docs.bob.co.za/shiplogic#POST-Create%20a%20shipment

@johnny, Ey mate… got any solution yet?

You may want to use this plugin: [NEW PLUGIN] Generate deep nested JSON from thing(s) - #53 by paul29 (I can vouch for it as I haven’t used it as I try to avoid plugins).

Alternatively, you can use the API connector directly and make the entire body one dynamic value (at least for the fields you want to send nested JSON). Then in the workflow action take the data you want to send and format it as a list, and place it in the body of the outbound API call.

1 Like