eSignature in the App

Latest update : 31st October, 2019

The following use case is assumed:

  • Request source. Web application integrated with Viafirma's API
  • PDF source. Generated by Viafirma from the template
  • Destination. Signature in Viafirma's App.
Description
SERVICE MESSAGE
URL /api/v3/message/
SECURITY YES
METHOD POST
CONTENT/APPLICATION JSON

{
"groupCode" : "string",
"workflow" : {
"type" : "APP"
},
"notification" : {
"text" : "string",
"detail" : "string",
"devices": [
{
"appCode": "string",
"code": "string",
"userCode": "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, these must be authorized to the group.
workflow.type: for face-to-face signatures, the ''APP'' type must be used. This method is especially suitable for developers who need to embed the sign page into their web application. For other methods you can use "PRESENTIAL" and "WEB".
• notification.text: (OPTIONAL) title of the notification sent to the app; it is 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 no information is reported, the description configured in the template will be used by default.
Notification.devices.appCode: code of the app to which the document will be sent. Viafirma's default app is "com.viafirma.documents", but if you have a personalized app you must use the code of your app, for example “com.viafirma.documents.myPrivateApp”.
Notification.devices.code: refers to the code of the authorized user in that app, and corresponds to user.UserCode.
document.templateCode: Identifier of the template managed by Viafirma. A template includes document, policies, notifications, etc. Check the template management options to learn more ways to use them.
document.readRequired: (OPTIONAL) used to push all the pages of the document forward. Once this is done, the policy panel is enabled 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 when enabled, it shows in the sign page the form previously designed and associated to 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 for the affected group.
callbackURL: (OPTIONAL) used to report via POST to the URL specified 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/developer/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" : "APP"
      },
      "notification" : {
          "text" : "Nuevo contrato pendiente de firma.",
          "detail" : "Núm. Contrato AA9988",
          "devices": [
          {
          "appCode": "com.viafirma.documents",
          "code": "<here_your_registered_app",
          "userCode": "<here_your_registered_userCode"
          }
          ]
      },
      "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 ""