DocuSign.Api.TemplateViews (DocuSign v2.0.0)
View SourceAPI calls for all endpoints tagged TemplateViews
.
Summary
Functions
Gets a URL for a template edit view.
Returns a URL that enables you to embed the Template Edit view of Docusign eSignature. You can embed the view in an iframe. API request update The API request object for this API method was updated in June 2024. The new API request format is described below. Existing applications must update to the new version: it solves a security issue with the old version. The deprecation schedule was announced in the Docusign Core Release Notes. While backwards compatibility will be provided for a while for existing applications, all applications must be updated to be secure. See below for migration information. Best practices The returned URL expires after 10 minutes. Therefore, request the URL immediately before you redirect your user to it. Due to screen space issues, do not use an iframe for embedded operations on mobile devices. For mobile applications, use a WebView (Android) or WKWebView (iOS). ### Closing the view's iframe If you choose to embed the view in your application via an iframe, Docusign recommends this software pattern to close the iframe after the view has completed: (One time) create a standalone “return” web page that you will use as the returnUrl
target for the view. The view will redirect the iframe to this URL when it has completed. Here's an example return page. In this page, use JavaScript and the postMessage method to send a message to your application with the results of the view. In your application, use window.addEventListener("message", function_name)
to register a listener for incoming messages. To show the view, use this API method, then set the iframe to load the URL from the API response. In your application, receive the completion message, validate it, and then close the iframe. ### Information security This view only has write access to the specific template referenced in the API call. The edit access corresponds to the access rights of the user associated with the access token used for the API call. Recommendations: Use the access token of a service user who can access the template. Do not use the access token of a user with administrator privileges. ### Migrating to the current version of the request object This section only applies to existing applications that use the older version of the request object. Migrating from the old API request object to the new version will take under a day of developer time. Step 1. Does your application set the returnUrl attribute? Yes: continue with step 2. No: In this case, your users first edit the template, and then the Docusign eSignature home screen is shown. To accomplish this UI pattern with the new API request format: Set the returnUrl to a new endpoint for your application. You can use query parameters or session data to manage state. Remember to authenticate the incoming requests. When the endpoint is called, use the EnvelopeViews:createConsole API call to obtain and then display the Docusign eSignature home page to your application's user. Step 2. Check that these API attributes are set: "view" = "template"
the returnUrl
is set. Step 3. All done! Test your application.
Functions
@spec views_post_template_edit_view( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, DocuSign.Model.ViewUrl.t()} | {:ok, DocuSign.Model.ErrorDetails.t()} | {:error, Tesla.Env.t()}
Gets a URL for a template edit view.
Returns a URL that enables you to embed the Template Edit view of Docusign eSignature. You can embed the view in an iframe. API request update The API request object for this API method was updated in June 2024. The new API request format is described below. Existing applications must update to the new version: it solves a security issue with the old version. The deprecation schedule was announced in the Docusign Core Release Notes. While backwards compatibility will be provided for a while for existing applications, all applications must be updated to be secure. See below for migration information. Best practices The returned URL expires after 10 minutes. Therefore, request the URL immediately before you redirect your user to it. Due to screen space issues, do not use an iframe for embedded operations on mobile devices. For mobile applications, use a WebView (Android) or WKWebView (iOS). ### Closing the view's iframe If you choose to embed the view in your application via an iframe, Docusign recommends this software pattern to close the iframe after the view has completed: (One time) create a standalone “return” web page that you will use as the returnUrl
target for the view. The view will redirect the iframe to this URL when it has completed. Here's an example return page. In this page, use JavaScript and the postMessage method to send a message to your application with the results of the view. In your application, use window.addEventListener("message", function_name)
to register a listener for incoming messages. To show the view, use this API method, then set the iframe to load the URL from the API response. In your application, receive the completion message, validate it, and then close the iframe. ### Information security This view only has write access to the specific template referenced in the API call. The edit access corresponds to the access rights of the user associated with the access token used for the API call. Recommendations: Use the access token of a service user who can access the template. Do not use the access token of a user with administrator privileges. ### Migrating to the current version of the request object This section only applies to existing applications that use the older version of the request object. Migrating from the old API request object to the new version will take under a day of developer time. Step 1. Does your application set the returnUrl attribute? Yes: continue with step 2. No: In this case, your users first edit the template, and then the Docusign eSignature home screen is shown. To accomplish this UI pattern with the new API request format: Set the returnUrl to a new endpoint for your application. You can use query parameters or session data to manage state. Remember to authenticate the incoming requests. When the endpoint is called, use the EnvelopeViews:createConsole API call to obtain and then display the Docusign eSignature home page to your application's user. Step 2. Check that these API attributes are set: "view" = "template"
the returnUrl
is set. Step 3. All done! Test your application.
Parameters
connection
(DocuSign.Connection): Connection to serveraccount_id
(String.t): The external account number (int) or account ID GUID.template_id
(String.t): The ID of the template.opts
(keyword): Optional parameters:body
(TemplateViewRequest):
Returns
{:ok, DocuSign.Model.ViewUrl.t}
on success{:error, Tesla.Env.t}
on failure