Combined Examples

The URL in the examples are those of PortaSigma SaaS running in http://portasigma.com. If you have an inhouse installation, replace it with your own URL root.

Combining Upload and Signature Gateway

Use this example as a reference when you have an application that generates documents that must be signed online. Once your application has generated a PDF file, it must:

  1. Upload it to PortaSigma
  2. Add signer(s) (signature requests)
  3. (At that point, or later) Redirect the signer to the signature page
  4. Process the return values

1. Upload a Document

POST https://api.portasigma.com/v1/docs/
(multipart form data ...)

The response will contain a status 303 (Redirect See Other) and a Location header with the URL of the created document, e.g.:

Location: https://api.portasigma.com/v1/docs/1312/

The last section of the URL is the id of the document.

2. Add a Signer

Use the value of Location returned by the prior call as the URL to post a signer:

POST https://api.portasigma.com/v1/docs/1312/
Content-Type: application/x-www-form-urlencoded
Content-Length: 73

name=xxxxxx&email=xxxxxxxx%40isigma.es&id-country=ES&id-number=12345678Z

(Do this once for each designated signer).

Again, the response will contain a status 303 (Redirect See Other) and a Location header with the URL of the created signature request, e.g.:

Location: https://api.portasigma.com/v1/docs/1312/signers/2474/

The last section of the URL is the id of the individual signature request. This is the value to use in the signature gateway.

3. Redirect the User to the Signature Page

On your web page, generate a link to sign the document as specified in Signature Gateway:

https://app.portasigma.com/request/view.html?id=2474&url=<url>

Where you must replace <url> with your application’s return address after completion of the signature process.

4. Process the Return Values

After signature or rejection, PortaSigma will redirect the user to the given <url> with the extra parameters defined in Redirection to the client application. Your application should then proceed depending on succes, rejection or error.