โ08-29-2022 08:51 AM
Hi there, I am new in this community so to Workato. I am looking for building a Body requests using multiple records (batch), I have a Workato list created but I don't know how to build this body call. Here is a sample
โ08-29-2022 03:01 PM
Joseph Blanchett will this allow to make a Batch request to the App? I want all records of the list to be included into the same call.
โ08-29-2022 03:02 PM
Yes just create your common data model schema contain a list
โ08-29-2022 03:03 PM
Perfect, I will try and let you know, thanks!
โ08-29-2022 03:11 PM
Do you have an example body structure that is expected from the API call you will be making via HTTP? This is important to accuracly advise. In many cases you would use a message template for the body itself and would start with the example API body for creating it. In terms of batch support, again that will depend on the structure of the anticipated message to the API. It it accepta a list then the acculation to list variable works assuming there is a coresponting list structure in the messge to map to. If it accepts a single record than a batch connector call inside an iteration loop could be the way to go.
โ08-29-2022 03:13 PM
Yes, here it is, that is two items:
{
"upload_request_id":"b3eb858c-e880-4938-bba3-bd5b733dd9b5",
"records":[
{
"phone_numbers":[
{
"phone_number":"+351929312312",
"phone_type":"MOBILE"
}
],
"first_name":"Joey",
"last_name":"Tribbiani",
"timezone":"Europe/Lisbon",
"priority":7,
"extra_data":{
"country":"USA",
"state":"California",
"job":"Actor"
}
},
{
"phone_numbers":[
{
"phone_number":"+351929312313",
"phone_type":"MOBILE"
}
],
"first_name":"Jane",
"last_name":"Doe",
"timezone":"GMT",
"priority":5,
"extra_data":{
"country":"USA",
"state":"California",
"job":"Actress"
}
}
]
}