Document source variants

Latest update: Novermber 18th, 2020

In order to make the tests easier, in all the use cases described in the previous chapters we have used the option where Viafirma is the one who generates the PDF from a previously defined template. The document that will be sent to the signatory can be built in several ways:

  • Document published in a URL.
  • Document submitted via API in Base64.
  • Document generated from a template.
  • Document previously signed in Viafirma.

The only change to be considered when defining the service will affect the object document:

PDF in Base64

The developer sends the Base64 of the PDF to be signed:

"document" : {
"templateType" : "base64",
"templateReference" : "<here_your_base64>",
"templateCode" : "your_template",
"readRequired" : true,
"watermarkText" : "Previsualización"
}

PDF published in URL

The developer publishes the PDF in a URL where Viafirma will retrieve it for processing:

"document" : {
"templateType" : "url",
"templateReference" : "<here_your_url",
"templateCode" : "your_template",
"readRequired" : true,
"watermarkText" : "Previsualización"
}

PDF based on template

The developer specifies the template code that will be used to build the document. This template must be previously existing in Viafirma.

"document" : {
"templateType" : "pdf",
"templateCode" : "your_template",
"readRequired" : true,
"watermarkText" : "Previsualización"
}

PDF previously signed in Viafirma

The developer refers to a signing process of Viafirma, using the PDF signed in this request to be resent and re-signed.

"document" : {
"templateType" : "message",
"templateReference" : "<your_messageCode>",
"templateCode" : "your_template",
"readRequired" : true,
"watermarkText" : "Previsualización"
}

The postman collection that you can download to test Viafirma's API has a set of tests with these modes called "PDF source variants".

results matching ""

    No results matching ""