Hi Chandana,
Most APIs use Base64 as the encoding/decoding (check the documentation).
https://docs.mendix.com/appstore/modules/community-commons-function-library/#39-stringutils
The JA Base64Encode will transform your binary (as input) to an encoded String, to be used in your form.
If still stuck, leave the API description in the comment, so I can guide you more.
Go Make It.
System.FileDocument is already a BLOB which means its already a Binary.
I would suggest to create a Java action to call this webserivce and implement below logic to submit both form and file.
https://www.baeldung.com/httpclient-multipart-upload
If it is only file, use