Debitura Customer API

For creditors. Uploading B2B and B2C invoices to collection, then tracking cases, contracts, payments and tasks through recovery. 53 operations across 44 paths, OpenAPI 3.0.4 with 81 component schemas. Authenticates with an API key in the XApiKey header or a bearer token. Carries webhooks with a paired test-webhook and test-case surface.

OpenAPI Specification

debitura-customer-api.json Raw ↑
{
  "openapi": "3.0.4",
  "info": {
    "title": "Debitura Customer API",
    "description": "Welcome to the Debitura Customer API, your gateway to seamlessly integrating your debt collection workflow with our platform. Debitura connects customers with trusted debt collection firms specializing in pre-legal debt recovery. With this API, you can easily upload cases, track their status, and manage your debt collection process efficiently. For any support or inquiries, please reach out to us at contact@debitura.com. To setup an API key, log into your Debitura account and go here: https://app.debitura.com/CreditorApiKey\n\n📖 Full documentation, guides, and integration walkthroughs: https://docs.debitura.com/clients\n\nNOTE: if you're representing a platform and want to provide this feature for your customers, you need a different API. Please contact us.",
    "contact": {
      "name": "Debitura Support",
      "url": "https://www.debitura.com/integration/debt-collection-api",
      "email": "contact@debitura.com"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://customer-api.debitura.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/cases": {
      "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"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Cases"
        ],
        "summary": "List collection cases",
        "description": "Returns a paginated list of collection cases for your account.\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, Merged\n  (case-insensitive; both name and description forms accepted)\n- divisionIds - Filter by creditor division IDs (comma-separated GUIDs, for multi-division creditors)\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  Valid sort fields: DateCreated, DateUpdated, DateFinished, DateCollectionStarted,\n  DueDate, Date, GrossAmount, Remainder, InterestFees, CollectionFees, ReminderFees,\n  Lifecycle, CloseCode\n  Examples: 'DateCreated:desc', 'DueDate:asc', 'GrossAmount:desc'\n  Unknown fields are silently ignored.\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,\nPendingVerification, NeedsAdditionalDetails, Leads, LeadsQuoteGiven, Active, Paused, Closed, Merged\n(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]]…\".\nValid sort fields: DateCreated, DateUpdated, DateFinished, DateCollectionStarted,\nDueDate, Date, GrossAmount, Remainder, InterestFees, CollectionFees, ReminderFees,\nLifecycle, 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",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/cases/preview": {
      "post": {
        "tags": [
          "Cases"
        ],
        "summary": "Preview case eligibility and requirements",
        "description": "Preview what would happen if you submitted a case, without actually creating it.\n\n**What This Endpoint Returns:**\n- IsEligible - Whether the case can be submitted (partner available)\n- PartnerAssignment - Which collection partner would handle the case\n- RequiredActions - What contracts/documents need to be signed before submission\n  - Standard Debt Collection Agreement (SDCA)\n  - Power of Attorney (PoA) for the assigned partner\n- PricingPreview - Estimated success fee with age-based surcharges\n- Jurisdiction - Geographic details\n\n**Use This To:**\n1. Check if a jurisdiction is supported before submitting\n2. Determine which documents need signing before case creation\n3. Get signing URLs to guide users through required actions\n4. Estimate pricing including age surcharges\n\n**Required Fields:**\n- AmountToRecover - Total principal amount\n- CurrencyCode - ISO 4217 currency code (e.g., 'DKK', 'EUR', 'USD')\n- Debtor.Type - 'Company' or 'Private'\n- Debtor.CountryAlpha2 - ISO 3166-1 alpha-2 country code\n- Debtor.StateAlpha2 - Required for US cases only (e.g., 'CA', 'NY')\n\n**Optional Fields (Multi-Invoice Age Pricing):**\n- AmountToRecoverOver12Months - Portion over 12 months overdue\n- AmountToRecoverOver24Months - Portion over 24 months overdue\n(Both must be provided together if used)\n- AmountToRecoverOver6Months - Portion over 6 months overdue (optional, improves pricing tier accuracy at the 180-day threshold; requires Over12/Over24)\n\n**Solution URLs Are Context-Aware:**\n- Bearer token (referral partner) → referral onboarding URLs\n- XApiKey (creditor) → standard creditor app URLs\n\n**Important Notes:**\n- This endpoint does NOT create a case - it only previews what would happen\n- The preview uses the same eligibility logic as POST /cases\n- If multiple partners match (system limitation), the first match is returned\n- All required actions must be completed before calling POST /cases\n\n**Example Workflow:**\n```\n1. POST /cases/preview → Check eligibility and get signing URLs\n2. User completes required actions (signs SDCA, signs PoA)\n3. POST /cases → Create the actual case\n```",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.PreviewCaseRequestApiViewModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.PreviewCaseRequestApiViewModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.PreviewCaseRequestApiViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.Requests.PreviewCaseRequestApiViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preview completed",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.PreviewCaseResponseApiViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.PreviewCaseResponseApiViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.PreviewCaseResponseApiViewModel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/cases/{id}": {
      "get": {
        "tags": [
          "Cases"
        ],
        "summary": "Fetch case by ID",
        "description": "Returns case details for the provided Debitura case ID (a GUID).",
        "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 does not belong to your account",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/cases/by-creditor-reference/{creditorReference}": {
      "get": {
        "tags": [
          "Cases"
        ],
        "summary": "Fetch case by creditor reference",
        "description": "Returns case details for the provided creditor reference. The creditor reference is your own unique identifier for the case, as provided when the case was created.",
        "parameters": [
          {
            "name": "creditorReference",
            "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": "Creditor 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 creditor 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"
                }
              }
            }
          }
        }
      }
    },
    "/cases/{id}/contract-status": {
      "get": {
        "tags": [
          "Cases"
        ],
        "summary": "Get contract signing status for a case",
        "description": "Returns the signing status of the SDCA (Standard Debt Collection Agreement), PoA (Power of Attorney), and Jurisdiction Pricing Appendix for a case.\n\n**Use case:** When a case is stuck in PendingContractSigning, use this endpoint to determine which contract is missing and get the signing URL.\n\n**Response:**\n- sdca: Always present — shows whether the debt collection agreement is signed\n- poa: Present only if a collection partner is assigned — shows whether the power of attorney is signed for that partner\n- NeedsPoaSigning: true when the case is blocked because a required PoA or Jurisdiction Pricing Appendix has not been signed\n- Each contract item includes a solutionUrl if signing or re-signing is needed\n- The solutionUrl is context-aware: referral partner bearer tokens get referral onboarding URLs, API keys get creditor app URLs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contract status returned",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.CaseContractStatusApiDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.CaseContractStatusApiDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Cases.CaseContractStatusApiDTO"
                }
              }
            }
          },
          "400": {
            "description": "ID missing, empty, or 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 does not belong to your account",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/cases/case-reference/{caseReference}": {
      "get": {
        "tags": [
          "Cases"
        ],
        "summary": "Fetch case by reference",
        "description": "Returns case details for the provided Debitura case reference (example: Q8OAXF3W).",
        "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 case does not belong to your account",
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/cases/{id}/timeline": {
      "get": {
        "tags": [
          "Cases"
        ],
        "summary": "Fetch case timeline",
        "description": "Returns the full event timeline for the case along with the current engagement phase.\n\n**Response shape:**\n- `items` — chronological list of timeline events\n- `currentEngagementPhase` — current phase of the active engagement: \"Pre-legal\", \"Legal\", or \"Enforcement\". Null when no active engagement exists.",
        "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": "ID missing",
            "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"
                }
        

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