docusignapi - how to void an envelope using C# / XML? -
can tell me how prepare code, 400 error:
public string voidenvelope(string envelopeid) { string url = baseurl + "/envelopes/" + envelopeid; string requestbody = "<envelopedefinition xmlns=\"http://www.docusign.com/restapi\">" + "<status>voided</status>" + "<voidedreason>user aborted</voidedreason>" + "</envelopedefinition>"; httpwebrequest request = initializerequest(url, "put", requestbody, email, password); string response = getresponsebody(request); homecoming response; }
when creating envelope doing post
/envelopes
uri outer xml element defined
<envelopedefinition ...
however when modifying existing envelope using put
, outer xml element defined as
<envelope ...
so seek this:
"<envelope>" + "<status>voided</status>" + "<voidedreason>user aborted</voidedreason>" + "</envelope>";
a great resource many people (including myself) forget rest api help page. best way of learning xml request bodies , potential nodes (it's great json!)
https://www.docusign.net/restapi/help
docusignapi
No comments:
Post a Comment