Signing a document previously eSigned by Viafirma Documents

Latest update: May 13th, 2020

The following use case is assumed:

  • The document was previously signed (finished) with Viafirma Documents and it has the messageCode associated to the request.
  • Unlike the other use cases, the document is built from a previously signed messageCode. In this case you must use the properties templateType : message and templateReference : messageCode.
Description
SERVICE MESSAGE
URL /api/v3/messages/
SECURITY YES
METHOD POST
CONTENT/APPLICATION application/JSON
PARAMS groupCode: authorized group code; the API must have permissions on the specified group, and if a template or policy code is provided these must be authorized to the group.
workflow.type: For face-to-face signatures, the "WEB" type should be used. This mechanism is especially suitable if as a developer you need to embed the sign page in your web application. For other methods you can use "PRESENTIAL" and "APP". Para otros mecanismos se puede usar “PRESENTIAL” y “APP”.
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 used will be used by default.
notification.detail: (OPTIONAL) description of the notification sent to the app; it is 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 used will be used by default.
notificacion.sharedLink.appCode: (OPTIONAL) if you define a mobile app code you will enable in the signature page a link to the app for the user to sign from the app, which can be downloaded right away or simply use it if he/she already has it. Note that if this option is used, the design (CSS) of the sign page must include this feature; you might have some 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, here 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) (OPTIONAL) here you can define the email subject. If you don't specify this, 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.templateType: to re-sign a document previously signed with Viafirma Documents, this attribute is mandatory, and its value must be "message".
document.templateReference: To re-sign a document previously signed with Viafirma Documents, this attribute is mandatory, and its value must match the process code (messageCode) you wish to re-sign.
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 of use. IMPORTANT: keep in mind that when you re-sign a document and if you use templates these should not be exactly the same as the one used for re-signing the document because, for example, if the position of the evidence is fixed, you risk that the new signature will be stamped on top of the previous one.
document.readRequired: (OPTIONAL) is 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: IMPORTANT: to re-sign documents the Form can only be used to capture data that will be processed by a third party via API, but the form data cannot be taken to the PDF because it is already signed and the signature would be broken.
document.watermarkText: (OPTIONAL) is used to paint a diagonal watermark on the viewer of the document to be signed. If this parameter is not entered 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/developer/callback.html). This parameter can also be configured in the template settings.
RESPONSE 200: HTTP status code 200/OK

Request Content Type: Application/JSON

{
  "groupCode" : "string",
  "workflow" : {
  "type" : "WEB"
  },
  "notification" : {
    "text" : "string",
    "detail" : "string",
    "sharedLink" : {
    "appCode" : "string",
    "email" : "string",
    "phone" : "string",
    "subject" : "string"
  }
  },
  "document" : {
    "templateType" : "string",
    "templateCode" : "string",
    "readRequired" : "true",
    "watermarkText" : "string",
    "formRequired" : "false"
  },
  "callbackMails" : "string",
  "callbackURL" : "string"
}

Response content type: string

Alternative responses in case of error: HTTP status codes other than 200/OK will be returned. In that case a JSON describing the problem will always be returned:

    {
      "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" : {
           "templateType" : "message",
           "templateReference" : "<here_your_signed_document_messageCode",
           "templateCode" : "<here_your_templateCode>",
           "readRequired" : false,
           "watermarkText" : "Preview",
           "formRequired" : "false"
        },
      "callbackMails" : "<here_your_email>",
      "callbackURL" : "<here_your_system_callback>"
    }

results matching ""

    No results matching ""