Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to post binary Attachment in Multi-part/form data via rest API

Ashuthosh_s_p
Tera Contributor

I have a API where its a Multipart /form data type, in this I need to attach the attachment from the sys_attachment  table to the third party service. Below I have shared the sample request body in JSON how it is done. Can anyone give me the code to include the body and file and send it Via rest API.

"documentFormat": "PDF",
"documentType": "PROOF OF ID",
"documentName": "AAA_BBB_DDD.pdf",
"documentStatus": "ACCEPTED",
"sourceApplication": "App1",
"sourceType": "API",
"country": "INDIA",
"brand": "SUZUKI"

"file": binary (File)

 

 

0 REPLIES 0