# Quick start guide

Follow these steps to get started with our Signature solution in minutes! This guide will show you step by step how to sign a simple text saying "This text can safely be signed".

# Full example for Postman

We have collected all the requests you need in a Postman collection allowing you to immediately test and see how the solution works, no setup required.

Run in Postman

# 1. Create and send document

Under the collection tab in Postman, you should now have a collection called Signicat Express Signature. When you expand the collection, the first item on the list is called Create and send a text document. Open it and click Send.

In the response, inside "signers" there is a URL which points to the signing process. Copy and paste this URL in your browser. Choose Norwegian BankID and sign with a test user, like the following:

National identity number One time password Password
01100844350 otp qwer1234

# 2. Get signing information and the signed document

After you have signed the document you can use the requests "Get information from signing process" and "Get the signed document" in the Postman collection. You will now be able to see the Signed Document Object and information about who signed the document.

# Do you want to set up and use your own test credentials?

The postman collection above works out-of-the-box and is set up with demo client credentials. If you want to add your own credentials after you have created an account, open the collection in Postman, click Edit on the collection and go to the Authorization tab. For more information about what to fill in, see step 2 in the guide below.

# Step by step walkthrough guide

# Before you start

# 1. Open Postman (or similar tool)

Our developers like to use Postman, which allows you to easily send requests. It can be downloaded for free from https://www.getpostman.com.

You can also download the OpenAPI document for our APIs from our API Reference (click the "Download" button at the top of the page).

# 2. Get access token

  1. Create a new empty request.
  2. Open the Authorization tab and set the authorization type to OAuth 2.0.
  3. Click Get New Access Token.
  4. Fill in the fields as shown in the image below. Bear in mind that you can only get an access token for scopes that you have access to. Your Client ID and Client Secret can be found by logging into your Dashboard account under the tab API Clients > Oauth clients.
  5. Click Request Token and then Use Token.

Postman screenshot

# 3. Create document

  1. Set the URL of the request to https://api.idfy.io/signature/documents.
  2. Set the HTTP verb to POST.
  3. In the Body tab, select the "Raw" option and select JSON in the dropdown list that appears on the right.
  4. Paste the JSON request below into the request body and set the format to JSON (it is set to Text by default). The text that is going to be signed saying "This text can safely be signed" is Base64 encoded and is what you see in the JSON object as base64Content under dataToSign.
  5. Click Send.
{
  "title": "As simple as that",
  "description": "This is an important document",
  "externalId": "ae7b9ca7-3839-4e0d-a070-9f14bffbbf55",
  "dataToSign": {
    "base64Content": "VGhpcyB0ZXh0IGNhbiBzYWZlbHkgYmUgc2lnbmVk",
    "fileName": "sample.txt"
  }, "contactDetails": {
    "email": "test@test.com"
  },
  "signers": [ {
      "externalSignerId": "uoiahsd321982983jhrmnec2wsadm32",
      "redirectSettings": {
        "redirectMode": "donot_redirect"
      },
      "signatureType": {
        "mechanism": "pkisignature"
      }
    }
  ]
}

Postman screenshot

# 4. Sign the document

In the response, you will receive a URL on the signer object, copy it into your browser (clicking it in Postman will not work) and sign the document. You must sign the document with a test user. For more information about test users and how to create them, refer to the email you received during your onboarding to Signicat.

Postman screenshot

# 5. Get information from signing process

  1. Set the URL to https://api.idfy.io/signature/documents/{documentId}. Replace {documentId} with the ID from the response body in step 4.
  2. Change the HTTP verb to GET and select "none" under the Body tab. Send the request.
  3. In the response you now have a property named documentSignature (under signers). Here you will find key information about the signature.
  4. The document also contains a status object, which includes the document status and a list of completed packages. The completed packages tell you which file packages you can download using the files endpoint.

Postman screenshot

# 6. Get the signed document

Set the GET URL to https://api.idfy.io/signature/documents/{documentId}/files?fileFormat=standard_packaging and click Send. This will give you the signed document as a Long Term Validation Signed Document Object (LTVSDO). You can also get more information and see the signed document by logging into your dashboard account and going to the Documents tab and clicking Search.

The parameter fileFormat can be set to either native (SDO) or standard_packaging (LTsVSDO). If the signed document is a PDF you can also download the signed document as a PAdES, which is a PDF viewable by the end-user that contains electronic signing data.

Last updated: 9/11/2020, 11:09:38 AM