docusign / docusign-esign-java-client

The Official Docusign Java Client Library used to interact with the eSignature REST API. Send, sign, and approve documents using this client.
https://javadoc.io/doc/com.docusign/docusign-esign-java/latest/index.html
MIT License
104 stars 95 forks source link

Envelopes API - updateDocument does not have any way to pass the body of the new document #213

Open nevster opened 2 years ago

nevster commented 2 years ago

https://github.com/docusign/docusign-esign-java-client/blob/9e01628d0aa825fee2bfaba62b50474b0bd8cb8b/src/main/java/com/docusign/esign/api/EnvelopesApi.java#L6705

According to the rest api, the bytes should be submitted as the body of the PUT: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeattachments/create/

Looking at the code, there's no way to pass the bytes in the method parameters and it's just set to "{}". So when you call it, you get the error: Error while requesting server, received a non successful HTTP code 400 with response Body: '{"errorCode":"FORMAT_CONVERSION_ERROR","message":"The data could not be converted. The document is empty."}'

LarryKlugerDS commented 2 years ago

Thank you for the bug report. I've filed internal bug DCM-6703. Please ask your DocuSign support contact to add your company's information to the bug report. I don't have a schedule for a fix. In the meantime, as a workaround, you may wish to call the API directly for this API method.