Skip to main content
The Postman starter kit lets you make your first authenticated request, create resources, and explore every endpoint without writing requests by hand.

Download the files

Each link downloads a JSON file.

Getting started

A health check, your first list requests, and creating a contact and a document.

Document lifecycle

Create a contact and a document, add the contact as a party, send the document, get the signing URL, and get the signed PDF.

Contacts and parties

Create a contact, find it by email, update it, and add it to a document as a party.

API reference

Every endpoint, generated from the OpenAPI specification and grouped like the API reference.

Import the collections

  1. Download the collections you want and the environment.
  2. In Postman, click Import and select the JSON files.
  3. Open the imported sajn Local environment.
  4. Set apiKey to an API key from Inställningar > Utvecklare > API-nycklar. For more information, see Authentication.
  5. Leave baseUrl set to https://app.sajn.se. A sandbox key reaches your sandbox through the same URL.
  6. Select sajn Local as the active environment.

Variables

The collections share variables through the environment, so one request can use what an earlier request returned, even in another collection: Every other path parameter, such as templateId or webhookId, has an empty variable of the same name in the environment. Set it before you run a request that uses it. Test scripts save each captured value to the collection and to the active environment. List requests include every query parameter that the endpoint accepts, turned off; turn on the ones you need. To retry a write safely, turn on the Idempotency-Key header, which sends a new GUID with each request. For more information, see Idempotency. To test against another API version, change apiVersion. For the supported versions, see API versioning.

Run the requests in order

  1. In the getting started collection, run Health check.
  2. Run List all documents or List all contacts to confirm that the key works.
  3. Run Create a new contact, then Create a new document.
  4. In the document lifecycle collection, run the requests from Create a new contact to Get a party with signing URL.
  5. To sign as the contact, open the signingUrl value in a browser. The example parties use example.com addresses, so they don’t receive the signing email.
  6. After every party has signed, run Get a document file.
Create a new document creates a draft with one party, Maja Holm, who signs for a company. It also sets expiresAt, because a document needs an expiration date before you can send it. Change the date to one that suits your test. Get a document file returns 409 INVALID_STATE until the file exists. The signed PDF exists after every party has signed, including Maja Holm. Create a new document saves her party ID in partyId, and Add a party to document replaces it with the contact’s. To get her signing URL, copy her ID from parties in the Create a new document response into partyId, and run Get a party with signing URL again. If Send document for signing returns 409 APPROVAL_REQUIRED, the document needs an approval before you can send it. To request one, use Request approval of a document.

How the collections stay current

sajn generates the collections from the same OpenAPI specification as the API reference. When the API changes, the collections are regenerated, so request URLs, methods, and example bodies match the docs.