Skip to content

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.

  1. Create the collection case. Requires CreateCollectionBatch (or CreateCollectionBatchWithSingleInvoice to start from one invoice). It is created with main status OPEN and ledger status COLLECTION.

    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_CLAIM event. ledgerStatus defaults to COLLECTION; pass it in the body to override.

  2. (Optional) Set or replace the collection profile if you did not pass one at creation: PUT /collection-batches/$CB_ID/replace-collection-profile (ChangeCollectionProfile).

  3. 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_CLAIM event is booked, the case is marked distributed (isDistributed = true), the collection fee is booked as a COLLECTION_BATCH_FEE financial 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.

  4. Track progress with GET /collection-batches/$CB_ID and its financial events; advance the ledger status (WATCH, LEGAL, ENFORCEMENT, …) with PUT /collection-batches/$CB_ID (UpdateCollectionBatch).