Skip to content

Commit 59a907b

Browse files
committed
Update Examples/eg008CreateTemplate.sh
1 parent 73cae22 commit 59a907b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Examples/eg008CreateTemplate.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
# Send an envelope with three documents
1+
# Create a template. First, the account's templates are listed.
2+
# If one of the templates is named "Example Signer and CC template"
3+
# then the template will not be created.
24
#
35
# Check that we're in a bash shell
46
if [[ $SHELL != *"bash"* ]]; then
57
echo "PROBLEM: Run these scripts from within the bash shell."
68
fi
79

10+
# Step 1. List the account's templates
11+
template_name="Example Signer and CC template"
12+
response=$(mktemp /tmp/response-eg-008.XXXXXX)
13+
curl --header "Authorization: Bearer {ACCESS_TOKEN}" \
14+
--header "Content-Type: application/json" \
15+
--get \
16+
--data-urlencode "search_text=${template_name}" \
17+
--request GET https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/templates
18+
19+
20+
exit 0
21+
822
# document 1 (html) has tag **signature_1**
923
# document 2 (docx) has tag /sn1/
1024
# document 3 (pdf) has tag /sn1/

0 commit comments

Comments
 (0)