Can someone please help me with the Json Request to upload multiple documents in a envelope. I have pasted the request below.
The error that I get is
API call failed, status returned was: 400
Error description:
{ "errorCode": "NO_DOCUMENT_RECEIVED", "message": "The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1 not found in request. 'documentId=' possibly missing from Content-Disposition header."}
--BOUNDARY
Content-Type: application/json
Content-Disposition: form-data
{
"emailSubject" : "This is email subject",
"emailBlurb" : "This is email body",
"recipients" : {
"signers" : [ {
"routingOrder" : "1",
"name" : "name",
"email" : "valid email address",
"recipientId" : "1",
"tabs" : {
"signHereTabs" : [ {
"anchorTab" : {
"anchorString" : "SignHere",
"anchorXOffset" : "1",
"anchorYOffset" : "1",
"anchorIgnoreIfNotPresent" : "true",
"anchorUnits" : "inches"
}
} ]
}
} ]
},
"documents" : [ {
"name" : "document.pdf",
"documentId" : "1"
}, {
"name" : "document2.pdf",
"documentId" : "2"
} ],
"status" : "sent"
}
--BOUNDARY
Content-Disposition: form-data
Content-Type: multipart/mixed; boundary=BBB
--BBB
Content-Type: application/pdf
Content-Disposition: file; filename="document.pdf"; documentid="1"
[B@47df4d31
--BBB
Content-Type: application/pdf
Content-Disposition: file; filename="document2.pdf"; documentid="2"
[B@1544f0d4
--BBB--
--BOUNDARY--