Debitura Managed Cases API

Managed Cases

Operations 11

POST /managed-cases Create case as managing partner
GET /managed-cases List managed cases
GET /managed-cases/{id} Fetch managed case by ID
GET /managed-cases/case-reference/{caseReference} Fetch managed case by reference
GET /managed-cases/{id}/timeline Fetch managed case timeline
GET /managed-cases/{id}/chats Fetch managed case chats
GET /managed-cases/{id}/payments Fetch managed case payments
POST /managed-cases/{id}/payments Record a payment on a test case (managing partner)
PUT /managed-cases/{id}/payments/{paymentId} Edit a payment on a test case (managing partner)
DELETE /managed-cases/{id}/payments/{paymentId} Delete a payment on a test case (managing partner)
GET /managed-cases/{id}/files Get managed case files

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-managedcases-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-managedcases-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Debitura Collection Partner Managed Cases API
  description: 'Welcome to the Debitura Collection Partner API, your gateway to automating debt collection workflows on the world''s leading platform for cross-border debt recovery.


    As a trusted partner in Debitura''s network of 500+ collection agencies and law firms across 183 jurisdictions, this API provides the following capabilities:


    **Managing Assigned Cases** - For exclusive partners with designated jurisdictions:

    - Retrieve and manage cases assigned to your agency

    - Track case details, timelines, and communications

    - Update case status and payment information


    **Submitting Cases to the Network** - Available to all partners:

    - Submit new cases on behalf of your clients to our global network

    - Track status of cases submitted to partners worldwide

    - Provide global coverage to your existing clients and earn a 20% revenue share

    - Manage cross-border debt collection through one unified platform


    All operations follow our standardized Debt Collection Agreement and no-cure-no-pay model. The API provides the same functionality available through our user-friendly partner portal at https://partner.debitura.com.


    For support or inquiries, please reach out to us at contact@debitura.com. To obtain your API key, log into the partner portal and navigate to: https://partner.debitura.com/CollectionPartnerApiKey/Index


    📖 Full documentation, guides, and integration walkthroughs: https://docs.debitura.com/collection-partners


    NOTE: Authentication requires the XApiKey header with your partner-specific API key. Available features depend on your partnership agreement.'
  contact:
    name: Debitura Support
    url: https://www.debitura.com/integration
    email: contact@debitura.com
  version: v1
servers:
- url: https://collectionpartner-api.debitura.com
  description: Production
security:
- ApiKey: []
tags:
- name: ManagedCases
  description: Managed Cases
paths:
  /managed-cases:
    post:
      tags:
      - ManagedCases
      summary: Create case as managing partner
      description: "Creates a collection case on behalf of your client (or yourself) through the Debitura platform.\n\n**Understanding the Creditor Field:**\nThe creditor is the party that the debtor owes money to. This can be:\n- **Your client's company** - When you're submitting cases on behalf of clients you represent\n- **Your own company** - When you're submitting your own debt collection cases\n\n**How It Works:**\n1. You provide the creditor's basic information (company name + country)\n2. Debitura creates a creditor record (if one doesn't exist)\n3. The collection case is created under that creditor\n4. You are set as the managing partner\n5. The case is automatically assigned to a collection partner based on jurisdiction\n\n**Managing Partner Benefits:**\n- Submit cases on behalf of your clients via API\n- Maintain your client relationships\n- Leverage Debitura's global partner network\n- Monitor case progress through read-only access\n- Provide full-service debt recovery to your clients\n\n**Required Fields:**\n- CreditorCompanyName - The company name of who the debtor owes money to\n- CreditorCountryAlpha2 OR CreditorCountry - Creditor's country (provide either code or name)\n- CurrencyCode - Case currency (e.g., 'USD', 'EUR', 'DKK')\n- Date - Invoice issue date\n- AmountToRecover - Claim amount\n- Debtor - Complete debtor information with jurisdiction\n\n**Debtor Rules:**\n- debtor.type must be \"Company\" or \"Person\"\n  - Company → debtor.name is mandatory (company name)\n  - Person → debtor.name is mandatory (person's full name)\n- For Company debtors, debtor.contactPerson is required\n- debtor.country (or debtor.countryAlpha2) is always required\n- debtor.stateAlpha2 is **required for US cases** - provide the two-letter state code (e.g., \"CA\", \"NY\"). For non-US cases, this field is optional.\n- debtor.state is a general-purpose region field (not used for US jurisdiction resolution)\n\n**Optional Fields:**\n- DueDate - Invoice due date\n- Comments - Additional notes\n- ClaimDescription - Description of the claim\n- CreditorReference - Your client's internal reference\n- CollectionPartnerId - Override automatic partner matching\n- IsTest - Mark as test case (excluded from production metrics)\n\n**Response:**\nReturns the created case details including the case ID, reference number, and assignment information.\n\n**Important Notes:**\n- Creditor records are created fresh each time (no duplicate detection)\n- Contract requirements are automatically bypassed\n- Cases appear in your 'Managed Cases' list\n- You have read-only access to monitor case progress"
      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.CreateManagedCaseRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateManagedCaseRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateManagedCaseRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.CreateManagedCaseRequest'
      responses:
        '200':
          description: Case created successfully
          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 data (field 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'
        '422':
          description: Business rule violation (e.g., no partner available for jurisdiction)
          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: Internal 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'
    get:
      tags:
      - ManagedCases
      summary: List managed cases
      description: "Returns a paginated list of cases where you are the **managing partner** (submitted on behalf of your clients).\n\n**What is a Managing Partner?**\nA managing partner is a collection partner that submits cases on behalf of their own clients but forwards the actual debt recovery work to another collection partner in Debitura's network. You remain your client's point of contact while leveraging Debitura's global network of 500+ partners across 183 jurisdictions.\n\n**Why Become a Managing Partner?**\n- Serve clients globally without physical presence in every jurisdiction\n- Maintain client relationships while outsourcing collection work\n- Access Debitura's vetted partner network\n- Earn commission on successful recoveries\n- Provide full-service debt recovery to your clients\n\n**Your Role as Managing Partner:**\n- Submit cases on behalf of your clients (via API or partner portal)\n- Monitor case progress and recovery status (read-only access)\n- Communicate with the collection partner through case chat\n- Receive updates on payments and case status\n- Invoice your clients and remit payments\n\n**Note:** This endpoint shows cases YOU submitted. For cases where you are actively collecting, use the `/cases` endpoint instead.\n\n**Partner Portal View:** These cases appear in the 'Cases Submitted' section of the partner portal.\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: PendingContractSigning, PendingVerificationInternal, PendingVerification,\n  NeedsAdditionalDetails, Leads, LeadsQuoteGiven, Active, Paused, Closed\n- divisionIds - Filter by your client 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\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- Each case includes collection partner information (who is actually collecting)\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
      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'
  /managed-cases/{id}:
    get:
      tags:
      - ManagedCases
      summary: Fetch managed case by ID
      description: 'Returns detailed information for a case you submitted on behalf of your client (where you are the managing partner).


        **Access Control:**

        This endpoint only returns cases where YOU are the managing partner. If you are the collection partner on a case, use `/cases/{id}` instead.


        **Response Includes:**

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

        - Debtor information

        - Your client information (the creditor)

        - Collection partner details (who is actively collecting this case)

        - Financial breakdown

        - Case progress and timeline summary


        **Monitoring Your Cases:**

        As the managing partner, you have read-only access to monitor progress while the collection partner handles the actual recovery work.'
      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 submitted by you as managing 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'
  /managed-cases/case-reference/{caseReference}:
    get:
      tags:
      - ManagedCases
      summary: Fetch managed case by reference
      description: 'Returns detailed case information using the Debitura case reference (e.g., ''Q8OAXF3W'') for cases you submitted.


        **Use Case:**

        Use this endpoint when you have the Debitura case reference but not the GUID. Helpful for customer service integrations or when your clients reference cases by the Debitura reference number.


        **Access Control:**

        Only returns cases where you are the managing partner.'
      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 submitted by you as managing 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'
  /managed-cases/{id}/timeline:
    get:
      tags:
      - ManagedCases
      summary: Fetch managed case timeline
      description: 'Returns the complete chronological event history for a case you submitted as managing partner.


        **Timeline Events Include:**

        - Case submission and acceptance

        - Assignment to collection partner

        - Status changes and lifecycle transitions

        - Payment recordings

        - Communication events between collection partner and creditor

        - Collection partner updates and notes


        **Managing Partner Transparency:**

        The timeline provides full visibility into the collection partner''s activities, allowing you to monitor progress and keep your clients informed.


        **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, update your clients on status, or audit collection partner activities.'
      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 submitted by you as managing 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'
  /managed-cases/{id}/chats:
    get:
      tags:
      - ManagedCases
      summary: Fetch managed case chats
      description: 'Returns all chat messages for a case you submitted, in chronological order.


        **Chat Participants (for Managed Cases):**

        - Managing partner (you) - Your messages to the collection partner

        - Collection partner - Messages from the partner actively collecting the case

        - Your client (creditor) - Messages from the client you represent

        - Debitura support - System notifications and support messages


        **Communication Flow:**

        As the managing partner, you can participate in case discussions to:

        - Coordinate with the collection partner

        - Provide additional information about the debtor

        - Relay questions from your client

        - Stay updated on collection progress


        **Use Case:**

        Monitor collection partner communications, coordinate case strategy, or extract conversation history to share with your clients.


        **Note:** Managing partners have limited write access - you can read and send messages but cannot modify case details or add payments.'
      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 submitted by you as managing 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'
  /managed-cases/{id}/payments:
    get:
      tags:
      - ManagedCases
      summary: Fetch managed case payments
      description: 'Returns all payments recorded on a case you submitted as managing partner.


        **Payment Information Includes:**

        - Payment amount, currency, and date

        - Payment type and method

        - Payment status (recorded by collection partner)

        - Allocation breakdown (principal, interest, fees)

        - Payout details (amounts to creditor and collection partner)


        **What This Endpoint Shows:**

        As a managing partner, you can monitor all payment activity on cases you submitted for your clients. This endpoint provides visibility into:

        - What the collection partner has recovered from the debtor

        - How recovered amounts are allocated (principal vs. interest vs. fees)

        - The collection partner''s success fee on each payment

        - Payment history and timeline


        **Important:** This endpoint is for monitoring and client reporting purposes. Your financial arrangements with your clients (billing, commissions, etc.) are managed outside of Debitura''s platform. The payment data shown here represents what the collection partner recovered and their fees, not any commissions or payments to you as the managing partner.


        **Use Case:**

        Monitor recovery progress, reconcile payments with your records, track case performance, or provide payment status updates to your clients.


        **Note:** On production cases, only the assigned collection partner can record new payments. For test cases (isTestCase: true), managing partners can record payments via `POST /managed-cases/{id}/payments`.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Payments returned (may be empty array)
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.PaymentDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.PaymentDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.PaymentDto'
        '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 submitted by you as managing 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'
    post:
      tags:
      - ManagedCases
      summary: Record a payment on a test case (managing partner)
      description: 'Records a payment on a test case you submitted as managing partner.


        **Test-Only Restriction:**

        This endpoint only works on cases created with `isTestCase: true`. Attempting to record a payment on a production case returns a 400 error. For production cases, the assigned collection partner must use `POST /cases/{id}/payments`.


        **Purpose:**

        Allows managing partners (e.g. Get-Systems) to test their full payment integration end-to-end — including webhook delivery, lifecycle transitions, and remainder updates — without involving the collection partner.


        **Payout Handling:**

        A payout record is created automatically with the full payment amount going to the creditor and zero to the collection partner. CommissionPaymentStatus is set to Unpaid.


        **Webhooks:**

        Payment webhooks fire normally, making this useful for end-to-end integration testing.


        **CloseCase:**

        If `closeCase=true` and the payment amount is less than the outstanding balance, a 400 is returned.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentRequest'
      responses:
        '200':
          description: Payment recorded successfully
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Payments.CreateManagedCasePaymentResponse'
        '400':
          description: Invalid request or production 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 or not submitted by you as managing 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'
        '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.Contrac

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