We are using DocuSign Rest API from our Pega application. There is a scenario where we have to delete a particular recipient, and the restful service for this functionality is an HTTP DELETE which expects a message body (JSON format).
But Pega has certain limitation in sending message body for HTTP DELETE requests and hence we are now unable to hit the DocuSign Rest API for Delete Recipient.
API for Docusign
Pega provides some workaround in such scenarios where there is a message body required for DELETE operations.
Can you please let me know if DocuSign provides an alternate way to invoke the service without a message body? We want this information to decide if we need to go the Pega way or DocuSign way to fix this issue.
You can delete the recipient by specifying the recipientId in the URL.
See deleteEnvelopeRecipients api
DELETE /v2/accounts/{accId}/envelopes/{envId}/recipients/{recipientId}
The api you are using is deleteListEnvelopeRecipients
Use deleteListEnvelopeRecipients api if you want to delete multiple recipients in a single call. You will have to specify the HTTP body for this call.
Related
We are using the DocuSign SDK (version 3.3.0) and utilizing webhooks to receive the various envelope and recipient events.
In the envelope, I need to retrieve the fields (status_changed_date_time and last_modified_date_time) in the XML message from the DocuSign Connect. But I identified that those fields are not being sent in the XML message.
Is there any way to include those above mentioned fields in the XML message from DocuSign connect?
The XML notification body is what it is. If it doesn't include the data your application needs, then make additional API calls to DocuSign to obtain the data you want. Doing so is a common pattern.
Note: It is important that you respond to DocuSign with a 200 status right away--all your processing should be done asynchronously on a different thread. Don't delay your 200 response.
I am trying to push notifications from DocuSign Connect to our webhook.
Is there any way to provide a header named Appkey and a given value when DocuSign connect pushes notifications to the provided webhook URL?
Our webhook requires a header named AppKey to access it.
Currently, I don't see any such configuration in Docusign Connect UI.
Drew is correct that custom headers can't be supplied at this time.
A possible workaround: you can supply parameters via the URL's query parameters. Eg use URL https://docusign-listener.example.com/?appkey=123
Remember that, thanks to the SSL/TLS protocol, the query parameters are NOT visible to anyone tapping the line since they are only sent after the encrypted channel is set up between the client (DocuSign) and the server (your app).
Also, if you'd like to be able to specify headers for the notification message requests, ask your DocuSign technical contact to add your organization's information to the internal ticket CONNECT-1109. Adding your information will help increase the priority of the enhancement request.
No, DocuSign Connect doesn't support custom headers.
The docusign website allows for me to save a document as a template, but I have not been able to find a way to do this programmatically through the API. Is there a simple way to save a document as a template?
Yes, you can create a Template via the API by issuing this request:
POST /v2/accounts/{accountId}/templates
The API documentation contains details about this operation.
UPDATE
Do I understand correctly that your goal is to create a Template that's based upon an existing DocuSign Document, i.e., to mimic the following functionality in the DocuSign web UI?
If that's the case, then I'm not aware of any single API call that can do this. Instead, I believe you'll need to issue a series of API calls, to retrieve info about the existing Document(s) and then create the new Template using that info:
1) Get information about the existing DocuSign Document (envelope): GET /v2/accounts/{accountId}/envelopes/{envelopeId} (docs)
This operation returns recipient info (including tabs for each recipient) as well as envelope data like email subject, email body, reminders, etc. It also returns a documentsUri property that you can use to get the document(s) that belong to the envelope.
2) Get the list of document(s) that the envelope contains by issuing a GET request to the URI specified by the documentsUri from the prior response. (docs)
This operation returns information about each document in the specified envelope, but does not return document contents.
3) For each document listed in the prior API response, issue a GET request to the URI specified by the uri property for the document. (docs)
4) Finally, create a new Template using the data that you received in response to the previous API requests: POST /v2/accounts/{accountId}/templates (docs)
Note: As a final note -- if you're using one of the DocuSign SDKs, it's possible that there might be a function that you can call to implement this scenario, without having to piece together all of these API calls yourself. I'm not familiar enough with the SDKs to say whether or not they provide this type of functionality, but it'd be worth checking for, if you're using an SDK.
Is it possible to request from the API to resend a webhook?
From here i can see this is possible from the Admin Panel
https://www.docusign.com/blog/dsdev-adding-webhooks-application/
When a webhook request fails, the Failures screen also enables you to
resend the notification. This can be very helpful when debugging your
listener software.
I want to do the same but from the API.
Thanks!
You can use the ConnectEvents Api's.
Specifically the following api's
retryForEnvelope
Republishes Connect information for the specified envelope.
retryForEnvelopes
Republishes Connect information for the specified set of envelopes. The primary use is to republish Connect post failures by including envelope IDs for the envelopes that failed to post in the request. The list of envelope IDs that failed to post correctly can be retrieved by calling to [ML:GetConnectLog] retrieve the failure log.
So I'm using REST API for my DocuSign handling, and I have this snippet that checks every 30 mins the status of each envelope, but I'm having hard time find out if there is a way to trigger response (i.e. email) as soon as someone signs the document?
Yes, the DocuSign REST API includes a webhook facility that you can use. When you call Envelopes:Create, include an eventNotification object. In that object you include an internet-accessible URL.
The DocuSign platform will then make HTTPS POSTS to your URL when there is an interesting status change to your envelope. (You define "interesting" status changes as part of the eventNotification object.)
See the eventNotification section in the docs.