How to create a template using the DocuSign API call in c#, xml



Need help on how to create a template using docusign api, c#, xml


I'm getting an error message as - '(404) Bad Request'


url = http://ift.tt/1dEnjnn{......}/templates



string requestBody =
"<envelopeDefinition xmlns=\"http://ift.tt/1haqqKN\">" +
"<emailSubject>Please sign this Document</emailSubject>" +
"<status>sent</status>" +
// add document(s)
"<documents>" +
"<document>" +
"<documentId>1</documentId>" +
"<name>document.pdf</name>" +
"</document>" +
"</documents>" +
// add recipient(s)
"<recipients>" +
"<signers>" +
"<signer>" +
"<recipientId>1</recipientId>" +
"<email>ssmith@hotmail.com</email>" +
"<name>Som Smith</name>" +
"<roleName>Signer</roleName>" +
"<tabs>" +
"<signHereTabs>" +
"<signHere>" +
"<xPosition>70</xPosition>" +
"<yPosition>560</yPosition>" +
"<documentId>1</documentId>" +
"<pageNumber>2</pageNumber>" +
"</signHere>" +
"</signHereTabs>" +
"</tabs>" +
"</signer>" +
"</signers>" +
"</recipients>" +
"<envelopeTemplateDefinition>" +
"<name>TestTemplate</name>" +
"<owner>" +
"<email>ssmith@hotmail.com</email>" +
"</owner>" +
"</envelopeTemplateDefinition>" +
"</envelopeDefinition>";


The Response error message i'm getting



<errorDetails xmlns="http://ift.tt/1haqqKN" xmlns:i="http://ift.tt/ra1lAU">errorCode>UNSPECIFIED_ERROR</errorCode><message>There is an error in XML document (1, 2).</message></errorDetails>


Much appreciated


No comments:

Post a Comment