eSignature in the web

Latest review: May 07, 2021

The following use case is assumed:

  • Request source. Web application integrated with Viafirma's API
  • PDF source. Generated by Viafirma from the template.
  • Destination. Remote signature through a notification sent to the signatory via email, text message or both, inviting them to access to a web page to eSign.
Description
SERVICE MESSAGE
URL /api/v3/messages/
SECURITY YES
METHOD POST
CONTENT/APPLICATION JSON
{
"groupCode" : "string",
"workflow" : {
"type" : "WEB"
},
"notification" : {
"text" : "string",
"detail" : "string",
"sharedLink" : {
"appCode" : "string",
"email" : "string",
"phone" : "string",
"subject" : "string"
}
},
"document" : {
"templateCode" : “string”,
"readRequired" :
"true|false",
"watermarkText" : "string",
"formRequired" : "true|fasle"
},
"callbackMails" : "string",
"callbackURL" : "string"
}
PARAMS groupCode: authorized group code; the API must have permissions on the given group, and in case of specifying a template or policy code, they must be authorized to the group.
workflow.type: WEB for remote signatures, where the system notifies the recipient(s) via EMAIL and/or SMS. Suitable when using the web signature module. APP to send document via push notification both to iOS and Android devices where Viafirma's app has been previously installed. PRESENTIAL designed for developers who wish to embed the sign page website in their applications, obtaining a LINK attribute that will be the one that must be presented to the user, embedding it in a web-view, pop-up, i-frame or similar.
notification.text: (OPTIONAL) title of the notification sent to the app; also used for the title (1st line) of the card displayed in the inbox. If not reported, the title set in the template will be used by default.
notification.detail: (OPTIONAL) description of the notification sent to the app; also used for the description (2nd line) of the card displayed in the inbox. If not reported, the description set in the template will be used by default.
notificacion.sharedLink.appCode: (OPTIONAL) if you define a mobile app code you will enable a link to the app in the sign page, so the user can eSign from the app, which they can download immediately or simply use it if they already have it. Note that if you use this option, the design (CSS) of the sign page has to include this option; you might have style sheets (CSS) where the container (div) that shows the links to the app is hidden.
notificacion.sharedLink.email: In case you opt for a MAIL or MAIL_SMS notification, this is where you will inform the recipient's email.
notificacion.sharedLink.phone: In case you opt for an SMS or MAIL_SMS notification, this is where you will inform the recipient's cell phone number. It is MANDATORY to use the country calling code in +99 format, for example, for Spain you must use +34 in front of the number.
notificacion.sharedLink.subject: (OPTIONAL) here you can define the email subject. If you don't specify it, the one you have set up in your template will be used by default, and if you haven't set it up in your template, the subject set up at global level will be used by default.
document.templateCode: Identifier of the template managed by Viafirma. A template includes document, policies, notifications, etc. Check the template management options to know more ways to use them.
document.readRequired: (OPTIONAL) used to force the advancement of all the pages in the document. Once this is done, using the API Page 13 of 46 enables the policy panel to continue with the signing process. If this parameter is not specified its default value is false.
Document.formRequired: (OPTIONAL) allowed values true and false, and if enabled they show the sign page with the form previously designed and associated with the template.
document.watermarkText: (OPTIONAL) used to paint a diagonal watermark on the viewer of the document to be signed. If this parameter is not specified its default value is "Preview".
callbackMails: (OPTIONAL) used for reporting via email when the request is completed. You can use several e-mail addresses comma-separated. The content of the mail (subject and body) can be configured in the template (recommended), and can also be configured in the service (see Customization object in the official product documentation). The default statuses for email notification are SUCCESS, EXPIRED, ERROR and REJECTED. To define different statuses on which to perform the callbackMail check the advanced configuration of the affected Group.
callbackURL: (OPTIONAL) used to report via POST to the specified URL at the end of the request. You can use URLs that are secured with Basic Auth, in which case you should use the "callbackAuthorization" parameter (more information at https://doc.viafirma.com/documents/api/latest/en/response_callback.html). This parameter can also be configured in the template settings.
RESPONSE 200: HTTP status code 200/OK

Response content type: string

You will receive the messageCode of the generated request so you can manage it in the rest of the services. Alternative responses in case of error: HTTP status codes other than 200/OK will be returned. In this case a JSON will always be returned describing the problem:

    {
      "code": "string",
      "type": "string",
      "message": "string",
      "trace": "string"
    }

POST SAMPLE

    {
      "groupCode": "<here_your_groupCode>",
      "workflow": {
        "type": "WEB"
      },
      "notification": {
        "text": "Nuevo contrato pendiente de firma.",
        "detail": "Núm. Contrato AA9988",
        "sharedLink": {
        "appCode": "com.viafirma.documents",
        "email": "<here_signer_email>",
        "subject": "Viafirma: firma de contrato"
      },
      "document" : {
        "templateCode": "<here_your_templateCode>",
        "readRequired": false,
        "watermarkText": "Preview",
        "formRequired": false
      },
      "callbackMails": "<here_your_email>",
      "callbackURL": "<here_your_system_callback>"
    }

results matching ""

    No results matching ""