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