Happy Business Starts Here

Error 'Required MultipartFile parameter 'file' is not present' when requesting invoice files

Highlighted
Honor Student

Error 'Required MultipartFile parameter 'file' is not present' when requesting invoice files

Hi guys, can someone help me please.

I'm trying to retrieve files related to specific invoice (GET):

"https://rest.apisandbox.zuora.com/v1/invoices/[id]/files"

In params I only include "apiaccesskeyid" and "apisecretaccesskey" and no other params, should I include something else? It says nothing in api rest docs about it...

 

I tested in Postman and it's working - it returns a list of related files.

 

But when I call same endpoint from Salesforce apex class it returns Status Code 200 for request, but no files:

{"success" : false,
     "processId" : "2D67A2403C7177A0",
     "reasons" : [ {
         "code" : 50000000,
         "message" : "Required MultipartFile parameter 'file' is not present"
      } ]
}

UPD: when I make callout from Salesforce apex I get response code 200, but body containes error. Looks like Zuora exepts request (doesn't refuse it), but then it fails to retrieve files because of missed param, which I don't know how to specify.

 

Thanks