Debitura Cases API

Cases

Operations 31

GET /cases List collection cases.
POST /cases Create collection case
GET /cases/{id} Fetch case by ID
GET /cases/case-reference/{caseReference} Fetch case by reference
GET /cases/by-partner-reference/{reference} Fetch a single case by the collection partner's own reference ID.
GET /cases/by-partner-reference Batch lookup of cases by the collection partner's own reference IDs.
GET /cases/by-creditor-reference Fetch a single case by creditor reference, scoped to a specific creditor and partner.
GET /cases/{id}/timeline Fetch case timeline
GET /cases/{id}/chats Fetch case chats
POST /cases/{id}/chats Send a chat message on a case
GET /cases/{id}/payments Fetch case payments
POST /cases/{id}/payments Create a payment on a case
GET /cases/{id}/files Get case files
POST /cases/{id}/files Upload a file to a case
POST /cases/{id}/notes Create a note on a case
PUT /cases/{id}/payments/{paymentId} Edit a payment on a case
DELETE /cases/{id}/payments/{paymentId} Delete a payment on a case
POST /cases/{id}/close Close a case
POST /cases/{id}/start Activate a case from PendingVerification
PUT /cases/{id}/fees Update case fees and/or principal
GET /cases/{id}/exclusive-period Get exclusive collection period chain
GET /cases/{id}/validation Get full validation detail for a case
POST /cases/preview Preview case eligibility and requirements
GET /cases/by-creditor-reference/{creditorReference} Fetch case by creditor reference
GET /cases/{id}/contract-status Get contract signing status for a case
GET /cases/{id}/quote-requests List quote requests for a case
GET /cases/{id}/quote-requests/{quoteRequestId} Get quote request details
GET /cases/{id}/quote-requests/{quoteRequestId}/quotes List quotes for a quote request
GET /cases/{id}/quote-requests/{quoteRequestId}/quotes/{quoteId} Get quote details
GET /cases/{id}/tasks List tasks for a case
POST /cases/{caseId}/files Upload a file to a case. Optionally posts a system chat message to notify the collection partner.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/debitura-cases-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

debitura-cases-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Debitura Cases API
  version: v1
  description: 'Operations tagged Cases across 3 of this provider''s published API definitions: debitura-collection-partner-api.json, debitura-customer-api.json, debitura-referral-partner-api.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://collectionpartner-api.debitura.com
  description: Production
- url: https://customer-api.debitura.com
  description: Production
- url: https://referral-api.debitura.com
  description: Production
tags:
- name: Cases
  description: Cases
paths:
  /cases:
    get:
      tags:
      - Cases
      summary: List collection cases.
      description: "Returns a paginated list of cases where you are the **collection partner** (actively collecting the debt).\n\n**What is a Collection Partner?**\nA collection partner is an agency or law firm that performs the actual debt recovery work. When you appear as the collection partner on a case, you are responsible for:\n- Contacting the debtor and attempting recovery\n- Managing the case lifecycle and status updates\n- Recording payments and fees\n- Uploading documents and evidence\n- Communicating with the creditor through the case chat\n\n**Note:** This endpoint shows cases where you are collecting. For cases you submitted on behalf of your own clients (where you are the managing partner), use the `/managed-cases` endpoint instead.\n\n**Pagination:**\n- page (default: 1) - Page number, starting from 1\n- pageSize (default: 10, max: 100) - Number of results per page\n\n**Filters:**\n- statuses - Filter by case lifecycle status (comma-separated list)\n  Valid values: PendingVerification, NeedsAdditionalDetails, Leads, LeadsQuoteGiven, Active, Paused, Closed\n  **Note:** Partner-specific statuses only. Internal platform statuses like 'PendingContractSigning' or 'PendingVerificationInternal' are not available here — cases in those stages are hidden from every collection-partner-facing endpoint until Debitura's internal verification clears, regardless of assignment.\n- divisionIds - Filter by creditor division IDs (comma-separated GUIDs)\n- debtorIds - Filter by specific debtor IDs (comma-separated GUIDs)\n- ids - Filter by specific case IDs (comma-separated GUIDs)\n- includeTestCases - When true, includes test/demo cases owned by the caller. Defaults to false.\n\n**Sorting:**\n- sort - Sort field and direction (format: 'field:direction')\n  Examples: 'date:desc', 'amount:asc', 'debtorName:asc'\n\n**Response:**\n- Returns InvoiceListApiDTO with page metadata and cases array\n- Page metadata includes: totalResults, currentPage, skipped, pageSize"
      parameters:
      - name: Page
        in: query
        schema:
          type: integer
          format: int32
      - name: PageSize
        in: query
        schema:
          type: integer
          format: int32
      - name: DebtorIds
        in: query
        schema:
          type: array
          items:
            type: string
            format: uuid
      - name: Ids
        in: query
        schema:
          type: array
          items:
            type: string
            format: uuid
      - name: Statuses
        in: query
        description: 'Filter by case lifecycle status. Valid values: PendingContractSigning, PendingVerificationInternal,

          PendingVerification, NeedsAdditionalDetails, Leads, LeadsQuoteGiven, Active, Paused, Closed, Merged

          (case-insensitive; both name and description forms accepted).'
        schema:
          type: array
          items:
            type: string
      - name: DivisionIds
        in: query
        description: Optional list of division IDs to filter by
        schema:
          type: array
          items:
            type: string
            format: uuid
      - name: Sort
        in: query
        description: 'Optional sorting string "Field[:asc|desc][,Field2[:asc|desc]]…".

          Valid sort fields: DateCreated, DateUpdated, DateFinished, DateCollectionStarted,

          DueDate, Date, GrossAmount, Remainder, InterestFees, CollectionFees, ReminderFees,

          Lifecycle, CloseCode. Examples: ''DateCreated:desc'', ''DueDate:asc''. Unknown fields are silently ignored.'
        schema:
          type: string
      - name: includeTestCases
        in: query
        description: "When true, includes test/demo cases where the caller is the owner (either as collection partner\nor as managing partner). Defaults to false.\n            \nImplementation note: the spec sets CollectionPartnerIds = [callerPartnerId] as an AND filter.\nSelf-managed test cases are still returned because routing isolation guarantees\nCollectionPartnerId == ManagedByPartnerId for cases submitted by the managing partner to themselves.\nTestCaseOwnerManagedByPartnerId provides the OR-leg for non-self-routed test cases."
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: List returned
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceListDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceListDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceListDto'
        '400':
          description: Invalid query parameters (returns specific validation errors)
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    post:
      tags:
      - Cases
      summary: Create collection case
      description: "Creates a new collection case for debt collection.\n\n**Test Mode:**\n- Set isTest=true to create a test case (case IS created in the database but marked as test data)\n- Test cases are excluded from production metrics and can be easily filtered or deleted\n- Use test mode for integration testing and development\n\n**Debtor Rules:**\n- debtor.type must be \"Company\" or \"Private\"\n  - Company → debtor.name is mandatory (company name)\n  - Private → debtor.name is mandatory (person's full name)\n\n**Geographic Rules:**\n- debtor.countryAlpha2 (ISO 3166-1 alpha-2) is always required\n- debtor.state is a free-text region description\n- For US debtors: debtor.stateAlpha2 (two-letter state code) is also required – debtor.state is ignored in that scenario\n\n**Optional Parameters:**\n- creditorDivisionId - Assign case to a specific division (for multi-division creditors)\n- collectionPartnerId - Override automatic partner assignment with a specific collection partner\n- skipDebituraVerification - Skip internal verification steps (advanced use)\n- skipCreationEmails - Deprecated: accepted for backwards compatibility but ignored server-side. Creation emails are always suppressed in favour of the hourly CasesStarted digest\n- allowPendingContracts - Accept cases with unsigned contracts in 'PendingContractSigning' status instead of returning 422\n\n**Error Responses:**\n- 400: Field validation errors (returns JSON object with field names as keys and error arrays as values)\n- 422: Business rule violations (returns BusinessErrorResponseApiDTO with type, message, and solutionUrl)\n- 500: Server errors"
      parameters:
      - name: Idempotency-Key
        in: header
        description: 'Optional 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 `Type: "IdempotencyConflict"`. Field-level 400 validation errors are not stored, so you may fix the request and retry with the same key.'
        schema:
          maxLength: 255
          type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateCollectionCaseRequestApiViewModel'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateCollectionCaseRequestApiViewModel'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateCollectionCaseRequestApiViewModel'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateCollectionCaseRequestApiViewModel'
      responses:
        '200':
          description: Case created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
        '400':
          description: Invalid request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '422':
          description: Business rule violation
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.BusinessErrorResponseApiDTO'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.BusinessErrorResponseApiDTO'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.BusinessErrorResponseApiDTO'
        '500':
          description: Server error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/{id}:
    get:
      tags:
      - Cases
      summary: Fetch case by ID
      description: 'Returns detailed case information for a specific case ID (GUID).


        **Access Control:**

        Only returns cases where you are the collection partner, or test/demo cases where you are the managing partner. For managed production cases, use `/managed-cases/{id}` instead.


        **Response Includes:**

        - Case details (reference, amount, currency, status, lifecycle stage)

        - Debtor information (name, address, contact details, company/private type)

        - Creditor information

        - Collection partner assignment details

        - Financial breakdown (principal, interest, fees)

        - Important dates (creation, assignment, due dates)

        - Geographic information (jurisdiction, country)'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Case found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
        '400':
          description: ID missing, empty, or ID is not a collection case
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Case not found, deleted, or not assigned to you as collection partner
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/case-reference/{caseReference}:
    get:
      tags:
      - Cases
      summary: Fetch case by reference
      description: 'Returns detailed case information using the Debitura case reference (e.g., ''Q8OAXF3W'').


        **Use Case:**

        Use this endpoint when you have the Debitura case reference (visible in the partner portal and emails) but not the GUID. This is helpful for customer service integrations or when referencing cases in communications.


        **Access Control:**

        Only returns cases where you are the collection partner, or test/demo cases where you are the managing partner. For managed production cases, use `/managed-cases/case-reference/{reference}`.'
      parameters:
      - name: caseReference
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Case found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
        '400':
          description: Reference missing or reference is not a collection case
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Reference not found or not assigned to you as collection partner
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/by-partner-reference/{reference}:
    get:
      tags:
      - Cases
      summary: Fetch a single case by the collection partner's own reference ID.
      description: 'Returns detailed case information using the collection partner''s own reference (the `CollectionPartnerReference` field set during case activation).


        **Use Case:**

        Use this endpoint when you have your own internal case reference and want to look up the corresponding Debitura case. This is useful for integrating your case management system with Debitura.


        **Matching:**

        Exact string match only. Combined references like ''112179442 & 112179443'' must be queried with the full combined string.


        **Access Control:**

        Only returns cases where you are the collection partner and the case is a production collection case.'
      parameters:
      - name: reference
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Case found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
        '400':
          description: Reference missing or empty
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: No case found with this partner reference
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/by-partner-reference:
    get:
      tags:
      - Cases
      summary: Batch lookup of cases by the collection partner's own reference IDs.
      description: 'Returns a dictionary mapping each partner reference to its corresponding case details.


        **Use Case:**

        Use this endpoint to look up multiple cases at once using your own internal reference IDs. This is more efficient than making individual calls for each reference.


        **Parameters:**

        - references (required) - Comma-separated list of partner reference strings (max 100)


        **Matching:**

        Exact string match only. References not found or not assigned to you are omitted from the response (no error).


        **Response:**

        A dictionary where keys are the partner reference strings and values are the case details. Missing references are silently omitted.'
      parameters:
      - name: references
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Dictionary of reference to case
          content:
            text/plain:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            text/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
        '400':
          description: References parameter missing, empty, or exceeds maximum
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/by-creditor-reference:
    get:
      tags:
      - Cases
      summary: Fetch a single case by creditor reference, scoped to a specific creditor and partner.
      description: 'Returns detailed case information using the creditor''s own reference (`CreditorReference`) scoped to a specific creditor.


        **Use Case:**

        Use this endpoint when you have the creditor''s reference (e.g. from an invoice file or payment import) and need to look up the corresponding Debitura case. Because `CreditorReference` is only unique within a single creditor, you must also supply `creditorId` to make the lookup unambiguous.


        **Matching:**

        Exact string match on `CreditorReference`. The case must also belong to the specified creditor and be assigned to the calling partner.


        **Access Control:**

        Only returns production collection cases where you are the collection partner. The `creditorId` parameter scopes the lookup to a specific creditor — you can only retrieve cases for creditors whose cases are assigned to you.'
      parameters:
      - name: reference
        in: query
        schema:
          type: string
      - name: creditorId
        in: query
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Case found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.InvoiceDto'
        '400':
          description: Reference or creditorId missing or empty
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: No case found for this reference + creditor combination, or not assigned to you
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/{id}/timeline:
    get:
      tags:
      - Cases
      summary: Fetch case timeline
      description: 'Returns the complete chronological event history for a case along with the current engagement phase.


        **Timeline Events Include:**

        - Case assignment to collection partner

        - Status changes and lifecycle transitions

        - Payment recordings

        - Document uploads

        - Communication events

        - Fee additions

        - Manual updates and notes

        - System-generated events


        **Response shape:**

        - `items` — chronological list of timeline events

        - `currentEngagementPhase` — current phase of the active engagement: "Pre-legal", "Legal", or "Enforcement". Null when no active engagement exists.


        **Use Case:**

        Use this to track case progress, understand case history, audit actions, or display activity to users. Timeline events are ordered chronologically and include timestamps, event types, titles, and descriptions.


        **Note:** Timeline is filtered to show partner-relevant events only.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Timeline returned
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.CaseTimelineResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.CaseTimelineResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.CaseTimelineResponse'
        '400':
          description: Case ID missing or empty
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Case not found or not assigned to you as collection partner
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /cases/{id}/chats:
    get:
      tags:
      - Cases
      summary: Fetch case chats
      description: 'Returns all chat messages for a case in chronological order.


        **Chat Participants:**

        - Collection partner (you) - Messages from your team

        - Creditor - Messages from the client who owns the debt

        - Debitura support - System notifications and support messages

        - Managing partner (if applicable) - Messages from the partner who submitted the case


        **Message Details Include:**

        - Message content and timestamp

        - Sender information (name, role)

        - Message type (text, system notification, file attachment reference)

        - Read status and delivery information


        **Use Case:**

        Use this endpoint to build case communication interfaces, retrieve conversation history, or integrate case discussions into your systems. Perfect for customer service tools or partner portals.


        **Note:** If the case has no thread or messages, an empty array is returned.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Chats returned (empty array if no messages)
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Chats.ChatDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Chats.ChatDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Chats.ChatDto'
        '400':
          description: Case ID missing or empty
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Case not found or not assigned to you as collection partner
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    post:
      tags:
      - Cases
      summary: Send a chat message on a case
      description: 'Posts a new chat message on a case, visible to both the collection partner and the creditor.


        **Message Details:**

        - The message is attributed to the team member identified by `userId`

        - The creditor will receive an email notification about the new message

        - A task is created in the Debitura platform for the creditor to review the message

        - Messages appear in the case chat timeline in chronological order


        **Prerequisites:**

        - The case must exist and be assigned to you as collection partner

        - The `userId` must be a valid user ID from `GET /users` belonging to your team


        **Use Case:**

        Use this endpoint to communicate with creditors about case progress, request additional information, or provide status updates. Messages sent via this endpoint are equivalent to messages sent through the partner portal chat.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Idempotency-Key
        in: header
        description: Optional idempotency key (max 255 characters). If the same ke

# --- truncated at 32 KB (227 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/debitura/refs/heads/main/openapi/debitura-cases-api-openapi.yml