1

I'm attempting to build embedded signing with my integration via REST API. I can successfully create the token with the bare minimum requirements.

{ "userName": "Derrick Test", "email": "email@email.com", "recipientId": "1", "clientUserId": "1", "returnUrl": "http://www.google.com", "authenticationMethod": "email" }

What I would like to enhance is redirect my signers to a specific URL on more than just completion. More specifically I would like to configure a different URL for the events:

cancel decline signing_complete viewing_complete

The REST documentation does not provide a JSON example when utilizing multiple events. Has anyone else been successful with this?

WTP API
  • 546
  • 3
  • 16

1 Answers1

2

With the REST API, you can only supply a single returnUrl, and it will apply for any/all events (i.e., cancel / decline / exception / fax_pending / id_check_failed / session_timeout / signing_complete / ttl_expired / viewing_complete). However, you can achieve the effect of having the user's destination be event-dependent simply by coding your return page to evaluate the event parameter in the querystring, and doing another redirect immediately to the event-specific page, depending on the value of the event querystring parameter.

For example, let's say you specify http://www.myfakesite.com/processReturn.aspx as the returnUrl value in the POST Recipient View request. When the recipient signs the document(s) and submits the Envelope, DocuSign will redirect the user to the URL: http://www.myfakesite.com/processReturn.aspx?event=signing_complete. Assuming you've built "processReturn.aspx" such that it evaluates the value of the event querystring parameter, it will see value "signing_complete" and then immediately redirect to the appropriate page (that you specify in the code) for the Signing Complete event.

Page 167 (returnUrl property description) of the REST API guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf) lists all possible values for the event parameter.

Kim Brandl
  • 13,125
  • 2
  • 16
  • 21