Skip to content

Commit 66e413b

Browse files
committed
Added eg003
1 parent 49ec8c0 commit 66e413b

File tree

3 files changed

+46
-14
lines changed

3 files changed

+46
-14
lines changed

Examples/eg001EmbeddedSigning.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ if [[ $SHELL != *"bash"* ]]; then
55
echo "PROBLEM: Run these scripts from within the bash shell."
66
fi
77

8-
source ../Env.txt
9-
108
#
119
# Step 1. Create the envelope.
1210
# The signer recipient includes a clientUserId setting

Examples/eg002SigningViaEmail.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ if [[ $SHELL != *"bash"* ]]; then
55
echo "PROBLEM: Run these scripts from within the bash shell."
66
fi
77

8-
source ../Env.txt
9-
108
# document 1 (html) has tag **signature_1**
119
# document 2 (docx) has tag /sn1/
1210
# document 3 (pdf) has tag /sn1/
@@ -109,15 +107,6 @@ curl --header "Authorization: Bearer {ACCESS_TOKEN}" \
109107
--data-binary @${request_data} \
110108
--request POST https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/envelopes
111109

112-
113-
#echo ""
114-
#echo ""
115-
#echo "Files"
116-
#echo "$request_data"
117-
#echo "$doc1_base64"
118-
#echo "$doc2_base64"
119-
#echo "$doc3_base64"
120-
121110
# cleanup
122111
rm "$request_data"
123112
rm "$doc1_base64"
@@ -129,4 +118,3 @@ echo ""
129118
echo "Done."
130119
echo ""
131120

132-

Examples/eg003ListEnvelopes.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# List envelopes and their status
2+
# List changes for the last 10 days
3+
4+
# Check that we're in a bash shell
5+
if [[ $SHELL != *"bash"* ]]; then
6+
echo "PROBLEM: Run these scripts from within the bash shell."
7+
fi
8+
9+
# temp files:
10+
request_data=$(mktemp /tmp/request.XXXXXX)
11+
12+
echo ""
13+
echo "Sending the list envelope status request to DocuSign..."
14+
echo "Results:"
15+
echo ""
16+
17+
# Calculate the from_date query parameter and use the
18+
# ISO 8601 format.
19+
# Example:
20+
# from_date=2018-09-30T07:43:12+03:00
21+
# For a Mac, 10 days in the past:
22+
from_date=`date -v -10d '+%Y-%m-%dT%H:%M:%S%z'`
23+
# Other Linux systems may be different
24+
25+
curl --header "Authorization: Bearer {ACCESS_TOKEN}" \
26+
--header "Content-Type: application/json" \
27+
--get \
28+
--data-urlencode 'from_date=${from_date}' \
29+
--request GET https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/envelopes
30+
31+
32+
# $ curl -X PUT -G 'http://example.com/resource/1' --data-urlencode 'param1=value 1' --data-urlencode param2=value2
33+
34+
35+
36+
# cleanup
37+
rm "$request_data"
38+
rm "$doc1_base64"
39+
rm "$doc2_base64"
40+
rm "$doc3_base64"
41+
42+
echo ""
43+
echo ""
44+
echo "Done."
45+
echo ""
46+

0 commit comments

Comments
 (0)