I'm building an app that creates DocuSign envelopes, and as part of this I need to add some MS Word (docx) docs to an existing envelope that I've created previously.
I've implemented a number of DocuSign API calls successfully, including the call to create a multi docucment draft envelope from both PDF and Word docs.
However, when I try to add more documents to this envelope, I get a 'FORMAT_CONVERSION_ERROR' error for each Word doc I add. PDF docs can be added successfully.
The API request I'm making is as follows:
Method: PUT
URL: https://demo.docusign.net/restapi/v2/accounts/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/envelopes/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/documents
Request:
Custom Headers
Name
Value
Accept
application/json
Content-Transfer-Encoding
Base64
Content-Type
application/json
X-DocuSign-Authentication
{"SendOnBehalfOf" : "", "Username" : "username_goes_here", "Password":"password_goes_here","IntegratorKey":"integrator_key_goes_here"}
Body:
"documents": [
{
"name": "2016 Audit Engagement Letter - Executive Superannuation Fund",
"documentId": "8",
"fileExtension": "docx",
"documentBase64": "UEsDBB..."
},
{
"name": "2016 Audit Management Letter - Executive Superannuation Fund",
"documentId": "9",
"fileExtension": "docx",
"documentBase64": "UEsDBBQAB..."
},
{
"name": "2016 Audit Representation Letter - Executive Superannuation Fund",
"documentId": "10",
"fileExtension": "docx",
"documentBase64": "UEsDBBQABgA..."
},
{
"name": "2016 Independent Audit Report - Executive Superannuation Fund",
"documentId": "11",
"fileExtension": "docx",
"documentBase64": "UEsDBBQABgAIA..."
},
]
I get a 200 OK back, but with the following errors in the body:
{
"envelopeId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"envelopeDocuments": [
{
"documentId": "8",
"order": "8",
"errorDetails": {
"errorCode": "FORMAT_CONVERSION_ERROR",
"message": "The data could not be converted."
}
},
{
"documentId": "9",
"order": "9",
"errorDetails": {
"errorCode": "FORMAT_CONVERSION_ERROR",
"message": "The data could not be converted."
}
},
{
"documentId": "10",
"order": "10",
"errorDetails": {
"errorCode": "FORMAT_CONVERSION_ERROR",
"message": "The data could not be converted."
}
},
{
"documentId": "11",
"order": "11",
"errorDetails": {
"errorCode": "FORMAT_CONVERSION_ERROR",
"message": "The data could not be converted."
}
}
]
}
The same docs can be uploaded successfully in the original POST request that creates the draft envelope, so I don't think the documents nor the base64 encoding is the issue.
Similarly, if I replace the docs with PDF docs, the request works ok and the PDFs are added to the existing envelope.
Has anyone else seen this? Does DS support adding Word docs to pre-existing draft envelopes?
Cheers, Hayden