Skip to main content
Newcomer
May 21, 2024
Question

How to replace/correct document after sent using C# SDK EnvelopAPI?

  • May 21, 2024
  • 1 reply
  • 118 views

I cannot find any documentation online for how to “Correct” document after it has been sent.

I have a new document (newer version) and I want to replace/correct the existing document in envelope.

I have tried to use UpdateDocuments, but it is not for envelope already sent.

 

    1 reply

    bin.chenNewcomerAuthor
    Newcomer
    May 21, 2024

    I started with this code below, but soon found out this will not work after envelope has already sent out.

    Document contractPdfDocument = new Document
    {
        DocumentBase64 = contractPdf,               //contract document    
        Name = contractId.ToString() + "_" + versionNumber.ToString() + "_" + DateTime.Now.ToString("ddMMyyyyHHmmss"),
        FileExtension = "pdf",                      //file extension
        DocumentId = contractId.ToString()          //source document id
    };
    var updatedDocumentResult = envelopesApi.UpdateDocuments(
        GetAccountID(), envelopeId, new EnvelopeDefinition() { Documents = new List<Document> { contractPdfDocument } });