Skip to main content
POST
/
v1
/
{tenantId}
/
case-vouchers
/
{caseId}
Add case voucher to case
curl --request POST \
  --url https://api.debbiecollect.com/v1/{tenantId}/case-vouchers/{caseId} \
  --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"
}'
{
  "caseVoucherId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

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

tenantId
string<uuid>
required

Id of the tenant

caseId
string
required

Case id

Body

application/json

New case voucher object

voucherTypeId
string<uuid>
required

An id for the voucher type. A list of ids can be found in the Voucher Type Ids chapter.

amount
integer
required

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
enum<string>
required

Currency

Available options:
DKK,
SEK,
NOK,
USD,
EUR,
GBP,
CHF
date
string
required
source
enum<string>
required

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".

Available options:
CREDITOR,
COLLECTOR
referenceId
string
interest
number

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%.

interestStartDate
string
interestEndDate
string
dueDate
string
appendix
object

The appendix is for pdf copies or similar for a case voucher.

uniqueId
string

A unique id, that can be used to prevent creating the same case voucher twice. This id is unique at the tenant level, meaning that no two case vouchers can have the same unique id on the same tenant.

referenceCaseVoucherId
string<uuid>

The id of the voucher that this voucher is a child of.

referenceVouchers
object[]
properties
object

Case voucher properties. You can create property types under settings in the platform. Use the handle as object key like this: { "mySingleLineTextPropertyTypeHandle": "your value" }

distribute
object[]

Distribution of the case voucher. The sum of the distribution must be equal to the amount of the case voucher.

Response

Successful operation

caseVoucherId
string<uuid>

Id of the case voucher