SAP Open Connectors

DocuSign Connector

Authentication 

The DocuSign connector uses three authentication workflows - Oauth2, JWTOauth2 and Oauth2password. You can authenticate a connector instance using the UI or via API calls. For detailed information on how to authenticate an instance, see our related documentation:

All three workflows are discussed in detail further in this article. 

Oauth2

  1. Sign in to https://developers.docusign.com/ to procure the API key and API secret from the administrator dashboard.
  2. You may need to create an app to get the credentials required for authentication. While creating the app, the redirect URI should be https://auth.cloudelements.io/oauth.

You can find more details at How to get an access token - DocuSign.

Required Parameters

To authenticate an instance of the DocuSign connector using Oauth2, you will need the following parameters:

Parameter Name/UI ValueAPI Value/KeyDescription
DocuSign Environmentdocusign.environmentThe environment on which your DocuSign app is configured
Oauth API Keyoauth.api.keyDocuSign Beta Oauth API key
Oauth API Secretoauth.api.secretDocuSign Oauth Secret

Sample Configuration JSON

"configuration": {
    "docusign.environment": "demo",
    "authentication.type": "MyUsername",
    "oauth.api.key": "MyUsername",
    "oauth.api.secret": "MyUsername",
  }

JWTOauth2

To authenticate an instance of the DocuSign connector using JWTOauth2, you will need to sign in to https://developers.docusign.com/ and check for details on https://developers.docusign.com/platform/auth/jwt/jwt-get-token/.

Required Parameters

Parameter Name/UI ValueAPI Value/KeyDescription
JWT Base64 Encoded Keybase64Key.pemJWT Base64 Encoded Key
JWT Issuerjwt.claim.issThe integration key, also known as the App Id, of the application
OAuth API Keyoauth.api.keyDocuSign Beta Oauth API key is also an App ID
JWT Subjectjwt.claim.subThe user Id of the user to be impersonated. For example: https://share.getcloudapp.com/jkuP60LP

Create a JWT Base64 Encoded Key

JWT Base64 Encoded Key is a Base64 encoded private key. Here is how you can get the value:

  1. Create the private key.
    openssl genrsa -des3 -out private.pem 2048;
  2. Create the public key.
    openssl rsa -in private.pem -outform PEM -pubout -out public.pem;
  3. Convert the private key to PKCS8 and DER format (for the Java code base to read).
    openssl pkcs8 -topk8 -inform PEM -outform DER -in private.pem -out private_key_pkcs8.der -nocrypt;
  4. Base64 encode the private key.
    cat private_key_pkcs8.der | base64 > base64Key.pem;
  5. Create a certificate and sign it with the private key.
    openssl req -new -x509 -key private.pem -out cacert.pem -days 1095;
  6. After running the steps above, you must provide an instance as public.pem and base64Key.pem
    Upload the file from the public pem of the Public key in your application as shown here and then use the file from base64Key.pem as jwtBase64EncodedKey.

Note: The JWT Grant flow access tokens expire after one hour, with no refresh token. Once the token expires, you must generate a new JWT and exchange it for a new access token.

Sample Configuration JSON

"configuration": {
    "docusign.environment": "demo",
    "filter.response.nulls": "true",
    "authentication.type": "jwtOauth2",
    "synchronous.bulk.notification": "true",
    "jwt.base64.encoded.key": "xxxxxxxx",
    "jwt.claim.iss": "xxxxxxxxxx",
    "oauth.api.key": "xxxxxxxx",
    "jwt.claim.sub": "xxxxxxxxx"
  }

Oauth2 Password

  1. Sign in to https://developers.docusign.com/ to procure the API key from the administrator dashboard.
  2. You may need to create an app to get the credentials required for authentication. While creating the app, the redirect URI should be https://auth.cloudelements.io/oauth.

You can find more details at Implicit Grant Authentication - DocuSign.

Required Parameters

Parameter Name/UI ValueAPI Value/KeyDescription
Docusign Environmentdocusign.environmentThe environment on which your DocuSign app is configured
OAuth API Keyoauth.api.keyDocuSign Beta Oauth API key
UsernameusernameDocuSign Beta Oauth Username
PasswordpasswordDocuSign Beta Oauth Password

Sample Configuration JSON

"configuration": {
    "docusign.environment": "demo",
    "filter.response.nulls": "true",
    "authentication.type": "oauth2password",
    "synchronous.bulk.notification": "true",
    "username": "xxxxxxxxxx",
    "oauth.api.key": "xxxxxxxx",
    "password": "xxxxxxxxx"
  }

Optional Authentication Parameters

These are the optional parameters you will need, to authenticate an connector instance via any of the methods discussed above.

Parameter NameAPI ValueDescription
Account IDaccountIdAccount ID
Webhook connect IDwebhook.connect.idID used to establish webhook handshakes with the platform and depends on enabling webhooks
Default select fieldsdefault.select.fields.mapGeneric map used to specify default fields for bulk download and GET /all requests. Each key should be the canonical objectName and values may be specified as a comma-delimited string or a list of strings.
Instance Variablesinstance.variablesStates what the instance variables are
Synchronous Bulk Notificationsynchronous.bulk.notificationEnables synchronous bulk callback notification
Filter Null Values from Responsefilter.response.nullsUsed to enable/disable filtering of null values from the responses

Connector Fact Sheet and Reference

Authentication and Configuration Parameters

To see all authentication parameters for the DocuSign connector, follow these steps:

  1. Sign in to SAP Open Connectors and navigate to Connectors.
  2. Hover over the card for , and then click My Resources.
                                                                                                     
  3. In the top navigation toolbar, click Setup.
  4. From the Setup page, you can view a complete list of the connector's authentication and configuration parameters.

Connector Resources

In order to provide users with normalized APIs across Hubs, SAP Open Connectors resources were mapped to the following Vendor resources.

Platform PlaceholderPlatform MethodPlatform ResourceVendor MethodVendor Resource
brandsGET/brandsGET/brands
GET/{id}/brands/{id}GET/{id}/brands/{id}
custom-tabsGET/custom-tabsGET/tab-definitions
GET/{id}/custom-tabs/{id}GET/{id}/tab-definitions/{id}
envelopesGET /envelopesGET/envelopes
GET/{id}/envelopes/{id}GET/{id}/envelopes/{id}
POST /envelopesPOST /envelopes
PATCH /envelopes/{id}PATCH/envelopes/{id}
GET/envelopes/{id}/attachmentsGET /envelopes/{id}/attachments
POST/envelopes/{id}/attachmentsPOST/envelopes/{id}/attachment
PATCH/envelopes/{id}/attachments/{attachmentId}PATCH/envelopes/{id}/attachments/{attachmentId}
DEL/envelopes/{id}/attachments/{attachmentId}DEL/envelopes/{id}/attachments/{attachmentId}
GET/{id}/envelopes/{id}/attachments/{attachmentId}GET/envelopes/{id}/attachments/{attachmentId}
GET/envelopes/{id}/commentsGET/envelopes/{id}/comments/transcript
POST/envelopes/{id}/console-urlPOST/view/console
GET/envelopes/{id}/custom-fieldsGET/envelopes/{id}/custom-fields
POST/envelopes/{id}/custom-fieldsPOST/envelopes/{id}/custom-fields
PATCH/envelopes/{id}/custom-fields/PUT/envelopes/{id}/custom-fields
DEL/envelopes/{id}/custom-fields/{customFieldId}DEL/envelopes/{id}/custom-fields
GET/envelopes/{id}/custom_fieldsGET/envelopes/{id}/custom_fields
GET/envelopes/{id}/definitionsGET/envelopes/{id}/html_definitions
GET/envelopes/{id}/documentsGET/envelopes/{id}/documents
PUT/envelopes/{id}/documentsPUT/envelopes/{id}/documents
GET/envelopes/{id}/documents/{documentId}GET/envelopes/{id}/documents/{documentId}
GET/envelopes/{id}/documents/certificatesGET/envelopes/{id}/documents/certificate
PATCH/envelopes/{id}/documents/{documentId}PUT/envelopes/{id}/documents
DEL/envelopes/{id}/documents/{documentId}DEL/envelopes/{id}/documents
GET/envelopes/{id}/documents/{documentId}/definitionsGET/envelopes/{id}/documents/{documentId}/html_definitions
GET/envelopes/{id}/documents/{documentId}/fieldsGET/envelopes/{id}/documents/{documentId}/fields
POST/envelopes/{id}/documents/{documentId}/fieldsPOST/envelopes/{id}/documents/{documentId}/fields
PATCH/envelopes/{id}/documents/{documentId}/fields/{fieldName}PUT/envelopes/{id}/documents/{documentId}/fields
DEL/envelopes/{id}/documents/{documentId}/fields/{fieldName}DEL/envelopes/{id}/documents/{documentId}/fields
GET/envelopes/{id}/documents/{documentId}/tabsGET/envelopes/{id}/documents/{documentId}/tabs
GET/envelopes/{id}/documents/{documentId}/templatesGET/envelopes/{id}/documents/{documentId}/templates
POST/envelopes/{id}/documents/{documentId}/templatesPOST/envelopes/{id}/documents/{documentId}/templates
DEL/envelopes/{id}/documents/{documentId}/templates/{templateId}DEL/envelopes/{id}/documents/{documentId}/templates/{templateId}
POST/envelopes/{id}/edit-view-urlPOST/envelopes/{id}/views/edit
GET/envelopes/{id}/email-settingsGET/envelopes/{id}/email_settings
POST/envelopes/{id}/email-settingsPOST/envelopes/{id}/email_settings
PUT/envelopes/{id}/email-settingsPUT/envelopes/{id}/email_settings
DEL/envelopes/{id}/email-settingsDEL/envelopes/{id}/email_settings
POST/envelopes/{id}/envelope-correction-urlPOST/envelopes/{id}/views/correct
GET/envelopes/{id}/form-dataGET/envelopes/{id}/form_data
POST/envelopes/{id}/html-previewPOST/envelopes/{envelopeId}/responsive_html_preview
GET/envelopes/{id}/lockGET/envelopes/{id}/lock
POST/envelopes/{id}/lockPOST/envelopes/{id}/lock
PUT/envelopes/{id}/lockPUT/envelopes/{id}/lock
DEL/envelopes/{id}/lockDEL/envelopes/{id}/lock
POST/envelopes/{id}/recipient-viewsPOST/envelopes/{envelopeId}/views/recipient
GET/envelopes/{id}/recipientsGET/envelopes/{id}/recipients
POST/envelopes/{id}/recipientsPOST/envelopes/{id}/recipients
PATCH/envelopes/{id}/recipients/{recipientId}PUT/envelopes/{id}/recipients
PUT/envelopes/{id}/recipients/document-visibilityPUT/envelopes/{envelopeId}/recipients/document_visibility
DEL/envelopes/{id}/recipients/{recipientId}DEL/envelopes/{id}/recipients/{recipientId}
GET/envelopes/{id}/recipients/{recipientId}/document-visibilityGET/envelopes/{id}/recipients/{recipientId}/document_visibility
PUT/envelopes/{id}/recipients/{recipientId}/document-visibilityPUT/envelopes/{envelopeId}/recipients/{recipientId}/document_visibility
GET/envelopes/{id}/recipients/{recipientId}/tabsGET/envelopes/{id}/recipients/{recipientId}/tabs
POST/envelopes/{id}/recipients/{recipientId}/tabsPOST/envelopes/{id}/recipients/{recipientId}/tabs
PATCH/envelopes/{id}/recipients/{recipientId}/tabs/{tabId}DEL/envelopes/{id}/recipients/{recipientsId}/tabs
PUT/envelopes/{id}/recipients/{recipientId}/tabs/{tabId}PUT/envelopes/{id}/recipients/{recipientsId}/tabs
POST/envelopes/{id}/sender-view-urlPOST/envelopes/{id}/views/sender
GET/envelopes/{id}/templatesGET/envelopes/{id}/templates
POST/envelopes/{id}/templatesPOST/envelopes/{id}/templates
groupsGET/groupsGET/groups
GET/groups/{id}/brandsGET/groups/{id}/brands
GET/groups/{id}/usersGET/groups/{id}/users
identity-verificationsGET/identity-verificationsGET/identity_verification
notaryGET/notaryGET/notary
notary-journalsGET/notary-journalsGET/notary/journals
notary-jurisdictionsGET/notary-jurisdictionsGET/notary/jurisdictions
payment-accountsGET/payment-accountsGET/payment_gateway_accounts
responseGET/responseGET/bulk_send_lists
GET/{id}/response/{id}GET/{id}/bulk_send_lists/{id}
POST/responseGET/bulk_send_lists
PATCH/response/{id}GET/bulk_send_lists/{id}
DEL/response
/bulk_send_lists/{id}
sealsGET/sealsGET/seals
signature-providersGET/signature-providersGET/signatureProviders
signing-groupGET/signing-groupsGET/signing_groups
GET/{id}/signing-groups/{id}GET/{id}/signing_groups/{id}
GET/signing-groups/{id}/usersPOST/signing_groups/{id}/users
tab-settingsGET/tab-settingsGET/tab-settings
templatesGET/templatesGET/templates
GET/{id}/templates/{id}GET/{id}/templates/{templateId}
GET/templates/{id}/custom-fieldsGET/templates/{id}/custom_fields
GET/templates/{id}/custom-fieldsGET/templates/{id}/custom_fields
GET/{id}/templates/{id}/documents/{documentId}GET/{id}/templates/{id}/documents/{documentId}
GET/templates/{id}/documents/{documentId}/fieldsGET/templates/{id}/documents/{documentId}/fields
GET/templates/{id}/documents/{documentId}/html-definitionsGET/templates/{id}/documents/{documentId}/html_definitions
GET/templates/{id}/documents/{documentId}/html-previewGET/templates/{id}/documents/{documentId}/responsive_html_preview
GET/templates/{id}/documents/{documentId}/tabsGET/templates/{id}/documents/{documentId}/tabs
GET/templates/{id}/html_definitionsGET/templates/{id}/html_definitions
GET/templates/{id}/recipientsGET/templates/{id}/recipients
GET/templates/{id}/recipients/{recipientId}/document_visibilityGET/templates/{id}/recipients/{recipientId}/document_visibility
GET/templates/{id}/recipients/{recipientId}/tabsGET/templates/{id}/recipients/{recipientId}/tabs
POST/templates/{id}//html-previewPOST/templates/{id}/responsive_html_preview
UsersGET/usersGET/users
POST/usersPOST/users
GET/users/{id}GET/users/{id}
GET/users/{id}/profileGET/users/{id}/profile
GET/users/{id}/profile/imageGET/users/{id}/profile/image
GET/users/{id}/settingsGET/users/{id}/settings
GET/users/{id}/signatureGET/users/{id}/signature
GET/users/{id}/signatures/{signatureId}/{imageType}GET/users/{id}/signatures/{signatureId}/{imageType}
userinfoGET/userinfoGEThttps://account-d.docusign.com/oauth/userinfo

Events and Supported Resources

The DocuSign connector supports events via polling and webhooks. For detailed information about our Events framework and how to configure a connector instance with events, see our documentation:

You can set up polling events for only the /envelopes resource of the DocuSign connector:

The DocuSign connector supports all other events via webhooks.

The optional configurations for events via webhooks are as shown below.

Bulk

Bulk provides an option to upload a large number of resources, such as users, to a service provider all at once. You can use bulk to download a .csv or .json file from a large number of records or upload a .csv or .json file to add multiple records. See Using Bulk for more information on managing bulk.

Note: When there is no native bulk available from the provider, SAP Open Connectors provides a bulk service for uploading and downloading data from the endpoint. DocuSign connector makes use of Bulk V3. For more information, see our Bulk documentation.
  • To make a POST/bulk/query bulkv2 API call with a query, select * from signing-groups and check the results of a bulk job.


  • Retrieve the results of the bulk job in both .csv and  .json format. Notice that in .json the created and modified date/times do not show as expected and have an extra \\ appended for both the fields.

  • This exists only in .json, as the created & modified dates/times show up as expected in csv format.

Bulk Details

Bulk InformationDetails
Bulk TypeSAP Open Connectors Bulk.
Upsert SupportNo
Field Selection SupportYes. You can specify fields within a resource. For example, select name,id from contacts.
Order By SupportNo

Querying

The Open Connectors Query Language ( OCNQL ) provides a standard way to search across all of our connectors. Rather than having users research how to query each resource at a provider, we've normalized your search experience. SAP Open Connectors translates your queries to the API provider's search syntax. OCNQL represents the "where" portion of a typical query that can include many other components like field selection, sorting, and pagination. For more information on querying, see Querying with OCNQL.

To determine whether where clause is supported for an object, you can make an API call to object/{objectName}/metadata while providing the Connector version and check for "filterable"="true".

A few examples for usage of the where clause:

  • /envelopes?where=from_date='2020-07-02T13:41:00Z'
  • /envelopes?where=from_date='2020-12-16T19:20:30.45+01:00' and envelopeId='d3f1a749-37e6-4a09-bc1c-70802a968f81'
  • /envelopes?where=from_date='2000-12-16T19:20:30.45+01:00' and status='sent'

There are several operators that are valid to be used for querying. You can find more details on them here. But each object which has "filterable"="true",  can also tell you what operators can be used for that particular filterable.

Connector Extension

Connector Builder gives you the integration tools to extend the current feature set of any of our connectors by adding a resource or method. If your use case requires a resource our connector doesn’t currently support, you can easily add it in yourself using Connector Builder. DocuSign is an extendable connector and therefore, you can customize it according to your needs. 

For more details, read the Extend Connectors article which gives a description in detail as to how it can be done.

Discovery APIs

Discovery APIs  are usually used in conjunction with a specific authenticated connector instance to:

  • Identify data objects in a connector
  • Identify data objects and their source (the vendor, a common resource, or SAP Open Connectors library)
  • Find metadata, including custom fields, related to an object
  • Retrieve the Open API specifications (API docs) of an object

However, Discovery APIs are not supported by SAP Open Connectors for the DocuSign connector, as there is no support by the vendor for the same. However, we do support the discovery of objects that are part of our implementation.

Connector API Documentation

The base URL for all API requests is https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2.

Provider Documentation