HTTP POSt request format for nested object

Hi all,

I am using HTTP API Post method request.

If the format of Body data in following form the API work perfectly.

{
      "channelId":"RPA",
      "cifId":"123456789",
      "serReqId":"getlist",
      "requestUUID":"12345678",
}

But I need to pass body data in following form:

{
   "webServiceReq":{
      "channelId":"RPA",
      "cifId":"123456789",
                      "serReqId":"getlist",
                      "requestUUID":"12345678",
                      "request":
                                        {
                                                            "custId":"0122345678"
                                        }                  
      }
}

Can anyone please help me to sort out this.

How to pass the above values in the parameters?

@Rahul_S Instead of passing values in parameter, you can pass the entire JSON as string in Body property of “HTTP request” activity.( Please see attached screenshot)
Note: Make sure the json is converted in single line string. If needed escape double quotes with one more double quote.
In your case pass body as string:
{““webServiceReq””:{““channelId””:““RPA””,““cifId””:““123456789"”,”“serReqId”“:”“getlist”“,”“requestUUID”“:”“12345678"”,““request””:{““custId””:"“0122345678"”}}}

Let me know if it works for you.

1 Like

Thanks a lot for Reply.

But now getting following error:

{"data":{"status":{"isSuccess":false,"message":"Unable to process your request:ERR0001","statusCode":"ERR0001"}}}

Any help would be appreciated.

Thanks

Hello Rahul,
Check out this very fast simple VB.NET that create JSON in 1 line:
startUiPathFromSalesforce/CreateJSON.txt at master · cristinegulescu/startUiPathFromSalesforce · GitHub
And the movie for demo:

Thanks,
Cristian