Skip to content

Commit 9130d7c

Browse files
committed
Updating to Rest V2.1 + IDV
1 parent e50ac24 commit 9130d7c

20 files changed

+491
-34
lines changed

README.md

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,66 @@
55
This repo includes bash scripts that use curl to demonstrate:
66

77
1. **Embedded Signing Ceremony.**
8-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg001EmbeddedSigning.sh)
8+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg001EmbeddedSigning.sh)
99
This example sends an envelope, and then uses an embedded signing ceremony for the first signer.
1010
With embedded signing, the DocuSign signing ceremony is initiated from your website.
1111
1. **Send an envelope with a remote (email) signer and cc recipient.**
12-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg002SigningViaEmail.sh)
12+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg002SigningViaEmail.sh)
1313
The envelope includes a pdf, Word, and HTML document.
1414
Anchor text ([AutoPlace](https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience)) is used to position the signing fields in the documents.
1515
1. **List envelopes in the user's account.**
16-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg003ListEnvelopes.sh)
16+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg003ListEnvelopes.sh)
1717
1. **Get an envelope's basic information.**
18-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg004EnvelopeInfo.sh)
18+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg004EnvelopeInfo.sh)
1919
The example lists the basic information about an envelope, including its overall status.
2020
1. **List an envelope's recipients**
21-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg005EnvelopeRecipients.sh)
21+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg005EnvelopeRecipients.sh)
2222
Includes current recipient status.
2323
1. **List an envelope's documents.**
24-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg006EnvelopeDocs.sh)
24+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg006EnvelopeDocs.sh)
2525
1. **Download an envelope's documents.**
26-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg007EnvelopeGetDoc.sh)
26+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg007EnvelopeGetDoc.sh)
2727
The example can download individual
2828
documents, the documents concatenated together, or a zip file of the documents.
2929
1. **Programmatically create a template.**
30-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg008CreateTemplate.sh)
30+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg008CreateTemplate.sh)
3131
1. **Send an envelope using a template.**
32-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg009UseTemplate.sh)
32+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg009UseTemplate.sh)
3333
1. **Send an envelope and upload its documents with multipart binary transfer.**
34-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg010SendBinaryDocs.sh)
34+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg010SendBinaryDocs.sh)
3535
Binary transfer is 33% more efficient than using Base64 encoding.
3636
1. **Embedded sending.**
37-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg011EmbeddedSending.sh)
37+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg011EmbeddedSending.sh)
3838
Embeds the DocuSign web tool (NDSE) in your web app to finalize or update
3939
the envelope and documents before they are sent.
4040
1. **Embedded DocuSign web tool (NDSE).**
41-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg012EmbeddedConsole.sh)
41+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg012EmbeddedConsole.sh)
4242
1. **Embedded Signing Ceremony from a template with an added document.**
43-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg013AddDocToTemplate.sh)
43+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg013AddDocToTemplate.sh)
4444
This example sends an envelope based on a template.
4545
In addition to the template's document(s), the example adds an
4646
additional document to the envelope by using the
4747
[Composite Templates](https://developers.docusign.com/esign-rest-api/guides/features/templates#composite-templates)
4848
feature.
49-
1. **Payments example: an order form, with online payment by credit card.**
50-
[Source.](https://github.com/docusign/eg-03-curl/blob/master/examples/eg014CollectPayment.sh)
49+
1. **Get the envelope tab data.** (Coming Soon...)
50+
1. **Set envelope tab values.** (Coming Soon...)
51+
1. **Set template tab values.** (Coming Soon...)
52+
1. **Get the envelope custom field data (metadata).** (Coming Soon...)
53+
1. **Send an envelope with a remote (email) signer using Access Code authentication.**
54+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg019SigningViaEmailWithAccessCode.sh)
55+
This example sends an envelope using remote (email) signing requiring the recipient to enter an access code.
56+
1. **Send an envelope with a remote (email) signer using SMS authentication.**
57+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg020SigningViaEmailWithSmsAuthentication.sh)
58+
This example sends an envelope using remote (email) signing requiring the recipient to supply a verification code sent to them via SMS.
59+
1. **Send an envelope with a remote (email) signer using Phone authentication.**
60+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg021SigningViaEmailWithPhoneAuthentication.sh)
61+
This example sends an envelope using remote (email) signing requiring the recipient to supply a verification code sent to them via a phone call.
62+
1. **Send an envelope with a remote (email) signer using Knowledge-Based authentication.**
63+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg022SigningViaEmailWithKnoweldgeBasedAuthentication.sh)
64+
This example sends an envelope using remote (email) signing requiring the recipient to validate their identity via Knowledge-Based authentication.
65+
1. **Send an envelope with a remote (email) signer using Identity Verification.**
66+
[Source.](https://github.com/docusign/eg-03-curl/blob/apiv2/examples/eg023SigningViaEmailWithIDVAuthentication.sh)
67+
This example sends an envelope using remote (email) signing requiring the recipient to validate their identity via a government issued ID.
5168

5269
## Installation
5370

@@ -76,7 +93,7 @@ file:
7693
### Payments code example
7794
To use the payments code example, first create a test payments gatway in your account.
7895
Follow the instructions in the
79-
[PAYMENTS_INSTALLATION.md](https://github.com/docusign/eg-03-curl/blob/master/PAYMENTS_INSTALLATION.md)
96+
[PAYMENTS_INSTALLATION.md](https://github.com/docusign/eg-03-curl/blob/apiv2/PAYMENTS_INSTALLATION.md)
8097
file.
8198

8299
Then add the payment gateway id to the code example file.
@@ -107,6 +124,16 @@ bash eg010SendBinaryDocs.sh
107124
bash eg011EmbeddedSending.sh
108125
bash eg012EmbeddedConsole.sh
109126
bash eg013AddDocToTemplate.sh
127+
base eg014Payments.sh (Coming Soon...)
128+
bash eg015GetEnvelopeTabData.sh (Coming Soon...)
129+
bash eg016SetEnvelopeTabValues.sh (Coming Soon...)
130+
bash eg017SetTemplateTabValues.sh (Coming Soon...)
131+
bash eg018GetEnvelopeCustomFieldData.sh (Coming Soon...)
132+
bash eg019SigningViaEmailWithAccessCode.sh
133+
bash eg020SigningViaEmailWithSmsAuthentication.sh
134+
bash eg021SigningViaEmailWithPhoneAuthentication.sh
135+
bash eg022SigningViaEmailWithKnoweldgeBasedAuthentication.sh
136+
bash eg023SigningViaEmailWithIDVAuthentication.sh
110137
111138
# Note: to use example 14 you must also configure a
112139
# payment gateway for your account.

examples/eg001EmbeddedSigning.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ printf \
8787
curl --header "Authorization: Bearer ${access_token}" \
8888
--header "Content-Type: application/json" \
8989
--data-binary @${request_data} \
90-
--request POST ${base_path}/v2/accounts/${account_id}/envelopes \
90+
--request POST ${base_path}/v2.1/accounts/${account_id}/envelopes \
9191
--output ${response}
9292

9393
echo ""
@@ -119,7 +119,7 @@ curl --header "Authorization: Bearer ${access_token}" \
119119
"userName": "{USER_FULLNAME}",
120120
"clientUserId": 1000,
121121
}' \
122-
--request POST ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/views/recipient \
122+
--request POST ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/views/recipient \
123123
--output ${response}
124124

125125
echo ""

examples/eg002SigningViaEmail.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ printf \
116116
curl --header "Authorization: Bearer ${access_token}" \
117117
--header "Content-Type: application/json" \
118118
--data-binary @${request_data} \
119-
--request POST ${base_path}/v2/accounts/${account_id}/envelopes \
119+
--request POST ${base_path}/v2.1/accounts/${account_id}/envelopes \
120120
--output $response
121121

122122
echo ""

examples/eg003ListEnvelopes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ curl --header "Authorization: Bearer ${access_token}" \
3838
--header "Content-Type: application/json" \
3939
--get \
4040
--data-urlencode "from_date=${from_date}" \
41-
--request GET ${base_path}/v2/accounts/${account_id}/envelopes
41+
--request GET ${base_path}/v2.1/accounts/${account_id}/envelopes
4242
# ***DS.snippet.0.end
4343

4444
echo ""

examples/eg004EnvelopeInfo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ echo ""
3535
# ***DS.snippet.0.start
3636
curl --header "Authorization: Bearer ${access_token}" \
3737
--header "Content-Type: application/json" \
38-
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}
38+
--request GET ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}
3939
# ***DS.snippet.0.end
4040

4141
echo ""

examples/eg005EnvelopeRecipients.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ echo ""
3535
# ***DS.snippet.0.start
3636
curl --header "Authorization: Bearer ${access_token}" \
3737
--header "Content-Type: application/json" \
38-
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/recipients
38+
--request GET ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/recipients
3939
# ***DS.snippet.0.end
4040

4141
echo ""

examples/eg006EnvelopeDocs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ echo ""
3535
# ***DS.snippet.0.start
3636
curl --header "Authorization: Bearer ${access_token}" \
3737
--header "Content-Type: application/json" \
38-
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/documents
38+
--request GET ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/documents
3939
# ***DS.snippet.0.end
4040

4141
echo ""

examples/eg007EnvelopeGetDoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ echo ""
7272
# ***DS.snippet.0.start
7373
curl --header "Authorization: Bearer ${access_token}" \
7474
--header "Content-Type: application/json" \
75-
--request GET ${base_path}/v2/accounts/${account_id}/envelopes/${envelope_id}/documents/${doc_choice} \
75+
--request GET ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/documents/${doc_choice} \
7676
--output ${output_file}${output_file_extension}
7777
# ***DS.snippet.0.end
7878

examples/eg008CreateTemplate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ curl --header "Authorization: Bearer ${access_token}" \
2828
--header "Content-Type: application/json" \
2929
--get \
3030
--data-urlencode "search_text=${template_name}" \
31-
--request GET ${base_path}/v2/accounts/${account_id}/templates \
31+
--request GET ${base_path}/v2.1/accounts/${account_id}/templates \
3232
--output $response
3333

3434
# pull out the templateId if it was returned
@@ -184,7 +184,7 @@ printf \
184184
curl --header "Authorization: Bearer ${access_token}" \
185185
--header "Content-Type: application/json" \
186186
--data-binary @${request_data} \
187-
--request POST ${base_path}/v2/accounts/${account_id}/templates \
187+
--request POST ${base_path}/v2.1/accounts/${account_id}/templates \
188188
--output $response
189189

190190
echo ""

examples/eg009UseTemplate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ curl --header "Authorization: Bearer ${access_token}" \
5252
],
5353
\"status\": \"sent\"
5454
}" \
55-
--request POST ${base_path}/v2/accounts/${account_id}/envelopes \
55+
--request POST ${base_path}/v2.1/accounts/${account_id}/envelopes \
5656
--output ${response}
5757
# ***DS.snippet.0.end
5858

0 commit comments

Comments
 (0)