curl --request POST \
--url https://api.debbiecollect.com/v1/{tenantId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityId": "3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"entityType": "case",
"type": "OTHER",
"minAccessRole": "debtor",
"file": {
"fileId": "8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f",
"fileName": "invoice-D12412347.pdf",
"contentType": "application/pdf"
}
}
'import requests
url = "https://api.debbiecollect.com/v1/{tenantId}/documents"
payload = {
"entityId": "3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"entityType": "case",
"type": "OTHER",
"minAccessRole": "debtor",
"file": {
"fileId": "8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f",
"fileName": "invoice-D12412347.pdf",
"contentType": "application/pdf"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityId: '3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f',
entityType: 'case',
type: 'OTHER',
minAccessRole: 'debtor',
file: {
fileId: '8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f',
fileName: 'invoice-D12412347.pdf',
contentType: 'application/pdf'
}
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/documents', 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://api.debbiecollect.com/v1/{tenantId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entityId' => '3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f',
'entityType' => 'case',
'type' => 'OTHER',
'minAccessRole' => 'debtor',
'file' => [
'fileId' => '8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f',
'fileName' => 'invoice-D12412347.pdf',
'contentType' => 'application/pdf'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.debbiecollect.com/v1/{tenantId}/documents"
payload := strings.NewReader("{\n \"entityId\": \"3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f\",\n \"entityType\": \"case\",\n \"type\": \"OTHER\",\n \"minAccessRole\": \"debtor\",\n \"file\": {\n \"fileId\": \"8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f\",\n \"fileName\": \"invoice-D12412347.pdf\",\n \"contentType\": \"application/pdf\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.debbiecollect.com/v1/{tenantId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityId\": \"3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f\",\n \"entityType\": \"case\",\n \"type\": \"OTHER\",\n \"minAccessRole\": \"debtor\",\n \"file\": {\n \"fileId\": \"8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f\",\n \"fileName\": \"invoice-D12412347.pdf\",\n \"contentType\": \"application/pdf\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityId\": \"3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f\",\n \"entityType\": \"case\",\n \"type\": \"OTHER\",\n \"minAccessRole\": \"debtor\",\n \"file\": {\n \"fileId\": \"8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f\",\n \"fileName\": \"invoice-D12412347.pdf\",\n \"contentType\": \"application/pdf\"\n }\n}"
response = http.request(request)
puts response.read_body{
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": 123,
"tenantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityType": "case",
"type": "OTHER",
"file": {
"fileName": "<string>",
"contentType": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"signedFile": {
"fileName": "<string>",
"contentType": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"minAccessRole": "<string>",
"date": "<string>",
"signedAt": "<string>",
"createdAt": "<string>"
}Add document
Attach a document to one of your cases, or to your creditor. Upload the file first with Upload file and pass the object it returns as file.
Set type to OTHER. The other document types decide whether a debt has a legal foundation and when it expires, and are set by your debt collection partner as the case progresses.
Consider whether the debtor should be able to see the document. minAccessRole: "debtor" shows it in the debtor self-service portal, which is what you want for an invoice copy, a contract or a photo that documents the claim. Leave it out to keep the document between you and your debt collection partner.
Required scope: write:documents
curl --request POST \
--url https://api.debbiecollect.com/v1/{tenantId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityId": "3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"entityType": "case",
"type": "OTHER",
"minAccessRole": "debtor",
"file": {
"fileId": "8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f",
"fileName": "invoice-D12412347.pdf",
"contentType": "application/pdf"
}
}
'import requests
url = "https://api.debbiecollect.com/v1/{tenantId}/documents"
payload = {
"entityId": "3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"entityType": "case",
"type": "OTHER",
"minAccessRole": "debtor",
"file": {
"fileId": "8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f",
"fileName": "invoice-D12412347.pdf",
"contentType": "application/pdf"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityId: '3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f',
entityType: 'case',
type: 'OTHER',
minAccessRole: 'debtor',
file: {
fileId: '8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f',
fileName: 'invoice-D12412347.pdf',
contentType: 'application/pdf'
}
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/documents', 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://api.debbiecollect.com/v1/{tenantId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entityId' => '3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f',
'entityType' => 'case',
'type' => 'OTHER',
'minAccessRole' => 'debtor',
'file' => [
'fileId' => '8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f',
'fileName' => 'invoice-D12412347.pdf',
'contentType' => 'application/pdf'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.debbiecollect.com/v1/{tenantId}/documents"
payload := strings.NewReader("{\n \"entityId\": \"3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f\",\n \"entityType\": \"case\",\n \"type\": \"OTHER\",\n \"minAccessRole\": \"debtor\",\n \"file\": {\n \"fileId\": \"8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f\",\n \"fileName\": \"invoice-D12412347.pdf\",\n \"contentType\": \"application/pdf\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.debbiecollect.com/v1/{tenantId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityId\": \"3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f\",\n \"entityType\": \"case\",\n \"type\": \"OTHER\",\n \"minAccessRole\": \"debtor\",\n \"file\": {\n \"fileId\": \"8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f\",\n \"fileName\": \"invoice-D12412347.pdf\",\n \"contentType\": \"application/pdf\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityId\": \"3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f\",\n \"entityType\": \"case\",\n \"type\": \"OTHER\",\n \"minAccessRole\": \"debtor\",\n \"file\": {\n \"fileId\": \"8d9f0c1e-2b3a-4c5d-6e7f-8a9b0c1d2e3f\",\n \"fileName\": \"invoice-D12412347.pdf\",\n \"contentType\": \"application/pdf\"\n }\n}"
response = http.request(request)
puts response.read_body{
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": 123,
"tenantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityType": "case",
"type": "OTHER",
"file": {
"fileName": "<string>",
"contentType": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"signedFile": {
"fileName": "<string>",
"contentType": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"minAccessRole": "<string>",
"date": "<string>",
"signedAt": "<string>",
"createdAt": "<string>"
}Authorizations
Authentication with an API key can be done by using a bearer token in the Authorization header. This is done using the following format Authorization: Bearer {token}. API keys are issued and revoked directly from the creditor portal under Developers > API.
Path Parameters
Id of your debt collection partner's tenant. You can find it on the API page in the creditor portal.
Body
New document
Id of the case or the creditor the document belongs to.
What the document is attached to. case hangs it on a collection case, creditor on the creditor itself.
case, creditor What the document is. The types other than OTHER carry legal meaning in the collection process — they decide whether the debt has a foundation and when it expires — and are set by the collector, not by you.
OTHER, FOUNDATION, SKYLDERKLAERING, COURTOPGJORTOGFREMLAGT, DOM, PAATEGNING, FORLIG, COURT, GAELDSBREV The uploaded file, as returned by the file endpoint. Only fileId is read: the name and content type are taken from the stored file, so they always agree with it.
Show child attributes
Show child attributes
The least privileged role that may see the document. debtor shows it to the debtor in the self-service portal, client to the creditor, caseworker only to the collector. Defaults to the collector-only level.
debtor, client, caseworker The date of the document itself, which can differ from the date it was uploaded. Defaults to now.
Whether the document is already signed.
When the document was signed. Only used together with isSigned.
Extra information about the document.
Show child attributes
Show child attributes
Response
Successful operation
Sequential id of the document
What the document is attached to. case hangs it on a collection case, creditor on the creditor itself.
case, creditor What the document is. The types other than OTHER carry legal meaning in the collection process — they decide whether the debt has a foundation and when it expires — and are set by the collector, not by you.
OTHER, FOUNDATION, SKYLDERKLAERING, COURTOPGJORTOGFREMLAGT, DOM, PAATEGNING, FORLIG, COURT, GAELDSBREV Show child attributes
Show child attributes
The signed version of the file, once the document has been signed.
Show child attributes
Show child attributes