File tree Expand file tree Collapse file tree 3 files changed +46
-4
lines changed
Expand file tree Collapse file tree 3 files changed +46
-4
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,6 @@ echo ""
8787# pull out the envelopeId
8888ENVELOPE_ID=` cat $response | grep envelopeId | sed ' s/.*\"envelopeId\": \"//' | sed ' s/\",//' | tr -d ' \r' `
8989echo " EnvelopeId: ${ENVELOPE_ID} "
90- # Save the envelope id for use by other scripts
91- echo ${ENVELOPE_ID} > ../ENVELOPE_ID
9290
9391# Step 2. Create a recipient view (a signing ceremony view)
9492# that the signer will directly open in their browser to sign.
Original file line number Diff line number Diff line change 1616# After it is signed, a copy is sent to the cc person.
1717
1818# temp files:
19- request_data=$( mktemp /tmp/request.XXXXXX)
19+ request_data=$( mktemp /tmp/request-eg-002.XXXXXX)
20+ response=$( mktemp /tmp/response-eg-002.XXXXXX)
2021doc1_base64=$( mktemp /tmp/eg-002-doc1.XXXXXX)
2122doc2_base64=$( mktemp /tmp/eg-002-doc2.XXXXXX)
2223doc3_base64=$( mktemp /tmp/eg-002-doc3.XXXXXX)
@@ -105,10 +106,20 @@ printf \
105106curl --header " Authorization: Bearer {ACCESS_TOKEN}" \
106107 --header " Content-Type: application/json" \
107108 --data-binary @${request_data} \
108- --request POST https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/envelopes
109+ --request POST https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/envelopes \
110+ --output $response
111+
112+ echo " "
113+ cat $response
114+
115+ # pull out the envelopeId
116+ ENVELOPE_ID=` cat $response | grep envelopeId | sed ' s/.*\"envelopeId\": \"//' | sed ' s/\",//' | tr -d ' \r' `
117+ # Save the envelope id for use by other scripts
118+ echo ${ENVELOPE_ID} > ../ENVELOPE_ID
109119
110120# cleanup
111121rm " $request_data "
122+ rm " $response "
112123rm " $doc1_base64 "
113124rm " $doc2_base64 "
114125rm " $doc3_base64 "
Original file line number Diff line number Diff line change 1+ # Get the envelope's details
2+ # This script uses the envelope_id stored in ../ENVELOPE_ID.
3+ # The ENVELOPE_ID file is created by example eg002SigningViaEmail.sh or
4+ # can be manually created.
5+
6+
7+ # Check that we're in a bash shell
8+ if [[ $SHELL != * " bash" * ]]; then
9+ echo " PROBLEM: Run these scripts from within the bash shell."
10+ fi
11+
12+ # Check that we have an envelope id
13+ if [ ! -f ../ENVELOPE_ID ]; then
14+ echo " An envelope id is needed. Execute script eg002SigningViaEmail.sh"
15+ echo " "
16+ exit -1
17+ fi
18+ envelope_id=` cat ../ENVELOPE_ID`
19+
20+ echo " "
21+ echo " Sending the Envelopes::get request to DocuSign..."
22+ echo " Results:"
23+ echo " "
24+
25+ curl --header " Authorization: Bearer {ACCESS_TOKEN}" \
26+ --header " Content-Type: application/json" \
27+ --request GET https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/envelopes/${envelope_id}
28+
29+ echo " "
30+ echo " "
31+ echo " Done."
32+ echo " "
33+
You can’t perform that action at this time.
0 commit comments