While configuring the endpoint that will return the file in the response, configure the response transformation structure to specify which property in the response will contain a file and what name should the file have.
Here is a sample endpoint mapping (focusing on the response transformation):
{
"method": "POST",
"response": {
"transform": {
"CERTIFICATE_FILE-fileName-1": data.certificateNumber,
"CERTIFICATE_FILE-file-1": data.certificateImage
}
}
}
In case the response should contain multiple files, the properties should reflect that like this:
{
"method": "POST",
"response": {
"transform": {
"CERTIFICATE_FILE-fileName-1": data.certificateNumber,
"CERTIFICATE_FILE-file-1": data.certificateImage
"CERTIFICATE_FILE-fileName-2": data.certificateNumber2,
"CERTIFICATE_FILE-file-2": data.certificateImage2
.
.
.
"CERTIFICATE_FILE-fileName-n": response.property or "static_file_name",
"CERTIFICATE_FILE-file-n": response.property
}
}
}