Adding Electronic Seal through api gives error - docusignapi

I have added seal recipients in envelope. I have got electronic seals enabled on the account. I have added only a seal recipient and the Demo Seal guid in the recipientSignatureProvider.
<?xml version="1.0" encoding="UTF-8"?>
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailSubject>Email Subject.</emailSubject>
<status>sent</status>
<documents>
<document>
<name>1</name>
<documentId>1</documentId>
</document>
</documents>
<recipients>
<seals>
<sealSign>
<recipientId>1</recipientId>
<routingOrder>1</routingOrder>
<recipientSignatureProviders>
<recipientSignatureProvider>
<sealName>a6176xxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</sealName>
</recipientSignatureProvider>
</recipientSignatureProviders>
</sealSign>
</seals>
</recipients>
</envelopeDefinition>
I get following error in the envelope audit.
Protect and Sign Demo (Client ID: dde5xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) replied: Error - ILLEGAL_DATA - Http error connecting to https://demo.docusign.net/restapi/vdev/signature/signhashsessioninfo Code 400 {"errorCode":"UNSPECIFIED_ERROR","message":"An Error Occurred."}
What am I doing wrong ?
The envelope status stays as "sent".
My expectation is it should be "complete" and seal applied in the document.

The vdev path is limited to DocuSign applications. You should be using .../v2.1
Also, you need the seal functionality to be enabled for your demo sandbox account. Contact go-live#docusign.com (include your account id) to have this done.

Related

DocuSign API Explorer - Creating a draft envelope with a document and recipient

I am trying to create a a draft envelope with a document and a recipient through DocuSign API Explorer using my DocuSign Developer Sandbox account.
Despite a SUCCESS response, the actual envelope contains neither the document or the recipient I included in the Request. Where am I going wrong?
Here is the Request XML:
<envelopeDefinition
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">
<documents>
<documentBase64><Base64BytesHere></documentBase64>
</documents>
<emailSubject>Test from API Explorer</emailSubject>
<recipients>
<signers>
<email>nobody#nobody.com</email>
<name>John Smith</name>
</signers>
</recipients>
<status>created</status>
</envelopeDefinition>
Here is the empty envelope screenshot
You're missing some parameters for the document and recipient objects, for instance you need to add a documentId and documentName for the document in addition to the document bytes.
Here's what a full XML request should look like:
<envelopeDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
<emailSubject>Test Subject</emailSubject>
<documents>
<document>
<name>document.pdf</name>
<documentId>1</documentId>
<documentBase64><Base64BytesHere></documentBase64>
</document>
</documents>
<recipients>
<signers>
<tabs>
<signHereTabs>
<signHereTab>
<pageNumber>1</pageNumber>
<documentId>1</documentId>
<xPosition>100</xPosition>
<yPosition>100</yPosition>
</signHereTab>
</signHereTabs>
</tabs>
<routingOrder>1</routingOrder>
<recipientId>1</recipientId>
<name>My Name</name>
<email>email#email.com</email>
</signers>
</recipients>
<status>created</status>
</envelopeDefinition>

Json alternative to Docusign connect XML

We are trying to determine if there is a way to obtain the timestamp of when a Carbon Copy, "Envelope Signed" or "Envelope Completed" email is sent with a json api instead of xml.
We have tested using Docusign connect by selecting the "Envelope Signed" and "Envelope Completed" events under "Send information on these envelope events" in the Docusign console.
Also, when the document is signed, we receive the expected post request to our connect endpoint which includes the following (private info removed) and are wondering if the timestamp in the "Sent" tag means that the carbon copy email was actually sent at that time and therefore we can use it for auditing purposes.
<RecipientStatus>
<Type>CarbonCopy</Type>
<Email>bob#example.com</Email>
<UserName>Bob</UserName>
<RoutingOrder>2</RoutingOrder>
<Sent>2015-07-08T16:14:18.88</Sent>
<DeclineReason xsi:nil="true" />
<Status>Completed</Status>
<RecipientIPAddress />
<CustomFields />
<AccountStatus>Active</AccountStatus>
<RecipientId>dc9521c4-b11d-426c-b409-326b985e823b</RecipientId>
</RecipientStatus>
thanks
PR

DocuSign transformPdfFields

I have a pdf that I need to create and attach the pdf in the envelope that has custom fields in it. These fields are DocuSign fields names. But transformPdfFields is not working. All I get is a document with no fields.
Please see code.
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<status>sent</status>
<emailSubject>DocuSign API - Embedded Signing example</emailSubject>
<documents>
<document>
<documentId>1</documentId>
<name>C:\Users\Desktop\Test Projects\DocuSign\Test.pdf</name>
<transformPdfFields>true</transformPdfFields>
</document>
</documents>
<recipients>
<signers>
<signer>
<recipientId>1</recipientId>
<email>me#me.com</email>
<name>Mike Rosey</name>
<defaultRecipient>true</defaultRecipient>
</signer>
</signers>
</recipients>

What does the following Azure Notification Hub REST response mean: 'The specified resource description is invalid.'?

I am trying to register my Windows Universal App for notifications from the Azure Notification Hub through our Java backend service.
I debugged the app from Visual Studio, while it was running on my Windows Phone device. The app could properly get a ChannelUri and passed it along to our Java backend. (I ran the backend on my local PC.)
The Java backend generated the following request for a template registration and tried to send it to the Azure REST Api:
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<WindowsTemplateRegistrationDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Tags>Windows,10204394042027091,broadcast</Tags>
<ChannelUri>https://db3.notify.windows.com/?token=AwYAAABXiUp%2bD8v1%2bVfWbWLr3FZ3rQcJtPkUgFwaiGZus4GbtkM8zbZ6uQt1NKXpC4FOtYWHDxXvBb3FkoefaozvCYTFiDjhdb3jDuORUDY8zBlkGw1MxY0QjrH7G0fFbW0RXgo%3d</ChannelUri>
<BodyTemplate><![CDATA[{...}]]></BodyTemplate>
<WNSHeaders>
<WNSHeader>
<Header>X-WNS-Type</Header>
<Value>wns/raw</Value>
</WNSHeader>
</WNSHeaders>
<TemplateName>geoinfo</TemplateName>
</WindowsTemplateRegistrationDescription>
</content>
</entry>
In my opinion this is according to the MS Azure REST reference: http://msdn.microsoft.com/en-us/library/azure/dn223265.aspx
Still, the response contains the following error:
<Error><Code>400</Code><Detail>The specified resource description is invalid..TrackingId:4ffaabcc-c7f8-4a6c-ab2f-4f65e94427df_G16,TimeStamp:10/21/2014 9:42:52 PM</Detail></Error>
Any ideas on what Azure's issue is around here?
Try this:
Call Create Registration ID
Store retrieved id in your DB
Call Create or Update Registration to create registration
Each time you want to update that registration in future (refresh channel, modify tags...) you just call Create or Update Registration again
I've just successfully played with payload bellow:
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text"></title>
<updated>2014-10-21T23:57:08Z</updated>
<content type="application/atom+xml;type=entry;charset=utf-8">
<WindowsTemplateRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
<Tags>t1,t2</Tags>
<ChannelUri>https://db3.notify.windows.com/?token=AwYAAABXiUp%2bD8v1%2bVfWbWLr3FZ3rQcJtPkUgFwaiGZus4GbtkM8zbZ6uQt1NKXpC4FOtYWHDxXvBb3FkoefaozvCYTFiDjhdb3jDuORUDY8zBlkGw1MxY0QjrH7G0fFbW0RXgo%3d</ChannelUri>
<BodyTemplate><![CDATA[<?xml version="1.0" encoding="utf-16"?><root></root>]]></BodyTemplate>
<WnsHeaders>
<WnsHeader>
<Header>X-WNS-Type</Header>
<Value>wns/raw</Value>
</WnsHeader>
</WnsHeaders>
<TemplateName>MyTemplate</TemplateName>
</WindowsTemplateRegistrationDescription>
</content>
</entry>
The error message apparently means that the request is missing required XML elements.
The problem in my case was the capitalization:
Both WNSHeader and WNSHeaders should be written in Pascal case instead: WnsHeader and WnsHeaders.
Unfortunately Microsoft's documentation on the API is misleading regarding this.

DocuSign error: This Account lacks sufficient permissions. In-Session permission required when specifying a captive recipient

When I send a SOAP request to DocuSign it is showing an error: This Account lacks sufficient permissions. In-Session permission required when specifying a captive recipient.
Full response XML is:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
<wsa:MessageID>urn:uuid:9f406870-dc55-441d-b5ff-8317166636b9</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:b572d1a4-b8b5-4254-8f1d-7fd46fb593f1</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-656764ea-c0f0-4074-88b1-dbffae666a83">
<wsu:Created>2013-08-01T18:00:46Z</wsu:Created>
<wsu:Expires>2013-08-01T18:05:46Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>This Account lacks sufficient permissions. In-Session permission required when specifying a captive recipient.</faultstring>
<faultactor>https://www.docusign.net/api/3.0/dsapi.asmx</faultactor>
<detail>
<ErrorCode xmlns="missing in Web.Config">111</ErrorCode>
<ErrorReason xmlns="missing in Web.Config">This Account lacks sufficient permissions.</ErrorReason>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
A request we send is:
User-Agent: SFDC-Callout/28.0
X-DocuSign-Authentication: <DocuSignCredentials><Username>There is a user name</Username><Password>There is a password</Password><IntegratorKey>There is an integrator key</IntegratorKey></DocuSignCredentials>
Accept: text/xml
Content-Type: text/xml
charset: UTF-8
SOAPAction: "http://www.docusign.net/API/3.0/CreateAndSendEnvelope"
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header />
<env:Body>
<CreateAndSendEnvelope xmlns="http://www.docusign.net/API/3.0">
<Envelope>
<AccountId>There is an accountId</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>Bayfront - Smoke free environment form - Antony.pdf</Name>
<PDFBytes>There is an encoded body</PDFBytes>
<FileExtension>pdf</FileExtension>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName>mikhail</UserName>
<Email>mikhail.ivanov#targetrecruit.net</Email>
<Type>Signer</Type>
<AccessCode xsi:nil="true" />
<RequireIDLookup>false</RequireIDLookup>
<CaptiveInfo>
<ClientUserId>1</ClientUserId>
</CaptiveInfo>
<RoutingOrder>1</RoutingOrder>
<RoleName>Signer</RoleName>
</Recipient>
</Recipients>
<Tabs />
<Subject>Please Sign this Document: </Subject>
<EmailBlurb>This is my new eSignature service, it allows me to get your signoff without having to fax, scan, retype, refile and wait forever</EmailBlurb>
<CustomFields>
<CustomField>
<Name>DSFSSourceObjectId</Name>
<Show>false</Show>
<Required>false</Required>
<Value>Credential ID</Value>
</CustomField>
</CustomFields>
</Envelope>
</CreateAndSendEnvelope>
</env:Body>
</env:Envelope>
What can be the reason? How should I fix it?
DocuSign developer sandboxes have this enabled by default so you can test Embedded Signing (and sending, etc) before going live.
In terms of live production accounts- not all accounts have embedding enabled so ensure you have purchased an account that has it. If you are getting this error in production you most likely need to upgrade.

Resources