Skip to main content

Cases

Base URL
https://referral-api.debitura.com
Authentication
API key in the XApiKey header

List cases for referral partner clients

GET/cases

Retrieves a paginated list of debt collection cases for all clients linked to the authenticated referral partner.

Case Lifecycle Stages Cases progress through a defined lifecycle: • Pending contract signing - Client hasn't signed debt collection agreement yet • Pending Verification Internal - Case awaiting internal Debitura review • Pending Verification - Case awaiting partner verification • More Info Required - More information required from creditor • Collecting Quotes - Awaiting quote from collection partner • Pending Quote Selection - Quote provided by partner • Active - Case is being actively collected • Paused - Collection temporarily paused • Closed - Case is closed (check CloseCode for reason)

Filtering Options • FromDate/ToDate - Filter by case creation date range (ISO 8601) • ExternalTenantId - Filter to specific client using your identifier • Statuses - Filter by lifecycle status(es) • Query - Search across reference numbers and debtor name • WaitingOn - Client or Debitura (held cases only; string values)

Held cases expose hold.waitingOn, waitingSince, requestDelivery (Pending/Delivered/Failed) and the latest unanswered client question. Delivery failure reasons and internal reviewer data are never returned. Pending/failed delivery does not start a response deadline; an unknown delivery time stays null. Summary counts follow all requested filters, before pagination.

Sorting • Sort - Sort field and direction (format: 'field:direction') • Supported fields: DateCreated, GrossAmount, DueDate • Examples: 'DateCreated:desc', 'GrossAmount:asc', 'DueDate:desc' • Default: DateCreated:desc (newest first)

Query parameters

  • FromDatedatetime

    Filter cases from this date (inclusive, based on case creation date). ISO 8601 format.

  • ToDatedatetime

    Filter cases to this date (inclusive, based on case creation date). ISO 8601 format.

  • ExternalTenantIdstring

    Filter by specific client's external tenant ID

  • Statusesarray of strings

    Filter by case lifecycle status(es). Multiple values can be provided. Accepts enum names (e.g. "Active", "Closed") or descriptions (e.g. "More Info Required").

  • Querystring

    Search query across case reference, creditor reference, and debtor name

  • WaitingOnstring

    Filter held cases by Client or Debitura. Numeric values are not accepted.

  • Pageinteger

    Page number (1-indexed)

    Min 1
  • PageSizeinteger

    Number of results per page (default: 10, max: 100)

    1 to 100
  • CountryIdsarray of integers

    Filter by debtor country ID(s). Multiple values can be provided. Only cases where the debtor's country matches one of the specified IDs are returned.

  • CollectionPartnerIdsarray of uuids

    Filter by collection partner ID(s). Multiple values can be provided. Only cases assigned to one of the specified collection partners are returned.

  • Sortstring

    Sort field and direction. Format: "field[:asc|desc]" Supported fields: DateCreated, GrossAmount, DueDate Examples: "DateCreated:desc", "GrossAmount:asc" Default: DateCreated:desc

Returns

200 Cases retrieved successfully

  • pageobject

    Paging metadata describing a paged result set.

  • casesarray of objectsnullable

    A debt collection case as seen by a referral partner, with your ExternalTenantId on Client.

  • summaryobject

Errors

400Invalid request parameters
500Internal server error

See Error handling.

GET/cases
curl https://referral-api.debitura.com/cases \
-H "XApiKey: $DEBITURA_API_KEY"
Response
{
"page": {
"totalResults": 42,
"pageSize": 25,
"currentPage": 1,
"responseCount": 42,
"totalPages": 1
},
"cases": [
{
"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
"reference": "INV-2026-0042",
"creditorReference": "INV-2026-0042",
"client": {
"externalTenantId": "string",
"creditorId": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
"companyName": "Muster GmbH",
"contacts": {
"onboardingUser": {},
"officeEmail": {},
"otherUsers": []
}
},
"debtor": {
"name": "Muster GmbH",
"country": "Germany"
},
"grossAmount": 2500,
"remainder": 1.5,
"currency": "EUR",
"lifecycle": "string",
"closeCode": "string",
"currentEngagementPhase": "string",
"dateCreated": "2026-10-01T14:05:00Z",
"dueDate": "2026-10-01T14:05:00Z",
"dateCollectionStarted": "2026-10-01T14:05:00Z",
"dateFinished": "2026-10-01T14:05:00Z",
"validation": {
"needsInfo": true,
"creditorRespondedAt": "2026-10-01T14:05:00Z",
"items": [
{}
]
},
"hold": {
"waitingOn": "Client",
"waitingSince": "2026-10-01T14:05:00Z",
"requestDelivery": "Pending",
"question": "string"
},
"collectionPartner": "string",
"expectedReferralRatePercentage": 1.5
}
],
"summary": {
"totalCases": 42,
"casesThisMonth": 3,
"byLifecycle": {
"active": 3,
"pending": 3,
"closed": 3,
"paused": 3
},
"byWaitingOn": {
"client": 3,
"debitura": 3
}
}
}

Get case detail with potential revenue breakdown

GET/cases/{id}

Retrieves a single case with all standard fields plus a potential revenue breakdown showing what the referral partner would earn if the full amount is collected.

Path parameters

  • iduuidRequired

Returns

200 Case retrieved successfully

  • iduuid
  • referencestringnullable
  • creditorReferencestringnullable
  • clientobject

    Client (creditor) info with referral-partner-specific ExternalTenantId.

  • debtorobject

    Debtor info for the case.

  • grossAmountnumber
  • remaindernumber
  • currencystringnullable
  • lifecyclestringnullable
  • closeCodestringnullable
  • currentEngagementPhasestringnullable

    The current phase of the case's engagement: "Pre-legal", "Legal", or "Enforcement". Null means no active engagement — see CurrentEngagementPhase for full semantics (not monotonic, persists after case closure).

  • dateCreateddatetime
  • dueDatedatetime
  • dateCollectionStarteddatetimenullable
  • dateFinisheddatetimenullable
  • validationobject

    The case's current validation status: whether information is needed, and what to supply.

  • holdobject

    Allowlisted referral visibility; never attach validation entities or internal diagnostics.

  • collectionPartnerstringnullable

    Display name of the collection partner handling this case (e.g. "Oriel Collections"). Null if no collection partner has been assigned yet.

  • expectedReferralRatePercentagenumbernullable

    The expected referral fee rate as a percentage (e.g. 70.0 = 70%). Uses the per-assignment override when set, otherwise the referral link's snapshotted rate (frozen at link creation time). Null when no collection partner has been assigned yet.

  • potentialRevenueobject

    Breakdown of potential revenue if the full case amount is collected. All amounts are in USD; percentages are displayed as whole numbers (e.g. 9.5 = 9.5%).

Errors

404Case not found
500Internal server error

See Error handling.

GET/cases/{id}
curl https://referral-api.debitura.com/cases/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \
-H "XApiKey: $DEBITURA_API_KEY"
Response
{
"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
"reference": "INV-2026-0042",
"creditorReference": "INV-2026-0042",
"client": {
"externalTenantId": "string",
"creditorId": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
"companyName": "Muster GmbH",
"contacts": {
"onboardingUser": {
"email": "finance@example.com",
"name": "Muster GmbH"
},
"officeEmail": "finance@example.com",
"otherUsers": [
{
"email": {},
"name": {}
}
]
}
},
"debtor": {
"name": "Muster GmbH",
"country": "Germany"
},
"grossAmount": 2500,
"remainder": 1.5,
"currency": "EUR",
"lifecycle": "string",
"closeCode": "string",
"currentEngagementPhase": "string",
"dateCreated": "2026-10-01T14:05:00Z",
"dueDate": "2026-10-01T14:05:00Z",
"dateCollectionStarted": "2026-10-01T14:05:00Z",
"dateFinished": "2026-10-01T14:05:00Z",
"validation": {
"needsInfo": true,
"creditorRespondedAt": "2026-10-01T14:05:00Z",
"items": [
{
"resolutionArea": "string",
"description": "string"
}
]
},
"hold": {
"waitingOn": "Client",
"waitingSince": "2026-10-01T14:05:00Z",
"requestDelivery": "Pending",
"question": "string"
},
"collectionPartner": "string",
"expectedReferralRatePercentage": 1.5,
"potentialRevenue": {
"grossAmountUsd": 2500,
"successFeePercentage": 2500,
"collectionPartnerRevenueUsd": 1.5,
"platformRevenueSharePercentage": 1.5,
"platformRevenueUsd": 1.5,
"referralFeePercentage": 2500,
"referralRevenueUsd": 1.5
}
}

Upload a file to a case. Optionally posts a system chat message to notify the collection partner.

POST/cases/{caseId}/files

Uploads a file and associates it with a case owned by one of the referral partner's clients.

File requirements:

  • Maximum file size: 25 MB
  • Allowed types: PDF, Excel (.xls, .xlsx), CSV, Text (.txt), Images (.jpg, .jpeg, .png, .gif)

documentType (optional form field, case-insensitive) says what the document is. Omit it when you do not know it; the file is then stored as not specified. Valid values: OriginalInvoice, AccountStatement, Contract, TermsAndConditions, ProofOfDelivery, DemandLetter, Correspondence, PaymentProof, CourtDocument, IdentityDocument, Miscellaneous. Still accepted for existing integrations: DebtorDocuments, CreditorDocuments, PartnerDocuments. Any other value is rejected with 400 and error InvalidDocumentType.

When sendChatNotification is true (default), a system message is posted on the case chat to notify the collection partner that a new file was uploaded.

Path parameters

  • caseIduuidRequired

Query parameters

  • sendChatNotificationboolean

Headers

  • Idempotency-Keystring

    Optional non-empty, non-whitespace idempotency key (max 255 characters) for safely retrying this request. If a previous request used the same key with an identical body, the original terminal response is replayed verbatim. Reusing the key with a different body returns 422 with businessErrors[0].type: "IdempotencyConflict". Field-level 400 validation errors are not stored, so you may fix the request and retry with the same key.

    Max 255 characters

Request bodymultipart/form-data

  • filefile
  • documentTypestring

Returns

200 File uploaded successfully — no response body.

Errors

400Validation error
404Case not found
413File too large
415Unsupported file type
500Internal server error

See Error handling.

POST/cases/{caseId}/files
curl -X POST https://referral-api.debitura.com/cases/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31/files \
-H "XApiKey: $DEBITURA_API_KEY" \
-F "file=@invoice.pdf"
Response

200 File uploaded successfully. No response body.

Preview case pricing

POST/cases/preview

Preview the success fee pricing for a potential case without creating it.

What This Endpoint Returns:

  • IsEligible - Whether the case can be submitted (partner available in this jurisdiction)
  • PricingPreview - Estimated success fee with base rate and any age-based surcharges
  • Jurisdiction - Geographic details for the matched jurisdiction

Use This To:

  1. Show your clients the Debitura success fee before they onboard
  2. Check if a jurisdiction is supported before starting the onboarding flow
  3. Display age-adjusted pricing for aged debt portfolios

Required Fields:

  • AmountToRecover - Total principal amount
  • CurrencyCode - ISO 4217 currency code (e.g., 'GBP', 'EUR', 'USD')
  • Debtor.Type - 'Company' or 'Private'
  • Debtor.CountryAlpha2 - ISO 3166-1 alpha-2 country code
  • Debtor.StateAlpha2 - Required for US cases only (e.g., 'CA', 'NY')

Age-Based Pricing (Optional)

Single invoice — pass dueDate: The simplest way to get age-adjusted pricing. Provide the invoice due date (ISO 8601, e.g. 2024-01-15) and Debitura computes the age surcharge internally. Cannot be a future date. Mutually exclusive with age bucket fields.

Multi-invoice portfolio — pass age buckets: For portfolios with invoices at different ages, pass the portion of the total that falls into each age bracket:

  • AmountToRecoverOver12Months and AmountToRecoverOver24Months must be provided together
  • AmountToRecoverOver6Months is optional but improves pricing tier accuracy at the 180-day threshold; can only be provided alongside the 12/24-month fields, must be >= AmountToRecoverOver12Months, and must be <= AmountToRecover

Multi-invoice portfolio — pass claimLines instead (recommended): Send the unpaid invoices and let Debitura do the arithmetic:

"claimLines": [
  { "dueDate": "2024-01-15", "amount": 423.42, "reference": "INV-1001" },
  { "dueDate": "2025-05-02", "amount": 700.87, "reference": "INV-1042" }
]
  • amount is the outstanding balance on that invoice, already net of payments and credit notes — not its original face value.
  • Debitura derives amountToRecover and all three age buckets from the lines and prices on them, so send claimLines instead of amountToRecover, the age bucket fields, and dueDate. Combining any of those with claimLines is a 400.
  • Use claimLines whenever the debtor has already part-paid: it is the only way to express an honest age profile on a part-paid claim, because the buckets are computed on the same outstanding balances the total is.
  • Maximum 1000 lines. Per-line errors are returned keyed by index, e.g. ClaimLines[2].DueDate.
  • The same ledger produces the same derived total and buckets on POST /clients case submission.

dueDate, the age bucket fields and claimLines are mutually exclusive — use one of the three. When no age fields are provided, base pricing is returned without age surcharge.

Important Notes:

  • This endpoint does NOT create a case — it only previews pricing
  • Pricing is based on the referral partner's agreed rate (jurisdiction pricing zone rate if applicable)
  • No creditor or client account is needed

Request body

  • amountToRecovernumber

    The TOTAL amount to recover for this case. This represents the full principal amount across all invoices (if multiple invoices are bundled).

    For multi-invoice cases with different ages, you can optionally provide age breakdown fields (AmountToRecoverOver12Months and AmountToRecoverOver24Months) to enable blended age-based pricing.

    If age breakdown fields are omitted, the preview will show base pricing without age surcharge calculation.

    Required unless you send ClaimLines, in which case this must be omitted or 0 — the server derives the total by summing the outstanding balance of every claim line. Sending both a non-zero AmountToRecover and ClaimLines is rejected, because the two would disagree.

  • currencyCodestringRequired

    ISO 4217 currency code for the amount (e.g., "DKK", "EUR", "USD")

    3–3 characters
  • debtorobjectRequired

    Simplified debtor information for case preview. Only includes the minimum fields required for partner routing and eligibility checking.

  • amountToRecoverOver6Monthsnumbernullable

    OPTIONAL - MULTI-INVOICE AGE BUCKET PRICING (PRICING ZONE 180-DAY THRESHOLD)

    The portion of AmountToRecover that is more than 6 months (180 days) overdue. This includes amounts that are 12+ and 24+ months overdue.

    This field is optional and can only be provided alongside AmountToRecoverOver12Months and AmountToRecoverOver24Months. It enables precise pricing tier selection based on the 180-day threshold. When omitted, the system falls back to deriving the threshold from AmountToRecoverOver12Months.

    Validation rules:

    • Must be ≤ AmountToRecover
    • Must be ≥ AmountToRecoverOver12Months
  • amountToRecoverOver12Monthsnumbernullable

    OPTIONAL - MULTI-INVOICE AGE BUCKET PRICING

    The portion of AmountToRecover that is more than 12 months overdue. This includes amounts that are 24+ months overdue.

    If provided, AmountToRecoverOver24Months must also be provided. Both fields must be provided together or both omitted.

    Used to calculate blended age uplift for multi-invoice cases:

    • Amount under 12 months = AmountToRecover - AmountToRecoverOver12Months
    • Amount 12-24 months = AmountToRecoverOver12Months - AmountToRecoverOver24Months
    • Amount over 24 months = AmountToRecoverOver24Months

    Blended uplift formula: ((A12-A24)×10 + A24×20) / AmountToRecover where A12 = AmountToRecoverOver12Months, A24 = AmountToRecoverOver24Months

    Validation rules:

    • Must be ≤ AmountToRecover
    • Must be ≥ AmountToRecoverOver24Months
  • amountToRecoverOver24Monthsnumbernullable

    OPTIONAL - MULTI-INVOICE AGE BUCKET PRICING

    The portion of AmountToRecover that is more than 24 months overdue.

    If provided, AmountToRecoverOver12Months must also be provided. Both fields must be provided together or both omitted.

    Used to calculate blended age uplift for multi-invoice cases. See AmountToRecoverOver12Months for full details on the calculation.

    Validation rules:

    • Must be ≤ AmountToRecoverOver12Months
    • Must be ≤ AmountToRecover
  • claimLinesarray of objectsnullable

    OPTIONAL - the unpaid invoices making up this claim, one line per invoice, each carrying its own outstanding balance and payment deadline.

    When supplied, the server derives AmountToRecover and all three cumulative age buckets from these lines and prices on them, so send them instead of — never alongside — AmountToRecover, the AmountToRecoverOver6/12/24Months fields, or DueDate. Supplying any of those together with ClaimLines is rejected with a 400.

    Use this whenever the debtor has already part-paid the claim: the buckets are then computed on the same outstanding balances the total is computed on, so the age profile stays honest. Maximum 1000 lines. Claim lines are a pricing input only and are never stored.

  • dueDatedatetimenullable

    Optional invoice due date. Mutually exclusive with age bucket fields and with ClaimLines. If provided, Debitura computes the age surcharge internally — no need to calculate age buckets. Cannot be a future date.

  • returnUrlstringnullable

    Optional: URL the creditor user should land on after completing any pending signing chain (SDCA upgrade / PoA / JPA / KYC) on the Debitura Creditors app. Embedded, URL-encoded, into PreviewCaseResponseApiViewModel.Result.SigningHandoff.CombinedSigningUrl (when at least one signing-related required action is present) and into BusinessErrorResponseApiDTO.SigningHandoff.CombinedSigningUrl / InvoiceDto.SigningHandoff.CombinedSigningUrl on POST /cases.

    Must be an absolute http(s) URL. Values that fail validation (relative URLs, non-http schemes, header-injection characters) are silently dropped — the combined URL is still emitted but without the returnUrl query parameter, and the Creditors app falls back to its own safe in-app default landing.

    Additive. Existing integrations that omit this field see the same behaviour as before.

    Max 2048 characters

Returns

200 Preview completed

  • isEligibleboolean

    Whether the case is eligible for collection (a partner is available in the requested jurisdiction). If false, check IneligibilityReason for details.

  • ineligibilityReasonstringnullable

    Explanation of why the case is not eligible (only present when IsEligible = false). Branch on IneligibilityReasonCode rather than on this text, which may be reworded.

  • ineligibilityReasonCodestringnullable

    Stable machine-readable reason, present whenever IneligibilityReason is One of: NoGeographicCoverage, AmountBelowMinimum, AmountAboveMaximum, DebtorTypeNotCovered, NotCoveredByPartnerRules, ExcludedForClient, EligibilityUndetermined.

    Only NoGeographicCoverage means we have no partner in the jurisdiction. AmountBelowMinimum means the geography IS covered and only the claim amount fell short — do not advise the client to correct their address. EligibilityUndetermined is a transient failure on our side.

  • applicableMinimumAmountnumbernullable

    What this claim would have to reach to be accepted, in the currency of the request; never below the platform minimum of 100 USD. Only present when no partner was matched, and not when the request currency cannot be priced. Null when no partner covering this case declares a minimum.

  • applicableMinimumCurrencyCodestringnullable

    ISO code that ApplicableMinimumAmount is expressed in.

  • marketMinimumAmountnumbernullable

    The smallest claim the marketplace takes for this jurisdiction and debtor type, in the currency of the request: the lowest partner floor, never below the platform minimum of 100 USD. A statement about the market, not about this claim: it is returned whether or not a partner was selected, and does not depend on the claim amount or on the caller. It is not the admission rules applied when a case is created. Null when no partner covers the market or the amount cannot be priced.

  • marketMinimumCurrencyCodestringnullable

    ISO code that MarketMinimumAmount is expressed in.

  • amountCheckUnavailableboolean

    True when a currency conversion needed to evaluate the claim amount was unavailable, so the amount-based part of this answer was NOT actually checked It can be true on an eligible answer: a partner matched only because amount conditions failed open while rates were down. Treat such an answer as provisional and retry rather than relying on the floor having been applied.

  • jurisdictionobject

    Geographic jurisdiction information for the case.

  • pricingPreviewobject

    Estimated pricing for the case, including age-based surcharges.

  • requiresKycVerificationboolean

    Whether the resolved collection partner requires KYC verification before cases can be submitted. When true, the creditor must complete KYC verification before case creation. Use the case creation endpoint with a creditor ID to determine whether KYC is already on file.

  • pendingActionsarray of objectsnullable

    Structured list of actions the creditor will need to complete before (or as part of) submitting cases for the matched collection partner. Always present — empty when nothing is pending.

    At preview time the request is creditor-less, so this list reflects the matched partner's hard requirements (e.g. PoA per partner, KYC if the partner is configured for it). Creditor-specific items such as SDCA upgrade are returned only when the API has creditor context.

    Additive over RequiresKycVerification — old clients that only read RequiresKycVerification are unaffected.

  • combinedSigningUrlstringnullable

    Always null on /cases/preview because preview is creditor-less — no concrete creditor signing state exists to chain. The structured PendingActions array on this response indicates which step types the matched partner will require ahead of onboarding.

    The canonical placement for the combined-signing URL on POST /cases responses is the nested SigningHandoff envelope (a SigningHandoffDto on both BusinessErrorResponseApiDTO and InvoiceDto). The combined URL is populated on POST /cases responses, where the creditor IS identified: <list type="bullet"><item><description>422 with at least one signing-related business error (MissingDebtCollectionContract, MissingPowerOfAttorney, MissingKycVerification) — see BusinessErrorResponseApiDTO.SigningHandoff.CombinedSigningUrl.</description></item><item><description>200 with AllowPendingContracts=true when signings remain — see InvoiceDto.SigningHandoff.CombinedSigningUrl.</description></item></list> Both POST surfaces use the same Creditors-app /Signing/PendingContracts entry point and walk the SDCA-upgrade → PoA → JPA → KYC chain end-to-end.

    This flat CombinedSigningUrl field on /cases/preview is preserved as-is for backward compatibility (it is always null in practice).

Errors

400Invalid request (validation errors)
500Internal server error

See Error handling.

POST/cases/preview
curl -X POST https://referral-api.debitura.com/cases/preview \
-H "XApiKey: $DEBITURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountToRecover": 4000,
"currencyCode": "EUR",
"debtor": {
"type": "Company",
"countryAlpha2": "PT"
},
"dueDate": "2026-05-01"
}'
Response
{
"isEligible": true,
"ineligibilityReason": null,
"ineligibilityReasonCode": null,
"applicableMinimumAmount": 2500,
"applicableMinimumCurrencyCode": "EUR",
"marketMinimumAmount": 2500,
"marketMinimumCurrencyCode": "EUR",
"amountCheckUnavailable": true,
"jurisdiction": {
"id": 3,
"name": "Muster GmbH",
"countryAlpha2": "DE",
"stateAlpha2": null
},
"pricingPreview": {
"baseSuccessFeePercentage": 2500,
"ageSurchargePercentage": 1.5,
"totalSuccessFeePercentage": 2500,
"currencyCode": "EUR",
"pricingSource": "string",
"pricingSourceDescription": "string"
},
"requiresKycVerification": true,
"pendingActions": [
{
"type": "SdcaUpgrade",
"collectionPartnerId": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
"dueDate": "2026-10-01T14:05:00Z"
}
],
"combinedSigningUrl": "https://app.debitura.com/…"
}