Skip to content

How should I use EnvelopesApi.UpdateDocument? #357

@eg-bernardo

Description

@eg-bernardo

I'm talking about this method: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopedocuments/update/
There it says:

The bytes of the document make up the body of the request

but the signature of the method is:

public EnvelopeDocument UpdateDocument(string accountId, string envelopeId, string documentId)

Calling that method as is, returns:

{
  "errorCode": "INVALID_REQUEST_PARAMETER",
  "message": "The request contained at least one invalid parameter. A filename was not found in the Content-Disposition header ('filename=\"filename.ext\""
}

I've also tried to provide the file by replacing the RestClient, and adding this to the IRestRequest using:

req.AddHeader("Content-Disposition", "filename=\"my_file.docx\"");
req.AddFile("my_file.docx", pathToFile, "application/vnd.openxmlformats-officedocument.wordprocessingml.document");

but then I get:

{
  "errorCode": "FORMAT_CONVERSION_ERROR",
  "message": "The data could not be converted."
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions