curl --request POST \
--url https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "DKK",
"amount": -100000,
"referenceId": "D12412347",
"text": "J.no. 1234",
"date": "2024-05-28 00:00:00.000+01",
"source": "CREDITOR",
"voucherTypeId": "eb41e58e-fccf-419d-a771-cd5027fe6e87"
}
'import requests
url = "https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id}"
payload = {
"currency": "DKK",
"amount": -100000,
"referenceId": "D12412347",
"text": "J.no. 1234",
"date": "2024-05-28 00:00:00.000+01",
"source": "CREDITOR",
"voucherTypeId": "eb41e58e-fccf-419d-a771-cd5027fe6e87"
}
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({
currency: 'DKK',
amount: -100000,
referenceId: 'D12412347',
text: 'J.no. 1234',
date: '2024-05-28 00:00:00.000+01',
source: 'CREDITOR',
voucherTypeId: 'eb41e58e-fccf-419d-a771-cd5027fe6e87'
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{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://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id}",
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([
'currency' => 'DKK',
'amount' => -100000,
'referenceId' => 'D12412347',
'text' => 'J.no. 1234',
'date' => '2024-05-28 00:00:00.000+01',
'source' => 'CREDITOR',
'voucherTypeId' => 'eb41e58e-fccf-419d-a771-cd5027fe6e87'
]),
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}/case-vouchers/{id}"
payload := strings.NewReader("{\n \"currency\": \"DKK\",\n \"amount\": -100000,\n \"referenceId\": \"D12412347\",\n \"text\": \"J.no. 1234\",\n \"date\": \"2024-05-28 00:00:00.000+01\",\n \"source\": \"CREDITOR\",\n \"voucherTypeId\": \"eb41e58e-fccf-419d-a771-cd5027fe6e87\"\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}/case-vouchers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"DKK\",\n \"amount\": -100000,\n \"referenceId\": \"D12412347\",\n \"text\": \"J.no. 1234\",\n \"date\": \"2024-05-28 00:00:00.000+01\",\n \"source\": \"CREDITOR\",\n \"voucherTypeId\": \"eb41e58e-fccf-419d-a771-cd5027fe6e87\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id}")
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 \"currency\": \"DKK\",\n \"amount\": -100000,\n \"referenceId\": \"D12412347\",\n \"text\": \"J.no. 1234\",\n \"date\": \"2024-05-28 00:00:00.000+01\",\n \"source\": \"CREDITOR\",\n \"voucherTypeId\": \"eb41e58e-fccf-419d-a771-cd5027fe6e87\"\n}"
response = http.request(request)
puts response.read_body{
"caseVoucherId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Add case voucher
Add case voucher to case
Required scope: write:case-vouchers
curl --request POST \
--url https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "DKK",
"amount": -100000,
"referenceId": "D12412347",
"text": "J.no. 1234",
"date": "2024-05-28 00:00:00.000+01",
"source": "CREDITOR",
"voucherTypeId": "eb41e58e-fccf-419d-a771-cd5027fe6e87"
}
'import requests
url = "https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id}"
payload = {
"currency": "DKK",
"amount": -100000,
"referenceId": "D12412347",
"text": "J.no. 1234",
"date": "2024-05-28 00:00:00.000+01",
"source": "CREDITOR",
"voucherTypeId": "eb41e58e-fccf-419d-a771-cd5027fe6e87"
}
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({
currency: 'DKK',
amount: -100000,
referenceId: 'D12412347',
text: 'J.no. 1234',
date: '2024-05-28 00:00:00.000+01',
source: 'CREDITOR',
voucherTypeId: 'eb41e58e-fccf-419d-a771-cd5027fe6e87'
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{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://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id}",
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([
'currency' => 'DKK',
'amount' => -100000,
'referenceId' => 'D12412347',
'text' => 'J.no. 1234',
'date' => '2024-05-28 00:00:00.000+01',
'source' => 'CREDITOR',
'voucherTypeId' => 'eb41e58e-fccf-419d-a771-cd5027fe6e87'
]),
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}/case-vouchers/{id}"
payload := strings.NewReader("{\n \"currency\": \"DKK\",\n \"amount\": -100000,\n \"referenceId\": \"D12412347\",\n \"text\": \"J.no. 1234\",\n \"date\": \"2024-05-28 00:00:00.000+01\",\n \"source\": \"CREDITOR\",\n \"voucherTypeId\": \"eb41e58e-fccf-419d-a771-cd5027fe6e87\"\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}/case-vouchers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"DKK\",\n \"amount\": -100000,\n \"referenceId\": \"D12412347\",\n \"text\": \"J.no. 1234\",\n \"date\": \"2024-05-28 00:00:00.000+01\",\n \"source\": \"CREDITOR\",\n \"voucherTypeId\": \"eb41e58e-fccf-419d-a771-cd5027fe6e87\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{id}")
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 \"currency\": \"DKK\",\n \"amount\": -100000,\n \"referenceId\": \"D12412347\",\n \"text\": \"J.no. 1234\",\n \"date\": \"2024-05-28 00:00:00.000+01\",\n \"source\": \"CREDITOR\",\n \"voucherTypeId\": \"eb41e58e-fccf-419d-a771-cd5027fe6e87\"\n}"
response = http.request(request)
puts response.read_body{
"caseVoucherId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Authentication can be done by using a bearer token in the Authorization header. This is done using the following format Authorization: Bearer {token}.
Path Parameters
Id of the tenant
Id of the case to add the vouchers to
Body
New case voucher object
An id for the voucher type.
Amount in base currency. For example 1.00 should be sent as 100. A negative amount (e.g. -100) represents a debt, while a positive amount (e.g. +100) represents a credit note or deposit.
Currency
DKK, SEK, NOK, USD, EUR, GBP, CHF The source of the case voucher. "CREDITOR" if the case voucher is imposed by the creditor (typically from an ERP system). "COLLECTOR" if the case voucher is imposed by collector (debt collection agency). If it is a deposit it is a direct payment if set to "CREDITOR".
CREDITOR, COLLECTOR Used when the voucher is accumulating interest to specify the interest rate (yearly interest and compound interest). The number is in decimal, for example 0.1 would be an interest rate of 10%.
The appendix is for pdf copies or similar for a case voucher.
Show child attributes
Show child attributes
The id of the voucher that this voucher is a child of.
Case voucher properties. You can create property types under settings in the platform. Use the handle as object key like this: { "mySingleLineTextPropertyTypeHandle": "your value" }
Show child attributes
Show child attributes
Distribution of the case voucher. The sum of the distribution must be equal to the amount of the case voucher.
Show child attributes
Show child attributes
Response
Successful operation
Id of the case voucher