Documents
Get a document by ID
Retrieve detailed information about a specific document including all parties, tags, and custom field values.
The response includes:
- Document metadata (subject, message, signing order, etc.)
- All document parties with their status (exposed under both
partiesand the deprecatedsignersfield — same content) - Applied tags
- Custom field values
- Document timestamps (created, updated, completed, archived)
GET
/
api
/
v1
/
documents
/
{id}
Get a document by ID
curl --request GET \
--url https://app.sajn.se/api/v1/documents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'authorization: <authorization>'import requests
url = "https://app.sajn.se/api/v1/documents/{id}"
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', Authorization: 'Bearer <token>'}
};
fetch('https://app.sajn.se/api/v1/documents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sajn.se/api/v1/documents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sajn.se/api/v1/documents/{id}")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signers": [
{
"id": "<string>",
"documentId": "<string>",
"name": "<string>",
"role": "SIGNER",
"signedAt": "2023-11-07T05:31:56Z",
"readStatus": "NOT_OPENED",
"signingStatus": "NOT_SIGNED",
"deliveryMethod": "EMAIL",
"requiredSignature": "NONE",
"twoStepVerification": "NONE",
"sendStatus": "NOT_SENT",
"identityVerified": true,
"identityMismatch": true,
"email": "[email protected]",
"phone": "<string>",
"companyName": "<string>",
"companyRole": "<string>",
"companyOrgNumber": "<string>",
"externalId": "<string>",
"companyId": "<string>",
"ssn": "<string>",
"country": "<string>",
"signingOrder": 123
}
],
"parties": [
{
"id": "<string>",
"documentId": "<string>",
"name": "<string>",
"role": "SIGNER",
"signedAt": "2023-11-07T05:31:56Z",
"readStatus": "NOT_OPENED",
"signingStatus": "NOT_SIGNED",
"deliveryMethod": "EMAIL",
"requiredSignature": "NONE",
"twoStepVerification": "NONE",
"sendStatus": "NOT_SENT",
"identityVerified": true,
"identityMismatch": true,
"email": "[email protected]",
"phone": "<string>",
"companyName": "<string>",
"companyRole": "<string>",
"companyOrgNumber": "<string>",
"externalId": "<string>",
"companyId": "<string>",
"ssn": "<string>",
"country": "<string>",
"signingOrder": 123
}
],
"productTables": [
{
"fieldId": "<string>",
"name": "<string>",
"currency": "<string>",
"language": "sv",
"allowSelection": true,
"selectionSignerId": "<string>",
"selectionRequired": true,
"sections": [
{
"id": "<string>",
"name": "<string>",
"pickOne": true
}
],
"rows": [
{
"id": "<string>",
"sku": "<string>",
"name": "<string>",
"description": "<string>",
"unit": "<string>",
"price": 123,
"moms": 123,
"billing": "ONE_TIME",
"discount": {
"type": "PERCENT",
"value": 123
},
"optional": true,
"selected": true,
"quantity": 123,
"lineTotal": 123,
"lineNet": 123,
"lineMoms": 123,
"sectionId": "<string>",
"productType": "GOODS"
}
],
"totals": {
"subtotal": 123,
"discountAmount": 123,
"momsAmount": 123,
"total": 123,
"rotDeduction": 123,
"rutDeduction": 123,
"payable": 123,
"byBilling": {}
}
}
],
"externalId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"documentMeta": {
"subject": "<string>",
"message": "<string>",
"signingOrder": "PARALLEL",
"forceReadFullDocument": true,
"showChatToSigners": true,
"preferredLanguage": "sv",
"value": "<string>",
"redirectUrl": "<string>",
"redirectEnabled": true,
"internalRecipients": [
"<string>"
],
"signableAfterExpired": true,
"sendPlainTextEmailOnly": true,
"reminderIntervalDays": "<string>",
"allowDelegation": true,
"accessVerification": "NONE",
"aiChatEnabled": true,
"ssnDisplayMode": "FULL",
"sameDeviceSigning": true,
"documentCategoryId": "<string>"
},
"completedAt": "2023-11-07T05:31:56Z",
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>"
}
],
"customFields": [
{
"id": "<string>",
"name": "<string>",
"type": "TEXT",
"value": "<string>"
}
],
"fields": [
{
"id": "<string>",
"type": "TEXT",
"position": 123,
"fieldMeta": {
"type": "TEXT",
"content": "<string>",
"locked": true,
"sectionStyle": {
"background": "none",
"padding": "none",
"bleed": true,
"border": true
},
"visibilityRule": {
"customInputId": "<string>",
"equals": "<string>",
"mode": "SHOW_WHEN"
},
"hidden": true
},
"documentId": "<string>",
"templateId": "<string>",
"createdAt": null,
"updatedAt": null
}
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}You’re viewing API version
2026-09, which is deprecated and stops working on October 1, 2027. To see the current version, select 2026-10 in the menu at the top of the sidebar. To move your integration, see Upgrading to 2026-10.Authorizations
bearerAuthoauth2
Response
200
Was this page helpful?
⌘I
Get a document by ID
curl --request GET \
--url https://app.sajn.se/api/v1/documents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'authorization: <authorization>'import requests
url = "https://app.sajn.se/api/v1/documents/{id}"
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {authorization: '<authorization>', Authorization: 'Bearer <token>'}
};
fetch('https://app.sajn.se/api/v1/documents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sajn.se/api/v1/documents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sajn.se/api/v1/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sajn.se/api/v1/documents/{id}")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signers": [
{
"id": "<string>",
"documentId": "<string>",
"name": "<string>",
"role": "SIGNER",
"signedAt": "2023-11-07T05:31:56Z",
"readStatus": "NOT_OPENED",
"signingStatus": "NOT_SIGNED",
"deliveryMethod": "EMAIL",
"requiredSignature": "NONE",
"twoStepVerification": "NONE",
"sendStatus": "NOT_SENT",
"identityVerified": true,
"identityMismatch": true,
"email": "[email protected]",
"phone": "<string>",
"companyName": "<string>",
"companyRole": "<string>",
"companyOrgNumber": "<string>",
"externalId": "<string>",
"companyId": "<string>",
"ssn": "<string>",
"country": "<string>",
"signingOrder": 123
}
],
"parties": [
{
"id": "<string>",
"documentId": "<string>",
"name": "<string>",
"role": "SIGNER",
"signedAt": "2023-11-07T05:31:56Z",
"readStatus": "NOT_OPENED",
"signingStatus": "NOT_SIGNED",
"deliveryMethod": "EMAIL",
"requiredSignature": "NONE",
"twoStepVerification": "NONE",
"sendStatus": "NOT_SENT",
"identityVerified": true,
"identityMismatch": true,
"email": "[email protected]",
"phone": "<string>",
"companyName": "<string>",
"companyRole": "<string>",
"companyOrgNumber": "<string>",
"externalId": "<string>",
"companyId": "<string>",
"ssn": "<string>",
"country": "<string>",
"signingOrder": 123
}
],
"productTables": [
{
"fieldId": "<string>",
"name": "<string>",
"currency": "<string>",
"language": "sv",
"allowSelection": true,
"selectionSignerId": "<string>",
"selectionRequired": true,
"sections": [
{
"id": "<string>",
"name": "<string>",
"pickOne": true
}
],
"rows": [
{
"id": "<string>",
"sku": "<string>",
"name": "<string>",
"description": "<string>",
"unit": "<string>",
"price": 123,
"moms": 123,
"billing": "ONE_TIME",
"discount": {
"type": "PERCENT",
"value": 123
},
"optional": true,
"selected": true,
"quantity": 123,
"lineTotal": 123,
"lineNet": 123,
"lineMoms": 123,
"sectionId": "<string>",
"productType": "GOODS"
}
],
"totals": {
"subtotal": 123,
"discountAmount": 123,
"momsAmount": 123,
"total": 123,
"rotDeduction": 123,
"rutDeduction": 123,
"payable": 123,
"byBilling": {}
}
}
],
"externalId": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"documentMeta": {
"subject": "<string>",
"message": "<string>",
"signingOrder": "PARALLEL",
"forceReadFullDocument": true,
"showChatToSigners": true,
"preferredLanguage": "sv",
"value": "<string>",
"redirectUrl": "<string>",
"redirectEnabled": true,
"internalRecipients": [
"<string>"
],
"signableAfterExpired": true,
"sendPlainTextEmailOnly": true,
"reminderIntervalDays": "<string>",
"allowDelegation": true,
"accessVerification": "NONE",
"aiChatEnabled": true,
"ssnDisplayMode": "FULL",
"sameDeviceSigning": true,
"documentCategoryId": "<string>"
},
"completedAt": "2023-11-07T05:31:56Z",
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>"
}
],
"customFields": [
{
"id": "<string>",
"name": "<string>",
"type": "TEXT",
"value": "<string>"
}
],
"fields": [
{
"id": "<string>",
"type": "TEXT",
"position": 123,
"fieldMeta": {
"type": "TEXT",
"content": "<string>",
"locked": true,
"sectionStyle": {
"background": "none",
"padding": "none",
"bleed": true,
"border": true
},
"visibilityRule": {
"customInputId": "<string>",
"equals": "<string>",
"mode": "SHOW_WHEN"
},
"hidden": true
},
"documentId": "<string>",
"templateId": "<string>",
"createdAt": null,
"updatedAt": null
}
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"requiredScopes": [
"<string>"
],
"grantedScopes": [
"<string>"
]
}
