Embedded Signature on a Third Party Application

Latest update: April 14th, 2021

Based on the following use case:

  • Request source: Web application integrated with Viafirma's API.
  • PDF source: generated by Viafirma based on the template, based on base64 or based on a previously signed-PDF with Viafirma.
  • Destination: This method is also used to embed the sign page generated by Viafirma inside a third party application, for instance through a web-view inside a mobile phone app of a third party web application.
  • SERVICE: /messages/dispatch
  • URL: {urlbase}/api/v3/messages/dispatch
  • SECURITY: YES
  • METHOD: POST
  • CONTENT/APPLICATION: JSON
{
  "groupCode" : "string",
  "externalCode" : "string",
  "workflow" : {
    "type" : "PRESENTIAL"
  },
  "notification" : {
    "text" : "string",
    "detail" : "string"
  },
  "document" : {
    "templateCode" : "string"
  }
}

PARAMS:

  • groupCode : (string) authorized group code.
  • externalCode : (string)(optional) allows you to include an internal code of your business-model with which you can make indexed searches, for example, your contract number, invoice, etc.
  • workflow.type : (string) for this use case you should always use the type "PRESENTIAL". In this way, Viafirma will not notify the signer through any channel, it only generates the unique link of the signature page that you can embed in your system.
  • notification.text : (string) (optional) used as title on signature screen
  • notification.detail : (string) (optional) used as description on signature screen
  • document.templateCode : (string) template previously designed for building the PDF, signature policies and other settings.

  • RESPONSE: 200: HTTP status code 200/OK

  • Response content type: application/json where you will find the MESSAGE object that includes the LINK (message.notification.sharedlink.link) of the sign page that you will need to embed in your web application.

Where you will find the MESSAGE object that includes, among other information, the LINK (message.notification.sharedlink.link) of the signature page that you will have to embed in your web application.

{
    "code": "string",
    "groupCode": "string",
    "workflow": {
        "current": "string",
        "history": [
            {
                "start": 0,
                "ends": 0,
                "taskName": "string",
                "order": 0
            }
        ],
        "initiate": 0,
        "lastUpdated": 0,
        "expires": 0,
        "type": "PRESENTIAL"
    },
    "notification": {
        "code": "string",
        "text": "string",
        "detail": "string",
        "sharedLink": {
            "link": "string"
        }
    },
    "document": {
        "templateCode": "string"
    },
    "policies": [{
            "signatures": [
                {
                    "code": "string"
                }
            ]
        }
    ]
}

Error responses

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

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

results matching ""

    No results matching ""