I am trying to void an existing envelope using the updated version of the DocuSign C# Client (DocuSign.eSign).
The envelope is in the Sent status and has not been completed or voided already.
Currently I have following code:
EnvelopesApi envelopesApi = new EnvelopesApi();
Envelope envelope = envelopesApi.GetEnvelope(accountId, envelopeId);
envelope.Status = "voided";
envelope.VoidedReason = "This envelope was voided by " + currentUserName;
// create the recipient view (aka signing URL)
var updateSummary = envelopesApi.Update(accountId, envelopeId, envelope);
return updateSummary;
When this code is called, it fails with an ApiException and the following ErrorContent:
{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. Value for 'purgeState' must be 'documents_queued' or 'documents_and_metadata_queued'."
}
The message is "The request contained at least one invalid parameter. Value for 'purgeState' must be 'documents_queued' or 'documents_and_metadata_queued'", but according to the docs, I shouldn't need to supply those parameter if the status is "voided" and I have a voided reason.
Is there a way to void an envelope using the DocuSign C# Client?