How to convert JSON Format REST API Payload (Request Body) into Groovy format for the below Payload
Summary:
The below Payload is working fine with the POSTMAN (The attachment element with multiple IDs with comma separated values in the Body Request)
{"to" : "to_email@email.com",
"cc" : "cc_email@email.com",
"subject" : "TEST OIC Email",
"body" : "TEST BODY",
"attachments" : ["DB3385C3B4B8B3C1B18A2A22D674F6E6A8F2","D6CF25B2101BB20BFD32AD7E9283D8A513BCDE"],
"additionInfo":
{
"opportunityNumber": "32110",
"idPDF": "2023-0000000235541-PdF-P2R1",
"template": "test_template",
"type": "abcdef"
}
}
But when we create the corresponding REST Webservice in Application Composer, provide the Sample Request body code as above, and convert the sample code, it does not work. The attachment element with multiple IDs with comma-separated values does not work. Please suggest how to use the attachment element with comma-separated values in Groovy format. We have tried the below two Groovy formats, and both are not working.