How to pass the following request body format using HTTP request (POST request)

Hi All,

How to pass a json body of the following format via UiPath HTTP request?

{
“amount”: 100,
“amountDetails”: {
“AmountType”: “Other”
}
}

Tried Using a Json template for the body, by Creating a Json file as a template for request, read the file and pass the string in the “body” of the HTTP request. However, this did not work.

Anyone managed to perform a API POST successfully with similar a request body?

Hi @sajeev

Could you please try it with the following JSON string once?

jsonBody = "{""amount"": 100, ""amountDetails"": {""AmountType"": ""Other""}}"

Hope this helps,
Best Regards.

Already tried this earlier, doesn’t work. Thanks for the suggestion.