Unable to call API - Invalid field type in multipart/form-data request

Retool Support just pointed me out to this related thread.

I just followed same idea and built the request body from scratch in a code node.

return `
--__________boundary__________
Content-Disposition: related; name="input"
Content-Type: application/json

{"notes": "Sample Notes 5"}
--__________boundary__________
Content-Disposition: related; name="evidence-file"; filename="Testing document.pdf"
Content-Type: application/pdf
Content-Transfer-Encoding: base64

${jsGenerateFile.data?.[0]?.data}
--__________boundary__________--`

Then on the actual dedicated Paypal resource node:

And I finally received a successful response.

1 Like