docusign-esign-node-client icon indicating copy to clipboard operation
docusign-esign-node-client copied to clipboard

How to set document to updateDocument?

Open Lorenzras opened this issue 3 years ago • 3 comments

What is the correct way to set base64 string in updateDocument?

From the documentation it only accepts 3 required parameters, (account id, envelope id, document id)

Here is my code.

import {EnvelopesApi} from 'docusign-esign';
import {apiClient} from '../../config';

export const updateDocument = async (
  accountId: string,
  envelopeId: string,
  documentId = '1',
  document: string, // base64
) => {
  const envApi = new EnvelopesApi(apiClient);

  return await envApi.updateDocument(
    accountId,
    envelopeId,
    documentId,
  );
};

Lorenzras avatar Jul 04 '22 04:07 Lorenzras

Based on this, the body would need to be a binary octet stream of the file

karankaushik95 avatar Jul 04 '22 05:07 karankaushik95

Based on this, the body would need to be a binary octet stream of the file

Thanks.

Still, I don't know where to set it using nodeJS sdk.

https://docusign.github.io/docusign-esign-node-client/module-api_EnvelopesApi.html#updateDocument

Lorenzras avatar Jul 04 '22 05:07 Lorenzras

Hello @Lorenzras could I direct you to the updateEnvelopes method. You will find a the envelopeDefinition parameter available to you to upload documents. https://docusign.github.io/docusign-esign-node-client/module-api_EnvelopesApi.html#updateDocuments

acooper4960 avatar Jul 14 '22 21:07 acooper4960

Hello @Lorenzras could I direct you to the updateEnvelopes method. You will find a the envelopeDefinition parameter available to you to upload documents. https://docusign.github.io/docusign-esign-node-client/module-api_EnvelopesApi.html#updateDocuments

Thanks! I'll take note of this. Turned out that there are frequent updates needed, so we just generate the documents on our server until finalized for docusigning.

Lorenzras avatar Oct 30 '22 16:10 Lorenzras