Create & Book Collection Case
A collection batch (collection case, ID prefix CB.) groups a debtor’s
expired invoices into a single errand. A collection profile is the workflow
template that drives its stages (notification, claim, monitoring), timing,
fees, and distribution. The case is “booked” once its collection-claim ledger
event is performed and the claim is distributed to the debtor.
Invoice numbers must be unique per client, so an invoice you create for a collection claim cannot reuse the number of an invoice the client already has. See Invoice numbers and payment references.
-
Create the collection case. Requires
CreateCollectionBatch(orCreateCollectionBatchWithSingleInvoiceto start from one invoice). It is created with main statusOPENand ledger statusCOLLECTION.Terminal window curl -X POST "https://$HOST/collection-batches" \-H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \-d '{"clientId": "C.100100","debtorId": "D.100200","currency": "SEK","productCode": "COLLECTION_SERVICE","collectionProfileCode": "STANDARD"}'Linking the collection profile generates the profile’s ledger events automatically, each scheduled at a planned date - including the
COLLECTION_CLAIMevent.ledgerStatusdefaults toCOLLECTION; pass it in the body to override. -
(Optional) Set or replace the collection profile if you did not pass one at creation:
PUT /collection-batches/$CB_ID/replace-collection-profile(ChangeCollectionProfile). -
The collection claim is performed on its planned date. A ledger event is not performed by a single API call; it runs through the reminder pipeline for its reminder date:
POST /reminders/generate(GenerateReminders) - builds the reminder + claim document.POST /reminders/authorize(AuthorizeReminders) - authorizes it.POST /reminders/bookkeep(BookkeepReminders) - books it.
When the
COLLECTION_CLAIMevent is booked, the case is marked distributed (isDistributed = true), the collection fee is booked as aCOLLECTION_BATCH_FEEfinancial event, and the claim document is queued for distribution to the debtor. This booked-and-distributed state is what “booked” means. In production, reminders can only be booked for the current day. -
Track progress with
GET /collection-batches/$CB_IDand its financial events; advance the ledger status (WATCH,LEGAL,ENFORCEMENT, …) withPUT /collection-batches/$CB_ID(UpdateCollectionBatch).
Where payments and fees are recorded
Section titled “Where payments and fees are recorded”Several invoices can share one collection case, so what belongs to the case as a whole is recorded on the case and what belongs to a single invoice stays on the invoice:
- Collection batch financial events, read with
GET /collection-batches/$CB_ID/financial-events(ReadCollectionBatchFinancialEvents). They hold the collection fees and the interest charged on the case, and the part of a payment that settles them. The types areCOLLECTION_BATCH_FEE,COLLECTION_BATCH_INTEREST,COLLECTION_BATCH_PAYMENT,COLLECTION_BATCH_LINKED_UNPLACED_PAYMENT,COLLECTION_BATCH_FEE_WRITEOFFandCOLLECTION_BATCH_INTEREST_WRITEOFF. A charge has a positive amount and a payment towards it a negative one. - Invoice financial events (
GET /invoices/events/financialandPOST /invoices/events/financial/search). They hold the part of a payment placed on the capital and on the invoice’s own reminder fees and interest.
One payment can therefore produce events in both places. How it is split follows the payment calculation order of the case.