{
  "components": {
    "schemas": {
      "ActingAsEnum": {
        "description": "* `consumer` - consumer\n* `business` - business",
        "enum": [
          "consumer",
          "business"
        ],
        "type": "string"
      },
      "AdditionalChargeEventWriteRequest": {
        "description": "A contextual event supplied when creating a debtor, claim, or additional charge.",
        "properties": {
          "description": {
            "description": "Optional description of the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "location": {
            "description": "Optional location associated with the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "occurence": {
            "description": "Time at which the event occurred; the historical field spelling is intentional.",
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "description": "Human-readable title of the event.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AdditionalChargeEventWriteTypeEnum"
              }
            ],
            "description": "Additional-charge event type.\n\n* `invoice` - invoice\n* `transaction` - transaction"
          },
          "your_reference": {
            "description": "Your optional reference for the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "occurence",
          "title",
          "type"
        ],
        "type": "object"
      },
      "AdditionalChargeEventWriteTypeEnum": {
        "description": "* `invoice` - invoice\n* `transaction` - transaction",
        "enum": [
          "invoice",
          "transaction"
        ],
        "type": "string"
      },
      "AddressRead": {
        "properties": {
          "city": {
            "description": "City or locality of the address.",
            "readOnly": true,
            "type": "string"
          },
          "country": {
            "description": "Country as a two-letter ISO 3166-1 code.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this address.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "postal_code": {
            "description": "Postal code of the address.",
            "readOnly": true,
            "type": "string"
          },
          "primary": {
            "description": "Whether this is the debtor's primary postal address.",
            "readOnly": true,
            "type": "boolean"
          },
          "street": {
            "description": "Street and house number.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "city",
          "country",
          "id",
          "postal_code",
          "primary",
          "street"
        ],
        "type": "object"
      },
      "AddressWriteRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "city": {
            "description": "City or locality of the address.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CountryEnum"
              }
            ],
            "description": "Country as a two-letter ISO 3166-1 alpha-2 code.\n\n* `AF` - Afghanistan\n* `AX` - Åland Islands\n* `AL` - Albania\n* `DZ` - Algeria\n* `AS` - American Samoa\n* `AD` - Andorra\n* `AO` - Angola\n* `AI` - Anguilla\n* `AQ` - Antarctica\n* `AG` - Antigua and Barbuda\n* `AR` - Argentina\n* `AM` - Armenia\n* `AW` - Aruba\n* `AU` - Australia\n* `AT` - Austria\n* `AZ` - Azerbaijan\n* `BS` - Bahamas\n* `BH` - Bahrain\n* `BD` - Bangladesh\n* `BB` - Barbados\n* `BY` - Belarus\n* `BE` - Belgium\n* `BZ` - Belize\n* `BJ` - Benin\n* `BM` - Bermuda\n* `BT` - Bhutan\n* `BO` - Bolivia\n* `BQ` - Bonaire, Sint Eustatius and Saba\n* `BA` - Bosnia and Herzegovina\n* `BW` - Botswana\n* `BV` - Bouvet Island\n* `BR` - Brazil\n* `IO` - British Indian Ocean Territory\n* `BN` - Brunei\n* `BG` - Bulgaria\n* `BF` - Burkina Faso\n* `BI` - Burundi\n* `CV` - Cabo Verde\n* `KH` - Cambodia\n* `CM` - Cameroon\n* `CA` - Canada\n* `KY` - Cayman Islands\n* `CF` - Central African Republic\n* `TD` - Chad\n* `CL` - Chile\n* `CN` - China\n* `CX` - Christmas Island\n* `CC` - Cocos (Keeling) Islands\n* `CO` - Colombia\n* `KM` - Comoros\n* `CG` - Congo\n* `CD` - Congo (the Democratic Republic of the)\n* `CK` - Cook Islands\n* `CR` - Costa Rica\n* `CI` - Côte d'Ivoire\n* `HR` - Croatia\n* `CU` - Cuba\n* `CW` - Curaçao\n* `CY` - Cyprus\n* `CZ` - Czechia\n* `DK` - Denmark\n* `DJ` - Djibouti\n* `DM` - Dominica\n* `DO` - Dominican Republic\n* `EC` - Ecuador\n* `EG` - Egypt\n* `SV` - El Salvador\n* `GQ` - Equatorial Guinea\n* `ER` - Eritrea\n* `EE` - Estonia\n* `SZ` - Eswatini\n* `ET` - Ethiopia\n* `FK` - Falkland Islands (Malvinas)\n* `FO` - Faroe Islands\n* `FJ` - Fiji\n* `FI` - Finland\n* `FR` - France\n* `GF` - French Guiana\n* `PF` - French Polynesia\n* `TF` - French Southern Territories\n* `GA` - Gabon\n* `GM` - Gambia\n* `GE` - Georgia\n* `DE` - Germany\n* `GH` - Ghana\n* `GI` - Gibraltar\n* `GR` - Greece\n* `GL` - Greenland\n* `GD` - Grenada\n* `GP` - Guadeloupe\n* `GU` - Guam\n* `GT` - Guatemala\n* `GG` - Guernsey\n* `GN` - Guinea\n* `GW` - Guinea-Bissau\n* `GY` - Guyana\n* `HT` - Haiti\n* `HM` - Heard Island and McDonald Islands\n* `VA` - Holy See\n* `HN` - Honduras\n* `HK` - Hong Kong\n* `HU` - Hungary\n* `IS` - Iceland\n* `IN` - India\n* `ID` - Indonesia\n* `IR` - Iran\n* `IQ` - Iraq\n* `IE` - Ireland\n* `IM` - Isle of Man\n* `IL` - Israel\n* `IT` - Italy\n* `JM` - Jamaica\n* `JP` - Japan\n* `JE` - Jersey\n* `JO` - Jordan\n* `KZ` - Kazakhstan\n* `KE` - Kenya\n* `KI` - Kiribati\n* `XK` - Kosovo\n* `KW` - Kuwait\n* `KG` - Kyrgyzstan\n* `LA` - Laos\n* `LV` - Latvia\n* `LB` - Lebanon\n* `LS` - Lesotho\n* `LR` - Liberia\n* `LY` - Libya\n* `LI` - Liechtenstein\n* `LT` - Lithuania\n* `LU` - Luxembourg\n* `MO` - Macao\n* `MG` - Madagascar\n* `MW` - Malawi\n* `MY` - Malaysia\n* `MV` - Maldives\n* `ML` - Mali\n* `MT` - Malta\n* `MH` - Marshall Islands\n* `MQ` - Martinique\n* `MR` - Mauritania\n* `MU` - Mauritius\n* `YT` - Mayotte\n* `MX` - Mexico\n* `FM` - Micronesia\n* `MD` - Moldova\n* `MC` - Monaco\n* `MN` - Mongolia\n* `ME` - Montenegro\n* `MS` - Montserrat\n* `MA` - Morocco\n* `MZ` - Mozambique\n* `MM` - Myanmar\n* `NA` - Namibia\n* `NR` - Nauru\n* `NP` - Nepal\n* `NL` - Netherlands\n* `NC` - New Caledonia\n* `NZ` - New Zealand\n* `NI` - Nicaragua\n* `NE` - Niger\n* `NG` - Nigeria\n* `NU` - Niue\n* `NF` - Norfolk Island\n* `KP` - North Korea\n* `MK` - North Macedonia\n* `MP` - Northern Mariana Islands\n* `NO` - Norway\n* `OM` - Oman\n* `PK` - Pakistan\n* `PW` - Palau\n* `PS` - Palestine, State of\n* `PA` - Panama\n* `PG` - Papua New Guinea\n* `PY` - Paraguay\n* `PE` - Peru\n* `PH` - Philippines\n* `PN` - Pitcairn\n* `PL` - Poland\n* `PT` - Portugal\n* `PR` - Puerto Rico\n* `QA` - Qatar\n* `RE` - Réunion\n* `RO` - Romania\n* `RU` - Russia\n* `RW` - Rwanda\n* `BL` - Saint Barthélemy\n* `SH` - Saint Helena, Ascension and Tristan da Cunha\n* `KN` - Saint Kitts and Nevis\n* `LC` - Saint Lucia\n* `MF` - Saint Martin (French part)\n* `PM` - Saint Pierre and Miquelon\n* `VC` - Saint Vincent and the Grenadines\n* `WS` - Samoa\n* `SM` - San Marino\n* `ST` - Sao Tome and Principe\n* `SA` - Saudi Arabia\n* `SN` - Senegal\n* `RS` - Serbia\n* `SC` - Seychelles\n* `SL` - Sierra Leone\n* `SG` - Singapore\n* `SX` - Sint Maarten (Dutch part)\n* `SK` - Slovakia\n* `SI` - Slovenia\n* `SB` - Solomon Islands\n* `SO` - Somalia\n* `ZA` - South Africa\n* `GS` - South Georgia and the South Sandwich Islands\n* `KR` - South Korea\n* `SS` - South Sudan\n* `ES` - Spain\n* `LK` - Sri Lanka\n* `SD` - Sudan\n* `SR` - Suriname\n* `SJ` - Svalbard and Jan Mayen\n* `SE` - Sweden\n* `CH` - Switzerland\n* `SY` - Syria\n* `TW` - Taiwan\n* `TJ` - Tajikistan\n* `TZ` - Tanzania\n* `TH` - Thailand\n* `TL` - Timor-Leste\n* `TG` - Togo\n* `TK` - Tokelau\n* `TO` - Tonga\n* `TT` - Trinidad and Tobago\n* `TN` - Tunisia\n* `TR` - Türkiye\n* `TM` - Turkmenistan\n* `TC` - Turks and Caicos Islands\n* `TV` - Tuvalu\n* `UG` - Uganda\n* `UA` - Ukraine\n* `AE` - United Arab Emirates\n* `GB` - United Kingdom\n* `UM` - United States Minor Outlying Islands\n* `US` - United States of America\n* `UY` - Uruguay\n* `UZ` - Uzbekistan\n* `VU` - Vanuatu\n* `VE` - Venezuela\n* `VN` - Vietnam\n* `VG` - Virgin Islands (British)\n* `VI` - Virgin Islands (U.S.)\n* `WF` - Wallis and Futuna\n* `EH` - Western Sahara\n* `YE` - Yemen\n* `ZM` - Zambia\n* `ZW` - Zimbabwe"
          },
          "id": {
            "description": "Existing address identifier to retain when replacing its collection. Omit for a new entry; supplied identifiers must belong to this parent and occur only once.",
            "format": "uuid",
            "type": "string"
          },
          "postal_code": {
            "description": "Postal code of the address.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "primary": {
            "description": "Whether this is the debtor's primary postal address. A single address defaults to primary when omitted; with multiple addresses, supply this flag on each and set exactly one to true.",
            "type": "boolean"
          },
          "street": {
            "description": "Street and house number.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "city",
          "country",
          "postal_code",
          "street"
        ],
        "type": "object"
      },
      "AllowedAnswerTypesEnum": {
        "description": "* `fileupload` - fileupload\n* `freetext` - freetext\n* `yes-no` - yes-no\n* `yes-no-dontknow` - yes-no-dontknow\n* `yes-no-freetext-on-no` - yes-no-freetext-on-no\n* `yes-with-date-no-freetext-on-no` - yes-with-date-no-freetext-on-no",
        "enum": [
          "fileupload",
          "freetext",
          "yes-no",
          "yes-no-dontknow",
          "yes-no-freetext-on-no",
          "yes-with-date-no-freetext-on-no"
        ],
        "type": "string"
      },
      "AnswerRead": {
        "properties": {
          "additional_comment": {
            "description": "Additional context supplied with the answer.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "booking_date": {
            "description": "Relevant booking date requested by the question, when applicable.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the answer was submitted.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents supplied with the answer.",
            "items": {
              "$ref": "#/components/schemas/DocumentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this answer.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "text": {
            "description": "Selected choice (`yes`, `no`, or `dontknow`) or free-text answer. Empty for an API answer supplied with documents only; legacy answers may use null.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Time at which the answer was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "additional_comment",
          "booking_date",
          "created_at",
          "documents",
          "id",
          "text",
          "updated_at"
        ],
        "type": "object"
      },
      "AnswerWriteRequest": {
        "additionalProperties": false,
        "description": "Answer a published request-to-client. Supply non-empty text, at least one document, or both. Only fileupload questions accept documents without text; other question types require text and may also require additional_comment or booking_date as described below.",
        "properties": {
          "additional_comment": {
            "description": "Required for \"no\" answers when allowed_answer_types is yes-no-freetext-on-no or yes-with-date-no-freetext-on-no. Stored as plain text: markup is removed and the value must not be empty afterwards.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          },
          "booking_date": {
            "description": "Required for \"yes\" only when allowed_answer_types is yes-with-date-no-freetext-on-no; forbidden otherwise.",
            "format": "date",
            "type": "string"
          },
          "documents": {
            "description": "Documents supplied with the answer. For `fileupload`, provide at least one document unless non-empty `text` is supplied. At most 20 documents and 50 MiB of decoded document content per command. Each file is limited to 10 MiB and each PDF to 100 pages. Exceeding a limit rejects the command with 400.",
            "items": {
              "$ref": "#/components/schemas/InlineDocumentCreateRequest"
            },
            "maxItems": 20,
            "type": "array"
          },
          "text": {
            "description": "Answer text. For choice-based requests use `yes` or `no`; `dontknow` is also accepted for `yes-no-dontknow`. Required for choice-based requests and `freetext`. For `fileupload`, provide non-empty text, at least one document, or both.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BankAccountRead": {
        "properties": {
          "account_holder": {
            "description": "Name of the bank-account holder.",
            "readOnly": true,
            "type": "string"
          },
          "bic": {
            "description": "BIC/SWIFT code of the bank account.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "iban": {
            "description": "IBAN of the debtor's bank account.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this bank account.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "account_holder",
          "bic",
          "iban",
          "id"
        ],
        "type": "object"
      },
      "BankAccountWriteRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "account_holder": {
            "default": "",
            "description": "Name of the bank-account holder.",
            "maxLength": 255,
            "type": "string"
          },
          "bic": {
            "description": "BIC/SWIFT code; required for non-German IBANs and checked for compatibility with the IBAN country.",
            "maxLength": 11,
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "iban": {
            "description": "IBAN of the debtor's bank account.",
            "maxLength": 34,
            "minLength": 1,
            "type": "string"
          },
          "id": {
            "description": "Existing bank account identifier to retain when replacing its collection. Omit for a new entry; supplied identifiers must belong to this parent and occur only once.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "iban"
        ],
        "type": "object"
      },
      "BusinessActingAsEnum": {
        "description": "* `business` - Business debtor",
        "enum": [
          "business"
        ],
        "type": "string"
      },
      "BusinessDebtorWriteRequest": {
        "description": "Debtor who incurred the obligation in a business capacity. Supply exactly one of person (sole proprietors) or organization. Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BusinessActingAsEnum"
              }
            ],
            "description": "The debtor incurred the obligation in a business capacity."
          },
          "addresses": {
            "description": "Postal addresses. A debtor can be created without addresses, but at least one complete address is required before an order can be finalized. A non-empty list must have exactly one primary address. Maximum 5 entries.",
            "items": {
              "$ref": "#/components/schemas/AddressWriteRequest"
            },
            "maxItems": 5,
            "type": "array"
          },
          "bank_accounts": {
            "description": "Known bank accounts belonging to the debtor. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/BankAccountWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "communication_channels": {
            "description": "Email addresses and telephone numbers for the debtor. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/CommunicationChannelWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "events": {
            "description": "Contextual events supplied when creating the debtor.",
            "items": {
              "$ref": "#/components/schemas/DebtorEventWriteRequest"
            },
            "type": "array"
          },
          "legal_form": {
            "description": "Optional permanent code from GET /v2/legal-forms/; omit it or supply null or an empty string when unknown. Consumers cannot supply a code. The catalog group determines whether person or organization is required.",
            "nullable": true,
            "type": "string"
          },
          "legal_representatives": {
            "description": "People or organizations legally representing the debtor. Maximum 10 entries. Representative nesting is limited to two levels, with at most 10 second-level representatives per first-level representative.",
            "items": {
              "$ref": "#/components/schemas/LegalRepresentativeWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "metadata": {
            "description": "Metadata supplied when creating the debtor; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/DebtorMetadataWriteRequest"
            },
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationWriteRequest"
              }
            ],
            "description": "Organization identity, required for business legal forms outside the privatperson and einzelkaufmann groups, or when no legal form is supplied. Supply name; person must be absent or null. Consumers cannot use this field.",
            "nullable": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorPersonWriteRequest"
              }
            ],
            "description": "Natural-person identity, required for consumers and business legal forms in the privatperson or einzelkaufmann group. Also permitted for businesses without a legal form. Supply first_name and last_name; salutation is optional. Organization must be absent or null.",
            "nullable": true
          },
          "your_reference": {
            "description": "Your reference for this debtor. Blank is stored as null.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "acting_as"
        ],
        "title": "Business debtor",
        "type": "object"
      },
      "CaseChargeTypeEnum": {
        "description": "* `reminder_fee` - reminder_fee\n* `bank_charge` - bank_charge\n* `research_costs` - research_costs",
        "enum": [
          "reminder_fee",
          "bank_charge",
          "research_costs"
        ],
        "type": "string"
      },
      "CaseDocumentStatusEnum": {
        "enum": [
          "pending",
          "ready",
          "failed",
          "rejected"
        ],
        "type": "string"
      },
      "CaseDocumentTypeEnum": {
        "description": "* `bank_statement` - bank_statement\n* `claim_statement` - claim_statement\n* `correspondence` - correspondence\n* `enforceable_title` - enforceable_title\n* `invoice` - invoice\n* `other` - other\n* `payment_proof` - payment_proof\n* `reminder` - reminder\n* `rental_agreement` - rental_agreement",
        "enum": [
          "bank_statement",
          "claim_statement",
          "correspondence",
          "enforceable_title",
          "invoice",
          "other",
          "payment_proof",
          "reminder",
          "rental_agreement"
        ],
        "type": "string"
      },
      "CaseHealthResponse": {
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseHealthResponseStatusEnum"
              }
            ],
            "description": "Whether the Case Management API is available.\n\n* `ok` - ok"
          },
          "version": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionEnum"
              }
            ],
            "description": "API contract version served by this endpoint.\n\n* `v2` - v2"
          }
        },
        "required": [
          "status",
          "version"
        ],
        "type": "object"
      },
      "CaseHealthResponseStatusEnum": {
        "description": "* `ok` - ok",
        "enum": [
          "ok"
        ],
        "type": "string"
      },
      "CaseStatementStatusEnum": {
        "enum": [
          "published",
          "cancelled"
        ],
        "type": "string"
      },
      "CaseTokenInfoResponse": {
        "properties": {
          "company": {
            "description": "Company whose data the request is authorized to access.",
            "format": "uuid",
            "type": "string"
          },
          "environment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnvironmentEnum"
              }
            ],
            "description": "Environment in which the credential is being used.\n\n* `production` - production\n* `sandbox` - sandbox"
          },
          "id": {
            "description": "Stable identifier of the calling credential, when available.",
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "description": "Permissions granted to the calling credential.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "token_name": {
            "description": "Human-readable name assigned to the calling credential.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "company",
          "environment",
          "id",
          "scopes",
          "token_name"
        ],
        "type": "object"
      },
      "CaseWebhookCommandResult": {
        "description": "Accepted webhook command response.",
        "properties": {
          "delivery_id": {
            "description": "Identifier of the delivery created by the command.",
            "format": "uuid",
            "type": "string"
          },
          "detail": {
            "description": "Human-readable result of the accepted command.",
            "type": "string"
          },
          "event_id": {
            "description": "Identifier of the event queued for delivery.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "delivery_id",
          "detail",
          "event_id"
        ],
        "type": "object"
      },
      "CaseWebhookEvent": {
        "description": "Body of every Case event, as delivered to a webhook endpoint and as listed by `GET /v2/events/`. Dispatch on `type`: each event type maps to exactly one family whose `data` keys are required or conditional as documented by that family.",
        "discriminator": {
          "mapping": {
            "dunning.handed_to_collection": "#/components/schemas/DunningHandedToCollectionWebhookEvent",
            "dunning.level_advanced": "#/components/schemas/DunningLevelAdvancedWebhookEvent",
            "invoice.cancelled": "#/components/schemas/InvoiceCancelledWebhookEvent",
            "invoice.created": "#/components/schemas/InvoiceCreatedWebhookEvent",
            "invoice.paid": "#/components/schemas/InvoicePaidWebhookEvent",
            "invoice.reopened": "#/components/schemas/InvoiceReopenedWebhookEvent",
            "invoice.written_off": "#/components/schemas/InvoiceWrittenOffWebhookEvent",
            "mandate.balance_updated": "#/components/schemas/MandateBalanceUpdatedWebhookEvent",
            "mandate.correspondence.published": "#/components/schemas/MandateCorrespondenceWebhookEvent",
            "mandate.created": "#/components/schemas/MandateCreatedWebhookEvent",
            "mandate.message.created": "#/components/schemas/MandateMessageWebhookEvent",
            "mandate.state.changed": "#/components/schemas/MandateStateChangedWebhookEvent",
            "mandate.status_update.published": "#/components/schemas/MandateStatusUpdateWebhookEvent",
            "order.accepted": "#/components/schemas/OrderAcceptedWebhookEvent",
            "order.expired": "#/components/schemas/OrderExpiredWebhookEvent",
            "order.message.created": "#/components/schemas/OrderMessageWebhookEvent",
            "order.rejected": "#/components/schemas/OrderRejectedWebhookEvent",
            "order.submitted": "#/components/schemas/OrderSubmittedWebhookEvent",
            "order.withdrawn": "#/components/schemas/OrderWithdrawnWebhookEvent",
            "payment.reported": "#/components/schemas/PaymentWebhookEvent",
            "request_to_client.answered": "#/components/schemas/RequestToClientAnsweredWebhookEvent",
            "request_to_client.created": "#/components/schemas/RequestToClientCreatedWebhookEvent",
            "single_mandate_statement.cancelled": "#/components/schemas/SingleMandateStatementCancelledWebhookEvent",
            "single_mandate_statement.published": "#/components/schemas/SingleMandateStatementPublishedWebhookEvent",
            "statement.cancelled": "#/components/schemas/StatementCancelledWebhookEvent",
            "statement.published": "#/components/schemas/StatementPublishedWebhookEvent"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/OrderSubmittedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/OrderWithdrawnWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/OrderRejectedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/OrderAcceptedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/OrderExpiredWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/MandateCreatedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/MandateStateChangedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/MandateStatusUpdateWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/MandateBalanceUpdatedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/OrderMessageWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/MandateMessageWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/RequestToClientCreatedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/RequestToClientAnsweredWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/StatementPublishedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/StatementCancelledWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/SingleMandateStatementPublishedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/SingleMandateStatementCancelledWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/MandateCorrespondenceWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceCreatedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/InvoicePaidWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceCancelledWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceWrittenOffWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceReopenedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/DunningLevelAdvancedWebhookEvent"
          },
          {
            "$ref": "#/components/schemas/DunningHandedToCollectionWebhookEvent"
          }
        ],
        "x-examples": [
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "claim_ids": [
                "30000000-0000-4000-8000-000000000001"
              ],
              "company_id": "10000000-0000-4000-8000-000000000001",
              "order_id": "20000000-0000-4000-8000-000000000001",
              "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000001",
            "type": "order.submitted"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "claim_ids": [
                "30000000-0000-4000-8000-000000000001"
              ],
              "company_id": "10000000-0000-4000-8000-000000000001",
              "order_id": "20000000-0000-4000-8000-000000000001",
              "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000002",
            "type": "order.withdrawn"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "claim_ids": [
                "30000000-0000-4000-8000-000000000001"
              ],
              "company_id": "10000000-0000-4000-8000-000000000001",
              "order_id": "20000000-0000-4000-8000-000000000001",
              "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000003",
            "type": "order.rejected"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "claim_ids": [
                "30000000-0000-4000-8000-000000000001"
              ],
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
              "order_id": "20000000-0000-4000-8000-000000000001",
              "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000004",
            "type": "order.accepted"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "claim_ids": [
                "30000000-0000-4000-8000-000000000001"
              ],
              "company_id": "10000000-0000-4000-8000-000000000001",
              "order_id": "20000000-0000-4000-8000-000000000001",
              "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000005",
            "type": "order.expired"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000006",
            "type": "mandate.created"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000007",
            "type": "mandate.state.changed"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
              "status_update_id": "f0000000-0000-4000-8000-000000000001"
            },
            "id": "00000000-0000-4000-8000-000000000008",
            "type": "mandate.status_update.published"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000009",
            "type": "mandate.balance_updated"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "message_id": "70000000-0000-4000-8000-000000000001",
              "order_id": "20000000-0000-4000-8000-000000000001",
              "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000010",
            "type": "order.message.created"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
              "message_id": "70000000-0000-4000-8000-000000000001"
            },
            "id": "00000000-0000-4000-8000-000000000011",
            "type": "mandate.message.created"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "request_to_client_id": "80000000-0000-4000-8000-000000000001",
              "request_to_client_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000012",
            "type": "request_to_client.created"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "request_to_client_id": "80000000-0000-4000-8000-000000000001",
              "request_to_client_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000013",
            "type": "request_to_client.answered"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "payment_id": "90000000-0000-4000-8000-000000000001",
              "payment_url": "/v2/payments/90000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000014",
            "type": "payment.reported"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "statement_id": "a0000000-0000-4000-8000-000000000001",
              "statement_url": "/v2/statements/a0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000015",
            "type": "statement.published"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "statement_id": "a0000000-0000-4000-8000-000000000001",
              "statement_url": "/v2/statements/a0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000016",
            "type": "statement.cancelled"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "single_mandate_statement_id": "a0000000-0000-4000-8000-000000000002",
              "single_mandate_statement_url": "/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/"
            },
            "id": "00000000-0000-4000-8000-000000000017",
            "type": "single_mandate_statement.published"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "single_mandate_statement_id": "a0000000-0000-4000-8000-000000000002",
              "single_mandate_statement_url": "/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/"
            },
            "id": "00000000-0000-4000-8000-000000000018",
            "type": "single_mandate_statement.cancelled"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "channel": "email",
              "company_id": "10000000-0000-4000-8000-000000000001",
              "correspondence_id": "f3000000-0000-4000-8000-000000000001",
              "correspondence_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/",
              "mandate_id": "50000000-0000-4000-8000-000000000001",
              "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000019",
            "type": "mandate.correspondence.published"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000020",
            "type": "invoice.created"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000021",
            "type": "invoice.paid"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000022",
            "type": "invoice.cancelled"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000023",
            "type": "invoice.written_off"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000024",
            "type": "invoice.reopened"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000025",
            "type": "dunning.level_advanced"
          },
          {
            "created_at": "2026-07-18T12:00:00Z",
            "data": {
              "company_id": "10000000-0000-4000-8000-000000000001",
              "invoice_id": "b0000000-0000-4000-8000-000000000001",
              "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
            },
            "id": "00000000-0000-4000-8000-000000000026",
            "type": "dunning.handed_to_collection"
          }
        ]
      },
      "CaseWebhookSubscriptionEventEnum": {
        "description": "* `*` - *\n* `order.submitted` - order.submitted\n* `order.withdrawn` - order.withdrawn\n* `order.rejected` - order.rejected\n* `order.accepted` - order.accepted\n* `order.expired` - order.expired\n* `mandate.created` - mandate.created\n* `mandate.state.changed` - mandate.state.changed\n* `mandate.status_update.published` - mandate.status_update.published\n* `mandate.balance_updated` - mandate.balance_updated\n* `order.message.created` - order.message.created\n* `mandate.message.created` - mandate.message.created\n* `request_to_client.created` - request_to_client.created\n* `request_to_client.answered` - request_to_client.answered\n* `payment.reported` - payment.reported\n* `statement.published` - statement.published\n* `statement.cancelled` - statement.cancelled\n* `single_mandate_statement.published` - single_mandate_statement.published\n* `single_mandate_statement.cancelled` - single_mandate_statement.cancelled\n* `mandate.correspondence.published` - mandate.correspondence.published\n* `invoice.created` - invoice.created\n* `invoice.paid` - invoice.paid\n* `invoice.cancelled` - invoice.cancelled\n* `invoice.written_off` - invoice.written_off\n* `invoice.reopened` - invoice.reopened\n* `dunning.level_advanced` - dunning.level_advanced\n* `dunning.handed_to_collection` - dunning.handed_to_collection",
        "enum": [
          "*",
          "order.submitted",
          "order.withdrawn",
          "order.rejected",
          "order.accepted",
          "order.expired",
          "mandate.created",
          "mandate.state.changed",
          "mandate.status_update.published",
          "mandate.balance_updated",
          "order.message.created",
          "mandate.message.created",
          "request_to_client.created",
          "request_to_client.answered",
          "payment.reported",
          "statement.published",
          "statement.cancelled",
          "single_mandate_statement.published",
          "single_mandate_statement.cancelled",
          "mandate.correspondence.published",
          "invoice.created",
          "invoice.paid",
          "invoice.cancelled",
          "invoice.written_off",
          "invoice.reopened",
          "dunning.level_advanced",
          "dunning.handed_to_collection"
        ],
        "type": "string"
      },
      "CaseWebhookTestEventEnum": {
        "description": "* `order.submitted` - order.submitted\n* `order.withdrawn` - order.withdrawn\n* `order.rejected` - order.rejected\n* `order.accepted` - order.accepted\n* `order.expired` - order.expired\n* `mandate.created` - mandate.created\n* `mandate.state.changed` - mandate.state.changed\n* `mandate.status_update.published` - mandate.status_update.published\n* `mandate.balance_updated` - mandate.balance_updated\n* `order.message.created` - order.message.created\n* `mandate.message.created` - mandate.message.created\n* `request_to_client.created` - request_to_client.created\n* `request_to_client.answered` - request_to_client.answered\n* `payment.reported` - payment.reported\n* `statement.published` - statement.published\n* `statement.cancelled` - statement.cancelled\n* `single_mandate_statement.published` - single_mandate_statement.published\n* `single_mandate_statement.cancelled` - single_mandate_statement.cancelled\n* `mandate.correspondence.published` - mandate.correspondence.published\n* `invoice.created` - invoice.created\n* `invoice.paid` - invoice.paid\n* `invoice.cancelled` - invoice.cancelled\n* `invoice.written_off` - invoice.written_off\n* `invoice.reopened` - invoice.reopened\n* `dunning.level_advanced` - dunning.level_advanced\n* `dunning.handed_to_collection` - dunning.handed_to_collection",
        "enum": [
          "order.submitted",
          "order.withdrawn",
          "order.rejected",
          "order.accepted",
          "order.expired",
          "mandate.created",
          "mandate.state.changed",
          "mandate.status_update.published",
          "mandate.balance_updated",
          "order.message.created",
          "mandate.message.created",
          "request_to_client.created",
          "request_to_client.answered",
          "payment.reported",
          "statement.published",
          "statement.cancelled",
          "single_mandate_statement.published",
          "single_mandate_statement.cancelled",
          "mandate.correspondence.published",
          "invoice.created",
          "invoice.paid",
          "invoice.cancelled",
          "invoice.written_off",
          "invoice.reopened",
          "dunning.level_advanced",
          "dunning.handed_to_collection"
        ],
        "type": "string"
      },
      "CaseWebhookTestEventRequest": {
        "description": "Event selection for the webhook test-delivery action.",
        "properties": {
          "event": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseWebhookTestEventEnum"
              }
            ],
            "description": "Event type to use for the test delivery; must be one the webhook is subscribed to.\n\n* `order.submitted` - order.submitted\n* `order.withdrawn` - order.withdrawn\n* `order.rejected` - order.rejected\n* `order.accepted` - order.accepted\n* `order.expired` - order.expired\n* `mandate.created` - mandate.created\n* `mandate.state.changed` - mandate.state.changed\n* `mandate.status_update.published` - mandate.status_update.published\n* `mandate.balance_updated` - mandate.balance_updated\n* `order.message.created` - order.message.created\n* `mandate.message.created` - mandate.message.created\n* `request_to_client.created` - request_to_client.created\n* `request_to_client.answered` - request_to_client.answered\n* `payment.reported` - payment.reported\n* `statement.published` - statement.published\n* `statement.cancelled` - statement.cancelled\n* `single_mandate_statement.published` - single_mandate_statement.published\n* `single_mandate_statement.cancelled` - single_mandate_statement.cancelled\n* `mandate.correspondence.published` - mandate.correspondence.published\n* `invoice.created` - invoice.created\n* `invoice.paid` - invoice.paid\n* `invoice.cancelled` - invoice.cancelled\n* `invoice.written_off` - invoice.written_off\n* `invoice.reopened` - invoice.reopened\n* `dunning.level_advanced` - dunning.level_advanced\n* `dunning.handed_to_collection` - dunning.handed_to_collection"
          }
        },
        "required": [
          "event"
        ],
        "type": "object"
      },
      "CaseWebhookWithSecret": {
        "description": "Create / rotate-secret response — surfaces `secret_key` exactly once.",
        "properties": {
          "auto_disabled": {
            "description": "`true` when the endpoint was disabled automatically after reaching `max_consecutive_failures`; re-enable it with `enabled: true` once the destination is fixed. Auto-disabled endpoints do not count toward the endpoint limit.",
            "readOnly": true,
            "type": "boolean"
          },
          "consecutive_failures": {
            "description": "Consecutive deliveries that reached terminal failure. Individual retry attempts do not increment this counter; a successful delivery resets it.",
            "readOnly": true,
            "type": "integer"
          },
          "contract_version": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContractVersionEnum"
              }
            ],
            "description": "Payload/signature contract of this endpoint. Endpoints created via this API are always `v2`; `v1` marks a legacy subscription that still receives v1 payloads and must be recreated to migrate.\n\n* `v1` - Legacy v1\n* `v2` - Version 2",
            "readOnly": true
          },
          "created_at": {
            "description": "Time at which the webhook subscription was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Optional single-line label for this webhook.",
            "maxLength": 255,
            "type": "string"
          },
          "enabled": {
            "description": "Whether deliveries are attempted. Re-enabling an endpoint resets its consecutive failure counter. Auto-disabled endpoints do not count toward the endpoint limit, so re-enabling one requires a free slot; otherwise the request returns 409 webhook_limit_reached.",
            "type": "boolean"
          },
          "events": {
            "description": "Current public event subscriptions for this endpoint. `[\"*\"]` subscribes to all public events; otherwise the list contains the subscribed event types.",
            "items": {
              "$ref": "#/components/schemas/CaseWebhookSubscriptionEventEnum"
            },
            "type": "array"
          },
          "id": {
            "description": "Stable identifier for this resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "last_failure_at": {
            "description": "Time of the most recent terminal delivery failure since the last successful delivery; null after a successful delivery or when no failure has been recorded.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "max_consecutive_failures": {
            "description": "Automatically disables the endpoint when this many consecutive deliveries reach terminal failure. Retry attempts within one delivery do not each count. Raising it above the failure count of an automatically disabled endpoint makes that endpoint count toward the endpoint limit again and requires a free slot.",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "secret_key": {
            "description": "Signing secret shown once on creation or rotation. Store it to verify webhook signatures; list, retrieve, and idempotent replay responses omit it.",
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Time at which the webhook subscription was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "url": {
            "description": "Publicly reachable HTTPS URL for webhook notifications. Must be unique among this company’s v2 endpoints; duplicate checks normalize the scheme, host, and default port.",
            "format": "uri",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "auto_disabled",
          "consecutive_failures",
          "contract_version",
          "created_at",
          "id",
          "last_failure_at",
          "updated_at",
          "url"
        ],
        "type": "object"
      },
      "Claim": {
        "discriminator": {
          "mapping": {
            "receivable": "#/components/schemas/ReceivableClaim",
            "titled": "#/components/schemas/TitledClaim"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/ReceivableClaim"
          },
          {
            "$ref": "#/components/schemas/TitledClaim"
          }
        ]
      },
      "ClaimAmountRead": {
        "description": "Read-only two-decimal EUR amount.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "description": "Currency of the amount; currently always EUR.\n\n* `EUR` - EUR",
            "readOnly": true
          },
          "value": {
            "description": "Monetary value expressed with two decimal places. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "currency",
          "value"
        ],
        "type": "object"
      },
      "ClaimAmountWriteRequest": {
        "description": "A non-negative EUR claim or charge amount.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the amount; currently always EUR.\n\n* `EUR` - EUR"
          },
          "value": {
            "description": "Non-negative monetary value in major currency units, with at most two decimal places; for EUR, 100.00 means 100 euros. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "ClaimChargeRead": {
        "description": "Read representation of one canonical additional charge.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Amount of the additional charge.",
            "readOnly": true
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this additional charge.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "occurrence_date": {
            "description": "Date on which the additional charge arose.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "subject_matter": {
            "description": "Reason or subject of the additional charge.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseChargeTypeEnum"
              }
            ],
            "description": "Business category of the additional charge.\n\n* `reminder_fee` - reminder_fee\n* `bank_charge` - bank_charge\n* `research_costs` - research_costs",
            "readOnly": true
          },
          "your_reference": {
            "description": "Your reference for this additional charge.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "events",
          "id",
          "metadata",
          "occurrence_date",
          "subject_matter",
          "type",
          "your_reference"
        ],
        "type": "object"
      },
      "ClaimChargeWriteRequest": {
        "description": "An additional charge / incidental claim (Nebenforderung).",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountWriteRequest"
              }
            ],
            "description": "Amount of the additional charge. Zero is accepted while drafting, but the amount must be positive before finalization."
          },
          "events": {
            "description": "Contextual events for this new charge.",
            "items": {
              "$ref": "#/components/schemas/AdditionalChargeEventWriteRequest"
            },
            "type": "array"
          },
          "metadata": {
            "description": "Metadata for this new charge; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/ClaimMetadataWriteRequest"
            },
            "type": "array"
          },
          "occurrence_date": {
            "description": "Date on which the additional charge arose; required before the order can be finalized.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "subject_matter": {
            "description": "Reason or subject of the additional charge. Maximum 2000 characters.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseChargeTypeEnum"
              }
            ],
            "description": "Business category of the additional charge.\n\n* `reminder_fee` - reminder_fee\n* `bank_charge` - bank_charge\n* `research_costs` - research_costs"
          },
          "your_reference": {
            "description": "Your reference for this additional charge.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "type"
        ],
        "type": "object"
      },
      "ClaimCreateRequest": {
        "discriminator": {
          "mapping": {
            "receivable": "#/components/schemas/ReceivableClaimCreateRequest",
            "titled": "#/components/schemas/TitledClaimCreateRequest"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/ReceivableClaimCreateRequest"
          },
          {
            "$ref": "#/components/schemas/TitledClaimCreateRequest"
          }
        ]
      },
      "ClaimDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Generic claim attachments: slot-only types belong to their sub-resource.",
        "properties": {
          "base64": {
            "description": "Base64-encoded PDF, JPEG, or PNG content. Supply exactly one of base64 or multipart file. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "file": {
            "description": "PDF, JPEG, or PNG file supplied as multipart form data. Supply exactly one of file or base64. Maximum file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "format": "binary",
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimDocumentTypeEnum"
              }
            ],
            "description": "Business purpose of the document.\n\n* `bank_statement` - bank_statement\n* `claim_statement` - claim_statement\n* `correspondence` - correspondence\n* `invoice` - invoice\n* `other` - other\n* `payment_proof` - payment_proof\n* `reminder` - reminder"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ClaimDocumentTypeEnum": {
        "description": "* `bank_statement` - bank_statement\n* `claim_statement` - claim_statement\n* `correspondence` - correspondence\n* `invoice` - invoice\n* `other` - other\n* `payment_proof` - payment_proof\n* `reminder` - reminder",
        "enum": [
          "bank_statement",
          "claim_statement",
          "correspondence",
          "invoice",
          "other",
          "payment_proof",
          "reminder"
        ],
        "type": "string"
      },
      "ClaimEventWriteRequest": {
        "description": "A contextual event supplied when creating a debtor, claim, or additional charge.",
        "properties": {
          "description": {
            "description": "Optional description of the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "location": {
            "description": "Optional location associated with the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "occurence": {
            "description": "Time at which the event occurred; the historical field spelling is intentional.",
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "description": "Human-readable title of the event.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimEventWriteTypeEnum"
              }
            ],
            "description": "Claim event type.\n\n* `claim` - claim\n* `delivery` - delivery"
          },
          "your_reference": {
            "description": "Your optional reference for the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "occurence",
          "title",
          "type"
        ],
        "type": "object"
      },
      "ClaimEventWriteTypeEnum": {
        "description": "* `claim` - claim\n* `delivery` - delivery",
        "enum": [
          "claim",
          "delivery"
        ],
        "type": "string"
      },
      "ClaimItemRead": {
        "description": "Read representation of one invoice line.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Calculated line total: quantity multiplied by unit price.",
            "readOnly": true
          },
          "description": {
            "description": "Goods or service represented by this invoice or contract line.",
            "readOnly": true,
            "type": "string"
          },
          "quantity": {
            "description": "Number of units represented by this line. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,10}(?:\\.[0-9]{1,6})?$",
            "readOnly": true,
            "type": "string"
          },
          "unit": {
            "description": "Unit of measure for the quantity, when applicable.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "unit_price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Price of one unit before multiplying by quantity.",
            "readOnly": true
          }
        },
        "required": [
          "amount",
          "description",
          "quantity",
          "unit",
          "unit_price"
        ],
        "type": "object"
      },
      "ClaimItemWriteRequest": {
        "description": "A line item on a claim (Rechnungsposten).",
        "properties": {
          "description": {
            "description": "Goods or service represented by this invoice or contract line.",
            "maxLength": 1000,
            "minLength": 1,
            "type": "string"
          },
          "quantity": {
            "description": "Non-negative number of units represented by this line; up to six decimal places are supported. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,10}(?:\\.[0-9]{1,6})?$",
            "type": "string"
          },
          "unit": {
            "description": "Unit of measure for the quantity, when applicable.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "unit_price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimUnitPriceWriteRequest"
              }
            ],
            "description": "Price of one unit before multiplying by quantity."
          }
        },
        "required": [
          "description",
          "quantity",
          "unit_price"
        ],
        "type": "object"
      },
      "ClaimLegalBasisRead": {
        "description": "Read representation of the singular legal basis.",
        "properties": {
          "claim_type_code": {
            "description": "Code identifying the contract or transaction underlying the claim. H17 is commercial rent, H19 is residential rent, and K014 identifies receivable enforcement costs in titled orders. See [legal basis codes](https://docs.paywise.de/api-docs/case-management-api/concepts/claims#legal-basis-codes) for the full code-to-meaning table.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "contract_date": {
            "description": "Date on which the underlying contract or obligation arose.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Terms or circumstances establishing the principal claim. API submissions are limited to 2000 characters.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "claim_type_code",
          "contract_date",
          "description"
        ],
        "type": "object"
      },
      "ClaimLegalBasisWriteRequest": {
        "description": "Writable singular legal basis.\n\nEvery key is optional: an absent key keeps the company default (create)\nor the stored value (PATCH); a supplied value — including `null` for\n`description` — is persisted as sent.",
        "properties": {
          "claim_type_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PrincipalClaimIkarosEventcodeEnum"
              }
            ],
            "description": "Public claim code. H17 (commercial rent) and H19 (residential rent) are valid only in rental orders and cannot be mixed in one order. Receivable enforcement costs in a titled order derive K014; do not supply a code for them. For other receivables, omission on creation or an empty string uses the company default when configured; omission on PATCH preserves the current code. See [legal basis codes](https://docs.paywise.de/api-docs/case-management-api/concepts/claims#legal-basis-codes) for the full code-to-meaning table."
          },
          "contract_date": {
            "description": "Date the underlying contract was concluded. For H17/H19 rent it is derived from the rental agreement and a supplied value must match. For other receivables it cannot follow document_date; when omitted during creation it defaults to document_date.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "description": "Terms or circumstances establishing the principal claim. Omission during creation, null, or an empty string uses the company default when configured; an omitted PATCH property keeps its current value. Maximum 2000 characters.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ClaimMetadataWriteRequest": {
        "description": "One creation-time metadata row; duplicate types are intentional.",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimMetadataWriteTypeEnum"
              }
            ],
            "description": "Claim or additional-charge metadata type.\n\n* `comment` - comment\n* `invoice:reference` - invoice:reference\n* `invoice:date` - invoice:date\n* `invoice:address_line_1` - invoice:address_line_1\n* `invoice:address_line_2` - invoice:address_line_2\n* `invoice:address_city` - invoice:address_city\n* `invoice:address_country` - invoice:address_country\n* `invoice:address_zip` - invoice:address_zip\n* `invoice:amount` - invoice:amount\n* `transaction:reference` - transaction:reference\n* `transaction:source_ip_address` - transaction:source_ip_address\n* `contract:reference` - contract:reference\n* `report:reference` - report:reference\n* `account:reference` - account:reference\n* `claim:holder:address:country` - claim:holder:address:country\n* `claim:holder:address:city` - claim:holder:address:city\n* `claim:holder:name` - claim:holder:name\n* `dunning:level` - dunning:level\n* `reminder:date` - reminder:date\n* `reminder:amount:value` - reminder:amount:value\n* `reminder:amount:currency` - reminder:amount:currency\n* `notification:date` - notification:date\n* `confirmation:email` - confirmation:email\n* `order:rate` - order:rate\n* `order:deposit` - order:deposit\n* `order:cashback` - order:cashback\n* `order:prepaid` - order:prepaid\n* `order:type` - order:type\n* `rental:pickup:date` - rental:pickup:date\n* `rental:pickup:time` - rental:pickup:time\n* `rental:pickup:city` - rental:pickup:city\n* `rental:dropoff:date` - rental:dropoff:date\n* `rental:dropoff:time` - rental:dropoff:time\n* `rental:dropoff:city` - rental:dropoff:city\n* `rental:gps_tracking` - rental:gps_tracking\n* `rental:charged_items` - rental:charged_items\n* `payment:method` - payment:method\n* `import:csv:filename` - import:csv:filename\n* `insurance:bonus_malus_system` - insurance:bonus_malus_system\n* `insurance:contribution_rate` - insurance:contribution_rate\n* `insurance:regional_class_liability_insurance` - insurance:regional_class_liability_insurance\n* `insurance:regional_class_partial_coverage` - insurance:regional_class_partial_coverage\n* `payment:frequency` - payment:frequency\n* `language` - language\n* `tax:id` - tax:id\n* `notification_delivery:date` - notification_delivery:date\n* `merchant:address_line1` - merchant:address_line1\n* `merchant:address_city` - merchant:address_city\n* `merchant:address_zip` - merchant:address_zip\n* `merchant:address_country` - merchant:address_country\n* `merchant:company_name` - merchant:company_name\n* `merchant:company_type` - merchant:company_type\n* `merchant:representative_firstname` - merchant:representative_firstname\n* `merchant:representative_secondname` - merchant:representative_secondname\n* `merchant:website_url` - merchant:website_url\n* `chargeback:reason` - chargeback:reason\n* `shop:website_url` - shop:website_url\n* `subscription:overdue_period` - subscription:overdue_period\n* `subscription:duration` - subscription:duration\n* `subscription:start` - subscription:start\n* `subscription:delivery:address` - subscription:delivery:address\n* `subscription:reference` - subscription:reference\n* `subscription:renewal` - subscription:renewal\n* `subscription:last_login` - subscription:last_login\n* `subscription:photo_available` - subscription:photo_available\n* `subscription:type` - subscription:type\n* `subscription:termination` - subscription:termination\n* `medical:patient` - medical:patient\n* `debtor:file_id` - debtor:file_id\n* `email:seller` - email:seller\n* `name:seller` - name:seller\n* `addressline:seller` - addressline:seller\n* `zip:seller` - zip:seller\n* `city:seller` - city:seller\n* `name:ditsributor` - name:ditsributor\n* `email:distributor` - email:distributor\n* `addressline:distributor` - addressline:distributor\n* `zip:distributor` - zip:distributor\n* `city:distributor` - city:distributor\n* `logo:distributor_pdf` - logo:distributor_pdf\n* `logo:distributor_email` - logo:distributor_email\n* `account:beneficiary` - account:beneficiary\n* `purchase:price` - purchase:price\n* `conditional:purchase_price` - conditional:purchase_price\n* `direct:payments` - direct:payments\n* `VAT` - VAT\n* `product:type` - product:type"
          },
          "value": {
            "description": "Metadata value; duplicate types remain separate entries.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "ClaimMetadataWriteTypeEnum": {
        "description": "* `comment` - comment\n* `invoice:reference` - invoice:reference\n* `invoice:date` - invoice:date\n* `invoice:address_line_1` - invoice:address_line_1\n* `invoice:address_line_2` - invoice:address_line_2\n* `invoice:address_city` - invoice:address_city\n* `invoice:address_country` - invoice:address_country\n* `invoice:address_zip` - invoice:address_zip\n* `invoice:amount` - invoice:amount\n* `transaction:reference` - transaction:reference\n* `transaction:source_ip_address` - transaction:source_ip_address\n* `contract:reference` - contract:reference\n* `report:reference` - report:reference\n* `account:reference` - account:reference\n* `claim:holder:address:country` - claim:holder:address:country\n* `claim:holder:address:city` - claim:holder:address:city\n* `claim:holder:name` - claim:holder:name\n* `dunning:level` - dunning:level\n* `reminder:date` - reminder:date\n* `reminder:amount:value` - reminder:amount:value\n* `reminder:amount:currency` - reminder:amount:currency\n* `notification:date` - notification:date\n* `confirmation:email` - confirmation:email\n* `order:rate` - order:rate\n* `order:deposit` - order:deposit\n* `order:cashback` - order:cashback\n* `order:prepaid` - order:prepaid\n* `order:type` - order:type\n* `rental:pickup:date` - rental:pickup:date\n* `rental:pickup:time` - rental:pickup:time\n* `rental:pickup:city` - rental:pickup:city\n* `rental:dropoff:date` - rental:dropoff:date\n* `rental:dropoff:time` - rental:dropoff:time\n* `rental:dropoff:city` - rental:dropoff:city\n* `rental:gps_tracking` - rental:gps_tracking\n* `rental:charged_items` - rental:charged_items\n* `payment:method` - payment:method\n* `import:csv:filename` - import:csv:filename\n* `insurance:bonus_malus_system` - insurance:bonus_malus_system\n* `insurance:contribution_rate` - insurance:contribution_rate\n* `insurance:regional_class_liability_insurance` - insurance:regional_class_liability_insurance\n* `insurance:regional_class_partial_coverage` - insurance:regional_class_partial_coverage\n* `payment:frequency` - payment:frequency\n* `language` - language\n* `tax:id` - tax:id\n* `notification_delivery:date` - notification_delivery:date\n* `merchant:address_line1` - merchant:address_line1\n* `merchant:address_city` - merchant:address_city\n* `merchant:address_zip` - merchant:address_zip\n* `merchant:address_country` - merchant:address_country\n* `merchant:company_name` - merchant:company_name\n* `merchant:company_type` - merchant:company_type\n* `merchant:representative_firstname` - merchant:representative_firstname\n* `merchant:representative_secondname` - merchant:representative_secondname\n* `merchant:website_url` - merchant:website_url\n* `chargeback:reason` - chargeback:reason\n* `shop:website_url` - shop:website_url\n* `subscription:overdue_period` - subscription:overdue_period\n* `subscription:duration` - subscription:duration\n* `subscription:start` - subscription:start\n* `subscription:delivery:address` - subscription:delivery:address\n* `subscription:reference` - subscription:reference\n* `subscription:renewal` - subscription:renewal\n* `subscription:last_login` - subscription:last_login\n* `subscription:photo_available` - subscription:photo_available\n* `subscription:type` - subscription:type\n* `subscription:termination` - subscription:termination\n* `medical:patient` - medical:patient\n* `debtor:file_id` - debtor:file_id\n* `email:seller` - email:seller\n* `name:seller` - name:seller\n* `addressline:seller` - addressline:seller\n* `zip:seller` - zip:seller\n* `city:seller` - city:seller\n* `name:ditsributor` - name:ditsributor\n* `email:distributor` - email:distributor\n* `addressline:distributor` - addressline:distributor\n* `zip:distributor` - zip:distributor\n* `city:distributor` - city:distributor\n* `logo:distributor_pdf` - logo:distributor_pdf\n* `logo:distributor_email` - logo:distributor_email\n* `account:beneficiary` - account:beneficiary\n* `purchase:price` - purchase:price\n* `conditional:purchase_price` - conditional:purchase_price\n* `direct:payments` - direct:payments\n* `VAT` - VAT\n* `product:type` - product:type",
        "enum": [
          "comment",
          "invoice:reference",
          "invoice:date",
          "invoice:address_line_1",
          "invoice:address_line_2",
          "invoice:address_city",
          "invoice:address_country",
          "invoice:address_zip",
          "invoice:amount",
          "transaction:reference",
          "transaction:source_ip_address",
          "contract:reference",
          "report:reference",
          "account:reference",
          "claim:holder:address:country",
          "claim:holder:address:city",
          "claim:holder:name",
          "dunning:level",
          "reminder:date",
          "reminder:amount:value",
          "reminder:amount:currency",
          "notification:date",
          "confirmation:email",
          "order:rate",
          "order:deposit",
          "order:cashback",
          "order:prepaid",
          "order:type",
          "rental:pickup:date",
          "rental:pickup:time",
          "rental:pickup:city",
          "rental:dropoff:date",
          "rental:dropoff:time",
          "rental:dropoff:city",
          "rental:gps_tracking",
          "rental:charged_items",
          "payment:method",
          "import:csv:filename",
          "insurance:bonus_malus_system",
          "insurance:contribution_rate",
          "insurance:regional_class_liability_insurance",
          "insurance:regional_class_partial_coverage",
          "payment:frequency",
          "language",
          "tax:id",
          "notification_delivery:date",
          "merchant:address_line1",
          "merchant:address_city",
          "merchant:address_zip",
          "merchant:address_country",
          "merchant:company_name",
          "merchant:company_type",
          "merchant:representative_firstname",
          "merchant:representative_secondname",
          "merchant:website_url",
          "chargeback:reason",
          "shop:website_url",
          "subscription:overdue_period",
          "subscription:duration",
          "subscription:start",
          "subscription:delivery:address",
          "subscription:reference",
          "subscription:renewal",
          "subscription:last_login",
          "subscription:photo_available",
          "subscription:type",
          "subscription:termination",
          "medical:patient",
          "debtor:file_id",
          "email:seller",
          "name:seller",
          "addressline:seller",
          "zip:seller",
          "city:seller",
          "name:ditsributor",
          "email:distributor",
          "addressline:distributor",
          "zip:distributor",
          "city:distributor",
          "logo:distributor_pdf",
          "logo:distributor_email",
          "account:beneficiary",
          "purchase:price",
          "conditional:purchase_price",
          "direct:payments",
          "VAT",
          "product:type"
        ],
        "type": "string"
      },
      "ClaimPrincipalAmountWriteRequest": {
        "description": "The principal amount of a receivable claim; a claim is never free.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the amount; currently always EUR.\n\n* `EUR` - EUR"
          },
          "value": {
            "description": "Principal amount including VAT, at least 0.01. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "ClaimReminderRead": {
        "description": "Read representation of one normalized reminder.",
        "properties": {
          "date": {
            "description": "Date on which the payment reminder was issued.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "due_date": {
            "description": "Payment deadline stated in the reminder, when present.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this reminder.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "date",
          "due_date",
          "id"
        ],
        "type": "object"
      },
      "ClaimReminderWriteRequest": {
        "description": "Writable reminder; ids retain rows only during PATCH replacement.",
        "properties": {
          "date": {
            "description": "Date on which the payment reminder was issued.",
            "format": "date",
            "type": "string"
          },
          "due_date": {
            "description": "Payment deadline stated in the reminder, when present; cannot precede the reminder date.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "Existing reminder identifier to retain during PATCH replacement. Omit for a new reminder; identifiers cannot be supplied when creating a claim and must belong to this claim.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "date"
        ],
        "type": "object"
      },
      "ClaimStatusEnum": {
        "description": "* `draft` - draft\n* `submitted` - submitted\n* `awaiting_client_response` - awaiting_client_response\n* `accepted` - accepted\n* `rejected` - rejected\n* `withdrawn` - withdrawn",
        "enum": [
          "draft",
          "submitted",
          "awaiting_client_response",
          "accepted",
          "rejected",
          "withdrawn"
        ],
        "type": "string"
      },
      "ClaimUnitPriceWriteRequest": {
        "description": "An EUR line-unit price; credits may be represented as negative.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the amount; currently always EUR.\n\n* `EUR` - EUR"
          },
          "value": {
            "description": "Price for one unit; a negative value represents a credit. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "ClaimsFromAdvancedCosts": {
        "properties": {
          "fee_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Collection-fee claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "fee_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on collection-fee claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable expense claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable expense claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_litigation_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable litigation-cost claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_litigation_expenses_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable litigation-cost claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxfree_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free expense claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxfree_litigation_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free litigation-cost claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "fee_claims",
          "fee_vat_claims",
          "taxable_expenses_claims",
          "taxable_expenses_vat_claims",
          "taxable_litigation_expenses_claims",
          "taxable_litigation_expenses_vat_claims",
          "taxfree_expenses_claims",
          "taxfree_litigation_expenses_claims"
        ],
        "type": "object"
      },
      "ClaimsFromPaymentsToClient": {
        "properties": {
          "fee_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Collection-fee claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "fee_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on collection-fee claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "success_commission_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Success-commission claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "success_commission_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on success-commission claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable expense claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable expense claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "taxfree_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free expense claims arising from debtor payments received directly by you.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "fee_claims",
          "fee_vat_claims",
          "success_commission_claims",
          "success_commission_vat_claims",
          "taxable_expenses_claims",
          "taxable_expenses_vat_claims",
          "taxfree_expenses_claims"
        ],
        "type": "object"
      },
      "ClaimsFromPaymentsToDCA": {
        "properties": {
          "fee_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Collection-fee claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "fee_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on collection-fee claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "success_commission_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Success-commission claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "success_commission_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on success-commission claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable expense claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_vat_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable expense claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "taxfree_expenses_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free expense claims arising from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "fee_claims",
          "fee_vat_claims",
          "success_commission_claims",
          "success_commission_vat_claims",
          "taxable_expenses_claims",
          "taxable_expenses_vat_claims",
          "taxfree_expenses_claims"
        ],
        "type": "object"
      },
      "ClosingCodeEnum": {
        "description": "* `IP01` - Vollzahlung\n* `IP02` - Teilzahlung\n* `IP03` - vor Bearbeitung bezahlt\n* `IP04` - Vergleichszahlung\n* `IPU1` - Vollzahlung (Unterakte)\n* `IPU2` - Teilzahlung (Unterakte)\n* `IPU3` - vor Bearbeitung bezahlt (Unterakte)\n* `IPU4` - Vergleichszahlung (Unterakte)\n* `IN01` - Akte storniert\n* `IN010` - Akte storniert - keine Kostenbelastung Honorar\n* `IN011` - Akte geschlossen: Negative SCHUFA-Auskunft\n* `IN012` - Akte storniert: Nicht eingezahlter GMV-Vorschuss\n* `IN013` - Akte storniert: Nicht eingezahlter ZV-Vorschuss\n* `IN014` - Akte storniert: Nicht beantwortete Rückfrage\n* `IN015` - Akte geschlossen: Mangels zustellfähiger Anschrift\n* `IN016` - Akte geschlossen: Schuldner verstorben\n* `IN017` - Akte geschlossen: Bestritten\n* `IN018` - Akte storniert: Zahlung vor Übernahme\n* `IN02` - Kunde wünscht Abschluss\n* `IN020` - Kunde wünscht Abschluss - keine Kostenbelastung\n* `IN03` - Abschluss wegen EV\n* `IN04` - Abschluss wegen Insolvenz\n* `IN05` - Schuldner verstorben\n* `IN06` - Erfolglos\n* `INO7` - Aktensperre\n* `IN08` - Aufhebung Aktensperre\n* `INU1` - Unterakte storniert\n* `INU2` - Kunde wünscht Abschluss (Unterakte)\n* `INU3` - Abschluss wegen EV (Unterakte)\n* `INU4` - Abschluss wegen Insolvenz (Unterakte)\n* `INU5` - Schuldner verstorben (Unterakte)\n* `INU6` - Erfolglos (Unterakte)\n* `IÜ01` - Überwachung Sonstiges\n* `IÜ02` - Überwachung Abgabe EV\n* `IÜ03` - Überwachung Insolvenz\n* `IÜU1` - Überwachung Sonstiges (Unterakte)\n* `IÜU2` - Überwachung Abgabe EV (Unterakte)\n* `IÜU3` - Überwachung Insolvenz (Unterakte)",
        "enum": [
          "IP01",
          "IP02",
          "IP03",
          "IP04",
          "IPU1",
          "IPU2",
          "IPU3",
          "IPU4",
          "IN01",
          "IN010",
          "IN011",
          "IN012",
          "IN013",
          "IN014",
          "IN015",
          "IN016",
          "IN017",
          "IN018",
          "IN02",
          "IN020",
          "IN03",
          "IN04",
          "IN05",
          "IN06",
          "INO7",
          "IN08",
          "INU1",
          "INU2",
          "INU3",
          "INU4",
          "INU5",
          "INU6",
          "IÜ01",
          "IÜ02",
          "IÜ03",
          "IÜU1",
          "IÜU2",
          "IÜU3"
        ],
        "type": "string"
      },
      "ClosingTypeEnum": {
        "description": "* `positive` - Positiv\n* `negative` - Negativ\n* `transition_to_longtime_monitoring` - Übergang ins Überwachungsverfahren",
        "enum": [
          "positive",
          "negative",
          "transition_to_longtime_monitoring"
        ],
        "type": "string"
      },
      "CommunicationChannelRead": {
        "properties": {
          "id": {
            "description": "Stable identifier of this communication channel.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "description": "Kind of contact channel.",
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "description": "Email address or telephone number for the selected channel.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "value"
        ],
        "type": "object"
      },
      "CommunicationChannelWriteRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "id": {
            "description": "Existing communication channel identifier to retain when replacing its collection. Omit for a new entry; supplied identifiers must belong to this parent and occur only once.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommunicationChannelWriteTypeEnum"
              }
            ],
            "description": "Kind of contact channel.\n\n* `email` - email\n* `phone` - phone\n* `mobile_phone` - mobile_phone"
          },
          "value": {
            "description": "Email address for email channels, or a telephone number for phone and mobile_phone channels. Telephone numbers are normalized and validated as E.164; international format such as +4915123456789 is recommended.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "CommunicationChannelWriteTypeEnum": {
        "description": "* `email` - email\n* `phone` - phone\n* `mobile_phone` - mobile_phone",
        "enum": [
          "email",
          "phone",
          "mobile_phone"
        ],
        "type": "string"
      },
      "ConsumerActingAsEnum": {
        "description": "* `consumer` - Consumer debtor",
        "enum": [
          "consumer"
        ],
        "type": "string"
      },
      "ConsumerDebtorWriteRequest": {
        "description": "Debtor who incurred the obligation as a consumer: a natural person without organization or legal form. Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConsumerActingAsEnum"
              }
            ],
            "description": "The debtor incurred the obligation as a consumer."
          },
          "addresses": {
            "description": "Postal addresses. A debtor can be created without addresses, but at least one complete address is required before an order can be finalized. A non-empty list must have exactly one primary address. Maximum 5 entries.",
            "items": {
              "$ref": "#/components/schemas/AddressWriteRequest"
            },
            "maxItems": 5,
            "type": "array"
          },
          "bank_accounts": {
            "description": "Known bank accounts belonging to the debtor. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/BankAccountWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "communication_channels": {
            "description": "Email addresses and telephone numbers for the debtor. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/CommunicationChannelWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "events": {
            "description": "Contextual events supplied when creating the debtor.",
            "items": {
              "$ref": "#/components/schemas/DebtorEventWriteRequest"
            },
            "type": "array"
          },
          "legal_representatives": {
            "description": "People or organizations legally representing the debtor. Maximum 10 entries. Representative nesting is limited to two levels, with at most 10 second-level representatives per first-level representative.",
            "items": {
              "$ref": "#/components/schemas/LegalRepresentativeWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "metadata": {
            "description": "Metadata supplied when creating the debtor; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/DebtorMetadataWriteRequest"
            },
            "type": "array"
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorPersonWriteRequest"
              }
            ],
            "description": "Natural-person identity of the consumer. Supply first_name and last_name; salutation is optional."
          },
          "your_reference": {
            "description": "Your reference for this debtor. Blank is stored as null.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "acting_as",
          "person"
        ],
        "title": "Consumer debtor",
        "type": "object"
      },
      "ContractVersionEnum": {
        "description": "* `v1` - Legacy v1\n* `v2` - Version 2",
        "enum": [
          "v1",
          "v2"
        ],
        "type": "string"
      },
      "CorrespondenceAttachment": {
        "properties": {
          "download_url": {
            "description": "Authenticated download URL, or null when `status` is `unavailable`.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "filename": {
            "description": "Filename as it arrived; sanitised at download time.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Opaque, stable identifier of the attachment within this correspondence item.",
            "maxLength": 255,
            "readOnly": true,
            "type": "string"
          },
          "mime_type": {
            "description": "Declared media type; the download sniffs the bytes and may answer with a different `Content-Type`.",
            "readOnly": true,
            "type": "string"
          },
          "size_bytes": {
            "description": "Size in bytes, or null when the mail does not declare it.",
            "nullable": true,
            "readOnly": true,
            "type": "integer"
          },
          "status": {
            "description": "`available` when the bytes can be downloaded; `unavailable` when the mail structure does not allow it. Open enumeration: clients must tolerate new values.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "download_url",
          "filename",
          "id",
          "mime_type",
          "size_bytes",
          "status"
        ],
        "type": "object"
      },
      "CorrespondenceBody": {
        "properties": {
          "complete": {
            "description": "False when the text was cut at the size limit or the stored mail could only be projected partially.",
            "readOnly": true,
            "type": "boolean"
          },
          "quoted_text": {
            "description": "Quoted earlier messages below the new part, or null.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "text": {
            "description": "Visible text of the new message part, projected from the stored mail; never HTML.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "complete",
          "quoted_text",
          "text"
        ],
        "type": "object"
      },
      "CorrespondenceDetail": {
        "description": "List row plus the projected text and the attachment inventory.",
        "properties": {
          "attachments": {
            "description": "Attachments of the message that a creditor may download.",
            "items": {
              "$ref": "#/components/schemas/CorrespondenceAttachment"
            },
            "readOnly": true,
            "type": "array"
          },
          "body": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CorrespondenceBody"
              }
            ],
            "description": "Projected plain text, or null when no body is stored.",
            "nullable": true,
            "readOnly": true
          },
          "channel": {
            "description": "Communication channel. Open enumeration: `email` today; clients must tolerate new values.",
            "readOnly": true,
            "type": "string"
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionEnum"
              }
            ],
            "description": "Whether paywise received or sent the message.",
            "readOnly": true
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CorrespondenceEmailDetails"
              }
            ],
            "description": "Email-channel details; present when `channel` is `email`.",
            "readOnly": true
          },
          "history_entry_ids": {
            "description": "Published history entries that surface this message; empty for messages reachable only through a client request.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of the correspondence item.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "occurred_at": {
            "description": "Time the message was received or sent.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "pdf_url": {
            "description": "Authenticated URL of the message rendered as PDF (header block and plain text).",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "source_mandate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HistorySourceMandate"
              }
            ],
            "description": "Main case or subcase the message belongs to.",
            "readOnly": true
          },
          "subject": {
            "description": "Subject line, or null.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Latest change to this item; use for incremental synchronization.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "url": {
            "description": "Authenticated API URL of this item.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "attachments",
          "body",
          "channel",
          "direction",
          "email",
          "history_entry_ids",
          "id",
          "occurred_at",
          "pdf_url",
          "source_mandate",
          "subject",
          "updated_at",
          "url"
        ],
        "type": "object"
      },
      "CorrespondenceEmailDetails": {
        "properties": {
          "cc": {
            "description": "Carbon-copy addresses.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "from": {
            "description": "Sender address.",
            "nullable": true,
            "type": "string"
          },
          "to": {
            "description": "Recipient addresses.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "cc",
          "from",
          "to"
        ],
        "type": "object"
      },
      "CorrespondenceList": {
        "description": "One correspondence item without body and attachments (list rows).",
        "properties": {
          "channel": {
            "description": "Communication channel. Open enumeration: `email` today; clients must tolerate new values.",
            "readOnly": true,
            "type": "string"
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionEnum"
              }
            ],
            "description": "Whether paywise received or sent the message.",
            "readOnly": true
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CorrespondenceEmailDetails"
              }
            ],
            "description": "Email-channel details; present when `channel` is `email`.",
            "readOnly": true
          },
          "history_entry_ids": {
            "description": "Published history entries that surface this message; empty for messages reachable only through a client request.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of the correspondence item.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "occurred_at": {
            "description": "Time the message was received or sent.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "pdf_url": {
            "description": "Authenticated URL of the message rendered as PDF (header block and plain text).",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "source_mandate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HistorySourceMandate"
              }
            ],
            "description": "Main case or subcase the message belongs to.",
            "readOnly": true
          },
          "subject": {
            "description": "Subject line, or null.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Latest change to this item; use for incremental synchronization.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "url": {
            "description": "Authenticated API URL of this item.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "channel",
          "direction",
          "email",
          "history_entry_ids",
          "id",
          "occurred_at",
          "pdf_url",
          "source_mandate",
          "subject",
          "updated_at",
          "url"
        ],
        "type": "object"
      },
      "CountryEnum": {
        "description": "* `AF` - Afghanistan\n* `AX` - Åland Islands\n* `AL` - Albania\n* `DZ` - Algeria\n* `AS` - American Samoa\n* `AD` - Andorra\n* `AO` - Angola\n* `AI` - Anguilla\n* `AQ` - Antarctica\n* `AG` - Antigua and Barbuda\n* `AR` - Argentina\n* `AM` - Armenia\n* `AW` - Aruba\n* `AU` - Australia\n* `AT` - Austria\n* `AZ` - Azerbaijan\n* `BS` - Bahamas\n* `BH` - Bahrain\n* `BD` - Bangladesh\n* `BB` - Barbados\n* `BY` - Belarus\n* `BE` - Belgium\n* `BZ` - Belize\n* `BJ` - Benin\n* `BM` - Bermuda\n* `BT` - Bhutan\n* `BO` - Bolivia\n* `BQ` - Bonaire, Sint Eustatius and Saba\n* `BA` - Bosnia and Herzegovina\n* `BW` - Botswana\n* `BV` - Bouvet Island\n* `BR` - Brazil\n* `IO` - British Indian Ocean Territory\n* `BN` - Brunei\n* `BG` - Bulgaria\n* `BF` - Burkina Faso\n* `BI` - Burundi\n* `CV` - Cabo Verde\n* `KH` - Cambodia\n* `CM` - Cameroon\n* `CA` - Canada\n* `KY` - Cayman Islands\n* `CF` - Central African Republic\n* `TD` - Chad\n* `CL` - Chile\n* `CN` - China\n* `CX` - Christmas Island\n* `CC` - Cocos (Keeling) Islands\n* `CO` - Colombia\n* `KM` - Comoros\n* `CG` - Congo\n* `CD` - Congo (the Democratic Republic of the)\n* `CK` - Cook Islands\n* `CR` - Costa Rica\n* `CI` - Côte d'Ivoire\n* `HR` - Croatia\n* `CU` - Cuba\n* `CW` - Curaçao\n* `CY` - Cyprus\n* `CZ` - Czechia\n* `DK` - Denmark\n* `DJ` - Djibouti\n* `DM` - Dominica\n* `DO` - Dominican Republic\n* `EC` - Ecuador\n* `EG` - Egypt\n* `SV` - El Salvador\n* `GQ` - Equatorial Guinea\n* `ER` - Eritrea\n* `EE` - Estonia\n* `SZ` - Eswatini\n* `ET` - Ethiopia\n* `FK` - Falkland Islands (Malvinas)\n* `FO` - Faroe Islands\n* `FJ` - Fiji\n* `FI` - Finland\n* `FR` - France\n* `GF` - French Guiana\n* `PF` - French Polynesia\n* `TF` - French Southern Territories\n* `GA` - Gabon\n* `GM` - Gambia\n* `GE` - Georgia\n* `DE` - Germany\n* `GH` - Ghana\n* `GI` - Gibraltar\n* `GR` - Greece\n* `GL` - Greenland\n* `GD` - Grenada\n* `GP` - Guadeloupe\n* `GU` - Guam\n* `GT` - Guatemala\n* `GG` - Guernsey\n* `GN` - Guinea\n* `GW` - Guinea-Bissau\n* `GY` - Guyana\n* `HT` - Haiti\n* `HM` - Heard Island and McDonald Islands\n* `VA` - Holy See\n* `HN` - Honduras\n* `HK` - Hong Kong\n* `HU` - Hungary\n* `IS` - Iceland\n* `IN` - India\n* `ID` - Indonesia\n* `IR` - Iran\n* `IQ` - Iraq\n* `IE` - Ireland\n* `IM` - Isle of Man\n* `IL` - Israel\n* `IT` - Italy\n* `JM` - Jamaica\n* `JP` - Japan\n* `JE` - Jersey\n* `JO` - Jordan\n* `KZ` - Kazakhstan\n* `KE` - Kenya\n* `KI` - Kiribati\n* `XK` - Kosovo\n* `KW` - Kuwait\n* `KG` - Kyrgyzstan\n* `LA` - Laos\n* `LV` - Latvia\n* `LB` - Lebanon\n* `LS` - Lesotho\n* `LR` - Liberia\n* `LY` - Libya\n* `LI` - Liechtenstein\n* `LT` - Lithuania\n* `LU` - Luxembourg\n* `MO` - Macao\n* `MG` - Madagascar\n* `MW` - Malawi\n* `MY` - Malaysia\n* `MV` - Maldives\n* `ML` - Mali\n* `MT` - Malta\n* `MH` - Marshall Islands\n* `MQ` - Martinique\n* `MR` - Mauritania\n* `MU` - Mauritius\n* `YT` - Mayotte\n* `MX` - Mexico\n* `FM` - Micronesia\n* `MD` - Moldova\n* `MC` - Monaco\n* `MN` - Mongolia\n* `ME` - Montenegro\n* `MS` - Montserrat\n* `MA` - Morocco\n* `MZ` - Mozambique\n* `MM` - Myanmar\n* `NA` - Namibia\n* `NR` - Nauru\n* `NP` - Nepal\n* `NL` - Netherlands\n* `NC` - New Caledonia\n* `NZ` - New Zealand\n* `NI` - Nicaragua\n* `NE` - Niger\n* `NG` - Nigeria\n* `NU` - Niue\n* `NF` - Norfolk Island\n* `KP` - North Korea\n* `MK` - North Macedonia\n* `MP` - Northern Mariana Islands\n* `NO` - Norway\n* `OM` - Oman\n* `PK` - Pakistan\n* `PW` - Palau\n* `PS` - Palestine, State of\n* `PA` - Panama\n* `PG` - Papua New Guinea\n* `PY` - Paraguay\n* `PE` - Peru\n* `PH` - Philippines\n* `PN` - Pitcairn\n* `PL` - Poland\n* `PT` - Portugal\n* `PR` - Puerto Rico\n* `QA` - Qatar\n* `RE` - Réunion\n* `RO` - Romania\n* `RU` - Russia\n* `RW` - Rwanda\n* `BL` - Saint Barthélemy\n* `SH` - Saint Helena, Ascension and Tristan da Cunha\n* `KN` - Saint Kitts and Nevis\n* `LC` - Saint Lucia\n* `MF` - Saint Martin (French part)\n* `PM` - Saint Pierre and Miquelon\n* `VC` - Saint Vincent and the Grenadines\n* `WS` - Samoa\n* `SM` - San Marino\n* `ST` - Sao Tome and Principe\n* `SA` - Saudi Arabia\n* `SN` - Senegal\n* `RS` - Serbia\n* `SC` - Seychelles\n* `SL` - Sierra Leone\n* `SG` - Singapore\n* `SX` - Sint Maarten (Dutch part)\n* `SK` - Slovakia\n* `SI` - Slovenia\n* `SB` - Solomon Islands\n* `SO` - Somalia\n* `ZA` - South Africa\n* `GS` - South Georgia and the South Sandwich Islands\n* `KR` - South Korea\n* `SS` - South Sudan\n* `ES` - Spain\n* `LK` - Sri Lanka\n* `SD` - Sudan\n* `SR` - Suriname\n* `SJ` - Svalbard and Jan Mayen\n* `SE` - Sweden\n* `CH` - Switzerland\n* `SY` - Syria\n* `TW` - Taiwan\n* `TJ` - Tajikistan\n* `TZ` - Tanzania\n* `TH` - Thailand\n* `TL` - Timor-Leste\n* `TG` - Togo\n* `TK` - Tokelau\n* `TO` - Tonga\n* `TT` - Trinidad and Tobago\n* `TN` - Tunisia\n* `TR` - Türkiye\n* `TM` - Turkmenistan\n* `TC` - Turks and Caicos Islands\n* `TV` - Tuvalu\n* `UG` - Uganda\n* `UA` - Ukraine\n* `AE` - United Arab Emirates\n* `GB` - United Kingdom\n* `UM` - United States Minor Outlying Islands\n* `US` - United States of America\n* `UY` - Uruguay\n* `UZ` - Uzbekistan\n* `VU` - Vanuatu\n* `VE` - Venezuela\n* `VN` - Vietnam\n* `VG` - Virgin Islands (British)\n* `VI` - Virgin Islands (U.S.)\n* `WF` - Wallis and Futuna\n* `EH` - Western Sahara\n* `YE` - Yemen\n* `ZM` - Zambia\n* `ZW` - Zimbabwe",
        "enum": [
          "AF",
          "AX",
          "AL",
          "DZ",
          "AS",
          "AD",
          "AO",
          "AI",
          "AQ",
          "AG",
          "AR",
          "AM",
          "AW",
          "AU",
          "AT",
          "AZ",
          "BS",
          "BH",
          "BD",
          "BB",
          "BY",
          "BE",
          "BZ",
          "BJ",
          "BM",
          "BT",
          "BO",
          "BQ",
          "BA",
          "BW",
          "BV",
          "BR",
          "IO",
          "BN",
          "BG",
          "BF",
          "BI",
          "CV",
          "KH",
          "CM",
          "CA",
          "KY",
          "CF",
          "TD",
          "CL",
          "CN",
          "CX",
          "CC",
          "CO",
          "KM",
          "CG",
          "CD",
          "CK",
          "CR",
          "CI",
          "HR",
          "CU",
          "CW",
          "CY",
          "CZ",
          "DK",
          "DJ",
          "DM",
          "DO",
          "EC",
          "EG",
          "SV",
          "GQ",
          "ER",
          "EE",
          "SZ",
          "ET",
          "FK",
          "FO",
          "FJ",
          "FI",
          "FR",
          "GF",
          "PF",
          "TF",
          "GA",
          "GM",
          "GE",
          "DE",
          "GH",
          "GI",
          "GR",
          "GL",
          "GD",
          "GP",
          "GU",
          "GT",
          "GG",
          "GN",
          "GW",
          "GY",
          "HT",
          "HM",
          "VA",
          "HN",
          "HK",
          "HU",
          "IS",
          "IN",
          "ID",
          "IR",
          "IQ",
          "IE",
          "IM",
          "IL",
          "IT",
          "JM",
          "JP",
          "JE",
          "JO",
          "KZ",
          "KE",
          "KI",
          "XK",
          "KW",
          "KG",
          "LA",
          "LV",
          "LB",
          "LS",
          "LR",
          "LY",
          "LI",
          "LT",
          "LU",
          "MO",
          "MG",
          "MW",
          "MY",
          "MV",
          "ML",
          "MT",
          "MH",
          "MQ",
          "MR",
          "MU",
          "YT",
          "MX",
          "FM",
          "MD",
          "MC",
          "MN",
          "ME",
          "MS",
          "MA",
          "MZ",
          "MM",
          "NA",
          "NR",
          "NP",
          "NL",
          "NC",
          "NZ",
          "NI",
          "NE",
          "NG",
          "NU",
          "NF",
          "KP",
          "MK",
          "MP",
          "NO",
          "OM",
          "PK",
          "PW",
          "PS",
          "PA",
          "PG",
          "PY",
          "PE",
          "PH",
          "PN",
          "PL",
          "PT",
          "PR",
          "QA",
          "RE",
          "RO",
          "RU",
          "RW",
          "BL",
          "SH",
          "KN",
          "LC",
          "MF",
          "PM",
          "VC",
          "WS",
          "SM",
          "ST",
          "SA",
          "SN",
          "RS",
          "SC",
          "SL",
          "SG",
          "SX",
          "SK",
          "SI",
          "SB",
          "SO",
          "ZA",
          "GS",
          "KR",
          "SS",
          "ES",
          "LK",
          "SD",
          "SR",
          "SJ",
          "SE",
          "CH",
          "SY",
          "TW",
          "TJ",
          "TZ",
          "TH",
          "TL",
          "TG",
          "TK",
          "TO",
          "TT",
          "TN",
          "TR",
          "TM",
          "TC",
          "TV",
          "UG",
          "UA",
          "AE",
          "GB",
          "UM",
          "US",
          "UY",
          "UZ",
          "VU",
          "VE",
          "VN",
          "VG",
          "VI",
          "WF",
          "EH",
          "YE",
          "ZM",
          "ZW"
        ],
        "type": "string"
      },
      "CurrencyEnum": {
        "description": "* `EUR` - EUR",
        "enum": [
          "EUR"
        ],
        "type": "string"
      },
      "DebtorDetail": {
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActingAsEnum"
              }
            ],
            "description": "Whether the debtor incurred the obligation as a consumer or in a business capacity.\n\n* `consumer` - consumer\n* `business` - business",
            "readOnly": true
          },
          "addresses": {
            "description": "Postal addresses associated with the debtor. API submissions are limited to 5 entries.",
            "items": {
              "$ref": "#/components/schemas/AddressRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "bank_accounts": {
            "description": "Known bank accounts belonging to the debtor. API submissions are limited to 10 entries.",
            "items": {
              "$ref": "#/components/schemas/BankAccountRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "communication_channels": {
            "description": "Email addresses and telephone numbers for the debtor. API submissions are limited to 10 entries.",
            "items": {
              "$ref": "#/components/schemas/CommunicationChannelRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "created_at": {
            "description": "Time at which the debtor was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this debtor.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "legal_form": {
            "description": "Permanent public legal-form code; look up its label and representation rules with GET /v2/legal-forms/. Null for consumers.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "legal_representatives": {
            "description": "People or organizations legally representing the debtor. API submissions are limited to 10 entries.",
            "items": {
              "$ref": "#/components/schemas/LegalRepresentativeRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRead"
              }
            ],
            "description": "Organization identity for a business debtor.",
            "nullable": true,
            "readOnly": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonRead"
              }
            ],
            "description": "Natural-person identity for a consumer or sole proprietor.",
            "nullable": true,
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the debtor was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for this debtor.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "acting_as",
          "addresses",
          "bank_accounts",
          "communication_channels",
          "created_at",
          "events",
          "id",
          "legal_form",
          "legal_representatives",
          "metadata",
          "organization",
          "person",
          "updated_at",
          "your_reference"
        ],
        "type": "object"
      },
      "DebtorEventWriteRequest": {
        "description": "A contextual event supplied when creating a debtor, claim, or additional charge.",
        "properties": {
          "description": {
            "description": "Optional description of the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "location": {
            "description": "Optional location associated with the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "occurence": {
            "description": "Time at which the event occurred; the historical field spelling is intentional.",
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "description": "Human-readable title of the event.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorEventWriteTypeEnum"
              }
            ],
            "description": "Debtor event type.\n\n* `registration` - Registrierung\n* `login` - Login\n* `insolvency` - Insolvenz"
          },
          "your_reference": {
            "description": "Your optional reference for the event.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "occurence",
          "title",
          "type"
        ],
        "type": "object"
      },
      "DebtorEventWriteTypeEnum": {
        "description": "* `registration` - Registrierung\n* `login` - Login\n* `insolvency` - Insolvenz",
        "enum": [
          "registration",
          "login",
          "insolvency"
        ],
        "type": "string"
      },
      "DebtorList": {
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActingAsEnum"
              }
            ],
            "description": "Whether the debtor incurred the obligation as a consumer or in a business capacity.\n\n* `consumer` - consumer\n* `business` - business",
            "readOnly": true
          },
          "addresses": {
            "description": "Postal addresses associated with the debtor.",
            "items": {
              "$ref": "#/components/schemas/AddressRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "created_at": {
            "description": "Time at which the debtor was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this debtor.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "legal_form": {
            "description": "Permanent public legal-form code; look up its label and representation rules with GET /v2/legal-forms/. Null for consumers.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRead"
              }
            ],
            "description": "Organization identity for a business debtor.",
            "nullable": true,
            "readOnly": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonRead"
              }
            ],
            "description": "Natural-person identity for a consumer or sole proprietor.",
            "nullable": true,
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the debtor was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for this debtor.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "acting_as",
          "addresses",
          "created_at",
          "events",
          "id",
          "legal_form",
          "metadata",
          "organization",
          "person",
          "updated_at",
          "your_reference"
        ],
        "type": "object"
      },
      "DebtorMetadataWriteRequest": {
        "description": "One creation-time metadata row; duplicate types are intentional.",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorMetadataWriteTypeEnum"
              }
            ],
            "description": "Debtor metadata type.\n\n* `user:reference` - user:reference\n* `user:name` - user:name\n* `user:ip` - user:ip\n* `user:language` - user:language"
          },
          "value": {
            "description": "Metadata value; duplicate types remain separate entries.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "DebtorMetadataWriteTypeEnum": {
        "description": "* `user:reference` - user:reference\n* `user:name` - user:name\n* `user:ip` - user:ip\n* `user:language` - user:language",
        "enum": [
          "user:reference",
          "user:name",
          "user:ip",
          "user:language"
        ],
        "type": "string"
      },
      "DebtorPersonWriteRequest": {
        "description": "Consumer and business persons share the same optional salutation.",
        "properties": {
          "birth_date": {
            "description": "Date of birth used to identify the natural person; cannot be in the future.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "first_name": {
            "description": "Given name of the natural person.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "last_name": {
            "description": "Family name of the natural person.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "salutation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalutationEnum"
              },
              {
                "enum": [
                  ""
                ],
                "type": "string"
              }
            ],
            "description": "Optional salutation of the natural person. Omit it or supply null or an empty string when unknown.",
            "nullable": true
          }
        },
        "required": [
          "first_name",
          "last_name"
        ],
        "type": "object"
      },
      "DebtorSummary": {
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActingAsEnum"
              }
            ],
            "description": "Whether the debtor incurred the obligation as a consumer or in a business capacity.\n\n* `consumer` - consumer\n* `business` - business",
            "readOnly": true
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this debtor.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "legal_form": {
            "description": "Permanent public legal-form code; look up its label and representation rules with GET /v2/legal-forms/. Null for consumers.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRead"
              }
            ],
            "description": "Organization identity for a business debtor.",
            "nullable": true,
            "readOnly": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonRead"
              }
            ],
            "description": "Natural-person identity for a consumer or sole proprietor.",
            "nullable": true,
            "readOnly": true
          },
          "your_reference": {
            "description": "Your reference for this debtor.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "acting_as",
          "events",
          "id",
          "legal_form",
          "metadata",
          "organization",
          "person",
          "your_reference"
        ],
        "type": "object"
      },
      "DebtorWriteRequest": {
        "discriminator": {
          "mapping": {
            "business": "#/components/schemas/BusinessDebtorWriteRequest",
            "consumer": "#/components/schemas/ConsumerDebtorWriteRequest"
          },
          "propertyName": "acting_as"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/ConsumerDebtorWriteRequest"
          },
          {
            "$ref": "#/components/schemas/BusinessDebtorWriteRequest"
          }
        ]
      },
      "DirectionEnum": {
        "enum": [
          "inbound",
          "outbound"
        ],
        "type": "string"
      },
      "DocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document upload; the parent resource comes from the URL.",
        "properties": {
          "base64": {
            "description": "Base64-encoded PDF, JPEG, or PNG content. Supply exactly one of base64 or multipart file. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "file": {
            "description": "PDF, JPEG, or PNG file supplied as multipart form data. Supply exactly one of file or base64. Maximum file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "format": "binary",
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseDocumentTypeEnum"
              }
            ],
            "description": "Business purpose of the document.\n\n* `bank_statement` - bank_statement\n* `claim_statement` - claim_statement\n* `correspondence` - correspondence\n* `enforceable_title` - enforceable_title\n* `invoice` - invoice\n* `other` - other\n* `payment_proof` - payment_proof\n* `reminder` - reminder\n* `rental_agreement` - rental_agreement"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "DocumentFailureReasonEnum": {
        "enum": [
          "page_limit_exceeded",
          "encrypted",
          "corrupt",
          "unsupported",
          "processing_failed"
        ],
        "type": "string"
      },
      "DocumentParent": {
        "properties": {
          "id": {
            "description": "Identifier of the resource that owns the document.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentParentTypeEnum"
              }
            ],
            "description": "Kind of resource that owns the document.\n\n* `claim` - claim\n* `message` - message\n* `request_to_client_answer` - request_to_client_answer\n* `rental_agreement` - rental_agreement\n* `enforceable_title` - enforceable_title",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "type"
        ],
        "type": "object"
      },
      "DocumentParentTypeEnum": {
        "description": "* `claim` - claim\n* `message` - message\n* `request_to_client_answer` - request_to_client_answer\n* `rental_agreement` - rental_agreement\n* `enforceable_title` - enforceable_title",
        "enum": [
          "claim",
          "message",
          "request_to_client_answer",
          "rental_agreement",
          "enforceable_title"
        ],
        "type": "string"
      },
      "DocumentRead": {
        "description": "Resource representation with a native UUID `id`.",
        "properties": {
          "created_at": {
            "description": "Time at which the document was submitted.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "download_url": {
            "description": "Authenticated API URL for downloading the document; null while its status is not `ready`.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "failure_reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentFailureReasonEnum"
              }
            ],
            "description": "Why processing failed when status is `failed`; `null` otherwise. `page_limit_exceeded`: PDF above the 100-page ceiling; `encrypted`: password-protected PDF; `corrupt`: bytes could not be parsed; `unsupported`: content type not accepted; `processing_failed`: any other processing error.",
            "nullable": true,
            "readOnly": true
          },
          "filename": {
            "description": "Original filename shown to users.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier for this resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mime_type": {
            "description": "Detected media type of the document.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "parent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentParent"
              }
            ],
            "description": "Resource that owns the document.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseDocumentStatusEnum"
              }
            ],
            "description": "Document availability: `pending` while scanning or processing is incomplete; `ready` when processing permits download; `failed` when scanning or processing failed; `rejected` when the malware check rejected the file.",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseDocumentTypeEnum"
              }
            ],
            "description": "Business purpose of the document.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which document processing last changed.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "download_url",
          "failure_reason",
          "filename",
          "id",
          "mime_type",
          "parent",
          "status",
          "type",
          "updated_at"
        ],
        "type": "object"
      },
      "DunningHandedToCollectionWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000026",
          "type": "dunning.handed_to_collection"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "dunning.handed_to_collection"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Dunning handed to collection",
        "type": "object"
      },
      "DunningLevelAdvancedWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000025",
          "type": "dunning.level_advanced"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "dunning.level_advanced"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Dunning level advanced",
        "type": "object"
      },
      "EmailHistoryRelatedResource": {
        "properties": {
          "body": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HistoryEmailMetadata"
              }
            ],
            "description": "Expanded email metadata. Text and attachments are read through `url`."
          },
          "id": {
            "description": "Identifier of the related resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailHistoryRelatedResourceTypeEnum"
              }
            ],
            "description": "Related resource kind.\n\n* `email` - email",
            "readOnly": true
          },
          "url": {
            "description": "Authenticated URL of the correspondence item that carries this email's text, PDF and attachments (`case:correspondence:read`); null when the email has no stored copy.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "url"
        ],
        "title": "Email",
        "type": "object"
      },
      "EmailHistoryRelatedResourceTypeEnum": {
        "description": "* `email` - email",
        "enum": [
          "email"
        ],
        "type": "string"
      },
      "EnforceableTitleDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document upload; the parent resource comes from the URL.",
        "properties": {
          "base64": {
            "description": "Base64-encoded PDF, JPEG, or PNG content. Supply exactly one of base64 or multipart file. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "file": {
            "description": "PDF, JPEG, or PNG file supplied as multipart form data. Supply exactly one of file or base64. Maximum file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "format": "binary",
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnforceableTitleDocumentTypeEnum"
              }
            ],
            "description": "Title document purpose: enforceable_title is the single primary title document, required before finalization; other supplies a supporting document and may be used multiple times."
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "EnforceableTitleDocumentTypeEnum": {
        "description": "* `enforceable_title` - enforceable_title\n* `other` - other",
        "enum": [
          "enforceable_title",
          "other"
        ],
        "type": "string"
      },
      "EnforceableTitleInlineRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleAmountWriteRequest"
              }
            ],
            "description": "Gross amount confirmed by the client and owned by the enforceable title. May be absent or null while drafting; must be positive before finalization.",
            "nullable": true
          },
          "documents": {
            "description": "Documents attached to the enforceable title during inline creation. A command may contain at most 20 documents in total across all nested claims, titles, and rental agreements. The combined decoded document content across the command must not exceed 50 MiB; each file is limited to 10 MiB and each PDF to 100 pages. Exceeding a limit rejects the command with 400.",
            "items": {
              "$ref": "#/components/schemas/InlineEnforceableTitleDocumentCreateRequest"
            },
            "type": "array"
          },
          "file_number": {
            "description": "Official file or reference number shown on the title. Required before finalization.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "issued_on": {
            "description": "Date on which the enforceable title was issued. Required before finalization.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "issuing_authority": {
            "description": "Court, notary, or other authority that issued the title. Required before finalization.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "legally_binding_since": {
            "description": "Optional date from which the title is legally binding; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "served_on": {
            "description": "Optional date on which the title was served; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "title_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleTypeEnum"
              }
            ],
            "description": "Legal title category: enforcement_order = Vollstreckungsbescheid; default_judgment = Versäumnisurteil; final_judgment = Endurteil; acknowledgment_judgment = Anerkenntnisurteil; reservation_judgment = Vorbehaltsurteil; court_settlement = Gerichtlicher Vergleich; enforceable_notarial_deed = Vollstreckbare notarielle Urkunde; cost_assessment_order = Kostenfestsetzungsbeschluss; other = Sonstiger Titel. Required before finalization.",
            "nullable": true
          }
        },
        "type": "object"
      },
      "EnforceableTitlePutRequest": {
        "additionalProperties": false,
        "description": "Replace the title metadata. Supply at least one title field. Omitted metadata fields and amount are cleared. Use PATCH to preserve fields you do not send.",
        "minProperties": 1,
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleAmountWriteRequest"
              }
            ],
            "description": "Gross amount confirmed by the client and owned by the enforceable title. May be absent or null while drafting; must be positive before finalization.",
            "nullable": true
          },
          "file_number": {
            "description": "Official file or reference number shown on the title. Required before finalization.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "issued_on": {
            "description": "Date on which the enforceable title was issued. Required before finalization.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "issuing_authority": {
            "description": "Court, notary, or other authority that issued the title. Required before finalization.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "legally_binding_since": {
            "description": "Optional date from which the title is legally binding; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "served_on": {
            "description": "Optional date on which the title was served; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "title_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleTypeEnum"
              }
            ],
            "description": "Legal title category: enforcement_order = Vollstreckungsbescheid; default_judgment = Versäumnisurteil; final_judgment = Endurteil; acknowledgment_judgment = Anerkenntnisurteil; reservation_judgment = Vorbehaltsurteil; court_settlement = Gerichtlicher Vergleich; enforceable_notarial_deed = Vollstreckbare notarielle Urkunde; cost_assessment_order = Kostenfestsetzungsbeschluss; other = Sonstiger Titel. Required before finalization.",
            "nullable": true
          }
        },
        "type": "object"
      },
      "EnforceableTitleRead": {
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleAmountWrite"
              }
            ],
            "description": "Gross amount confirmed by the client and owned by the enforceable title.",
            "nullable": true,
            "readOnly": true
          },
          "created_at": {
            "description": "Time at which the enforceable title was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents owned by the title; one primary enforceable-title document is required before finalization.",
            "items": {
              "$ref": "#/components/schemas/DocumentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "file_number": {
            "description": "Official file or reference number shown on the title.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of the enforceable title.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "issued_on": {
            "description": "Date on which the enforceable title was issued.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "issuing_authority": {
            "description": "Court, notary, or other authority that issued the title.",
            "readOnly": true,
            "type": "string"
          },
          "legally_binding_since": {
            "description": "Optional date from which the title is legally binding; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "served_on": {
            "description": "Optional date on which the title was served; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "title_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleTypeEnum"
              }
            ],
            "description": "Legal title category: enforcement_order = Vollstreckungsbescheid; default_judgment = Versäumnisurteil; final_judgment = Endurteil; acknowledgment_judgment = Anerkenntnisurteil; reservation_judgment = Vorbehaltsurteil; court_settlement = Gerichtlicher Vergleich; enforceable_notarial_deed = Vollstreckbare notarielle Urkunde; cost_assessment_order = Kostenfestsetzungsbeschluss; other = Sonstiger Titel.",
            "nullable": true,
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the enforceable title last changed.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "created_at",
          "documents",
          "file_number",
          "id",
          "issued_on",
          "issuing_authority",
          "legally_binding_since",
          "served_on",
          "title_type",
          "updated_at"
        ],
        "type": "object"
      },
      "EnvironmentEnum": {
        "description": "* `production` - production\n* `sandbox` - sandbox",
        "enum": [
          "production",
          "sandbox"
        ],
        "type": "string"
      },
      "Error": {
        "properties": {
          "code": {
            "description": "Machine-readable error category.",
            "type": "string"
          },
          "detail": {
            "description": "Short human-readable summary of the error.",
            "type": "string"
          },
          "errors": {
            "description": "Field-level validation errors, when applicable.",
            "items": {
              "$ref": "#/components/schemas/ErrorItem"
            },
            "type": "array"
          }
        },
        "required": [
          "detail",
          "code"
        ],
        "type": "object"
      },
      "ErrorItem": {
        "properties": {
          "code": {
            "description": "Machine-readable field error code.",
            "type": "string"
          },
          "field": {
            "description": "Path to the field that caused the error, using dots for objects and brackets for list indexes, for example `claims[0].amount`; null for an error without a field path.",
            "nullable": true,
            "type": "string"
          },
          "message": {
            "description": "Human-readable explanation of the field error.",
            "type": "string"
          }
        },
        "required": [
          "field",
          "code",
          "message"
        ],
        "type": "object"
      },
      "ExtraordinaryPayoutsToClient": {
        "properties": {
          "allocation_to_client_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your costs from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_client_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your expenses from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_default_interest": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to default interest from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the collection fee from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to fee VAT from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_main_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the principal claim from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_overpayment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to overpayment from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the success commission from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to success-commission VAT from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_tax_free_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to paywise's tax-free expenses from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to paywise's taxable expenses from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to VAT on taxable expenses from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "payout": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Resulting payout balance from extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "total_payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "allocation_to_client_costs",
          "allocation_to_client_expenses",
          "allocation_to_default_interest",
          "allocation_to_fee",
          "allocation_to_fee_vat",
          "allocation_to_main_claim",
          "allocation_to_overpayment",
          "allocation_to_success_commission",
          "allocation_to_success_commission_vat",
          "allocation_to_tax_free_expenses",
          "allocation_to_taxable_expenses",
          "allocation_to_taxable_expenses_vat",
          "payout",
          "total_payments"
        ],
        "type": "object"
      },
      "HistoryAttachment": {
        "properties": {
          "download_url": {
            "description": "Authenticated history attachment download URL, or null when no file is available.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "filename": {
            "description": "Original filename of the published attachment.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of the published file.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mime_type": {
            "description": "Media type of the attachment.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "download_url",
          "filename",
          "id",
          "mime_type"
        ],
        "type": "object"
      },
      "HistoryEmailMetadata": {
        "properties": {
          "correspondence_url": {
            "description": "Authenticated URL of the full correspondence item (text, PDF, attachments); null when the email has no stored copy.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "date": {
            "description": "Time the email record was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionEnum"
              }
            ],
            "description": "Whether paywise received or sent the email.",
            "readOnly": true
          },
          "subject": {
            "description": "Subject of the email published through this history entry.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "correspondence_url",
          "date",
          "direction",
          "subject"
        ],
        "type": "object"
      },
      "HistorySourceMandate": {
        "properties": {
          "id": {
            "description": "Identifier of the case that produced the entry.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "reference_number": {
            "description": "paywise reference number of the source case.",
            "readOnly": true,
            "type": "string"
          },
          "relation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RelationEnum"
              }
            ],
            "description": "Main-case or subcase attribution.\n\n* `main_case` - main_case\n* `subcase` - subcase",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "reference_number",
          "relation"
        ],
        "type": "object"
      },
      "InlineClaimDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document embedded inline in a claim, message, or answer payload.",
        "properties": {
          "base64": {
            "description": "Required base64-encoded PDF, JPEG, or PNG content. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Across the entire command, at most 20 documents and 50 MiB of decoded content are allowed, including documents nested under other parents. Exceeding a limit returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimDocumentTypeEnum"
              }
            ],
            "description": "Business purpose of the document.\n\n* `bank_statement` - bank_statement\n* `claim_statement` - claim_statement\n* `correspondence` - correspondence\n* `invoice` - invoice\n* `other` - other\n* `payment_proof` - payment_proof\n* `reminder` - reminder"
          }
        },
        "required": [
          "base64",
          "type"
        ],
        "type": "object"
      },
      "InlineDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document embedded inline in a claim, message, or answer payload.",
        "properties": {
          "base64": {
            "description": "Required base64-encoded PDF, JPEG, or PNG content. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Across the entire command, at most 20 documents and 50 MiB of decoded content are allowed, including documents nested under other parents. Exceeding a limit returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseDocumentTypeEnum"
              }
            ],
            "description": "Business purpose of the document.\n\n* `bank_statement` - bank_statement\n* `claim_statement` - claim_statement\n* `correspondence` - correspondence\n* `enforceable_title` - enforceable_title\n* `invoice` - invoice\n* `other` - other\n* `payment_proof` - payment_proof\n* `reminder` - reminder\n* `rental_agreement` - rental_agreement"
          }
        },
        "required": [
          "base64",
          "type"
        ],
        "type": "object"
      },
      "InlineEnforceableTitleDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document embedded inline in a claim, message, or answer payload.",
        "properties": {
          "base64": {
            "description": "Required base64-encoded PDF, JPEG, or PNG content. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Across the entire command, at most 20 documents and 50 MiB of decoded content are allowed, including documents nested under other parents. Exceeding a limit returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnforceableTitleDocumentTypeEnum"
              }
            ],
            "description": "Title document purpose: enforceable_title is the single primary title document, required before finalization; other supplies a supporting document and may be used multiple times."
          }
        },
        "required": [
          "base64",
          "type"
        ],
        "type": "object"
      },
      "InlineRentalAgreementDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document embedded inline in a claim, message, or answer payload.",
        "properties": {
          "base64": {
            "description": "Required base64-encoded PDF, JPEG, or PNG content. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Across the entire command, at most 20 documents and 50 MiB of decoded content are allowed, including documents nested under other parents. Exceeding a limit returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalAgreementDocumentTypeEnum"
              }
            ],
            "description": "Agreement document purpose: rental_agreement and claim_statement each occupy a single optional document slot; other supplies supporting documents and may be used multiple times."
          }
        },
        "required": [
          "base64",
          "type"
        ],
        "type": "object"
      },
      "InvoiceCancelledWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000022",
          "type": "invoice.cancelled"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "invoice.cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Invoice cancelled",
        "type": "object"
      },
      "InvoiceCreatedWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000020",
          "type": "invoice.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "invoice.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Invoice created",
        "type": "object"
      },
      "InvoiceOrder": {
        "description": "An invoice order contains receivable claims and exposes `starting_approach` and `creditor_obligation_fulfilled`.\n\nRead representation of an order.\n\n`status` is derived from the order's submission and review progress;\n`mandate` names the\ncreated mandate once the order is accepted; `merged_into` names the\nsurviving order when this order was merged away during review.",
        "properties": {
          "additional_debtors": {
            "description": "Inline summaries of the additional debtors. Retrieve each debtor's full details with GET /v2/debtors/{id}/ using its id. Replace membership through PATCH /v2/orders/{id}/ while the order is a draft. API submissions are limited to 10 additional debtors.",
            "items": {
              "$ref": "#/components/schemas/DebtorSummary"
            },
            "readOnly": true,
            "type": "array"
          },
          "claims": {
            "description": "Receivable claims belonging to this order, including their itemized charges and documents. Titled claims are accepted only in titled orders. API submissions are limited to 50 claims per order.",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "readOnly": true,
            "type": "array"
          },
          "confirmation_email": {
            "description": "Address receiving the order-entry confirmation, when requested.",
            "format": "email",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the order was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "creditor_obligation_fulfilled": {
            "description": "Whether you fully performed your obligation to the debtor.",
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorSummary"
              }
            ],
            "description": "Inline summary of the primary debtor. Retrieve full details with GET /v2/debtors/{id}/ using its id.",
            "readOnly": true
          },
          "expires_at": {
            "description": "Time at which this API-created draft expires: updated_at plus 90 days, refreshed by every successful draft change. Once it has passed, the order reads expired and every change answers 409 order_expired until the daily cleanup deletes it. Null once the order is finalized and for orders created in the portal.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this order.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mandate": {
            "description": "Accepted case created from this order, when available.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "merged_into": {
            "description": "Surviving order when this order was merged during review.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "rejection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderRejection"
              }
            ],
            "description": "Why paywise declined the order: reason, time, notified recipients, and the standard reason's key. Null unless status is rejected.",
            "nullable": true,
            "readOnly": true
          },
          "starting_approach": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StartingApproachEnum"
              }
            ],
            "description": "Initial collection route: extrajudicial starts out of court; judicial starts by applying for a payment order (Mahnbescheid). Null while this decision is unset.",
            "nullable": true,
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderStatusEnum"
              }
            ],
            "description": "Order lifecycle state: draft is editable; submitted awaits processing; awaiting_client_response requires client input; accepted has entered case processing; rejected was declined; withdrawn was cancelled by the client; expired passed its draft deadline and accepts no further changes (409 order_expired) until the daily cleanup deletes it; merged points to the surviving order in merged_into.",
            "readOnly": true
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderTotals"
              }
            ],
            "description": "Financial totals calculated across the order's claims.",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceOrderTypeEnum"
              }
            ],
            "description": "Literal invoice order discriminator.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the order was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "additional_debtors",
          "claims",
          "confirmation_email",
          "created_at",
          "creditor_obligation_fulfilled",
          "debtor",
          "expires_at",
          "id",
          "mandate",
          "merged_into",
          "rejection",
          "starting_approach",
          "status",
          "totals",
          "type",
          "updated_at"
        ],
        "title": "Invoice order",
        "type": "object"
      },
      "InvoiceOrderTypeEnum": {
        "enum": [
          "invoice"
        ],
        "type": "string"
      },
      "InvoicePaidWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000021",
          "type": "invoice.paid"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "invoice.paid"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Invoice paid",
        "type": "object"
      },
      "InvoiceReopenedWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000024",
          "type": "invoice.reopened"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "invoice.reopened"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Invoice reopened",
        "type": "object"
      },
      "InvoiceWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000020",
          "type": "invoice.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "invoice.created",
              "invoice.paid",
              "invoice.cancelled",
              "invoice.written_off",
              "invoice.reopened",
              "dunning.level_advanced",
              "dunning.handed_to_collection"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Invoice and dunning event",
        "type": "object"
      },
      "InvoiceWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "invoice_id": "b0000000-0000-4000-8000-000000000001",
          "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "invoice_id": {
            "description": "Mahnservice invoice the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "invoice_url": {
            "description": "API path of the invoice (`/mahnservice/v1/invoices/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "invoice_id",
          "invoice_url"
        ],
        "type": "object"
      },
      "InvoiceWrittenOffWebhookEvent": {
        "description": "Mahnservice invoice event: the invoice was created (API or bookkeeping import), settled, cancelled or written off, reopened by the bookkeeping, or its dunning process advanced a level / was handed to debt collection. Fetch `invoice_url` (Mahnservice API v1) for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "invoice_id": "b0000000-0000-4000-8000-000000000001",
            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000023",
          "type": "invoice.written_off"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/InvoiceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "invoice.written_off"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Invoice written off",
        "type": "object"
      },
      "KindEnum": {
        "description": "* `calendar_day` - calendar_day\n* `business_day` - business_day",
        "enum": [
          "calendar_day",
          "business_day"
        ],
        "type": "string"
      },
      "LegacyEventRead": {
        "description": "Stored events may likewise use retired or internal type values.",
        "properties": {
          "description": {
            "description": "Optional description of the event.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "location": {
            "description": "Optional location associated with the event.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "occurence": {
            "description": "Time at which the event occurred; the historical field spelling is intentional.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "title": {
            "description": "Human-readable title of the event.",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "description": "Stored event type; historical values may be outside today's input enum.",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your optional reference for the event.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "description",
          "location",
          "occurence",
          "title",
          "type",
          "your_reference"
        ],
        "type": "object"
      },
      "LegacyMetadataRead": {
        "description": "Stored types may predate today's resource-specific input choices.",
        "properties": {
          "type": {
            "description": "Stored metadata type; historical values may be outside today's input enum.",
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "description": "Stored metadata value.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "LegalFormCatalog": {
        "properties": {
          "code": {
            "description": "Permanent code used when submitting this legal form.",
            "pattern": "^[-a-zA-Z0-9_]+$",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Short explanation of the legal form.",
            "readOnly": true,
            "type": "string"
          },
          "group": {
            "description": "Legal-form family used to determine representation rules.",
            "readOnly": true,
            "type": "string"
          },
          "label": {
            "description": "Display name of the legal form.",
            "readOnly": true,
            "type": "string"
          },
          "representative_requirements": {
            "description": "Representative roles required for this legal form: legal_representatives[].role values of a debtor in the Case Management API, legal_representatives[].type values of a company in the Partner API.",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "code",
          "description",
          "group",
          "label",
          "representative_requirements"
        ],
        "type": "object"
      },
      "LegalRepresentativeLevelTwoRead": {
        "properties": {
          "id": {
            "description": "Stable identifier of this legal representative.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "legal_form": {
            "description": "Legal form of an organization representative.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRead"
              }
            ],
            "description": "Organization identity of the representative.",
            "nullable": true,
            "readOnly": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonRead"
              }
            ],
            "description": "Natural-person identity of the representative.",
            "nullable": true,
            "readOnly": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoleEnum"
              }
            ],
            "description": "Legal or organizational role of the representative.",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "legal_form",
          "organization",
          "person",
          "role"
        ],
        "type": "object"
      },
      "LegalRepresentativeLevelTwoWriteRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "id": {
            "description": "Existing representative identifier to retain when replacing its collection. Omit for a new entry; supplied identifiers must belong to this parent and occur only once.",
            "format": "uuid",
            "type": "string"
          },
          "legal_form": {
            "description": "Legal form of an organization representative.",
            "nullable": true,
            "type": "string"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationWriteRequest"
              }
            ],
            "description": "Organization identity of the representative. Supply exactly one of person or organization; an organization requires name.",
            "nullable": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonWriteRequest"
              }
            ],
            "description": "Natural-person identity of the representative. Supply exactly one of person or organization; a person requires first_name and last_name. Salutation is optional.",
            "nullable": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoleEnum"
              }
            ],
            "description": "Legal or organizational role of the representative.\n\n* `managing_director` - managing_director\n* `director` - director\n* `board_member` - board_member\n* `chairperson` - chairperson\n* `general_partner` - general_partner\n* `shareholder` - shareholder\n* `owner` - owner\n* `authorized_signatory` - authorized_signatory\n* `partner` - partner\n* `legal_guardian` - legal_guardian\n* `other` - other"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "LegalRepresentativeRead": {
        "properties": {
          "id": {
            "description": "Stable identifier of this legal representative.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "legal_form": {
            "description": "Legal form of an organization representative.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "legal_representatives": {
            "description": "Second-level people or organizations legally representing this representative. API submissions are limited to 10 entries at the second and final representative level.",
            "items": {
              "$ref": "#/components/schemas/LegalRepresentativeLevelTwoRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRead"
              }
            ],
            "description": "Organization identity of the representative.",
            "nullable": true,
            "readOnly": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonRead"
              }
            ],
            "description": "Natural-person identity of the representative.",
            "nullable": true,
            "readOnly": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoleEnum"
              }
            ],
            "description": "Legal or organizational role of the representative.",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "legal_form",
          "legal_representatives",
          "organization",
          "person",
          "role"
        ],
        "type": "object"
      },
      "LegalRepresentativeWriteRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "id": {
            "description": "Existing representative identifier to retain when replacing its collection. Omit for a new entry; supplied identifiers must belong to this parent and occur only once.",
            "format": "uuid",
            "type": "string"
          },
          "legal_form": {
            "description": "Legal form of an organization representative.",
            "nullable": true,
            "type": "string"
          },
          "legal_representatives": {
            "description": "Second-level representatives of this representative. At most two representative levels are supported. When supplied on an existing representative, this array replaces its nested collection; [] clears it and omission preserves it. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/LegalRepresentativeLevelTwoWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationWriteRequest"
              }
            ],
            "description": "Organization identity of the representative. Supply exactly one of person or organization; an organization requires name.",
            "nullable": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonWriteRequest"
              }
            ],
            "description": "Natural-person identity of the representative. Supply exactly one of person or organization; a person requires first_name and last_name. Salutation is optional.",
            "nullable": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoleEnum"
              }
            ],
            "description": "Legal or organizational role of the representative.\n\n* `managing_director` - managing_director\n* `director` - director\n* `board_member` - board_member\n* `chairperson` - chairperson\n* `general_partner` - general_partner\n* `shareholder` - shareholder\n* `owner` - owner\n* `authorized_signatory` - authorized_signatory\n* `partner` - partner\n* `legal_guardian` - legal_guardian\n* `other` - other"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "MandateBalanceUpdatedWebhookEvent": {
        "description": "Accepted-case event carrying only the case reference: creation, a public state change, or a balance change booked by paywise. Fetch `mandate_url` for the current state (`legal_balance` after `mandate.balance_updated`).",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000009",
          "type": "mandate.balance_updated"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.balance_updated"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case balance updated",
        "type": "object"
      },
      "MandateCorrespondenceWebhookEvent": {
        "description": "A debtor correspondence item (for example an email) became readable for the creditor.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "channel": "email",
            "company_id": "10000000-0000-4000-8000-000000000001",
            "correspondence_id": "f3000000-0000-4000-8000-000000000001",
            "correspondence_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000019",
          "type": "mandate.correspondence.published"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateCorrespondenceWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.correspondence.published"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case correspondence published",
        "type": "object"
      },
      "MandateCorrespondenceWebhookEventData": {
        "example": {
          "channel": "email",
          "company_id": "10000000-0000-4000-8000-000000000001",
          "correspondence_id": "f3000000-0000-4000-8000-000000000001",
          "correspondence_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/",
          "mandate_id": "50000000-0000-4000-8000-000000000001",
          "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "channel": {
            "description": "Communication channel (`email`; open enumeration).",
            "type": "string"
          },
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "correspondence_id": {
            "description": "Correspondence item that became readable.",
            "format": "uuid",
            "type": "string"
          },
          "correspondence_url": {
            "description": "Relative API URL of the correspondence item.",
            "format": "uri-reference",
            "type": "string"
          },
          "mandate_id": {
            "description": "Accepted case (mandate) the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_url": {
            "description": "API path of the accepted case (`/v2/mandates/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "mandate_id",
          "mandate_url",
          "correspondence_id",
          "correspondence_url",
          "channel"
        ],
        "type": "object"
      },
      "MandateCreatedWebhookEvent": {
        "description": "Accepted-case event carrying only the case reference: creation, a public state change, or a balance change booked by paywise. Fetch `mandate_url` for the current state (`legal_balance` after `mandate.balance_updated`).",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000006",
          "type": "mandate.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case created",
        "type": "object"
      },
      "MandateDebtor": {
        "description": "Immutable debtor snapshot embedded in accepted-case resources.",
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActingAsEnum"
              }
            ],
            "description": "Whether the debtor incurred the obligation as a consumer or in a business capacity.\n\n* `consumer` - consumer\n* `business` - business",
            "readOnly": true
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "legal_form": {
            "description": "Permanent public legal-form code; look up its label and representation rules with GET /v2/legal-forms/. Null for consumers.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRead"
              }
            ],
            "description": "Organization identity for a business debtor.",
            "nullable": true,
            "readOnly": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonRead"
              }
            ],
            "description": "Natural-person identity for a consumer or sole proprietor.",
            "nullable": true,
            "readOnly": true
          },
          "your_reference": {
            "description": "Your reference for this debtor.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "acting_as",
          "events",
          "legal_form",
          "metadata",
          "organization",
          "person",
          "your_reference"
        ],
        "type": "object"
      },
      "MandateDetail": {
        "description": "Complete representation of one case, including its main case and sub-cases.",
        "properties": {
          "archived": {
            "description": "Whether your company archived the case from its active view.",
            "readOnly": true,
            "type": "boolean"
          },
          "claims": {
            "description": "Claims of the main case, shared by the main case and its sub-cases, ordered by creation time.",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "readOnly": true,
            "type": "array"
          },
          "created_at": {
            "description": "Time at which the accepted case was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateDebtor"
              }
            ],
            "description": "Debtor associated with the accepted case.",
            "nullable": true,
            "readOnly": true
          },
          "history": {
            "description": "Up to 100 published history entries. Included only when `history=true`; use the paginated history endpoint for the full timeline.",
            "items": {
              "$ref": "#/components/schemas/MandateHistory"
            },
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of the accepted case.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "legal_balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateLegalBalance"
              }
            ],
            "description": "Legal claim, payments, and remaining balance by component for the main case, shared with its sub-cases; null when no legal balance is available.",
            "nullable": true,
            "readOnly": true
          },
          "main_case": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateReference"
              }
            ],
            "description": "Main case when this resource is a sub-case.",
            "nullable": true,
            "readOnly": true
          },
          "previous_reference_numbers": {
            "description": "Earlier paywise case-file reference numbers of this case. Usually empty: when a case is re-keyed, `reference_number` shows the new number and the previous one is appended here. The `reference_number` list filter also matches these exactly.",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "readOnly": true,
            "type": "string"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateState"
              }
            ],
            "description": "Current legal, processing, and payment states.",
            "readOnly": true
          },
          "subcases": {
            "description": "Up to 100 sub-cases grouped under this main case, ordered by sub-case number. Empty when this resource is itself a sub-case.",
            "items": {
              "$ref": "#/components/schemas/MandateReference"
            },
            "readOnly": true,
            "type": "array"
          },
          "total_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentAmountRead"
              }
            ],
            "description": "Current claim total maintained on the main case, shared with its sub-cases. Use the mandate detail `legal_balance` for the legal claim and remaining balance broken down by component.",
            "nullable": true,
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the accepted case was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "archived",
          "claims",
          "created_at",
          "debtor",
          "id",
          "legal_balance",
          "main_case",
          "previous_reference_numbers",
          "reference_number",
          "state",
          "subcases",
          "total_amount",
          "updated_at"
        ],
        "type": "object"
      },
      "MandateDocument": {
        "description": "Public metadata for a claim document reachable from a mandate.",
        "properties": {
          "created_at": {
            "description": "Time at which the document was submitted.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "download_url": {
            "description": "Authenticated API URL for downloading the document; null unless it is ready and its file is available.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this case document.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mime_type": {
            "description": "Detected media type of the document.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseDocumentStatusEnum"
              }
            ],
            "description": "Document availability: `pending` while scanning or processing is incomplete; `ready` when processing permits download; `failed` when scanning or processing failed; `rejected` when the malware check rejected the file.",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseDocumentTypeEnum"
              }
            ],
            "description": "Business purpose of the document.",
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "download_url",
          "filename",
          "id",
          "mime_type",
          "status",
          "type"
        ],
        "type": "object"
      },
      "MandateDocumentPage": {
        "description": "Limit/offset page of results.",
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "readOnly": true,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "results": {
            "description": "Documents returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/MandateDocument"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "count",
          "next",
          "previous",
          "results"
        ],
        "type": "object"
      },
      "MandateHistory": {
        "description": "One published status and the resources it makes available to the client.",
        "properties": {
          "advance_type": {
            "description": "Category of the requested advance, when applicable.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "attachments": {
            "description": "Files explicitly published with this entry.",
            "items": {
              "$ref": "#/components/schemas/HistoryAttachment"
            },
            "readOnly": true,
            "type": "array"
          },
          "description": {
            "description": "Plain-text explanation of the published event.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this history entry.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "is_advance_request": {
            "description": "Whether this update requests an advance payment.",
            "readOnly": true,
            "type": "boolean"
          },
          "occurred_at": {
            "description": "Time at which the published event occurred.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "related_resources": {
            "description": "Resources published through this entry. Multiple resources may be linked; bodies are included only when explicitly expanded and authorized.",
            "items": {
              "$ref": "#/components/schemas/MandateHistoryRelatedResource"
            },
            "readOnly": true,
            "type": "array"
          },
          "source_mandate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HistorySourceMandate"
              }
            ],
            "description": "Main case or subcase that produced the entry.",
            "readOnly": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateState"
              }
            ],
            "description": "Workflow values recorded on this status. Blank dimensions were not recorded; this is not a complete state snapshot.",
            "readOnly": true
          },
          "text": {
            "description": "Compatibility alias of the event description.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "title": {
            "description": "Short title of the published event.",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateHistoryTypeEnum"
              }
            ],
            "description": "Business category of the history entry.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Latest change to this entry or its published related content; use for incremental synchronization.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "advance_type",
          "attachments",
          "description",
          "id",
          "is_advance_request",
          "occurred_at",
          "related_resources",
          "source_mandate",
          "state",
          "text",
          "title",
          "type",
          "updated_at"
        ],
        "type": "object"
      },
      "MandateHistoryPage": {
        "description": "Limit/offset page of results.",
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "readOnly": true,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "results": {
            "description": "History entries returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/MandateHistory"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "count",
          "next",
          "previous",
          "results"
        ],
        "type": "object"
      },
      "MandateHistoryRelatedResource": {
        "discriminator": {
          "mapping": {
            "email": "#/components/schemas/EmailHistoryRelatedResource",
            "message": "#/components/schemas/MessageHistoryRelatedResource",
            "request_to_client": "#/components/schemas/RequestToClientHistoryRelatedResource",
            "single_mandate_statement": "#/components/schemas/StatementHistoryRelatedResource"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/RequestToClientHistoryRelatedResource"
          },
          {
            "$ref": "#/components/schemas/MessageHistoryRelatedResource"
          },
          {
            "$ref": "#/components/schemas/EmailHistoryRelatedResource"
          },
          {
            "$ref": "#/components/schemas/StatementHistoryRelatedResource"
          }
        ]
      },
      "MandateHistoryTypeEnum": {
        "enum": [
          "status_update"
        ],
        "type": "string"
      },
      "MandateLegalBalance": {
        "description": "The case's legal claim balance: claim, payments, and remaining balance per component.",
        "properties": {
          "balance_of_costs_interest_bearing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Open balance of interest-bearing costs.",
            "nullable": true,
            "readOnly": true
          },
          "balance_of_costs_interest_free": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Open balance of interest-free costs.",
            "nullable": true,
            "readOnly": true
          },
          "balance_of_interest_on_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Open balance of interest charged on costs.",
            "nullable": true,
            "readOnly": true
          },
          "balance_of_interest_on_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Open balance of interest charged on the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "balance_of_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Open balance of the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "legal_claim_of_costs_interest_bearing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total legal claim for interest-bearing costs.",
            "nullable": true,
            "readOnly": true
          },
          "legal_claim_of_costs_interest_free": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total legal claim for interest-free costs.",
            "nullable": true,
            "readOnly": true
          },
          "legal_claim_of_interest_on_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total legal claim for interest on costs.",
            "nullable": true,
            "readOnly": true
          },
          "legal_claim_of_interest_on_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total legal claim for interest on the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "legal_claim_of_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total legal principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "payment_on_costs_interest_bearing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Payments allocated to interest-bearing costs.",
            "nullable": true,
            "readOnly": true
          },
          "payment_on_costs_interest_free": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Payments allocated to interest-free costs.",
            "nullable": true,
            "readOnly": true
          },
          "payment_on_interest_on_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Payments allocated to interest on costs.",
            "nullable": true,
            "readOnly": true
          },
          "payment_on_interest_on_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Payments allocated to interest on the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "payment_on_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Payments allocated to the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "total_balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Current total open balance of the legal claim.",
            "nullable": true,
            "readOnly": true
          },
          "total_legal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total legal claim before deducting payments.",
            "nullable": true,
            "readOnly": true
          },
          "total_payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total payments allocated to the legal claim.",
            "nullable": true,
            "readOnly": true
          },
          "updated": {
            "description": "Time at which the legal-claim balance was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "balance_of_costs_interest_bearing",
          "balance_of_costs_interest_free",
          "balance_of_interest_on_costs",
          "balance_of_interest_on_principal_claim",
          "balance_of_principal_claim",
          "legal_claim_of_costs_interest_bearing",
          "legal_claim_of_costs_interest_free",
          "legal_claim_of_interest_on_costs",
          "legal_claim_of_interest_on_principal_claim",
          "legal_claim_of_principal_claim",
          "payment_on_costs_interest_bearing",
          "payment_on_costs_interest_free",
          "payment_on_interest_on_costs",
          "payment_on_interest_on_principal_claim",
          "payment_on_principal_claim",
          "total_balance",
          "total_legal_claim",
          "total_payment",
          "updated"
        ],
        "type": "object"
      },
      "MandateList": {
        "description": "Compact list representation of one case.",
        "properties": {
          "archived": {
            "description": "Whether your company archived the case from its active view.",
            "readOnly": true,
            "type": "boolean"
          },
          "created_at": {
            "description": "Time at which the accepted case was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateDebtor"
              }
            ],
            "description": "Debtor associated with the accepted case.",
            "nullable": true,
            "readOnly": true
          },
          "id": {
            "description": "Stable identifier of the accepted case.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "previous_reference_numbers": {
            "description": "Earlier paywise case-file reference numbers of this case. Usually empty: when a case is re-keyed, `reference_number` shows the new number and the previous one is appended here. The `reference_number` list filter also matches these exactly.",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "readOnly": true,
            "type": "string"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateState"
              }
            ],
            "description": "Current legal, processing, and payment states.",
            "readOnly": true
          },
          "total_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentAmountRead"
              }
            ],
            "description": "Current claim total maintained on the main case, shared with its sub-cases. Use the mandate detail `legal_balance` for the legal claim and remaining balance broken down by component.",
            "nullable": true,
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the accepted case was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "archived",
          "created_at",
          "debtor",
          "id",
          "previous_reference_numbers",
          "reference_number",
          "state",
          "total_amount",
          "updated_at"
        ],
        "type": "object"
      },
      "MandateMessageWebhookEvent": {
        "description": "A client-authored message on an accepted case was received by paywise. This does not announce a message sent by paywise to the client.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
            "message_id": "70000000-0000-4000-8000-000000000001"
          },
          "id": "00000000-0000-4000-8000-000000000011",
          "type": "mandate.message.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateMessageWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.message.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case message event",
        "type": "object"
      },
      "MandateMessageWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "mandate_id": "50000000-0000-4000-8000-000000000001",
          "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
          "message_id": "70000000-0000-4000-8000-000000000001"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_id": {
            "description": "Accepted case (mandate) the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_url": {
            "description": "API path of the accepted case (`/v2/mandates/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          },
          "message_id": {
            "description": "Client-authored message received by paywise.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "mandate_id",
          "mandate_url",
          "message_id"
        ],
        "type": "object"
      },
      "MandateReference": {
        "properties": {
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateDebtor"
              }
            ],
            "description": "Debtor associated with the accepted case.",
            "nullable": true,
            "readOnly": true
          },
          "id": {
            "description": "Stable identifier of the accepted case.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "debtor",
          "id",
          "reference_number"
        ],
        "type": "object"
      },
      "MandateState": {
        "properties": {
          "legal_stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateStateValue"
              }
            ],
            "description": "Current legal collection stage.",
            "readOnly": true
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateStateValue"
              }
            ],
            "description": "Current payment or settlement state.",
            "readOnly": true
          },
          "processing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateStateValue"
              }
            ],
            "description": "Current operational processing state.",
            "readOnly": true
          }
        },
        "required": [
          "legal_stage",
          "payment",
          "processing"
        ],
        "type": "object"
      },
      "MandateStateChangedWebhookEvent": {
        "description": "Accepted-case event carrying only the case reference: creation, a public state change, or a balance change booked by paywise. Fetch `mandate_url` for the current state (`legal_balance` after `mandate.balance_updated`).",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000007",
          "type": "mandate.state.changed"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.state.changed"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case state changed",
        "type": "object"
      },
      "MandateStateValue": {
        "description": "Stable machine code plus an i18n-ready label key and current label.",
        "properties": {
          "code": {
            "description": "Stable machine-readable state code; an empty string when that state has not been set.",
            "readOnly": true,
            "type": "string"
          },
          "label": {
            "description": "Current human-readable state label; an empty string when its code is unset.",
            "readOnly": true,
            "type": "string"
          },
          "label_key": {
            "description": "Stable translation key for the state; an empty string when its code is unset.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "code",
          "label",
          "label_key"
        ],
        "type": "object"
      },
      "MandateStatusUpdateWebhookEvent": {
        "description": "A standalone status update was published on an accepted case.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
            "status_update_id": "f0000000-0000-4000-8000-000000000001"
          },
          "id": "00000000-0000-4000-8000-000000000008",
          "type": "mandate.status_update.published"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateStatusUpdateWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.status_update.published"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case status update",
        "type": "object"
      },
      "MandateStatusUpdateWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "mandate_id": "50000000-0000-4000-8000-000000000001",
          "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
          "status_update_id": "f0000000-0000-4000-8000-000000000001"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_id": {
            "description": "Accepted case (mandate) the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_url": {
            "description": "API path of the accepted case (`/v2/mandates/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          },
          "status_update_id": {
            "description": "Status update that was published.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "mandate_id",
          "mandate_url",
          "status_update_id"
        ],
        "type": "object"
      },
      "MandateWebhookEvent": {
        "description": "Accepted-case event carrying only the case reference: creation, a public state change, or a balance change booked by paywise. Fetch `mandate_url` for the current state (`legal_balance` after `mandate.balance_updated`).",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000006",
          "type": "mandate.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MandateWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "mandate.created",
              "mandate.state.changed",
              "mandate.balance_updated"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Case lifecycle event",
        "type": "object"
      },
      "MandateWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "mandate_id": "50000000-0000-4000-8000-000000000001",
          "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_id": {
            "description": "Accepted case (mandate) the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_url": {
            "description": "API path of the accepted case (`/v2/mandates/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "mandate_id",
          "mandate_url"
        ],
        "type": "object"
      },
      "MessageAuthor": {
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageAuthorTypeEnum"
              }
            ],
            "description": "Authorship channel: `api` for a client message created through current Case Management API, `user` for another client-authored message, or `paywise` for a message sent by paywise.",
            "readOnly": true
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "MessageAuthorTypeEnum": {
        "description": "* `api` - api\n* `user` - user\n* `paywise` - paywise",
        "enum": [
          "api",
          "user",
          "paywise"
        ],
        "type": "string"
      },
      "MessageCreateRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "body": {
            "description": "Message content sent to paywise; supported HTML is sanitized and the content must not be empty after sanitization.",
            "maxLength": 262144,
            "minLength": 1,
            "type": "string"
          },
          "documents": {
            "description": "Documents attached to the message. At most 20 documents and 50 MiB of decoded document content per command. Each file is limited to 10 MiB and each PDF to 100 pages. Exceeding a limit rejects the command with 400.",
            "items": {
              "$ref": "#/components/schemas/InlineDocumentCreateRequest"
            },
            "maxItems": 20,
            "type": "array"
          },
          "title": {
            "description": "Short subject of the message.",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "body",
          "title"
        ],
        "type": "object"
      },
      "MessageHistoryRelatedResource": {
        "properties": {
          "body": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageRead"
              }
            ],
            "description": "Message, included when explicitly expanded and authorized."
          },
          "id": {
            "description": "Identifier of the related resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageHistoryRelatedResourceTypeEnum"
              }
            ],
            "description": "Related resource kind.\n\n* `message` - message",
            "readOnly": true
          },
          "url": {
            "description": "Authenticated API URL of the related resource.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "url"
        ],
        "title": "Message",
        "type": "object"
      },
      "MessageHistoryRelatedResourceTypeEnum": {
        "description": "* `message` - message",
        "enum": [
          "message"
        ],
        "type": "string"
      },
      "MessageParent": {
        "properties": {
          "id": {
            "description": "Identifier of the order or accepted case owning the message.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageParentTypeEnum"
              }
            ],
            "description": "Whether the message belongs to an order (`order`) or an accepted case (`mandate`).",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "type"
        ],
        "type": "object"
      },
      "MessageParentTypeEnum": {
        "description": "* `order` - order\n* `mandate` - mandate",
        "enum": [
          "order",
          "mandate"
        ],
        "type": "string"
      },
      "MessageRead": {
        "description": "Resource representation with a native UUID `id`.",
        "properties": {
          "author": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageAuthor"
              }
            ],
            "description": "Channel through which the message was authored.",
            "readOnly": true
          },
          "body": {
            "description": "Message content exchanged with paywise.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the message was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents attached to the message.",
            "items": {
              "$ref": "#/components/schemas/DocumentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "editable": {
            "description": "Whether this message can be edited through the API. True only for a client message created through current Case Management API for the calling company while it is under review and no review task has started.",
            "readOnly": true,
            "type": "boolean"
          },
          "href": {
            "description": "API URL of this message.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier for this resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "parent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageParent"
              }
            ],
            "description": "Order or accepted case to which the message belongs.",
            "readOnly": true
          },
          "response_to": {
            "description": "Message to which this message responds, when applicable.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "sender": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SenderEnum"
              }
            ],
            "description": "Party that sent the message.",
            "readOnly": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StateEnum"
              }
            ],
            "description": "Review/publication state: `under_review` for a client message awaiting review, `handled` after handling, or `published` for a published message. Check `editable` before offering edits.",
            "readOnly": true
          },
          "title": {
            "description": "Short subject of the message.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Time at which the message was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "author",
          "body",
          "created_at",
          "documents",
          "editable",
          "href",
          "id",
          "parent",
          "response_to",
          "sender",
          "state",
          "title",
          "updated_at"
        ],
        "type": "object"
      },
      "MonthlyRentWriteRequest": {
        "description": "The agreed monthly rent; `RentalAgreement.base_rent` is NUMERIC(10,2).",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the amount; currently always EUR.\n\n* `EUR` - EUR"
          },
          "value": {
            "description": "Monthly rent expressed with two decimal places (up to 8 digits before the point). Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,8}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "Order": {
        "discriminator": {
          "mapping": {
            "invoice": "#/components/schemas/InvoiceOrder",
            "rental": "#/components/schemas/RentalOrder",
            "titled": "#/components/schemas/TitledOrder"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/InvoiceOrder"
          },
          {
            "$ref": "#/components/schemas/RentalOrder"
          },
          {
            "$ref": "#/components/schemas/TitledOrder"
          }
        ]
      },
      "OrderAcceptedWebhookEvent": {
        "description": "The order was accepted and its claims were frozen into exactly one accepted case. Carries the order and the mandate it created or extended, so the case can be fetched without reading the order first.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "claim_ids": [
              "30000000-0000-4000-8000-000000000001"
            ],
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000004",
          "type": "order.accepted"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderAcceptedWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.accepted"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order accepted",
        "type": "object"
      },
      "OrderAcceptedWebhookEventData": {
        "example": {
          "claim_ids": [
            "30000000-0000-4000-8000-000000000001"
          ],
          "company_id": "10000000-0000-4000-8000-000000000001",
          "mandate_id": "50000000-0000-4000-8000-000000000001",
          "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/",
          "order_id": "20000000-0000-4000-8000-000000000001",
          "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "claim_ids": {
            "description": "Complete claim UUID set at the lifecycle event, sorted by UUID. Always present on newly emitted events, including [] for an empty set. May be omitted only on retained envelopes materialized before this contract; omission means an unavailable historical snapshot, not an empty set. Stored feed and delivery payloads are never rewritten.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_id": {
            "description": "Accepted case (mandate) the order's claims now belong to; equals the order's `mandate` field.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_url": {
            "description": "API path of the accepted case (`/v2/mandates/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          },
          "order_id": {
            "description": "Order the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "order_url": {
            "description": "API path of the order (`/v2/orders/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "order_id",
          "order_url",
          "mandate_id",
          "mandate_url"
        ],
        "type": "object"
      },
      "OrderCreateRequest": {
        "description": "Create an order with a referenced debtor and embedded\nclaims in one API call. Returns the created order in its read\nrepresentation.",
        "properties": {
          "additional_debtor_ids": {
            "description": "Other debtors, each supplied by an existing UUID from the active company. The primary debtor cannot also appear here, and each referenced additional debtor may appear only once. Maximum 10 entries.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "claims": {
            "description": "Claims to create in this draft; each must specify type. Invoice and rental orders accept receivable claims. Titled orders accept titled claims and receivable enforcement costs (K014); at least one complete claim, including one titled claim for titled orders, is required before finalization. Maximum 50 entries. The 50-claim limit applies to the complete order, including claims added later through the claim endpoint; exceeding it returns 400 validation_error.",
            "items": {
              "$ref": "#/components/schemas/ClaimCreateRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "confirmation_email": {
            "description": "Address that receives the order entry confirmation (Eingangsbestätigung) when the order is finalized. Omit or set null for no confirmation email.",
            "format": "email",
            "maxLength": 255,
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "creditor_obligation_fulfilled": {
            "description": "Whether you have fully performed your obligation to the debtor. For invoice and rental orders, supply true or false before finalization; null leaves the decision unset. Omit for titled orders.",
            "nullable": true,
            "type": "boolean"
          },
          "debtor_id": {
            "description": "Existing primary debtor in the selected company.",
            "format": "uuid",
            "type": "string"
          },
          "rental_agreement": {
            "$ref": "#/components/schemas/RentalAgreementInlineRequest",
            "description": "Rental-agreement singleton supplied only for a rental order."
          },
          "starting_approach": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StartingApproachEnum"
              }
            ],
            "description": "Initial route for invoice and rental orders: extrajudicial starts with out-of-court collection; judicial starts by applying for a payment order (Mahnbescheid). Required before finalization; omit for titled orders, where enforcement is implicit.",
            "nullable": true
          },
          "success_fee_confirmed": {
            "description": "Only valid for titled orders. Confirmation of the titled-order success-fee arrangement; it must be true before finalization. See the [paywise General Terms and Conditions (AGB)](https://paywise.de/agb/) for the exact conditions for titled orders.",
            "type": "boolean"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderTypeEnum"
              }
            ],
            "default": "invoice",
            "description": "Order type discriminator: invoice, rental, or titled. Defaults to invoice when omitted."
          }
        },
        "required": [
          "debtor_id"
        ],
        "type": "object"
      },
      "OrderExpiredWebhookEvent": {
        "description": "Order lifecycle event: the order was submitted, withdrawn, rejected, or expired. Fetch `order_url` for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "claim_ids": [
              "30000000-0000-4000-8000-000000000001"
            ],
            "company_id": "10000000-0000-4000-8000-000000000001",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000005",
          "type": "order.expired"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order expired",
        "type": "object"
      },
      "OrderMessageWebhookEvent": {
        "description": "A client-authored message on an order was received by paywise. This does not announce a message sent by paywise to the client.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "message_id": "70000000-0000-4000-8000-000000000001",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000010",
          "type": "order.message.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderMessageWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.message.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order message event",
        "type": "object"
      },
      "OrderMessageWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "message_id": "70000000-0000-4000-8000-000000000001",
          "order_id": "20000000-0000-4000-8000-000000000001",
          "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "message_id": {
            "description": "Client-authored message received by paywise.",
            "format": "uuid",
            "type": "string"
          },
          "order_id": {
            "description": "Order the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "order_url": {
            "description": "API path of the order (`/v2/orders/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "order_id",
          "order_url",
          "message_id"
        ],
        "type": "object"
      },
      "OrderRejectedWebhookEvent": {
        "description": "Order lifecycle event: the order was submitted, withdrawn, rejected, or expired. Fetch `order_url` for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "claim_ids": [
              "30000000-0000-4000-8000-000000000001"
            ],
            "company_id": "10000000-0000-4000-8000-000000000001",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000003",
          "type": "order.rejected"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.rejected"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order rejected",
        "type": "object"
      },
      "OrderRejection": {
        "description": "Why and when paywise declined an order, present only while rejected.",
        "properties": {
          "code": {
            "description": "Stable machine-readable key of the standard rejection reason when the rejection used one; null for an individually worded rejection.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "notified_to": {
            "description": "E-mail addresses of your company's status-update recipients the rejection notice was delivered to. Empty when no notice was sent.",
            "items": {
              "format": "email",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "reason": {
            "description": "Plain-text reason paywise gave for rejecting the order: the wording of the rejection notice with formatting removed.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "rejected_at": {
            "description": "Time at which paywise rejected the order.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "code",
          "notified_to",
          "reason",
          "rejected_at"
        ],
        "type": "object"
      },
      "OrderRequestToClientRead": {
        "description": "Published order clarification, available before case acceptance.",
        "properties": {
          "allowed_answer_types": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AllowedAnswerTypesEnum"
              }
            ],
            "description": "Answer format accepted for this request.\n\n* `fileupload` - fileupload\n* `freetext` - freetext\n* `yes-no` - yes-no\n* `yes-no-dontknow` - yes-no-dontknow\n* `yes-no-freetext-on-no` - yes-no-freetext-on-no\n* `yes-with-date-no-freetext-on-no` - yes-with-date-no-freetext-on-no",
            "readOnly": true
          },
          "answer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AnswerRead"
              }
            ],
            "description": "Submitted answer, or null while unanswered.",
            "nullable": true,
            "readOnly": true
          },
          "answered": {
            "description": "Whether an answer has already been submitted.",
            "readOnly": true,
            "type": "boolean"
          },
          "answered_at": {
            "description": "Time at which the answer was submitted, when answered.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the request was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Question or explanation describing what paywise needs.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "href": {
            "description": "API URL of this client request.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this client request.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "order": {
            "description": "Order for which paywise needs information.",
            "properties": {
              "href": {
                "description": "API URL of the order.",
                "format": "uri",
                "nullable": true,
                "type": "string"
              },
              "id": {
                "description": "Identifier of the order.",
                "format": "uuid",
                "type": "string"
              }
            },
            "readOnly": true,
            "required": [
              "id",
              "href"
            ],
            "type": "object"
          },
          "question_attachments": {
            "description": "Files paywise attached to the question.",
            "items": {
              "properties": {
                "download_url": {
                  "description": "Temporary URL for downloading the attachment.",
                  "format": "uri",
                  "nullable": true,
                  "type": "string"
                },
                "filename": {
                  "description": "Original filename of the attachment.",
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "description": "Stable identifier of the attachment.",
                  "format": "uuid",
                  "type": "string"
                },
                "mime_type": {
                  "description": "Media type of the attachment.",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "title": {
            "description": "Short subject of the requested information.",
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Time at which the request was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "allowed_answer_types",
          "answer",
          "answered",
          "answered_at",
          "created_at",
          "description",
          "href",
          "id",
          "order",
          "question_attachments",
          "title",
          "updated_at"
        ],
        "type": "object"
      },
      "OrderStatusEnum": {
        "enum": [
          "draft",
          "submitted",
          "awaiting_client_response",
          "accepted",
          "rejected",
          "withdrawn",
          "expired",
          "merged"
        ],
        "type": "string"
      },
      "OrderSubmittedWebhookEvent": {
        "description": "Order lifecycle event: the order was submitted, withdrawn, rejected, or expired. Fetch `order_url` for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "claim_ids": [
              "30000000-0000-4000-8000-000000000001"
            ],
            "company_id": "10000000-0000-4000-8000-000000000001",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000001",
          "type": "order.submitted"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.submitted"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order submitted",
        "type": "object"
      },
      "OrderTotals": {
        "properties": {
          "charges": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Sum of itemized additional charges on receivable claims.",
            "readOnly": true
          },
          "main_claims": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Sum of receivable-claim principal amounts plus gross enforceable-title amounts.",
            "readOnly": true
          },
          "order_value": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Current open value for invoice and rental orders; for titled orders, gross main_claims plus charges, with payments reported separately.",
            "readOnly": true
          },
          "payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Sum of payments already reported for the order's claims.",
            "readOnly": true
          }
        },
        "required": [
          "charges",
          "main_claims",
          "order_value",
          "payments"
        ],
        "type": "object"
      },
      "OrderTypeEnum": {
        "description": "* `invoice` - invoice\n* `rental` - rental\n* `titled` - titled",
        "enum": [
          "invoice",
          "rental",
          "titled"
        ],
        "type": "string"
      },
      "OrderWebhookEvent": {
        "description": "Order lifecycle event: the order was submitted, withdrawn, rejected, or expired. Fetch `order_url` for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "claim_ids": [
              "30000000-0000-4000-8000-000000000001"
            ],
            "company_id": "10000000-0000-4000-8000-000000000001",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000001",
          "type": "order.submitted"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.submitted",
              "order.withdrawn",
              "order.rejected",
              "order.expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order lifecycle event",
        "type": "object"
      },
      "OrderWebhookEventData": {
        "example": {
          "claim_ids": [
            "30000000-0000-4000-8000-000000000001"
          ],
          "company_id": "10000000-0000-4000-8000-000000000001",
          "order_id": "20000000-0000-4000-8000-000000000001",
          "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "claim_ids": {
            "description": "Complete claim UUID set at the lifecycle event, sorted by UUID. Always present on newly emitted events, including [] for an empty set. May be omitted only on retained envelopes materialized before this contract; omission means an unavailable historical snapshot, not an empty set. Stored feed and delivery payloads are never rewritten.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "order_id": {
            "description": "Order the event refers to.",
            "format": "uuid",
            "type": "string"
          },
          "order_url": {
            "description": "API path of the order (`/v2/orders/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "order_id",
          "order_url"
        ],
        "type": "object"
      },
      "OrderWithdrawRequest": {
        "description": "Optional plain-text reason for a client-initiated withdrawal.",
        "properties": {
          "reason": {
            "description": "Optional explanation for withdrawing an eligible submitted order before acceptance or active review prevents withdrawal. Maximum 5000 characters.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrderWithdrawnWebhookEvent": {
        "description": "Order lifecycle event: the order was submitted, withdrawn, rejected, or expired. Fetch `order_url` for the current state.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "claim_ids": [
              "30000000-0000-4000-8000-000000000001"
            ],
            "company_id": "10000000-0000-4000-8000-000000000001",
            "order_id": "20000000-0000-4000-8000-000000000001",
            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000002",
          "type": "order.withdrawn"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/OrderWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "order.withdrawn"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Order withdrawn",
        "type": "object"
      },
      "OrganizationPatchRequest": {
        "description": "Partial update of an existing organization. Omitted properties stay unchanged; an empty object is rejected. Creating a new organization during PATCH requires name.",
        "minProperties": 1,
        "properties": {
          "commercial_register": {
            "description": "Register court or authority holding the registration.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "commercial_registration_number": {
            "description": "Commercial, cooperative, partnership, or association register number (HRA, HRB, GnR, PR, VR; Austrian FN). Free text for foreign legal forms.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "name": {
            "description": "Registered or trading name of the organization.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationRead": {
        "properties": {
          "commercial_register": {
            "description": "Register court or authority holding the registration.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "commercial_registration_number": {
            "description": "Commercial, association, or partnership register number.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "Registered or trading name of the organization.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "commercial_register",
          "commercial_registration_number",
          "name"
        ],
        "type": "object"
      },
      "OrganizationWriteRequest": {
        "description": "An empty object `{}` is rejected — omit the member instead.",
        "properties": {
          "commercial_register": {
            "description": "Register court or authority holding the registration.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "commercial_registration_number": {
            "description": "Register number beginning with HRA, HRB, VR, or PR, followed by one to nine digits and an optional letter; for example, HRB 12345. Whitespace and letter case are normalized.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "name": {
            "description": "Registered or trading name of the organization.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "PaginatedClaimList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedCorrespondenceListList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/CorrespondenceList"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedDebtorListList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/DebtorList"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedDocumentReadList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/DocumentRead"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedEventFeed": {
        "description": "One page of the event feed. There is no total count.",
        "properties": {
          "cursor": {
            "description": "Opaque position after the last event on this page; pass it as `since` on the next poll. Present on every page: it equals `next` while more events are waiting, stays set on the last page, repeats `since` when the page is empty, and is null only for an empty page requested without `since`.",
            "nullable": true,
            "type": "string"
          },
          "next": {
            "description": "Opaque cursor of the last event on this page; pass it as `since` to continue. Null when the feed has no further event yet.",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Events in feed order, oldest first. Each entry is the envelope delivered for the same event ID. Only events retained for the last 30 days and permitted by the credential’s resource read scopes are included; new events become visible after about 60 seconds.",
            "items": {
              "$ref": "#/components/schemas/CaseWebhookEvent"
            },
            "type": "array"
          }
        },
        "required": [
          "cursor",
          "next",
          "results"
        ],
        "type": "object"
      },
      "PaginatedMandateListList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/MandateList"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedMessageReadList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/MessageRead"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedOrderList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedOrderRequestToClientReadList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/OrderRequestToClientRead"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedPaymentReadList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/PaymentRead"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedRequestToClientReadList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/RequestToClientRead"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedSingleMandateStatementListList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/SingleMandateStatementList"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedStatementListList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/StatementList"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedWebhookDeliveryList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PaginatedWebhookList": {
        "properties": {
          "count": {
            "description": "Total number of matching resources.",
            "example": 123,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page. With `updated_since` it carries an opaque `cursor`.",
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page. Always null with `updated_since`.",
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "results": {
            "description": "Resources returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            },
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "type": "object"
      },
      "PatchedClaimUpdateRequest": {
        "description": "Partial update of a claim while its order is a draft.\n\nOne flat schema: a claim's type is immutable, so `type` is not a\nwritable field here and title ownership changes only through the\nclaim-owned `enforceable-title` route.",
        "properties": {
          "additional_charges": {
            "description": "Itemized incidental charges for a receivable claim, such as reminder or bank fees. This array replaces all existing charges; [] clears them and omission preserves them. Maximum 50 entries per claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimChargeWriteRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "delay_date": {
            "description": "Payment-default date for a receivable claim. For H17/H19 rent, an explicit date overrides the derived day after due_date and null restores derivation. For other receivables, null clears it; changing document_date, due_date, or reminders without supplying delay_date recalculates it. An explicit date must follow the applicable due or reminder date.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim. The resulting disputed claim must have a non-blank reason; an existing reason satisfies this requirement when omitted from PATCH. Setting is_disputed to false clears the existing reason unless you supply this field, which must then be empty or null.",
            "maxLength": 2500,
            "nullable": true,
            "type": "string"
          },
          "document_date": {
            "description": "Date of the invoice, contract, or other claim document. For H17/H19 rent, supply the first day of the rental month; only one rental claim per calendar month is allowed. Only valid for receivable claims. Required and cannot be in the future at finalization.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "due_date": {
            "description": "Date on which a receivable claim became due. For H17/H19 rent, an explicit date overrides the agreement rule, null restores derivation, and omission preserves the current date or its existing derivation. For other receivables it cannot precede document_date.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim. Setting false also clears the existing dispute_reason unless you supply that field explicitly.",
            "type": "boolean"
          },
          "items": {
            "description": "Invoice or contract lines for a receivable claim. This array replaces all existing lines; [] clears them and omission preserves them. Supply principal_amount separately when the principal changes. Maximum 100 entries per claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimItemWriteRequest"
            },
            "maxItems": 100,
            "type": "array"
          },
          "legal_basis": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimLegalBasisWriteRequest"
              }
            ],
            "description": "Contract or obligation establishing a receivable claim. Supplied properties update the existing legal basis; omitted properties stay unchanged. Not valid on titled claims or on receivable enforcement costs in titled orders, which always use K014."
          },
          "principal_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimPrincipalAmountWriteRequest"
              }
            ],
            "description": "Replacement principal amount including VAT, before charges and payments. Only valid for receivable claims; titled claims use their enforceable-title amount. Changing items does not update this amount. The principal must be positive before finalization."
          },
          "reminders": {
            "description": "Payment reminders for a receivable claim, in chronological order starting no earlier than its due date (or document date when due_date is absent). This array replaces all reminders; [] clears them and omission preserves them. Retain existing entries with their id. Maximum 50 entries per claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimReminderWriteRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim. Before finalization, a receivable claim must have non-blank subject_matter or at least one claim document. Maximum 2000 characters.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchedDebtorWriteRequest": {
        "description": "Metadata and events are create-and-read only.",
        "properties": {
          "acting_as": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActingAsEnum"
              }
            ],
            "description": "Whether the debtor incurred the obligation as a consumer or in a business capacity. When changing it, update person, organization, and legal_form together to form a valid identity."
          },
          "addresses": {
            "description": "Postal addresses for the debtor. Supplied arrays replace the entire collection; [] clears it and omission leaves it unchanged. Include an existing child id to retain that entry. A non-empty list must have exactly one primary address; an order requires at least one complete address before finalization. Maximum 5 entries.",
            "items": {
              "$ref": "#/components/schemas/AddressWriteRequest"
            },
            "maxItems": 5,
            "type": "array"
          },
          "bank_accounts": {
            "description": "Known bank accounts for the debtor. Supplied arrays replace the entire collection; [] clears it and omission leaves it unchanged. Include an existing child id to retain that entry. Duplicate IBANs are rejected. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/BankAccountWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "communication_channels": {
            "description": "Email addresses and telephone numbers for the debtor. Supplied arrays replace the entire collection; [] clears it and omission leaves it unchanged. Include an existing child id to retain that entry. Duplicate type/value pairs are rejected. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/CommunicationChannelWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "legal_form": {
            "description": "Optional permanent code from GET /v2/legal-forms/. Null or an empty string clears it; consumers cannot supply a code. A supplied catalog group determines the permitted identity. Omission preserves the current value.",
            "nullable": true,
            "type": "string"
          },
          "legal_representatives": {
            "description": "Legal representatives for the debtor. Supplied arrays replace the entire collection; [] clears it and omission leaves it unchanged. Include an existing child id to retain that entry. Representative nesting is limited to two levels. Maximum 10 entries.",
            "items": {
              "$ref": "#/components/schemas/LegalRepresentativeWriteRequest"
            },
            "maxItems": 10,
            "type": "array"
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationPatchRequest"
              }
            ],
            "description": "Organization identity for business legal forms outside the privatperson and einzelkaufmann groups. Supplied properties update the current organization; omission leaves it unchanged and null removes it. The resulting debtor must retain a valid identity.",
            "nullable": true
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonPatchRequest"
              }
            ],
            "description": "Natural-person identity for consumers and business legal forms in the privatperson or einzelkaufmann group. Supplied properties update the current person; omission leaves it unchanged and null removes it. The resulting debtor must retain a valid identity.",
            "nullable": true
          },
          "your_reference": {
            "description": "Your reference for this debtor. Blank is stored as null.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchedEnforceableTitlePatchRequest": {
        "description": "Update the supplied title metadata; omitted fields retain their values.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleAmountWriteRequest"
              }
            ],
            "description": "Gross amount confirmed by the client and owned by the enforceable title. May be absent or null while drafting; must be positive before finalization.",
            "nullable": true
          },
          "file_number": {
            "description": "Official file or reference number shown on the title. Required before finalization.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "issued_on": {
            "description": "Date on which the enforceable title was issued. Required before finalization.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "issuing_authority": {
            "description": "Court, notary, or other authority that issued the title. Required before finalization.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "legally_binding_since": {
            "description": "Optional date from which the title is legally binding; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "served_on": {
            "description": "Optional date on which the title was served; it cannot precede issued_on.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "title_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitleTypeEnum"
              }
            ],
            "description": "Legal title category: enforcement_order = Vollstreckungsbescheid; default_judgment = Versäumnisurteil; final_judgment = Endurteil; acknowledgment_judgment = Anerkenntnisurteil; reservation_judgment = Vorbehaltsurteil; court_settlement = Gerichtlicher Vergleich; enforceable_notarial_deed = Vollstreckbare notarielle Urkunde; cost_assessment_order = Kostenfestsetzungsbeschluss; other = Sonstiger Titel. Required before finalization.",
            "nullable": true
          }
        },
        "type": "object"
      },
      "PatchedMessagePatchRequest": {
        "additionalProperties": false,
        "description": "Update the message title, body, or both. Supply at least one field; omitted fields retain their values. Unknown fields are rejected.",
        "minProperties": 1,
        "properties": {
          "body": {
            "description": "Message content sent to paywise; supported HTML is sanitized and the content must not be empty after sanitization.",
            "maxLength": 262144,
            "minLength": 1,
            "type": "string"
          },
          "title": {
            "description": "Short subject of the message.",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchedOrderDecisionPatchRequest": {
        "description": "The order fields that stay editable while it is a draft.",
        "properties": {
          "additional_debtor_ids": {
            "description": "Replace the order's additional-debtor membership with up to 10 existing debtor UUIDs from the active company. Omit to leave membership unchanged; [] unlinks all additional debtors without deleting their records. The primary debtor cannot also appear here, and duplicates are rejected. Available only while the order is a draft.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "confirmation_email": {
            "description": "Address that receives the order entry confirmation (Eingangsbestätigung) when the order is finalized. Set null to turn the confirmation email off again.",
            "format": "email",
            "maxLength": 255,
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "creditor_obligation_fulfilled": {
            "description": "Whether you have fully performed your obligation to the debtor. For invoice and rental orders, supply true or false before finalization; null leaves the decision unset. Omit for titled orders.",
            "nullable": true,
            "type": "boolean"
          },
          "debtor_id": {
            "description": "Replace the primary debtor with an existing debtor in the selected company.",
            "format": "uuid",
            "type": "string"
          },
          "starting_approach": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StartingApproachEnum"
              }
            ],
            "description": "Initial route for invoice and rental orders: extrajudicial starts with out-of-court collection; judicial starts by applying for a payment order (Mahnbescheid). Required before finalization; omit for titled orders, where enforcement is implicit.",
            "nullable": true
          },
          "success_fee_confirmed": {
            "description": "Only valid for titled orders. Confirmation of the titled-order success-fee arrangement; it must be true before finalization. See the [paywise General Terms and Conditions (AGB)](https://paywise.de/agb/) for the exact conditions for titled orders.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PatchedRentalAgreementWriteRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "contract_date": {
            "description": "Date on which the rental contract was concluded; this is not the tenancy start or move-in date. Required before finalization. Updating it also updates the legal_basis.contract_date of H17/H19 claims in the order.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "due_rule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalDueRuleRequest"
              }
            ],
            "description": "Rule used to derive H17/H19 rental due dates. Omission preserves the current rule; null restores the default third German business day. Changes recalculate dates except claim-level dates explicitly overridden by the client.",
            "nullable": true
          },
          "monthly_rent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonthlyRentWriteRequest"
              }
            ],
            "description": "Total recurring Warmmiete, including ancillary-cost prepayments; it does not constrain an individual claim amount. May be absent or null while drafting; must be positive before finalization.",
            "nullable": true
          },
          "property_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalPropertyAddressWriteRequest"
              }
            ],
            "description": "Complete address of the rented property, even when it matches the debtor address. Supply street, postal_code, city, and country; this creates a separate property address and does not reuse a debtor address id or primary flag. A complete property address is required before finalization.",
            "nullable": true
          }
        },
        "type": "object"
      },
      "PatchedWebhookRequest": {
        "description": "A webhook subscription. The signing secret is never included; it is returned exactly once on creation or rotation.",
        "properties": {
          "description": {
            "description": "Optional single-line label for this webhook.",
            "maxLength": 255,
            "type": "string"
          },
          "enabled": {
            "description": "Whether deliveries are attempted. Re-enabling an endpoint resets its consecutive failure counter. Auto-disabled endpoints do not count toward the endpoint limit, so re-enabling one requires a free slot; otherwise the request returns 409 webhook_limit_reached.",
            "type": "boolean"
          },
          "events": {
            "description": "Replacement list of public event subscriptions. Use `[\"*\"]` for all public events; the wildcard must be the only list entry. Omit to keep the endpoint’s current subscriptions.",
            "items": {
              "$ref": "#/components/schemas/CaseWebhookSubscriptionEventEnum"
            },
            "type": "array"
          },
          "max_consecutive_failures": {
            "description": "Automatically disables the endpoint when this many consecutive deliveries reach terminal failure. Retry attempts within one delivery do not each count. Raising it above the failure count of an automatically disabled endpoint makes that endpoint count toward the endpoint limit again and requires a free slot.",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "url": {
            "description": "Publicly reachable HTTPS URL for webhook notifications. Must be unique among this company’s v2 endpoints; duplicate checks normalize the scheme, host, and default port. A company can register at most 20 webhook endpoints. Enabled and manually disabled endpoints count toward this limit; automatically disabled endpoints do not, and re-enabling one requires a free slot. Exceeding the limit returns 409 webhook_limit_reached; delete an unused endpoint to free capacity.",
            "format": "uri",
            "maxLength": 2048,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentAmountRead": {
        "properties": {
          "currency": {
            "description": "Currency of the payment.",
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "description": "Amount received, expressed with two decimal places. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "currency",
          "value"
        ],
        "type": "object"
      },
      "PaymentAmountWriteRequest": {
        "description": "Base for every nested EUR amount object; subclasses override `value`\nthrough :func:`amount_value_field` to set their own digit/floor limits.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the payment; currently always EUR.\n\n* `EUR` - EUR"
          },
          "value": {
            "description": "Amount received in major currency units, with at most two decimal places; must be at least 0.01. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "PaymentClaimReference": {
        "properties": {
          "document_reference": {
            "description": "Invoice, contract, or source-document number of the claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Identifier of the claim receiving the payment.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for the claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "document_reference",
          "id",
          "your_reference"
        ],
        "type": "object"
      },
      "PaymentMandateReference": {
        "properties": {
          "id": {
            "description": "Identifier of the accepted case receiving the payment.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "reference_number"
        ],
        "type": "object"
      },
      "PaymentMetadataWriteRequest": {
        "description": "One creation-time metadata row; duplicate types are intentional.",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentMetadataWriteTypeEnum"
              }
            ],
            "description": "Payment metadata type.\n\n* `comment` - comment\n* `invoice:reference` - invoice:reference\n* `invoice:update_and_capture` - invoice:update_and_capture\n* `transaction:reference` - transaction:reference\n* `contract:reference` - contract:reference\n* `report:reference` - report:reference\n* `contravention:reference` - contravention:reference"
          },
          "value": {
            "description": "Metadata value; duplicate types remain separate entries.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "PaymentMetadataWriteTypeEnum": {
        "description": "* `comment` - comment\n* `invoice:reference` - invoice:reference\n* `invoice:update_and_capture` - invoice:update_and_capture\n* `transaction:reference` - transaction:reference\n* `contract:reference` - contract:reference\n* `report:reference` - report:reference\n* `contravention:reference` - contravention:reference",
        "enum": [
          "comment",
          "invoice:reference",
          "invoice:update_and_capture",
          "transaction:reference",
          "contract:reference",
          "report:reference",
          "contravention:reference"
        ],
        "type": "string"
      },
      "PaymentRead": {
        "description": "Read representation of one reported payment.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentAmountRead"
              }
            ],
            "description": "Amount received.",
            "nullable": true,
            "readOnly": true
          },
          "claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentClaimReference"
              }
            ],
            "description": "Claim to which the payment was reported.",
            "nullable": true,
            "readOnly": true
          },
          "created_at": {
            "description": "Time at which the payment was reported.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this reported payment.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mandate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentMandateReference"
              }
            ],
            "description": "Accepted case containing the claim.",
            "nullable": true,
            "readOnly": true
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "updated_at": {
            "description": "Time at which the payment record was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "value_date": {
            "description": "Date on which the payment was credited.",
            "format": "date",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for reconciling this payment.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "claim",
          "created_at",
          "id",
          "mandate",
          "metadata",
          "updated_at",
          "value_date",
          "your_reference"
        ],
        "type": "object"
      },
      "PaymentWebhookEvent": {
        "description": "A payment report was finalized by the company.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "payment_id": "90000000-0000-4000-8000-000000000001",
            "payment_url": "/v2/payments/90000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000014",
          "type": "payment.reported"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PaymentWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "payment.reported"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Payment event",
        "type": "object"
      },
      "PaymentWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "payment_id": "90000000-0000-4000-8000-000000000001",
          "payment_url": "/v2/payments/90000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "payment_id": {
            "description": "Reported payment.",
            "format": "uuid",
            "type": "string"
          },
          "payment_url": {
            "description": "API path of the payment (`/v2/payments/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "payment_id",
          "payment_url"
        ],
        "type": "object"
      },
      "PaymentWriteRequest": {
        "description": "Payment input; the target is supplied exclusively by the URL.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentAmountWriteRequest"
              }
            ],
            "description": "Amount received."
          },
          "metadata": {
            "description": "Metadata supplied when reporting the payment; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/PaymentMetadataWriteRequest"
            },
            "type": "array"
          },
          "value_date": {
            "description": "Date on which the payment was credited; must not be in the future.",
            "format": "date",
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for reconciling this payment.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "value_date"
        ],
        "type": "object"
      },
      "PaymentsToClient": {
        "properties": {
          "allocation_to_client_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your costs from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_client_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your expenses from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_default_interest": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to default interest from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the collection fee from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to fee VAT from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_main_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the principal claim from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_overpayment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to overpayment from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the success commission from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to success-commission VAT from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_tax_free_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to paywise's tax-free expenses from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to paywise's taxable expenses from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to VAT on taxable expenses from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "payout": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Resulting payout balance from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "total_payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "allocation_to_client_costs",
          "allocation_to_client_expenses",
          "allocation_to_default_interest",
          "allocation_to_fee",
          "allocation_to_fee_vat",
          "allocation_to_main_claim",
          "allocation_to_overpayment",
          "allocation_to_success_commission",
          "allocation_to_success_commission_vat",
          "allocation_to_tax_free_expenses",
          "allocation_to_taxable_expenses",
          "allocation_to_taxable_expenses_vat",
          "payout",
          "total_payments"
        ],
        "type": "object"
      },
      "PaymentsToDCA": {
        "properties": {
          "allocation_to_client_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your costs from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_client_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your expenses from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_default_interest": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to default interest from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the collection fee from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to fee VAT from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_main_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the principal claim from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_overpayment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to overpayment from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the success commission from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to success-commission VAT from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_tax_free_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to paywise's tax-free expenses from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to paywise's taxable expenses from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to VAT on taxable expenses from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "payout": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Resulting payout balance from debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "total_payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "allocation_to_client_costs",
          "allocation_to_client_expenses",
          "allocation_to_default_interest",
          "allocation_to_fee",
          "allocation_to_fee_vat",
          "allocation_to_main_claim",
          "allocation_to_overpayment",
          "allocation_to_success_commission",
          "allocation_to_success_commission_vat",
          "allocation_to_tax_free_expenses",
          "allocation_to_taxable_expenses",
          "allocation_to_taxable_expenses_vat",
          "payout",
          "total_payments"
        ],
        "type": "object"
      },
      "PayoutMethodEnum": {
        "description": "* `transfer` - Überweisung\n* `direct_debit` - Lastschrift",
        "enum": [
          "transfer",
          "direct_debit"
        ],
        "type": "string"
      },
      "PersonPatchRequest": {
        "description": "Partial update of an existing person. Omitted properties stay unchanged; an empty object is rejected. Creating a new person during PATCH requires first_name and last_name; salutation is optional.",
        "minProperties": 1,
        "properties": {
          "birth_date": {
            "description": "Date of birth (YYYY-MM-DD) used to identify the natural person.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "first_name": {
            "description": "Given name of the natural person.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "last_name": {
            "description": "Family name of the natural person.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "salutation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalutationEnum"
              },
              {
                "enum": [
                  ""
                ],
                "type": "string"
              }
            ],
            "description": "Optional salutation of the natural person. Omit it or supply null or an empty string when unknown.\n\n* `mr` - mr\n* `ms` - ms\n* `mx` - mx",
            "nullable": true
          }
        },
        "type": "object"
      },
      "PersonRead": {
        "properties": {
          "birth_date": {
            "description": "Date of birth used to identify the natural person.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "first_name": {
            "description": "Given name of the natural person.",
            "readOnly": true,
            "type": "string"
          },
          "last_name": {
            "description": "Family name of the natural person.",
            "readOnly": true,
            "type": "string"
          },
          "salutation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SalutationEnum"
              }
            ],
            "description": "Salutation of the natural person; null if no supported salutation is stored.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "birth_date",
          "first_name",
          "last_name",
          "salutation"
        ],
        "type": "object"
      },
      "PersonWriteRequest": {
        "description": "An empty object `{}` is rejected — omit the member instead.",
        "properties": {
          "birth_date": {
            "description": "Date of birth used to identify the natural person; cannot be in the future.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "first_name": {
            "description": "Given name of the natural person.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "last_name": {
            "description": "Family name of the natural person.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "salutation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SalutationEnum"
              },
              {
                "enum": [
                  ""
                ],
                "type": "string"
              }
            ],
            "description": "Optional salutation of the natural person. Omit it or supply null or an empty string when unknown.",
            "nullable": true
          }
        },
        "required": [
          "first_name",
          "last_name"
        ],
        "type": "object"
      },
      "PrincipalClaimIkarosEventcodeEnum": {
        "description": "* `H01` - H01 - Anzeigen in Zeitungen u.a.\n* `H02` - H02 - Ärztliche oder zahnärztliche Leistung\n* `H03` - H03 - Bürgschaft\n* `H04` - H04 - Darlehensrückzahlung\n* `H05` - H05 - Dienstleistungsvertrag\n* `H06` - H06 - Frachtkosten\n* `H07` - H07 - Geschäftsbesorgung durch Selbständige\n* `H08` - H08 - Handwerkerleistung\n* `H09` - H09 - Heimunterbringung\n* `H10` - H10 - Hotelkosten\n* `H11` - H11 - Kaufvertrag\n* `H12` - H12 - Kontokorrentabrechnung\n* `H13` - H13 - Krankenhauskosten-Pflege/Behandlung\n* `H14` - H14 - Lagerkosten\n* `H15` - H15 - Leasing/Mietkauf\n* `H16` - H16 - Lehrgangs-/Unterrichtskosten\n* `H17` - H17 - Miete für Geschäftsraum einschl. Nebenkosten\n* `H18` - H18 - Miete für Kraftfahrzeug\n* `H19` - H19 - Miete für Wohnraum einschl. Nebenkosten\n* `H20` - H20 - Mietnebenkosten - auch Renovierungskosten-\n* `H21` - H21 - Miete\n* `H22` - H22 - Mitgliedsbeitrag\n* `H23` - H23 - Pacht\n* `H24` - H24 - Rechtsanwalts-/Rechtsbeistandshonorar\n* `H25` - H25 - Rentenrückstände\n* `H26` - H26 - Reparaturleistung\n* `H27` - H27 - Rückgriff aus Versicherungsvertrag wegen Unfall/Vorfall\n* `H28` - H28 - Schadenersatz aus Vertrag\n* `H29` - H29 - Schadenersatz aus Unfall/Vorfall\n* `H30` - H30 - Scheck/Wechsel\n* `H31` - H31 - Scheck-/Wechselprovision(1/3 %)\n* `H32` - H32 - Scheck-/Wechselunkosten - Spesen/Protest-\n* `H33` - H33 - Schuldanerkenntnis\n* `H34` - H34 - Speditionskosten\n* `H35` - H35 - Tilgungs-/Zinsraten\n* `H36` - H36 - Überziehung des Bankkontos\n* `H37` - H37 - Ungerechtfertigte Bereicherung\n* `H38` - H38 - Unterhaltsrückstände\n* `H39` - H39 - Vergleich, außergerichtlicher\n* `H40` - H40 - Vermittlungs-/Maklerprovision\n* `H41` - H41 - Versicherungsprämie/-beitrag\n* `H42` - H42 - Versorgungsleistung - Strom, Wasser, Gas, Wärme-\n* `H43` - H43 - Warenlieferung/-en\n* `H44` - H44 - Werkvertrag/Werklieferungsvertrag\n* `H45` - H45 - Zeitungs-/Zeitschriftenbezug\n* `H46` - H46 - Zinsrückstände/Verzugszinsen\n* `H61` - H61 - Wahlleistungen bei stationärer Behandlung\n* `H70` - H70 - Kindertagesstättenbeitrag\n* `H75` - H75 - Reisevertrag\n* `H76` - H76 - Telekommunikationsleistungen\n* `H77` - H77 - Krankentransportkosten\n* `H78` - H78 - Tierärztliche Leistung\n* `H79` - H79 - Verpflegungskosten\n* `H80` - H80 - Rückgriff aus Bürgschaft oder Garantie\n* `H90` - H90 - Wohngeld/Hausgeld für Wohnungseigentümergemeinschaft\n* `H95` - H95 - Beiträge zur privaten Pflegeversicherung",
        "enum": [
          "H01",
          "H02",
          "H03",
          "H04",
          "H05",
          "H06",
          "H07",
          "H08",
          "H09",
          "H10",
          "H11",
          "H12",
          "H13",
          "H14",
          "H15",
          "H16",
          "H17",
          "H18",
          "H19",
          "H20",
          "H21",
          "H22",
          "H23",
          "H24",
          "H25",
          "H26",
          "H27",
          "H28",
          "H29",
          "H30",
          "H31",
          "H32",
          "H33",
          "H34",
          "H35",
          "H36",
          "H37",
          "H38",
          "H39",
          "H40",
          "H41",
          "H42",
          "H43",
          "H44",
          "H45",
          "H46",
          "H61",
          "H70",
          "H75",
          "H76",
          "H77",
          "H78",
          "H79",
          "H80",
          "H90",
          "H95"
        ],
        "type": "string"
      },
      "ReceivableClaim": {
        "description": "A receivable claim based on an invoice, rent, or another obligation. Its principal amount, dates, charges, and documents belong to the claim.",
        "properties": {
          "additional_charges": {
            "description": "Itemized incidental claims such as reminder or bank fees. API submissions are limited to 50 entries.",
            "items": {
              "$ref": "#/components/schemas/ClaimChargeRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "additional_charges_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Sum of all itemized additional charges.",
            "readOnly": true
          },
          "additional_debtor_ids": {
            "description": "Read-only additional debtor identifiers projected from the current order.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "created_at": {
            "description": "Time at which the claim was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "debtor_id": {
            "description": "Read-only primary debtor identifier projected from the current order. Change party membership only on a draft order; debtor details use the debtor resource.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "delay_date": {
            "description": "Date from which the debtor is considered in payment default.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "document_date": {
            "description": "Date of the invoice, contract, or other claim document.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents relevant to processing the claim.",
            "items": {
              "$ref": "#/components/schemas/DocumentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "due_date": {
            "description": "Date on which payment of the principal claim became due.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this claim.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim.",
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "description": "Invoice or contract lines that make up the principal claim. API submissions are limited to 100 entries.",
            "items": {
              "$ref": "#/components/schemas/ClaimItemRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "legal_basis": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimLegalBasisRead"
              }
            ],
            "description": "Contract or obligation that establishes the principal claim.",
            "readOnly": true
          },
          "mandate_id": {
            "description": "Read-only accepted mandate identifier, or null before acceptance.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "order_id": {
            "description": "Read-only current order identifier. Internal review may change this relationship while the claim identifier and all claim-specific URLs remain stable.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "payments": {
            "description": "Read-only payments attributed to this claim. Report subsequent payments through the stable claim payments URL, including after acceptance or an internal order move. Reporting requires case:payments:write.",
            "items": {
              "$ref": "#/components/schemas/PaymentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "principal_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Original principal amount including VAT, before charges and payments.",
            "nullable": true,
            "readOnly": true
          },
          "reminders": {
            "description": "Payment reminders issued for this claim in chronological order. API submissions are limited to 50 entries.",
            "items": {
              "$ref": "#/components/schemas/ClaimReminderRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimStatusEnum"
              }
            ],
            "description": "Read-only effective claim lifecycle. Draft-only commands return 409 claim_not_editable after submission and 409 order_expired once the draft has passed its expires_at; payment and title commands retain their specific lifecycle conflict codes.",
            "readOnly": true
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim. API submissions are limited to 2000 characters.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "total_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Current open amount after charges and reported payments.",
            "nullable": true,
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReceivableClaimTypeEnum"
              }
            ],
            "description": "Literal receivable claim discriminator.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the claim was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "additional_charges",
          "additional_charges_amount",
          "additional_debtor_ids",
          "created_at",
          "debtor_id",
          "delay_date",
          "dispute_reason",
          "document_date",
          "document_reference",
          "documents",
          "due_date",
          "events",
          "id",
          "is_disputed",
          "items",
          "legal_basis",
          "mandate_id",
          "metadata",
          "order_id",
          "payments",
          "principal_amount",
          "reminders",
          "status",
          "subject_matter",
          "total_amount",
          "type",
          "updated_at",
          "your_reference"
        ],
        "title": "Receivable claim",
        "type": "object"
      },
      "ReceivableClaimCreateRequest": {
        "description": "Create a receivable claim: the amount is stated on the claim itself.",
        "properties": {
          "additional_charges": {
            "description": "Itemized incidental claims such as reminder or bank fees. Maximum 50 entries per claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimChargeWriteRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "delay_date": {
            "description": "Date from which the debtor is considered in payment default. For H17/H19 rent, omission on creation derives the day after due_date, an explicit date overrides it, and null restores derivation. For other receivables, omission allows automatic calculation from available dates; null explicitly clears the date. An explicit date must follow the applicable due or reminder date.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim. Required and non-blank when is_disputed is true; must be empty or null when it is false.",
            "maxLength": 2500,
            "nullable": true,
            "type": "string"
          },
          "document_date": {
            "description": "Date of the invoice, contract, or other claim document. For H17/H19 rent, supply the first day of the rental month; only one rental claim per calendar month is allowed. Required and cannot be in the future at finalization.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents attached to this receivable claim. A command may contain at most 20 documents in total across all nested claims, titles, and rental agreements. The combined decoded document content across the command must not exceed 50 MiB; each file is limited to 10 MiB and each PDF to 100 pages. Exceeding a limit rejects the command with 400.",
            "items": {
              "$ref": "#/components/schemas/InlineClaimDocumentCreateRequest"
            },
            "maxItems": 20,
            "type": "array"
          },
          "due_date": {
            "description": "Date on which the principal became due. For H17/H19 rent, omission on creation derives it from the agreement; an explicit date overrides that rule and null restores derivation. For other receivables it cannot precede document_date.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "events": {
            "description": "Contextual events supplied when creating the claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimEventWriteRequest"
            },
            "type": "array"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim.",
            "type": "boolean"
          },
          "items": {
            "description": "Optional invoice or contract lines supporting the principal claim. Supply principal_amount separately; these lines do not calculate it. Maximum 100 entries per claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimItemWriteRequest"
            },
            "maxItems": 100,
            "type": "array"
          },
          "legal_basis": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimLegalBasisWriteRequest"
              }
            ],
            "description": "Legal basis for a receivable claim; titled enforcement costs derive K014 and therefore omit this field."
          },
          "metadata": {
            "description": "Metadata supplied when creating the claim; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/ClaimMetadataWriteRequest"
            },
            "type": "array"
          },
          "payments": {
            "description": "Payments already received for this claim. Maximum 50 entries per claim during creation; report later payments through the payment endpoints.",
            "example": [
              {
                "amount": {
                  "currency": "EUR",
                  "value": "50.00"
                },
                "value_date": "2026-07-17",
                "your_reference": "BANK-TRANSACTION-99812"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/PaymentWriteRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "principal_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimPrincipalAmountWriteRequest"
              }
            ],
            "description": "Original principal amount including VAT, before charges and payments. Required even when items are supplied; line items do not calculate this value for you. The principal must be positive before finalization."
          },
          "reminders": {
            "description": "Payment reminders in chronological order. The first reminder cannot precede the claim due date, or document date when no due date is set; later reminders cannot precede an earlier reminder or its payment deadline. Maximum 50 entries per claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimReminderWriteRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim. Before finalization, a receivable claim must have non-blank subject_matter or at least one claim document. Maximum 2000 characters.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReceivableClaimTypeEnum"
              }
            ],
            "description": "Literal receivable claim discriminator."
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "is_disputed",
          "principal_amount",
          "type"
        ],
        "title": "Receivable claim input",
        "type": "object"
      },
      "ReceivableClaimTypeEnum": {
        "enum": [
          "receivable"
        ],
        "type": "string"
      },
      "RelatedStatement": {
        "description": "Reference to another statement that contains the same accepted case.",
        "properties": {
          "booking_date": {
            "description": "Date on which the related statement was booked.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "clearing_no": {
            "description": "Clearing number of the related statement.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Identifier of the related statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "period_end": {
            "description": "End of the period covered by the related statement.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "period_start": {
            "description": "Start of the period covered by the related statement.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "booking_date",
          "clearing_no",
          "id",
          "period_end",
          "period_start"
        ],
        "type": "object"
      },
      "RelationEnum": {
        "description": "* `main_case` - main_case\n* `subcase` - subcase",
        "enum": [
          "main_case",
          "subcase"
        ],
        "type": "string"
      },
      "RentalAgreementDocumentCreateRequest": {
        "additionalProperties": false,
        "description": "Document upload; the parent resource comes from the URL.",
        "properties": {
          "base64": {
            "description": "Base64-encoded PDF, JPEG, or PNG content. Supply exactly one of base64 or multipart file. Maximum decoded file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "maxLength": 15029589,
            "minLength": 1,
            "type": "string"
          },
          "file": {
            "description": "PDF, JPEG, or PNG file supplied as multipart form data. Supply exactly one of file or base64. Maximum file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Oversized content returns 400; too many PDF pages uses page_limit_exceeded.",
            "format": "binary",
            "type": "string"
          },
          "filename": {
            "description": "Original filename shown to users. Path components and control characters are removed and the extension always follows the detected content type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalAgreementDocumentTypeEnum"
              }
            ],
            "description": "Agreement document purpose: rental_agreement and claim_statement each occupy a single optional document slot; other supplies supporting documents and may be used multiple times."
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "RentalAgreementDocumentTypeEnum": {
        "description": "* `rental_agreement` - rental_agreement\n* `claim_statement` - claim_statement\n* `other` - other",
        "enum": [
          "rental_agreement",
          "claim_statement",
          "other"
        ],
        "type": "string"
      },
      "RentalAgreementInlineRequest": {
        "description": "Unknown and read-only request fields are rejected with a validation error instead of being silently ignored.",
        "properties": {
          "contract_date": {
            "description": "Date on which the rental contract was concluded; this is not the tenancy start or move-in date. Required before finalization.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents attached to the rental agreement during inline creation. A command may contain at most 20 documents in total across all nested claims, titles, and rental agreements. The combined decoded document content across the command must not exceed 50 MiB; each file is limited to 10 MiB and each PDF to 100 pages. Exceeding a limit rejects the command with 400.",
            "items": {
              "$ref": "#/components/schemas/InlineRentalAgreementDocumentCreateRequest"
            },
            "type": "array"
          },
          "due_rule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalDueRuleRequest"
              }
            ],
            "description": "Optional rental due-date rule. Omit or set null to use the third German business day of the rental month for H17/H19 claims; explicit claim-level dates override the derived result.",
            "nullable": true
          },
          "monthly_rent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonthlyRentWriteRequest"
              }
            ],
            "description": "Total recurring Warmmiete, including ancillary-cost prepayments; it does not constrain an individual claim amount. May be absent or null while drafting; must be positive before finalization.",
            "nullable": true
          },
          "property_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalPropertyAddressWriteRequest"
              }
            ],
            "description": "Complete address of the rented property, even when it matches the debtor address. Supply street, postal_code, city, and country; this creates a separate property address and does not reuse a debtor address id or primary flag. A complete property address is required before finalization.",
            "nullable": true
          }
        },
        "type": "object"
      },
      "RentalAgreementRead": {
        "properties": {
          "contract_date": {
            "description": "Date on which the rental contract was concluded; this is not the tenancy start or move-in date.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the rental agreement was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents owned by the agreement, including the optional rental-agreement and claim-statement primary slots.",
            "items": {
              "$ref": "#/components/schemas/DocumentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "due_rule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalDueRule"
              }
            ],
            "description": "Rule used to derive H17/H19 rental due dates. Null means the default third German business day of the rental month applies; explicit claim-level dates override the derived result.",
            "nullable": true,
            "readOnly": true
          },
          "id": {
            "description": "Stable identifier of the rental agreement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "monthly_rent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Total recurring Warmmiete, including ancillary-cost prepayments; it does not constrain an individual claim amount.",
            "nullable": true,
            "readOnly": true
          },
          "property_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalPropertyAddressRead"
              }
            ],
            "description": "Complete address of the rented property, even when it matches the debtor address.",
            "nullable": true,
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the rental agreement last changed.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "contract_date",
          "created_at",
          "documents",
          "due_rule",
          "id",
          "monthly_rent",
          "property_address",
          "updated_at"
        ],
        "type": "object"
      },
      "RentalDueRule": {
        "description": "Both keys are required even under the singleton's partial PATCH.",
        "properties": {
          "day": {
            "description": "Day number from 1 to 31 within the rental month: calendar day for calendar_day, or ordinal business day for business_day. If the month has fewer such days, the last applicable day is used.",
            "maximum": 31,
            "minimum": 1,
            "type": "integer"
          },
          "kind": {
            "$ref": "#/components/schemas/KindEnum",
            "description": "How to interpret day: calendar_day counts all dates; business_day counts Monday through Friday excluding German federal public holidays. State-specific holidays are not considered."
          }
        },
        "required": [
          "day",
          "kind"
        ],
        "type": "object"
      },
      "RentalDueRuleRequest": {
        "description": "Both keys are required even under the singleton's partial PATCH.",
        "properties": {
          "day": {
            "description": "Day number from 1 to 31 within the rental month: calendar day for calendar_day, or ordinal business day for business_day. If the month has fewer such days, the last applicable day is used.",
            "maximum": 31,
            "minimum": 1,
            "type": "integer"
          },
          "kind": {
            "$ref": "#/components/schemas/KindEnum",
            "description": "How to interpret day: calendar_day counts all dates; business_day counts Monday through Friday excluding German federal public holidays. State-specific holidays are not considered."
          }
        },
        "required": [
          "day",
          "kind"
        ],
        "type": "object"
      },
      "RentalOrder": {
        "description": "A rental order contains receivable claims and one `rental_agreement`, alongside `starting_approach` and `creditor_obligation_fulfilled`.\n\nRead representation of an order.\n\n`status` is derived from the order's submission and review progress;\n`mandate` names the\ncreated mandate once the order is accepted; `merged_into` names the\nsurviving order when this order was merged away during review.",
        "properties": {
          "additional_debtors": {
            "description": "Inline summaries of the additional debtors. Retrieve each debtor's full details with GET /v2/debtors/{id}/ using its id. Replace membership through PATCH /v2/orders/{id}/ while the order is a draft. API submissions are limited to 10 additional debtors.",
            "items": {
              "$ref": "#/components/schemas/DebtorSummary"
            },
            "readOnly": true,
            "type": "array"
          },
          "claims": {
            "description": "Receivable claims belonging to this order, including their itemized charges and documents. Titled claims are accepted only in titled orders. API submissions are limited to 50 claims per order.",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "readOnly": true,
            "type": "array"
          },
          "confirmation_email": {
            "description": "Address receiving the order-entry confirmation, when requested.",
            "format": "email",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the order was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "creditor_obligation_fulfilled": {
            "description": "Whether you fully performed your obligation to the debtor.",
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorSummary"
              }
            ],
            "description": "Inline summary of the primary debtor. Retrieve full details with GET /v2/debtors/{id}/ using its id.",
            "readOnly": true
          },
          "expires_at": {
            "description": "Time at which this API-created draft expires: updated_at plus 90 days, refreshed by every successful draft change. Once it has passed, the order reads expired and every change answers 409 order_expired until the daily cleanup deletes it. Null once the order is finalized and for orders created in the portal.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this order.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mandate": {
            "description": "Accepted case created from this order, when available.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "merged_into": {
            "description": "Surviving order when this order was merged during review.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "rejection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderRejection"
              }
            ],
            "description": "Why paywise declined the order: reason, time, notified recipients, and the standard reason's key. Null unless status is rejected.",
            "nullable": true,
            "readOnly": true
          },
          "rental_agreement": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalAgreementRead"
              }
            ],
            "description": "Rental-agreement singleton owned by this order.",
            "nullable": true,
            "readOnly": true
          },
          "starting_approach": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StartingApproachEnum"
              }
            ],
            "description": "Initial collection route: extrajudicial starts out of court; judicial starts by applying for a payment order (Mahnbescheid). Null while this decision is unset.",
            "nullable": true,
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderStatusEnum"
              }
            ],
            "description": "Order lifecycle state: draft is editable; submitted awaits processing; awaiting_client_response requires client input; accepted has entered case processing; rejected was declined; withdrawn was cancelled by the client; expired passed its draft deadline and accepts no further changes (409 order_expired) until the daily cleanup deletes it; merged points to the surviving order in merged_into.",
            "readOnly": true
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderTotals"
              }
            ],
            "description": "Financial totals calculated across the order's claims.",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RentalOrderTypeEnum"
              }
            ],
            "description": "Literal rental order discriminator.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the order was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "additional_debtors",
          "claims",
          "confirmation_email",
          "created_at",
          "creditor_obligation_fulfilled",
          "debtor",
          "expires_at",
          "id",
          "mandate",
          "merged_into",
          "rejection",
          "rental_agreement",
          "starting_approach",
          "status",
          "totals",
          "type",
          "updated_at"
        ],
        "title": "Rental order",
        "type": "object"
      },
      "RentalOrderTypeEnum": {
        "enum": [
          "rental"
        ],
        "type": "string"
      },
      "RentalPropertyAddressRead": {
        "properties": {
          "city": {
            "description": "City of the rented property.",
            "readOnly": true,
            "type": "string"
          },
          "country": {
            "description": "ISO 3166-1 alpha-2 country code of the rented property.",
            "readOnly": true,
            "type": "string"
          },
          "postal_code": {
            "description": "Postal code of the rented property.",
            "readOnly": true,
            "type": "string"
          },
          "street": {
            "description": "Street and house number of the rented property.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "city",
          "country",
          "postal_code",
          "street"
        ],
        "type": "object"
      },
      "RentalPropertyAddressWriteRequest": {
        "description": "A complete property address, with no debtor collection metadata.",
        "properties": {
          "city": {
            "description": "City of the rented property.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CountryEnum"
              }
            ],
            "description": "ISO 3166-1 alpha-2 country code of the rented property."
          },
          "postal_code": {
            "description": "Postal code of the rented property.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "street": {
            "description": "Street and house number of the rented property.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "city",
          "country",
          "postal_code",
          "street"
        ],
        "type": "object"
      },
      "RequestToClientAnsweredWebhookEvent": {
        "description": "A request to the client was published or answered. A request raised on an accepted case carries `mandate_id` and `request_to_client_url`; a request raised on an order carries `order_id` instead and can be read and answered below `/v2/orders/{order_id}/requests-to-client/{id}/`. A CSV-upload request carries neither parent reference.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "request_to_client_id": "80000000-0000-4000-8000-000000000001",
            "request_to_client_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000013",
          "type": "request_to_client.answered"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/RequestToClientWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "request_to_client.answered"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Client request answered",
        "type": "object"
      },
      "RequestToClientCreatedWebhookEvent": {
        "description": "A request to the client was published or answered. A request raised on an accepted case carries `mandate_id` and `request_to_client_url`; a request raised on an order carries `order_id` instead and can be read and answered below `/v2/orders/{order_id}/requests-to-client/{id}/`. A CSV-upload request carries neither parent reference.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "request_to_client_id": "80000000-0000-4000-8000-000000000001",
            "request_to_client_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000012",
          "type": "request_to_client.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/RequestToClientWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "request_to_client.created"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Client request created",
        "type": "object"
      },
      "RequestToClientHistoryRelatedResource": {
        "properties": {
          "body": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RequestToClientRead"
              }
            ],
            "description": "Expanded client request, included only with `expand=history.related_resources` and the `case:requests_to_client:read` scope. On mandate detail, also set `history=true`."
          },
          "id": {
            "description": "Identifier of the related resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RequestToClientHistoryRelatedResourceTypeEnum"
              }
            ],
            "description": "Related resource kind.\n\n* `request_to_client` - request_to_client",
            "readOnly": true
          },
          "url": {
            "description": "Authenticated API URL of the related resource.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "url"
        ],
        "title": "Client request",
        "type": "object"
      },
      "RequestToClientHistoryRelatedResourceTypeEnum": {
        "description": "* `request_to_client` - request_to_client",
        "enum": [
          "request_to_client"
        ],
        "type": "string"
      },
      "RequestToClientMandateReference": {
        "properties": {
          "href": {
            "description": "API URL of the accepted case.",
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "Identifier of the accepted case.",
            "format": "uuid",
            "type": "string"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RequestToClientRead": {
        "description": "Published clarification request with its optional answer.",
        "properties": {
          "allowed_answer_types": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AllowedAnswerTypesEnum"
              }
            ],
            "description": "Answer format accepted by the answer endpoint. Choice formats use `text: yes` or `text: no`; `yes-no-dontknow` also permits `dontknow`. Formats ending in `freetext-on-no` require `additional_comment` for `no`; `yes-with-date-no-freetext-on-no` requires `booking_date` for `yes`. `freetext` requires text; `fileupload` accepts text, documents, or both.",
            "readOnly": true
          },
          "answer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AnswerRead"
              }
            ],
            "description": "Submitted answer, or null while unanswered.",
            "nullable": true,
            "readOnly": true
          },
          "answered": {
            "description": "Whether an answer has already been submitted.",
            "readOnly": true,
            "type": "boolean"
          },
          "answered_at": {
            "description": "Time at which the answer was submitted, when answered.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the request was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Question or explanation describing what paywise needs.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "href": {
            "description": "API URL of this client request.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this client request.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mandate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RequestToClientMandateReference"
              }
            ],
            "description": "Accepted case for which paywise needs information.",
            "readOnly": true
          },
          "question_attachments": {
            "description": "Files paywise attached to the question.",
            "items": {
              "properties": {
                "download_url": {
                  "description": "Authenticated API URL for downloading the question attachment; null when no downloadable file is available.",
                  "format": "uri",
                  "nullable": true,
                  "type": "string"
                },
                "filename": {
                  "description": "Original filename of the attachment.",
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "description": "Stable identifier of the attachment.",
                  "format": "uuid",
                  "type": "string"
                },
                "mime_type": {
                  "description": "Media type of the attachment.",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "title": {
            "description": "Short subject of the requested information.",
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Time at which the request was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "allowed_answer_types",
          "answer",
          "answered",
          "answered_at",
          "created_at",
          "description",
          "href",
          "id",
          "mandate",
          "question_attachments",
          "title",
          "updated_at"
        ],
        "type": "object"
      },
      "RequestToClientWebhookEvent": {
        "description": "A request to the client was published or answered. A request raised on an accepted case carries `mandate_id` and `request_to_client_url`; a request raised on an order carries `order_id` instead and can be read and answered below `/v2/orders/{order_id}/requests-to-client/{id}/`. A CSV-upload request carries neither parent reference.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "mandate_id": "50000000-0000-4000-8000-000000000001",
            "request_to_client_id": "80000000-0000-4000-8000-000000000001",
            "request_to_client_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000012",
          "type": "request_to_client.created"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/RequestToClientWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "request_to_client.created",
              "request_to_client.answered"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Client request event",
        "type": "object"
      },
      "RequestToClientWebhookEventData": {
        "description": "Request context. An accepted-case request carries `mandate_id` and `request_to_client_url`, an order request carries `order_id`, and a CSV-upload request carries neither. Parent references are never mixed.",
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "mandate_id": "50000000-0000-4000-8000-000000000001",
          "request_to_client_id": "80000000-0000-4000-8000-000000000001",
          "request_to_client_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "mandate_id": {
            "description": "Accepted case the request belongs to. Present for case-level requests only.",
            "format": "uuid",
            "type": "string"
          },
          "order_id": {
            "description": "Order the request belongs to. Present for order-level requests only.",
            "format": "uuid",
            "type": "string"
          },
          "request_to_client_id": {
            "description": "Request to the client.",
            "format": "uuid",
            "type": "string"
          },
          "request_to_client_url": {
            "description": "API path of the request (`/v2/mandates/{mandate_id}/requests-to-client/{id}/`). Present for case-level requests only.",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "request_to_client_id"
        ],
        "type": "object"
      },
      "RoleEnum": {
        "enum": [
          "managing_director",
          "director",
          "board_member",
          "chairperson",
          "general_partner",
          "shareholder",
          "owner",
          "authorized_signatory",
          "partner",
          "legal_guardian",
          "other"
        ],
        "type": "string"
      },
      "SalutationEnum": {
        "enum": [
          "mr",
          "ms",
          "mx"
        ],
        "type": "string"
      },
      "SenderEnum": {
        "enum": [
          "client",
          "paywise"
        ],
        "type": "string"
      },
      "SingleMandateStatementCancelledWebhookEvent": {
        "description": "A per-case statement was released to the company or cancelled.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "single_mandate_statement_id": "a0000000-0000-4000-8000-000000000002",
            "single_mandate_statement_url": "/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/"
          },
          "id": "00000000-0000-4000-8000-000000000018",
          "type": "single_mandate_statement.cancelled"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/SingleMandateStatementWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "single_mandate_statement.cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Per-case statement cancelled",
        "type": "object"
      },
      "SingleMandateStatementCostBurden": {
        "description": "Kostenbelastung: what the client owes us on this case.",
        "properties": {
          "fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Collection fee charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "fee_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on the collection fee charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "items": {
            "description": "Itemized positions making up the cost burden.",
            "items": {
              "$ref": "#/components/schemas/SingleMandateStatementCostBurdenItem"
            },
            "readOnly": true,
            "type": "array"
          },
          "tax_free_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "total_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total gross amount of the cost burden.",
            "nullable": true,
            "readOnly": true
          },
          "total_net": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total net amount of the cost burden.",
            "nullable": true,
            "readOnly": true
          },
          "total_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total VAT included in the cost burden.",
            "nullable": true,
            "readOnly": true
          },
          "vat_rate": {
            "description": "VAT rate as a decimal fraction, for example 0.19 for 19%. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,3}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "fee",
          "fee_vat",
          "items",
          "tax_free_expenses",
          "taxable_expenses",
          "taxable_expenses_vat",
          "total_amount",
          "total_net",
          "total_vat",
          "vat_rate"
        ],
        "type": "object"
      },
      "SingleMandateStatementCostBurdenItem": {
        "description": "One account line of a Kostenbelastung.",
        "properties": {
          "account_code": {
            "description": "Account code of this cost position.",
            "readOnly": true,
            "type": "string"
          },
          "designation": {
            "description": "Human-readable designation of the cost position.",
            "readOnly": true,
            "type": "string"
          },
          "gross_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Gross amount of this cost position.",
            "nullable": true,
            "readOnly": true
          },
          "main_account_code": {
            "description": "Main account into which this position is grouped.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "net_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Net amount of this cost position.",
            "nullable": true,
            "readOnly": true
          },
          "vat_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT amount of this cost position.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "account_code",
          "designation",
          "gross_amount",
          "main_account_code",
          "net_amount",
          "vat_amount"
        ],
        "type": "object"
      },
      "SingleMandateStatementFinancials": {
        "properties": {
          "cost_burden": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SingleMandateStatementCostBurden"
              }
            ],
            "description": "What you owe paywise on this case, when applicable.",
            "nullable": true,
            "readOnly": true
          },
          "open_principal_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Principal claim still open after this settlement.",
            "nullable": true,
            "readOnly": true
          },
          "principal_claims": {
            "description": "Invoices settled by this statement.",
            "items": {
              "$ref": "#/components/schemas/SingleMandateStatementPrincipalClaim"
            },
            "readOnly": true,
            "type": "array"
          },
          "principal_claims_total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total of all principal claims settled by this statement.",
            "nullable": true,
            "readOnly": true
          },
          "total_balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Settlement balance: positive pays you, negative is owed by you.",
            "nullable": true,
            "readOnly": true
          },
          "vat_entries": {
            "description": "Payments and their allocation grouped by VAT rate.",
            "items": {
              "$ref": "#/components/schemas/SingleMandateStatementVATEntry"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "cost_burden",
          "open_principal_claim",
          "principal_claims",
          "principal_claims_total",
          "total_balance",
          "vat_entries"
        ],
        "type": "object"
      },
      "SingleMandateStatementList": {
        "properties": {
          "booking_date": {
            "description": "Date on which the case statement was booked.",
            "format": "date",
            "readOnly": true,
            "type": "string"
          },
          "cancelled_at": {
            "description": "Time at which the case statement was cancelled.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "clearing_no": {
            "description": "Clearing number of the case statement.",
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the case statement was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this case statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "invoice_no": {
            "description": "Invoice number, when this settlement produces an invoice.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "period_end": {
            "description": "End of the settled period.",
            "format": "date",
            "readOnly": true,
            "type": "string"
          },
          "period_start": {
            "description": "Start of the settled period, or null for the full case history.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "reference_number": {
            "description": "paywise case-file reference number of the settled case.",
            "readOnly": true,
            "type": "string"
          },
          "statement_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementTypeEnum"
              }
            ],
            "description": "Kind of interim, final, expense, or monitoring settlement.\n\n* `interim` - Zwischenabrechnung\n* `final` - Endabrechnung\n* `expenses_invoice` - Auslagenrechnung\n* `transition_to_longtime_monitoring` - Übergabe Überwachungsverfahren\n* `negative_closing` - Negativabschluss",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseStatementStatusEnum"
              }
            ],
            "description": "Whether the case statement is published or cancelled.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the case statement was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your customer number for the debtor on the settled case.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "booking_date",
          "cancelled_at",
          "clearing_no",
          "created_at",
          "id",
          "invoice_no",
          "period_end",
          "period_start",
          "reference_number",
          "statement_type",
          "status",
          "updated_at",
          "your_reference"
        ],
        "type": "object"
      },
      "SingleMandateStatementMandateReference": {
        "properties": {
          "id": {
            "description": "Identifier of the accepted case settled by this statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "reference_number"
        ],
        "type": "object"
      },
      "SingleMandateStatementPrincipalClaim": {
        "description": "One invoice (Hauptforderung) settled by this Aktenabrechnung.",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Invoiced amount of the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "voucher_date": {
            "description": "Date of the invoice or voucher.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "voucher_no": {
            "description": "Your invoice or voucher number for the settled claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "voucher_date",
          "voucher_no"
        ],
        "type": "object"
      },
      "SingleMandateStatementPublishedWebhookEvent": {
        "description": "A per-case statement was released to the company or cancelled.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "single_mandate_statement_id": "a0000000-0000-4000-8000-000000000002",
            "single_mandate_statement_url": "/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/"
          },
          "id": "00000000-0000-4000-8000-000000000017",
          "type": "single_mandate_statement.published"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/SingleMandateStatementWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "single_mandate_statement.published"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Per-case statement published",
        "type": "object"
      },
      "SingleMandateStatementRead": {
        "properties": {
          "booking_date": {
            "description": "Date on which the case statement was booked.",
            "format": "date",
            "readOnly": true,
            "type": "string"
          },
          "cancelled_at": {
            "description": "Time at which the case statement was cancelled.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "clearing_no": {
            "description": "Clearing number of the case statement.",
            "readOnly": true,
            "type": "string"
          },
          "comment": {
            "description": "Additional notes supplied with the case statement.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the case statement was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "file": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementFile"
              }
            ],
            "description": "Downloadable statement document, when available.",
            "nullable": true,
            "readOnly": true
          },
          "financials": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SingleMandateStatementFinancials"
              }
            ],
            "description": "Principal claims, payment allocation, and settlement balance.",
            "readOnly": true
          },
          "id": {
            "description": "Stable identifier of this case statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "invoice_no": {
            "description": "Invoice number, when this settlement produces an invoice.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "mandate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SingleMandateStatementMandateReference"
              }
            ],
            "description": "Accepted case settled by this statement, when still linked.",
            "nullable": true,
            "readOnly": true
          },
          "payout_method": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PayoutMethodEnum"
              }
            ],
            "description": "Whether the balance is settled by transfer or direct debit.\n\n* `transfer` - Überweisung\n* `direct_debit` - Lastschrift",
            "nullable": true,
            "readOnly": true
          },
          "period_end": {
            "description": "End of the settled period.",
            "format": "date",
            "readOnly": true,
            "type": "string"
          },
          "period_start": {
            "description": "Start of the settled period, or null for the full case history.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "pre_tax_deductible": {
            "description": "Whether you may deduct input VAT for this settlement.",
            "readOnly": true,
            "type": "boolean"
          },
          "reference_number": {
            "description": "paywise case-file reference number of the settled case.",
            "readOnly": true,
            "type": "string"
          },
          "statement_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementTypeEnum"
              }
            ],
            "description": "Kind of interim, final, expense, or monitoring settlement.\n\n* `interim` - Zwischenabrechnung\n* `final` - Endabrechnung\n* `expenses_invoice` - Auslagenrechnung\n* `transition_to_longtime_monitoring` - Übergabe Überwachungsverfahren\n* `negative_closing` - Negativabschluss",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseStatementStatusEnum"
              }
            ],
            "description": "Whether the case statement is published or cancelled.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the case statement was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your customer number for the debtor on the settled case.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "booking_date",
          "cancelled_at",
          "clearing_no",
          "comment",
          "created_at",
          "file",
          "financials",
          "id",
          "invoice_no",
          "mandate",
          "payout_method",
          "period_end",
          "period_start",
          "pre_tax_deductible",
          "reference_number",
          "statement_type",
          "status",
          "updated_at",
          "your_reference"
        ],
        "type": "object"
      },
      "SingleMandateStatementVATEntry": {
        "description": "Payments and their allocation for one VAT rate.\n\n`vat_rate` is a decimal fraction (`0.19`) — the Aktenabrechnung\nconvention, preserved verbatim. It deliberately differs from the percent\nrepresentation on `/v2/statements/`: that resource inherited its shape\nfrom the Sammelabrechnung model, this one from the Aktenabrechnung.",
        "properties": {
          "allocation_to_client_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your costs.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_client_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to your expenses.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_default_interest": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to default interest.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the collection fee.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_fee_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to VAT on the collection fee.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_main_claim": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the principal claim.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_overpayment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to an overpayment.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to the success commission.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_success_commission_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to VAT on the success commission.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_tax_free_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to tax-free expenses.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to taxable expenses.",
            "nullable": true,
            "readOnly": true
          },
          "allocation_to_taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Amount allocated to VAT on taxable expenses.",
            "nullable": true,
            "readOnly": true
          },
          "instalment_payments_to_client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Instalment payments already passed on to you.",
            "nullable": true,
            "readOnly": true
          },
          "payments_to_client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "payments_to_dca": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "payout": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Balance for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "total_payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total debtor payments at this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "vat_rate": {
            "description": "VAT rate as a decimal fraction, for example 0.19 for 19%. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,3}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "allocation_to_client_costs",
          "allocation_to_client_expenses",
          "allocation_to_default_interest",
          "allocation_to_fee",
          "allocation_to_fee_vat",
          "allocation_to_main_claim",
          "allocation_to_overpayment",
          "allocation_to_success_commission",
          "allocation_to_success_commission_vat",
          "allocation_to_tax_free_expenses",
          "allocation_to_taxable_expenses",
          "allocation_to_taxable_expenses_vat",
          "instalment_payments_to_client",
          "payments_to_client",
          "payments_to_dca",
          "payout",
          "total_payments",
          "vat_rate"
        ],
        "type": "object"
      },
      "SingleMandateStatementWebhookEvent": {
        "description": "A per-case statement was released to the company or cancelled.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "single_mandate_statement_id": "a0000000-0000-4000-8000-000000000002",
            "single_mandate_statement_url": "/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/"
          },
          "id": "00000000-0000-4000-8000-000000000017",
          "type": "single_mandate_statement.published"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/SingleMandateStatementWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "single_mandate_statement.published",
              "single_mandate_statement.cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Per-case statement event",
        "type": "object"
      },
      "SingleMandateStatementWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "single_mandate_statement_id": "a0000000-0000-4000-8000-000000000002",
          "single_mandate_statement_url": "/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "single_mandate_statement_id": {
            "description": "Per-case statement.",
            "format": "uuid",
            "type": "string"
          },
          "single_mandate_statement_url": {
            "description": "API path of the per-case statement (`/v2/single-mandate-statements/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "single_mandate_statement_id",
          "single_mandate_statement_url"
        ],
        "type": "object"
      },
      "StandaloneClaimCreateRequest": {
        "discriminator": {
          "mapping": {
            "receivable": "#/components/schemas/StandaloneReceivableClaimCreateRequest",
            "titled": "#/components/schemas/StandaloneTitledClaimCreateRequest"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/StandaloneReceivableClaimCreateRequest"
          },
          {
            "$ref": "#/components/schemas/StandaloneTitledClaimCreateRequest"
          }
        ]
      },
      "StandaloneReceivableClaimCreateRequest": {
        "description": "Create a receivable claim: the amount is stated on the claim itself.",
        "properties": {
          "additional_charges": {
            "description": "Itemized incidental claims such as reminder or bank fees.",
            "items": {
              "$ref": "#/components/schemas/ClaimChargeWriteRequest"
            },
            "type": "array"
          },
          "delay_date": {
            "description": "Date from which the debtor is considered in payment default.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim.",
            "maxLength": 2500,
            "nullable": true,
            "type": "string"
          },
          "document_date": {
            "description": "Date of the invoice, contract, or other claim document.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "documents": {
            "description": "Documents relevant to processing the claim.",
            "items": {
              "$ref": "#/components/schemas/InlineClaimDocumentCreateRequest"
            },
            "type": "array"
          },
          "due_date": {
            "description": "Date on which payment of the principal claim became due.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "events": {
            "description": "Contextual events supplied when creating the claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimEventWriteRequest"
            },
            "type": "array"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim.",
            "type": "boolean"
          },
          "items": {
            "description": "Invoice or contract lines that make up the principal claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimItemWriteRequest"
            },
            "type": "array"
          },
          "legal_basis": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimLegalBasisWriteRequest"
              }
            ],
            "description": "Contract or obligation that establishes the principal claim."
          },
          "metadata": {
            "description": "Metadata supplied when creating the claim; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/ClaimMetadataWriteRequest"
            },
            "type": "array"
          },
          "order_id": {
            "description": "Required draft order identifier for standalone claim creation. The order must belong to the selected company. This relationship is read-only after creation; clients cannot move a claim by PATCH.",
            "format": "uuid",
            "type": "string",
            "writeOnly": true
          },
          "payments": {
            "description": "Payments already received for this claim.",
            "items": {
              "$ref": "#/components/schemas/PaymentWriteRequest"
            },
            "type": "array"
          },
          "principal_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimPrincipalAmountWriteRequest"
              }
            ],
            "description": "Original principal amount including VAT, before charges and payments."
          },
          "reminders": {
            "description": "Payment reminders issued for this claim in chronological order.",
            "items": {
              "$ref": "#/components/schemas/ClaimReminderWriteRequest"
            },
            "type": "array"
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReceivableClaimTypeEnum"
              }
            ],
            "description": "Claim type discriminator; always receivable for this shape.\n\n* `receivable` - Receivable claim"
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "is_disputed",
          "order_id",
          "principal_amount",
          "type"
        ],
        "title": "Standalone receivable claim",
        "type": "object"
      },
      "StandaloneTitledClaimCreateRequest": {
        "description": "Create a titled claim: the enforceable title owns amount and dates.",
        "properties": {
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim.",
            "maxLength": 2500,
            "nullable": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "enforceable_title": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnforceableTitleInlineRequest"
              }
            ],
            "description": "Enforceable title that owns the amount and legal metadata of a titled claim."
          },
          "events": {
            "description": "Contextual events supplied when creating the claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimEventWriteRequest"
            },
            "type": "array"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim.",
            "type": "boolean"
          },
          "metadata": {
            "description": "Metadata supplied when creating the claim; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/ClaimMetadataWriteRequest"
            },
            "type": "array"
          },
          "order_id": {
            "description": "Required draft order identifier for standalone claim creation. The order must belong to the selected company. This relationship is read-only after creation; clients cannot move a claim by PATCH.",
            "format": "uuid",
            "type": "string",
            "writeOnly": true
          },
          "payments": {
            "description": "Payments already received for this claim.",
            "items": {
              "$ref": "#/components/schemas/PaymentWriteRequest"
            },
            "type": "array"
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitledClaimTypeEnum"
              }
            ],
            "description": "Claim type discriminator; always titled for this shape.\n\n* `titled` - Titled claim"
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "enforceable_title",
          "is_disputed",
          "order_id",
          "type"
        ],
        "title": "Standalone titled claim",
        "type": "object"
      },
      "StartingApproachEnum": {
        "enum": [
          "extrajudicial",
          "judicial"
        ],
        "type": "string"
      },
      "StateEnum": {
        "enum": [
          "under_review",
          "handled",
          "published"
        ],
        "type": "string"
      },
      "StatementAmount": {
        "properties": {
          "currency": {
            "description": "Currency of the amount.",
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "description": "Monetary value expressed with two decimal places. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "currency",
          "value"
        ],
        "type": "object"
      },
      "StatementCancelledWebhookEvent": {
        "description": "A statement was published or cancelled.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "statement_id": "a0000000-0000-4000-8000-000000000001",
            "statement_url": "/v2/statements/a0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000016",
          "type": "statement.cancelled"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/StatementWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "statement.cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Statement cancelled",
        "type": "object"
      },
      "StatementClosing": {
        "properties": {
          "accepted_main_claim_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Principal amount accepted when the case was closed.",
            "nullable": true,
            "readOnly": true
          },
          "closing_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClosingCodeEnum"
              }
            ],
            "description": "Machine-readable closing reason code.\n\n* `IP01` - Vollzahlung\n* `IP02` - Teilzahlung\n* `IP03` - vor Bearbeitung bezahlt\n* `IP04` - Vergleichszahlung\n* `IPU1` - Vollzahlung (Unterakte)\n* `IPU2` - Teilzahlung (Unterakte)\n* `IPU3` - vor Bearbeitung bezahlt (Unterakte)\n* `IPU4` - Vergleichszahlung (Unterakte)\n* `IN01` - Akte storniert\n* `IN010` - Akte storniert - keine Kostenbelastung Honorar\n* `IN011` - Akte geschlossen: Negative SCHUFA-Auskunft\n* `IN012` - Akte storniert: Nicht eingezahlter GMV-Vorschuss\n* `IN013` - Akte storniert: Nicht eingezahlter ZV-Vorschuss\n* `IN014` - Akte storniert: Nicht beantwortete Rückfrage\n* `IN015` - Akte geschlossen: Mangels zustellfähiger Anschrift\n* `IN016` - Akte geschlossen: Schuldner verstorben\n* `IN017` - Akte geschlossen: Bestritten\n* `IN018` - Akte storniert: Zahlung vor Übernahme\n* `IN02` - Kunde wünscht Abschluss\n* `IN020` - Kunde wünscht Abschluss - keine Kostenbelastung\n* `IN03` - Abschluss wegen EV\n* `IN04` - Abschluss wegen Insolvenz\n* `IN05` - Schuldner verstorben\n* `IN06` - Erfolglos\n* `INO7` - Aktensperre\n* `IN08` - Aufhebung Aktensperre\n* `INU1` - Unterakte storniert\n* `INU2` - Kunde wünscht Abschluss (Unterakte)\n* `INU3` - Abschluss wegen EV (Unterakte)\n* `INU4` - Abschluss wegen Insolvenz (Unterakte)\n* `INU5` - Schuldner verstorben (Unterakte)\n* `INU6` - Erfolglos (Unterakte)\n* `IÜ01` - Überwachung Sonstiges\n* `IÜ02` - Überwachung Abgabe EV\n* `IÜ03` - Überwachung Insolvenz\n* `IÜU1` - Überwachung Sonstiges (Unterakte)\n* `IÜU2` - Überwachung Abgabe EV (Unterakte)\n* `IÜU3` - Überwachung Insolvenz (Unterakte)",
            "nullable": true,
            "readOnly": true
          },
          "closing_date": {
            "description": "Date on which the case was closed.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "closing_description": {
            "description": "Human-readable explanation of the closing reason.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "closing_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClosingTypeEnum"
              }
            ],
            "description": "Business category of the case closing.\n\n* `positive` - Positiv\n* `negative` - Negativ\n* `transition_to_longtime_monitoring` - Übergang ins Überwachungsverfahren",
            "nullable": true,
            "readOnly": true
          },
          "remaining_main_claim_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Principal amount still open when the case was closed.",
            "nullable": true,
            "readOnly": true
          }
        },
        "required": [
          "accepted_main_claim_amount",
          "closing_code",
          "closing_date",
          "closing_description",
          "closing_type",
          "remaining_main_claim_amount"
        ],
        "type": "object"
      },
      "StatementCostBurden": {
        "properties": {
          "fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Collection fee charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "fee_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on the collection fee charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "litigation_taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable litigation expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "litigation_taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable litigation expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "litigation_taxfree_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free litigation expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "tax_free_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Tax-free expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Taxable expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "taxable_expenses_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT on taxable expenses charged to you.",
            "nullable": true,
            "readOnly": true
          },
          "total_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total amount charged to you for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "vat_rate": {
            "description": "VAT percentage applied to this cost burden, e.g. 19.00 for 19%. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,3}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "fee",
          "fee_vat",
          "litigation_taxable_expenses",
          "litigation_taxable_expenses_vat",
          "litigation_taxfree_expenses",
          "tax_free_expenses",
          "taxable_expenses",
          "taxable_expenses_vat",
          "total_amount",
          "vat_rate"
        ],
        "type": "object"
      },
      "StatementFile": {
        "properties": {
          "download_url": {
            "description": "Authenticated URL for downloading this file.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "filename": {
            "description": "Descriptive filename for this download.",
            "readOnly": true,
            "type": "string"
          },
          "media_type": {
            "description": "Media type of this download.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "download_url",
          "filename",
          "media_type"
        ],
        "type": "object"
      },
      "StatementFinancials": {
        "properties": {
          "balance_before_outstanding_items_offsetting": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Payout balance before older outstanding items are offset.",
            "nullable": true,
            "readOnly": true
          },
          "outstanding_items_offset": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Older outstanding items deducted from this statement.",
            "nullable": true,
            "readOnly": true
          },
          "total_balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Final balance after outstanding items are offset.",
            "nullable": true,
            "readOnly": true
          },
          "vat_entries": {
            "description": "Invoice and collection amounts grouped by VAT rate.",
            "items": {
              "$ref": "#/components/schemas/StatementVATEntry"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "balance_before_outstanding_items_offsetting",
          "outstanding_items_offset",
          "total_balance",
          "vat_entries"
        ],
        "type": "object"
      },
      "StatementHistoryRelatedResource": {
        "properties": {
          "body": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SingleMandateStatementRead"
              }
            ],
            "description": "Case statement, included when explicitly expanded and authorized."
          },
          "id": {
            "description": "Identifier of the related resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementHistoryRelatedResourceTypeEnum"
              }
            ],
            "description": "Related resource kind.\n\n* `single_mandate_statement` - single_mandate_statement",
            "readOnly": true
          },
          "url": {
            "description": "Authenticated API URL of the related resource.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "url"
        ],
        "title": "Case statement",
        "type": "object"
      },
      "StatementHistoryRelatedResourceTypeEnum": {
        "description": "* `single_mandate_statement` - single_mandate_statement",
        "enum": [
          "single_mandate_statement"
        ],
        "type": "string"
      },
      "StatementList": {
        "properties": {
          "booking_date": {
            "description": "Date on which the statement was booked.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "cancelled_at": {
            "description": "Time at which the statement was cancelled, when applicable.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "clearing_no": {
            "description": "Clearing number of the statement.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "comment": {
            "description": "Free-text note paywise attached to the statement, when any.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the statement record was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "invoice_no": {
            "description": "Invoice number of the statement.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "mandate_count": {
            "description": "Number of accepted cases included in this statement.",
            "minimum": 0,
            "readOnly": true,
            "type": "integer"
          },
          "period_end": {
            "description": "End of the period covered by the statement.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "period_start": {
            "description": "Start of the period covered by the statement.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "published_at": {
            "description": "Time at which the statement became available to you.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseStatementStatusEnum"
              }
            ],
            "description": "Whether the statement is published or cancelled.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the statement record was last updated.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "booking_date",
          "cancelled_at",
          "clearing_no",
          "comment",
          "created_at",
          "id",
          "invoice_no",
          "mandate_count",
          "period_end",
          "period_start",
          "published_at",
          "status",
          "updated_at"
        ],
        "type": "object"
      },
      "StatementMandateRow": {
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Current claim total of the linked main case, shared with its sub-cases; null when the case or its total is unavailable. This is a live case value, rather than a snapshot at the statement booking date.",
            "nullable": true,
            "readOnly": true
          },
          "closing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementClosing"
              }
            ],
            "description": "Closing details when the accepted case ended in this statement.",
            "nullable": true,
            "readOnly": true
          },
          "cost_burden": {
            "description": "Fees and expenses charged to you, grouped by VAT rate.",
            "items": {
              "$ref": "#/components/schemas/StatementCostBurden"
            },
            "readOnly": true,
            "type": "array"
          },
          "created_at": {
            "description": "Time at which the accepted case was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateDebtor"
              }
            ],
            "description": "Debtor associated with the accepted case.",
            "nullable": true,
            "readOnly": true
          },
          "id": {
            "description": "Identifier of the accepted case included in the statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "reference_number": {
            "description": "paywise case-file reference number.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "related_statements": {
            "description": "Other published statements that also include this accepted case, newest first. Empty when the case appears in no other statement.",
            "items": {
              "$ref": "#/components/schemas/RelatedStatement"
            },
            "readOnly": true,
            "type": "array"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MandateState"
              }
            ],
            "description": "Current legal, processing, and payment states of the case.",
            "nullable": true,
            "readOnly": true
          },
          "third_party_money": {
            "description": "Debtor-payment allocations grouped by VAT rate.",
            "items": {
              "$ref": "#/components/schemas/StatementThirdPartyMoney"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "amount",
          "closing",
          "cost_burden",
          "created_at",
          "debtor",
          "id",
          "reference_number",
          "related_statements",
          "state",
          "third_party_money"
        ],
        "type": "object"
      },
      "StatementMandateRowPage": {
        "description": "Limit/offset page of statement case rows.",
        "properties": {
          "count": {
            "description": "Total number of matching case rows.",
            "readOnly": true,
            "type": "integer"
          },
          "next": {
            "description": "URL for the next page, or null when this is the last page.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "previous": {
            "description": "URL for the previous page, or null when this is the first page.",
            "format": "uri",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "results": {
            "description": "Case rows returned for the requested page.",
            "items": {
              "$ref": "#/components/schemas/StatementMandateRow"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "count",
          "next",
          "previous",
          "results"
        ],
        "type": "object"
      },
      "StatementPublishedWebhookEvent": {
        "description": "A statement was published or cancelled.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "statement_id": "a0000000-0000-4000-8000-000000000001",
            "statement_url": "/v2/statements/a0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000015",
          "type": "statement.published"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/StatementWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "statement.published"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Statement published",
        "type": "object"
      },
      "StatementRead": {
        "properties": {
          "booking_date": {
            "description": "Date on which the statement was booked.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "cancelled_at": {
            "description": "Time at which the statement was cancelled, when applicable.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "clearing_no": {
            "description": "Clearing number of the statement.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "comment": {
            "description": "Free-text note paywise attached to the statement, when any.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the statement record was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "files": {
            "description": "Every available download of this statement: the PDF and the Excel exports for third-party money, cost burden and closings. A file appears once it has been transferred.",
            "items": {
              "$ref": "#/components/schemas/StatementTypedFile"
            },
            "readOnly": true,
            "type": "array"
          },
          "financials": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementFinancials"
              }
            ],
            "description": "Statement-wide balances and VAT breakdown.",
            "readOnly": true
          },
          "id": {
            "description": "Stable identifier of this statement.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "invoice_no": {
            "description": "Invoice number of the statement.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "mandate_count": {
            "description": "Number of accepted cases included in this statement.",
            "minimum": 0,
            "readOnly": true,
            "type": "integer"
          },
          "mandates": {
            "description": "Accepted cases included in this statement.",
            "items": {
              "$ref": "#/components/schemas/StatementMandateRow"
            },
            "readOnly": true,
            "type": "array"
          },
          "period_end": {
            "description": "End of the period covered by the statement.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "period_start": {
            "description": "Start of the period covered by the statement.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "published_at": {
            "description": "Time at which the statement became available to you.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaseStatementStatusEnum"
              }
            ],
            "description": "Whether the statement is published or cancelled.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the statement record was last updated.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "booking_date",
          "cancelled_at",
          "clearing_no",
          "comment",
          "created_at",
          "files",
          "financials",
          "id",
          "invoice_no",
          "mandate_count",
          "mandates",
          "period_end",
          "period_start",
          "published_at",
          "status",
          "updated_at"
        ],
        "type": "object"
      },
      "StatementThirdPartyMoney": {
        "properties": {
          "extraordinary_payouts_to_client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtraordinaryPayoutsToClient"
              }
            ],
            "description": "Allocation of extraordinary payouts made to you.",
            "nullable": true,
            "readOnly": true
          },
          "payments_to_client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentsToClient"
              }
            ],
            "description": "Allocation of debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "payments_to_dca": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentsToDCA"
              }
            ],
            "description": "Allocation of debtor payments received by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "total_payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total debtor payments received by paywise or directly by you.",
            "nullable": true,
            "readOnly": true
          },
          "vat_rate": {
            "description": "VAT percentage applied to this payment allocation, e.g. 19.00 for 19%. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,3}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "extraordinary_payouts_to_client",
          "payments_to_client",
          "payments_to_dca",
          "total_payments",
          "vat_rate"
        ],
        "type": "object"
      },
      "StatementTypeEnum": {
        "description": "* `interim` - Zwischenabrechnung\n* `final` - Endabrechnung\n* `expenses_invoice` - Auslagenrechnung\n* `transition_to_longtime_monitoring` - Übergabe Überwachungsverfahren\n* `negative_closing` - Negativabschluss",
        "enum": [
          "interim",
          "final",
          "expenses_invoice",
          "transition_to_longtime_monitoring",
          "negative_closing"
        ],
        "type": "string"
      },
      "StatementTypedFile": {
        "properties": {
          "download_url": {
            "description": "Authenticated URL for downloading this file.",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "filename": {
            "description": "Descriptive filename for this download.",
            "readOnly": true,
            "type": "string"
          },
          "media_type": {
            "description": "Media type of this download.",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "description": "Kind of download: full-pdf (the statement document), third-party-money-xlsx (Fremdgeldabrechnung), cost-burden-xlsx (Kostenbelastung) or closing-xlsx (Abschlussmeldungen). Pass it as the type query parameter of the download operation.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "download_url",
          "filename",
          "media_type",
          "type"
        ],
        "type": "object"
      },
      "StatementVATEntry": {
        "properties": {
          "claims_from_advanced_costs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimsFromAdvancedCosts"
              }
            ],
            "description": "Collection claims arising from costs advanced by paywise.",
            "nullable": true,
            "readOnly": true
          },
          "claims_from_payments_to_client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimsFromPaymentsToClient"
              }
            ],
            "description": "Collection claims arising from debtor payments made directly to you.",
            "nullable": true,
            "readOnly": true
          },
          "claims_from_payments_to_dca": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimsFromPaymentsToDCA"
              }
            ],
            "description": "Collection claims arising from debtor payments to paywise.",
            "nullable": true,
            "readOnly": true
          },
          "instalment_payments_to_client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Instalment payments already passed on to you for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "invoice_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Net invoice amount for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "invoice_amount_vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "VAT charged on the invoice amount for this rate.",
            "nullable": true,
            "readOnly": true
          },
          "payout": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Payout balance for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "total_payments_to_dca": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total debtor payments received by paywise for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "vat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatementAmount"
              }
            ],
            "description": "Total VAT amount for this VAT rate.",
            "nullable": true,
            "readOnly": true
          },
          "vat_rate": {
            "description": "VAT percentage applied to this entry, e.g. 19.00 for 19%. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,3}(?:\\.[0-9]{1,2})?$",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "claims_from_advanced_costs",
          "claims_from_payments_to_client",
          "claims_from_payments_to_dca",
          "instalment_payments_to_client",
          "invoice_amount",
          "invoice_amount_vat",
          "payout",
          "total_payments_to_dca",
          "vat",
          "vat_rate"
        ],
        "type": "object"
      },
      "StatementWebhookEvent": {
        "description": "A statement was published or cancelled.",
        "example": {
          "created_at": "2026-07-18T12:00:00Z",
          "data": {
            "company_id": "10000000-0000-4000-8000-000000000001",
            "statement_id": "a0000000-0000-4000-8000-000000000001",
            "statement_url": "/v2/statements/a0000000-0000-4000-8000-000000000001/"
          },
          "id": "00000000-0000-4000-8000-000000000015",
          "type": "statement.published"
        },
        "properties": {
          "created_at": {
            "description": "Time at which the event occurred.",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/StatementWebhookEventData",
            "description": "Identifiers and links for the resources affected by the event."
          },
          "id": {
            "description": "Stable identifier of this event; equals the `webhook-id` header of every delivery attempt.",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "description": "Business event that occurred.",
            "enum": [
              "statement.published",
              "statement.cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "data"
        ],
        "title": "Statement event",
        "type": "object"
      },
      "StatementWebhookEventData": {
        "example": {
          "company_id": "10000000-0000-4000-8000-000000000001",
          "statement_id": "a0000000-0000-4000-8000-000000000001",
          "statement_url": "/v2/statements/a0000000-0000-4000-8000-000000000001/"
        },
        "properties": {
          "company_id": {
            "description": "Company whose resource triggered the event.",
            "format": "uuid",
            "type": "string"
          },
          "statement_id": {
            "description": "Statement.",
            "format": "uuid",
            "type": "string"
          },
          "statement_url": {
            "description": "API path of the statement (`/v2/statements/{id}/`).",
            "format": "uri-reference",
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "statement_id",
          "statement_url"
        ],
        "type": "object"
      },
      "TitleAmountWrite": {
        "description": "The gross enforceable amount; validated as a whole even on PATCH.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the title amount; only EUR is supported."
          },
          "value": {
            "description": "Gross title amount in major currency units, with at most two decimal places. Zero is accepted while drafting; the amount must be positive before finalization. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "TitleAmountWriteRequest": {
        "description": "The gross enforceable amount; validated as a whole even on PATCH.",
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "default": "EUR",
            "description": "Currency of the title amount; only EUR is supported."
          },
          "value": {
            "description": "Gross title amount in major currency units, with at most two decimal places. Zero is accepted while drafting; the amount must be positive before finalization. Exact decimal string; parse it with a decimal type, never a binary float.",
            "pattern": "^-?[0-9]{1,14}(?:\\.[0-9]{1,2})?$",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "TitleTypeEnum": {
        "description": "* `enforcement_order` - enforcement_order\n* `default_judgment` - default_judgment\n* `final_judgment` - final_judgment\n* `acknowledgment_judgment` - acknowledgment_judgment\n* `reservation_judgment` - reservation_judgment\n* `court_settlement` - court_settlement\n* `enforceable_notarial_deed` - enforceable_notarial_deed\n* `cost_assessment_order` - cost_assessment_order\n* `other` - other",
        "enum": [
          "enforcement_order",
          "default_judgment",
          "final_judgment",
          "acknowledgment_judgment",
          "reservation_judgment",
          "court_settlement",
          "enforceable_notarial_deed",
          "cost_assessment_order",
          "other"
        ],
        "type": "string"
      },
      "TitledClaim": {
        "description": "A claim backed by an enforceable title. The title's amount, dates, and documents belong to `enforceable_title`.",
        "properties": {
          "additional_debtor_ids": {
            "description": "Read-only additional debtor identifiers projected from the current order.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "created_at": {
            "description": "Time at which the claim was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "debtor_id": {
            "description": "Read-only primary debtor identifier projected from the current order. Change party membership only on a draft order; debtor details use the debtor resource.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "enforceable_title": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnforceableTitleRead"
              }
            ],
            "description": "Enforceable title that owns this claim's gross amount, legal metadata, and title documents.",
            "nullable": true,
            "readOnly": true
          },
          "events": {
            "description": "Stored contextual events associated with this resource.",
            "items": {
              "$ref": "#/components/schemas/LegacyEventRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "description": "Stable identifier of this claim.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim.",
            "readOnly": true,
            "type": "boolean"
          },
          "mandate_id": {
            "description": "Read-only accepted mandate identifier, or null before acceptance.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Stored metadata entries; duplicate types remain separate entries.",
            "items": {
              "$ref": "#/components/schemas/LegacyMetadataRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "order_id": {
            "description": "Read-only current order identifier. Internal review may change this relationship while the claim identifier and all claim-specific URLs remain stable.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "payments": {
            "description": "Read-only payments attributed to this claim. Report subsequent payments through the stable claim payments URL, including after acceptance or an internal order move. Reporting requires case:payments:write.",
            "items": {
              "$ref": "#/components/schemas/PaymentRead"
            },
            "readOnly": true,
            "type": "array"
          },
          "principal_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Always null for a titled claim; use enforceable_title.amount for the authoritative gross amount.",
            "nullable": true,
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimStatusEnum"
              }
            ],
            "description": "Read-only effective claim lifecycle. Draft-only commands return 409 claim_not_editable after submission and 409 order_expired once the draft has passed its expires_at; payment and title commands retain their specific lifecycle conflict codes.",
            "readOnly": true
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim. API submissions are limited to 2000 characters.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "total_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClaimAmountRead"
              }
            ],
            "description": "Authoritative gross enforceable-title amount; reported payments are exposed separately and do not reduce it.",
            "nullable": true,
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitledClaimTypeEnum"
              }
            ],
            "description": "Literal titled claim discriminator.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the claim was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "additional_debtor_ids",
          "created_at",
          "debtor_id",
          "dispute_reason",
          "document_reference",
          "enforceable_title",
          "events",
          "id",
          "is_disputed",
          "mandate_id",
          "metadata",
          "order_id",
          "payments",
          "principal_amount",
          "status",
          "subject_matter",
          "total_amount",
          "type",
          "updated_at",
          "your_reference"
        ],
        "title": "Titled claim",
        "type": "object"
      },
      "TitledClaimCreateRequest": {
        "description": "Create a titled claim: the enforceable title owns amount and dates.",
        "properties": {
          "dispute_reason": {
            "description": "Debtor's stated reason for disputing the claim. Required and non-blank when is_disputed is true; must be empty or null when it is false.",
            "maxLength": 2500,
            "nullable": true,
            "type": "string"
          },
          "document_reference": {
            "description": "Invoice, contract, or other source-document number.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          },
          "enforceable_title": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnforceableTitleInlineRequest"
              }
            ],
            "description": "Claim-owned enforceable title; required for a titled claim, which only a titled order accepts."
          },
          "events": {
            "description": "Contextual events supplied when creating the claim.",
            "items": {
              "$ref": "#/components/schemas/ClaimEventWriteRequest"
            },
            "type": "array"
          },
          "is_disputed": {
            "description": "Whether the debtor disputes the claim.",
            "type": "boolean"
          },
          "metadata": {
            "description": "Metadata supplied when creating the claim; duplicate types are allowed.",
            "items": {
              "$ref": "#/components/schemas/ClaimMetadataWriteRequest"
            },
            "type": "array"
          },
          "payments": {
            "description": "Payments already received for this claim. Maximum 50 entries per claim during creation; report later payments through the payment endpoints.",
            "example": [
              {
                "amount": {
                  "currency": "EUR",
                  "value": "50.00"
                },
                "value_date": "2026-07-17",
                "your_reference": "BANK-TRANSACTION-99812"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/PaymentWriteRequest"
            },
            "maxItems": 50,
            "type": "array"
          },
          "subject_matter": {
            "description": "Goods, services, or other obligation underlying the claim. Maximum 2000 characters.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitledClaimTypeEnum"
              }
            ],
            "description": "Literal titled claim discriminator."
          },
          "your_reference": {
            "description": "Your reference for this claim.",
            "maxLength": 255,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "enforceable_title",
          "is_disputed",
          "type"
        ],
        "title": "Titled claim input",
        "type": "object"
      },
      "TitledClaimTypeEnum": {
        "description": "* `titled` - Titled claim",
        "enum": [
          "titled"
        ],
        "type": "string"
      },
      "TitledDeleteConflictError": {
        "properties": {
          "code": {
            "description": "Machine-readable error category.",
            "type": "string"
          },
          "detail": {
            "description": "Short human-readable summary of the error.",
            "type": "string"
          },
          "document_ids": {
            "description": "Documents that must be deleted before the title can be deleted.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "errors": {
            "description": "Field-level validation errors, when applicable.",
            "items": {
              "$ref": "#/components/schemas/ErrorItem"
            },
            "type": "array"
          }
        },
        "required": [
          "detail",
          "code"
        ],
        "type": "object"
      },
      "TitledOrder": {
        "description": "A titled order contains titled claims and may include receivable claims for enforcement costs. It exposes `success_fee_confirmed` and omits `starting_approach` and `creditor_obligation_fulfilled`; enforcement is implicit.\n\nRead representation of an order.\n\n`status` is derived from the order's submission and review progress;\n`mandate` names the\ncreated mandate once the order is accepted; `merged_into` names the\nsurviving order when this order was merged away during review.",
        "properties": {
          "additional_debtors": {
            "description": "Inline summaries of the additional debtors. Retrieve each debtor's full details with GET /v2/debtors/{id}/ using its id. Replace membership through PATCH /v2/orders/{id}/ while the order is a draft. API submissions are limited to 10 additional debtors.",
            "items": {
              "$ref": "#/components/schemas/DebtorSummary"
            },
            "readOnly": true,
            "type": "array"
          },
          "claims": {
            "description": "Titled claims owning enforceable titles, plus any receivable claims for enforcement costs (K014). At least one complete titled claim is required before finalization. API submissions are limited to 50 claims per order.",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "readOnly": true,
            "type": "array"
          },
          "confirmation_email": {
            "description": "Address receiving the order-entry confirmation, when requested.",
            "format": "email",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the order was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtorSummary"
              }
            ],
            "description": "Inline summary of the primary debtor. Retrieve full details with GET /v2/debtors/{id}/ using its id.",
            "readOnly": true
          },
          "expires_at": {
            "description": "Time at which this API-created draft expires: updated_at plus 90 days, refreshed by every successful draft change. Once it has passed, the order reads expired and every change answers 409 order_expired until the daily cleanup deletes it. Null once the order is finalized and for orders created in the portal.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this order.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "mandate": {
            "description": "Accepted case created from this order, when available.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "merged_into": {
            "description": "Surviving order when this order was merged during review.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "rejection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderRejection"
              }
            ],
            "description": "Why paywise declined the order: reason, time, notified recipients, and the standard reason's key. Null unless status is rejected.",
            "nullable": true,
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderStatusEnum"
              }
            ],
            "description": "Order lifecycle state: draft is editable; submitted awaits processing; awaiting_client_response requires client input; accepted has entered case processing; rejected was declined; withdrawn was cancelled by the client; expired passed its draft deadline and accepts no further changes (409 order_expired) until the daily cleanup deletes it; merged points to the surviving order in merged_into.",
            "readOnly": true
          },
          "success_fee_confirmed": {
            "description": "Whether the titled-order success-fee arrangement has been confirmed for finalization. See the [paywise General Terms and Conditions (AGB)](https://paywise.de/agb/) for the exact conditions for titled orders.",
            "readOnly": true,
            "type": "boolean"
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderTotals"
              }
            ],
            "description": "Financial totals calculated across the order's claims.",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TitledOrderTypeEnum"
              }
            ],
            "description": "Literal titled order discriminator.",
            "readOnly": true
          },
          "updated_at": {
            "description": "Time at which the order was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "additional_debtors",
          "claims",
          "confirmation_email",
          "created_at",
          "debtor",
          "expires_at",
          "id",
          "mandate",
          "merged_into",
          "rejection",
          "status",
          "success_fee_confirmed",
          "totals",
          "type",
          "updated_at"
        ],
        "title": "Titled order",
        "type": "object"
      },
      "TitledOrderTypeEnum": {
        "enum": [
          "titled"
        ],
        "type": "string"
      },
      "TranslationKeyError": {
        "properties": {
          "code": {
            "description": "Machine-readable error category.",
            "type": "string"
          },
          "detail": {
            "description": "Short human-readable summary of the error.",
            "type": "string"
          },
          "errors": {
            "description": "Field-level validation errors, when applicable.",
            "items": {
              "$ref": "#/components/schemas/ErrorItem"
            },
            "type": "array"
          },
          "translation_key": {
            "description": "Key of the localized message matching `detail`.",
            "type": "string"
          }
        },
        "required": [
          "detail",
          "code"
        ],
        "type": "object"
      },
      "UsageLimit": {
        "description": "One live sliding-window bucket for the calling API principal.",
        "properties": {
          "limit": {
            "description": "Maximum requests allowed within the window.",
            "readOnly": true,
            "type": "integer"
          },
          "remaining": {
            "description": "Requests still available in the current window.",
            "readOnly": true,
            "type": "integer"
          },
          "resets_at": {
            "description": "Earliest time at which capacity becomes available again.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "scope": {
            "description": "Rate-limit bucket this usage entry describes.",
            "readOnly": true,
            "type": "string"
          },
          "used": {
            "description": "Requests already counted in the current window.",
            "readOnly": true,
            "type": "integer"
          },
          "window_seconds": {
            "description": "Length of the bucket's rolling window in seconds.",
            "readOnly": true,
            "type": "integer"
          }
        },
        "required": [
          "limit",
          "remaining",
          "resets_at",
          "scope",
          "used",
          "window_seconds"
        ],
        "type": "object"
      },
      "UsageResponse": {
        "description": "Point-in-time live usage returned by `/usage`.",
        "properties": {
          "generated_at": {
            "description": "Time at which this usage snapshot was calculated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "limits": {
            "description": "Current usage and remaining capacity for each rate-limit bucket.",
            "items": {
              "$ref": "#/components/schemas/UsageLimit"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "generated_at",
          "limits"
        ],
        "type": "object"
      },
      "VersionEnum": {
        "description": "* `v2` - v2",
        "enum": [
          "v2"
        ],
        "type": "string"
      },
      "Webhook": {
        "description": "A webhook subscription. The signing secret is never included; it is returned exactly once on creation or rotation.",
        "properties": {
          "auto_disabled": {
            "description": "`true` when the endpoint was disabled automatically after reaching `max_consecutive_failures`; re-enable it with `enabled: true` once the destination is fixed. Auto-disabled endpoints do not count toward the endpoint limit.",
            "readOnly": true,
            "type": "boolean"
          },
          "consecutive_failures": {
            "description": "Consecutive deliveries that reached terminal failure. Individual retry attempts do not increment this counter; a successful delivery resets it.",
            "readOnly": true,
            "type": "integer"
          },
          "contract_version": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContractVersionEnum"
              }
            ],
            "description": "Payload/signature contract of this endpoint. Endpoints created via this API are always `v2`; `v1` marks a legacy subscription that still receives v1 payloads and must be recreated to migrate.\n\n* `v1` - Legacy v1\n* `v2` - Version 2",
            "readOnly": true
          },
          "created_at": {
            "description": "Time at which the webhook subscription was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Optional single-line label for this webhook.",
            "maxLength": 255,
            "type": "string"
          },
          "enabled": {
            "description": "Whether deliveries are attempted. Re-enabling an endpoint resets its consecutive failure counter. Auto-disabled endpoints do not count toward the endpoint limit, so re-enabling one requires a free slot; otherwise the request returns 409 webhook_limit_reached.",
            "type": "boolean"
          },
          "events": {
            "description": "Current public event subscriptions for this endpoint. `[\"*\"]` subscribes to all public events; otherwise the list contains the subscribed event types.",
            "items": {
              "$ref": "#/components/schemas/CaseWebhookSubscriptionEventEnum"
            },
            "type": "array"
          },
          "id": {
            "description": "Stable identifier for this resource.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "last_failure_at": {
            "description": "Time of the most recent terminal delivery failure since the last successful delivery; null after a successful delivery or when no failure has been recorded.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "max_consecutive_failures": {
            "description": "Automatically disables the endpoint when this many consecutive deliveries reach terminal failure. Retry attempts within one delivery do not each count. Raising it above the failure count of an automatically disabled endpoint makes that endpoint count toward the endpoint limit again and requires a free slot.",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "updated_at": {
            "description": "Time at which the webhook subscription was last updated.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "url": {
            "description": "Publicly reachable HTTPS URL for webhook notifications. Must be unique among this company’s v2 endpoints; duplicate checks normalize the scheme, host, and default port.",
            "format": "uri",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "auto_disabled",
          "consecutive_failures",
          "contract_version",
          "created_at",
          "id",
          "last_failure_at",
          "updated_at",
          "url"
        ],
        "type": "object"
      },
      "WebhookDelivery": {
        "description": "Read view of a single delivery attempt (all fields read-only).",
        "properties": {
          "attempts": {
            "description": "Number of delivery attempts made so far.",
            "readOnly": true,
            "type": "integer"
          },
          "completed_at": {
            "description": "Time at which delivery succeeded or stopped retrying.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "created_at": {
            "description": "Time at which the delivery was queued.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "error_message": {
            "description": "Latest failure reason, such as an HTTP error, transport error, disabled or blocked endpoint, or expired retry window. Empty when no failure reason is recorded.",
            "readOnly": true,
            "type": "string"
          },
          "event_id": {
            "description": "Stable identifier of the event, shared by deliveries to different endpoints and by manual redeliveries. Use this ID to deduplicate event processing.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "event_type": {
            "description": "Business event being delivered.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Stable identifier of this delivery.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "idempotency_key": {
            "description": "Key identifying this delivery record. A manual redelivery receives a new key while preserving `event_id`; deduplicate business-event processing with `event_id`.",
            "readOnly": true,
            "type": "string"
          },
          "last_attempt_at": {
            "description": "Time of the most recent delivery attempt.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "next_retry_at": {
            "description": "Scheduled time of the next retry, when applicable.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "payload": {
            "$ref": "#/components/schemas/CaseWebhookEvent",
            "description": "Exact event body sent to the webhook endpoint.",
            "readOnly": true
          },
          "request_id": {
            "description": "Request that originally caused the event, when available.",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "response_body": {
            "description": "Most recently recorded HTTP response body, truncated to at most 4096 UTF-8 bytes. Empty when no body is retained.",
            "readOnly": true,
            "type": "string"
          },
          "response_status_code": {
            "description": "Latest HTTP status returned by the destination.",
            "nullable": true,
            "readOnly": true,
            "type": "integer"
          },
          "status": {
            "description": "Delivery state: `pending` (queued), `delivering` (attempt in progress), `retrying` (waiting for another attempt), `success` (delivered), or `failed` (automatic delivery stopped).",
            "readOnly": true,
            "type": "string"
          },
          "updated_at": {
            "description": "Time at which the delivery record last changed.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "webhook": {
            "description": "Webhook subscription targeted by the delivery.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "webhook_url": {
            "description": "Current URL configured on the targeted webhook subscription.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "attempts",
          "completed_at",
          "created_at",
          "error_message",
          "event_id",
          "event_type",
          "id",
          "idempotency_key",
          "last_attempt_at",
          "next_retry_at",
          "payload",
          "request_id",
          "response_body",
          "response_status_code",
          "status",
          "updated_at",
          "webhook",
          "webhook_url"
        ],
        "type": "object"
      },
      "WebhookRequest": {
        "description": "A webhook subscription. The signing secret is never included; it is returned exactly once on creation or rotation.",
        "properties": {
          "description": {
            "description": "Optional single-line label for this webhook.",
            "maxLength": 255,
            "type": "string"
          },
          "enabled": {
            "description": "Whether deliveries are attempted. Re-enabling an endpoint resets its consecutive failure counter. Auto-disabled endpoints do not count toward the endpoint limit, so re-enabling one requires a free slot; otherwise the request returns 409 webhook_limit_reached.",
            "type": "boolean"
          },
          "events": {
            "description": "Public event types to subscribe to. Use `[\"*\"]` for all public events; the wildcard must be the only list entry. If omitted on creation, subscribes to the current public Case event catalogue.",
            "items": {
              "$ref": "#/components/schemas/CaseWebhookSubscriptionEventEnum"
            },
            "type": "array"
          },
          "max_consecutive_failures": {
            "description": "Automatically disables the endpoint when this many consecutive deliveries reach terminal failure. Retry attempts within one delivery do not each count. Raising it above the failure count of an automatically disabled endpoint makes that endpoint count toward the endpoint limit again and requires a free slot.",
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "url": {
            "description": "Publicly reachable HTTPS URL for webhook notifications. Must be unique among this company’s v2 endpoints; duplicate checks normalize the scheme, host, and default port. A company can register at most 20 webhook endpoints. Enabled and manually disabled endpoints count toward this limit; automatically disabled endpoints do not, and re-enabling one requires a free slot. Exceeding the limit returns 409 webhook_limit_reached; delete an unused endpoint to free capacity.",
            "format": "uri",
            "maxLength": 2048,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "caseBearerAuth": {
        "description": "Company-bound Case Management API key — the standard credential for this API.",
        "scheme": "bearer",
        "type": "http"
      },
      "partnerBearerAuth": {
        "description": "Partner API key acting for one entitled company; every Case request must then also carry the X-On-Behalf-Of-Company header.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "url": "https://docs.paywise.de/api-docs/case-management-api/introduction"
  },
  "info": {
    "description": "Submit orders and manage their complete lifecycle through the current API at the `/v2/` HTTP path.",
    "title": "paywise Case Management API",
    "version": "current"
  },
  "openapi": "3.0.3",
  "paths": {
    "/v2/claims/": {
      "get": {
        "description": "Claims addressed by their stable UUID and current relationships.\n\nRead claims throughout their lifecycle using URLs that remain valid after\ninternal order moves. Standalone creation requires a draft `order_id`;\nthe relationship is read-only thereafter. Create, PATCH, and DELETE require\na draft order and otherwise return `409 claim_not_editable`. An expired\ndraft instead returns `409 order_expired`. Tenant-scoped by the\nauthenticated company.",
        "operationId": "list-claims",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact match on the document reference (e.g. the invoice number), ignoring case and surrounding whitespace.",
            "in": "query",
            "name": "document_reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Filter claims by their parent order's UUID.",
            "in": "query",
            "name": "order_id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "* `draft` - draft\n* `submitted` - submitted\n* `awaiting_client_response` - awaiting_client_response\n* `accepted` - accepted\n* `rejected` - rejected\n* `withdrawn` - withdrawn",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "accepted",
                "awaiting_client_response",
                "draft",
                "rejected",
                "submitted",
                "withdrawn"
              ],
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exact match on your claim reference, ignoring case and surrounding whitespace.",
            "in": "query",
            "name": "your_reference",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedClaimList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List claims",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "post": {
        "description": "Claims addressed by their stable UUID and current relationships.\n\nRead claims throughout their lifecycle using URLs that remain valid after\ninternal order moves. Standalone creation requires a draft `order_id`;\nthe relationship is read-only thereafter. Create, PATCH, and DELETE require\na draft order and otherwise return `409 claim_not_editable`. An expired\ndraft instead returns `409 order_expired`. Tenant-scoped by the\nauthenticated company.",
        "operationId": "create-claim",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "claim-create": {
                  "value": {
                    "additional_charges": [],
                    "document_date": "2026-06-05",
                    "document_reference": "2026-0042",
                    "documents": [],
                    "due_date": "2026-06-19",
                    "events": [
                      {
                        "description": null,
                        "location": null,
                        "occurence": "2026-06-05T09:00:00Z",
                        "title": "Invoice issued",
                        "type": "claim",
                        "your_reference": "2026-0042"
                      }
                    ],
                    "is_disputed": false,
                    "items": [
                      {
                        "description": "Accessibility review",
                        "quantity": "2.5",
                        "unit": "hours",
                        "unit_price": {
                          "currency": "EUR",
                          "value": "40.00"
                        }
                      }
                    ],
                    "legal_basis": {
                      "claim_type_code": "H11",
                      "description": "Consulting agreement of 2026-05-01"
                    },
                    "metadata": [
                      {
                        "type": "comment",
                        "value": "Consulting invoice from the customer portal"
                      }
                    ],
                    "order_id": "20000000-0000-4000-8000-000000000001",
                    "principal_amount": {
                      "currency": "EUR",
                      "value": "100.00"
                    },
                    "reminders": [
                      {
                        "date": "2026-07-01",
                        "due_date": "2026-07-08"
                      }
                    ],
                    "subject_matter": "Website accessibility consulting in June 2026",
                    "type": "receivable",
                    "your_reference": "INV-2026-0042"
                  }
                },
                "rental-claim-explicit-dates": {
                  "value": {
                    "delay_date": "2026-03-11",
                    "document_date": "2026-03-01",
                    "due_date": "2026-03-10",
                    "is_disputed": false,
                    "legal_basis": {
                      "claim_type_code": "H17"
                    },
                    "order_id": "20000000-0000-4000-8000-000000000001",
                    "principal_amount": {
                      "currency": "EUR",
                      "value": "2400.00"
                    },
                    "subject_matter": "Commercial rent for March 2026",
                    "type": "receivable",
                    "your_reference": "COMMERCIAL-RENT-2026-03"
                  }
                },
                "titled-claim": {
                  "value": {
                    "enforceable_title": {
                      "amount": {
                        "currency": "EUR",
                        "value": "5000.00"
                      },
                      "documents": [
                        {
                          "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                          "filename": "court-settlement.pdf",
                          "type": "enforceable_title"
                        }
                      ],
                      "file_number": "42 O 100/26",
                      "issued_on": "2026-02-10",
                      "issuing_authority": "Landgericht Berlin",
                      "legally_binding_since": null,
                      "served_on": null,
                      "title_type": "court_settlement"
                    },
                    "is_disputed": false,
                    "order_id": "20000000-0000-4000-8000-000000000001",
                    "subject_matter": "Enforcement title",
                    "type": "titled",
                    "your_reference": "TITLE-STAGED-2026-0042"
                  }
                },
                "titled-enforcement-cost": {
                  "value": {
                    "document_date": "2026-02-12",
                    "is_disputed": false,
                    "order_id": "20000000-0000-4000-8000-000000000001",
                    "principal_amount": {
                      "currency": "EUR",
                      "value": "75.00"
                    },
                    "subject_matter": "Enforcement costs",
                    "type": "receivable",
                    "your_reference": "ENFORCEMENT-COST-1"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/StandaloneClaimCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "receivable": {
                    "summary": "Receivable claim",
                    "value": {
                      "additional_charges": [],
                      "additional_charges_amount": {
                        "currency": "EUR",
                        "value": "0.00"
                      },
                      "additional_debtor_ids": [],
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor_id": "40000000-0000-4000-8000-000000000001",
                      "delay_date": "2026-07-09",
                      "dispute_reason": null,
                      "document_date": "2026-06-05",
                      "document_reference": "2026-0042",
                      "documents": [],
                      "due_date": "2026-06-19",
                      "events": [
                        {
                          "description": null,
                          "location": null,
                          "occurence": "2026-06-05T09:00:00Z",
                          "title": "Invoice issued",
                          "type": "claim",
                          "your_reference": "2026-0042"
                        }
                      ],
                      "id": "30000000-0000-4000-8000-000000000001",
                      "is_disputed": false,
                      "items": [],
                      "legal_basis": {
                        "claim_type_code": null,
                        "contract_date": null,
                        "description": null
                      },
                      "mandate_id": null,
                      "metadata": [
                        {
                          "type": "comment",
                          "value": "Consulting invoice from the customer portal"
                        }
                      ],
                      "order_id": "20000000-0000-4000-8000-000000000001",
                      "payments": [],
                      "principal_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "reminders": [],
                      "status": "draft",
                      "subject_matter": "Website accessibility consulting in June 2026",
                      "total_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "type": "receivable",
                      "updated_at": "2026-07-18T10:00:00Z",
                      "your_reference": "INV-2026-0042"
                    }
                  },
                  "titled": {
                    "summary": "Titled claim",
                    "value": {
                      "additional_debtor_ids": [],
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor_id": "40000000-0000-4000-8000-000000000001",
                      "dispute_reason": null,
                      "document_reference": null,
                      "enforceable_title": {
                        "amount": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "created_at": "2026-07-18T10:00:00Z",
                        "documents": [],
                        "file_number": "12-3456789-0-1",
                        "id": "31000000-0000-4000-8000-000000000001",
                        "issued_on": "2026-01-15",
                        "issuing_authority": "Amtsgericht Berlin",
                        "legally_binding_since": "2026-02-01",
                        "served_on": "2026-01-20",
                        "title_type": "enforcement_order",
                        "updated_at": "2026-07-18T10:00:00Z"
                      },
                      "events": [],
                      "id": "30000000-0000-4000-8000-000000000001",
                      "is_disputed": false,
                      "mandate_id": null,
                      "metadata": [],
                      "order_id": "20000000-0000-4000-8000-000000000001",
                      "payments": [],
                      "principal_amount": null,
                      "status": "draft",
                      "subject_matter": "Enforcement title",
                      "total_amount": {
                        "currency": "EUR",
                        "value": "2500.00"
                      },
                      "type": "titled",
                      "updated_at": "2026-07-18T10:00:00Z",
                      "your_reference": "TITLE-2026-0042"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Claim"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create claim",
        "tags": [
          "Claims"
        ],
        "x-paywise-request-example-by-response-example": {
          "receivable": "claim-create",
          "titled": "titled-claim"
        },
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/claims/{claim_id}/documents/": {
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "list-claim-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the parent claim.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List claim documents",
        "tags": [
          "Documents"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "post": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "create-claim-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the parent claim.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "document-base64": {
                  "value": {
                    "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/ClaimDocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "examples": {
                "document-multipart": {
                  "value": {
                    "file": "(binary PDF body)",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/ClaimDocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create claim document",
        "tags": [
          "Documents"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/claims/{claim_id}/documents/{id}/": {
      "delete": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "delete-claim-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the parent claim.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete claim document",
        "tags": [
          "Documents"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "get-claim-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the parent claim.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get claim document",
        "tags": [
          "Documents"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      }
    },
    "/v2/claims/{claim_id}/documents/{id}/download/": {
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "download-claim-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the parent claim.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download claim document",
        "tags": [
          "Documents"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      }
    },
    "/v2/claims/{claim_id}/enforceable-title/": {
      "delete": {
        "description": "The enforceable-title singleton owned by a titled claim.",
        "operationId": "delete-enforceable-title",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/TitledDeleteConflictError"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete enforceable title",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "get": {
        "description": "The enforceable-title singleton owned by a titled claim.",
        "operationId": "get-enforceable-title",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnforceableTitleRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get enforceable title",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "patch": {
        "description": "The enforceable-title singleton owned by a titled claim.",
        "operationId": "update-enforceable-title",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "enforceable-title-service-dates": {
                  "value": {
                    "legally_binding_since": "2026-02-15",
                    "served_on": "2026-02-12"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedEnforceableTitlePatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnforceableTitleRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update enforceable title",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "put": {
        "description": "The enforceable-title singleton owned by a titled claim.",
        "operationId": "replace-enforceable-title",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnforceableTitlePutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnforceableTitleRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnforceableTitleRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Replace enforceable title",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/claims/{claim_id}/enforceable-title/documents/": {
      "get": {
        "description": "Documents owned by a titled claim's enforceable title.",
        "operationId": "list-enforceable-title-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List enforceable title documents",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "post": {
        "description": "Documents owned by a titled claim's enforceable title.",
        "operationId": "create-enforceable-title-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnforceableTitleDocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EnforceableTitleDocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create enforceable title document",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/claims/{claim_id}/enforceable-title/documents/{id}/": {
      "delete": {
        "description": "Documents owned by a titled claim's enforceable title.",
        "operationId": "delete-enforceable-title-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete enforceable title document",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "get": {
        "description": "Documents owned by a titled claim's enforceable title.",
        "operationId": "get-enforceable-title-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get enforceable title document",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      }
    },
    "/v2/claims/{claim_id}/enforceable-title/documents/{id}/download/": {
      "get": {
        "description": "Documents owned by a titled claim's enforceable title.",
        "operationId": "download-enforceable-title-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download enforceable title document",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      }
    },
    "/v2/claims/{claim_id}/payments/": {
      "get": {
        "description": "Client payments recorded on one claim across its whole lifecycle.\n\nDraft and in-review orders take side-effect-free claim facts; once the\nclaim carries a mandate the create delegates to the shared claim payment\nreport. Deletion stays draft-only. Requires `case:payments:write` to report\nor delete and `case:payments:read` to list, in every lifecycle state.",
        "operationId": "list-claim-payments",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPaymentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List claim payments",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:payments:read"
        ]
      },
      "post": {
        "description": "Client payments recorded on one claim across its whole lifecycle.\n\nDraft and in-review orders take side-effect-free claim facts; once the\nclaim carries a mandate the create delegates to the shared claim payment\nreport. Deletion stays draft-only. Requires `case:payments:write` to report\nor delete and `case:payments:read` to list, in every lifecycle state.",
        "operationId": "create-claim-payment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "payment-report": {
                  "value": {
                    "amount": {
                      "currency": "EUR",
                      "value": "50.00"
                    },
                    "metadata": [
                      {
                        "type": "transaction:reference",
                        "value": "BANK-TRANSACTION-99812"
                      }
                    ],
                    "value_date": "2026-07-17",
                    "your_reference": "BANK-TRANSACTION-99812"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PaymentWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create claim payment",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:payments:write"
        ]
      }
    },
    "/v2/claims/{claim_id}/payments/{id}/": {
      "delete": {
        "description": "Client payments recorded on one claim across its whole lifecycle.\n\nDraft and in-review orders take side-effect-free claim facts; once the\nclaim carries a mandate the create delegates to the shared claim payment\nreport. Deletion stays draft-only. Requires `case:payments:write` to report\nor delete and `case:payments:read` to list, in every lifecycle state.",
        "operationId": "delete-claim-payment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent claim in this request.",
            "in": "path",
            "name": "claim_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the payment in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete claim payment",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:payments:write"
        ]
      }
    },
    "/v2/claims/{id}/": {
      "delete": {
        "description": "Claims addressed by their stable UUID and current relationships.\n\nRead claims throughout their lifecycle using URLs that remain valid after\ninternal order moves. Standalone creation requires a draft `order_id`;\nthe relationship is read-only thereafter. Create, PATCH, and DELETE require\na draft order and otherwise return `409 claim_not_editable`. An expired\ndraft instead returns `409 order_expired`. Tenant-scoped by the\nauthenticated company.",
        "operationId": "delete-claim",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the claim in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete claim",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "get": {
        "description": "Claims addressed by their stable UUID and current relationships.\n\nRead claims throughout their lifecycle using URLs that remain valid after\ninternal order moves. Standalone creation requires a draft `order_id`;\nthe relationship is read-only thereafter. Create, PATCH, and DELETE require\na draft order and otherwise return `409 claim_not_editable`. An expired\ndraft instead returns `409 order_expired`. Tenant-scoped by the\nauthenticated company.",
        "operationId": "get-claim",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the claim in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "receivable": {
                    "summary": "Receivable claim",
                    "value": {
                      "additional_charges": [],
                      "additional_charges_amount": {
                        "currency": "EUR",
                        "value": "0.00"
                      },
                      "additional_debtor_ids": [],
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor_id": "40000000-0000-4000-8000-000000000001",
                      "delay_date": "2026-07-09",
                      "dispute_reason": null,
                      "document_date": "2026-06-05",
                      "document_reference": "2026-0042",
                      "documents": [],
                      "due_date": "2026-06-19",
                      "events": [
                        {
                          "description": null,
                          "location": null,
                          "occurence": "2026-06-05T09:00:00Z",
                          "title": "Invoice issued",
                          "type": "claim",
                          "your_reference": "2026-0042"
                        }
                      ],
                      "id": "30000000-0000-4000-8000-000000000001",
                      "is_disputed": false,
                      "items": [],
                      "legal_basis": {
                        "claim_type_code": null,
                        "contract_date": null,
                        "description": null
                      },
                      "mandate_id": null,
                      "metadata": [
                        {
                          "type": "comment",
                          "value": "Consulting invoice from the customer portal"
                        }
                      ],
                      "order_id": "20000000-0000-4000-8000-000000000001",
                      "payments": [],
                      "principal_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "reminders": [],
                      "status": "draft",
                      "subject_matter": "Website accessibility consulting in June 2026",
                      "total_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "type": "receivable",
                      "updated_at": "2026-07-18T10:00:00Z",
                      "your_reference": "INV-2026-0042"
                    }
                  },
                  "titled": {
                    "summary": "Titled claim",
                    "value": {
                      "additional_debtor_ids": [],
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor_id": "40000000-0000-4000-8000-000000000001",
                      "dispute_reason": null,
                      "document_reference": null,
                      "enforceable_title": {
                        "amount": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "created_at": "2026-07-18T10:00:00Z",
                        "documents": [],
                        "file_number": "12-3456789-0-1",
                        "id": "31000000-0000-4000-8000-000000000001",
                        "issued_on": "2026-01-15",
                        "issuing_authority": "Amtsgericht Berlin",
                        "legally_binding_since": "2026-02-01",
                        "served_on": "2026-01-20",
                        "title_type": "enforcement_order",
                        "updated_at": "2026-07-18T10:00:00Z"
                      },
                      "events": [],
                      "id": "30000000-0000-4000-8000-000000000001",
                      "is_disputed": false,
                      "mandate_id": null,
                      "metadata": [],
                      "order_id": "20000000-0000-4000-8000-000000000001",
                      "payments": [],
                      "principal_amount": null,
                      "status": "draft",
                      "subject_matter": "Enforcement title",
                      "total_amount": {
                        "currency": "EUR",
                        "value": "2500.00"
                      },
                      "type": "titled",
                      "updated_at": "2026-07-18T10:00:00Z",
                      "your_reference": "TITLE-2026-0042"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Claim"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get claim",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "patch": {
        "description": "Claims addressed by their stable UUID and current relationships.\n\nRead claims throughout their lifecycle using URLs that remain valid after\ninternal order moves. Standalone creation requires a draft `order_id`;\nthe relationship is read-only thereafter. Create, PATCH, and DELETE require\na draft order and otherwise return `409 claim_not_editable`. An expired\ndraft instead returns `409 order_expired`. Tenant-scoped by the\nauthenticated company.",
        "operationId": "update-claim",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the claim in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "claim-draft-patch": {
                  "value": {
                    "due_date": "2026-06-26",
                    "subject_matter": "Website accessibility consulting in June 2026 (rev. 2)"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedClaimUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "receivable": {
                    "summary": "Receivable claim",
                    "value": {
                      "additional_charges": [],
                      "additional_charges_amount": {
                        "currency": "EUR",
                        "value": "0.00"
                      },
                      "additional_debtor_ids": [],
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor_id": "40000000-0000-4000-8000-000000000001",
                      "delay_date": "2026-07-09",
                      "dispute_reason": null,
                      "document_date": "2026-06-05",
                      "document_reference": "2026-0042",
                      "documents": [],
                      "due_date": "2026-06-19",
                      "events": [
                        {
                          "description": null,
                          "location": null,
                          "occurence": "2026-06-05T09:00:00Z",
                          "title": "Invoice issued",
                          "type": "claim",
                          "your_reference": "2026-0042"
                        }
                      ],
                      "id": "30000000-0000-4000-8000-000000000001",
                      "is_disputed": false,
                      "items": [],
                      "legal_basis": {
                        "claim_type_code": null,
                        "contract_date": null,
                        "description": null
                      },
                      "mandate_id": null,
                      "metadata": [
                        {
                          "type": "comment",
                          "value": "Consulting invoice from the customer portal"
                        }
                      ],
                      "order_id": "20000000-0000-4000-8000-000000000001",
                      "payments": [],
                      "principal_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "reminders": [],
                      "status": "draft",
                      "subject_matter": "Website accessibility consulting in June 2026",
                      "total_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "type": "receivable",
                      "updated_at": "2026-07-18T10:00:00Z",
                      "your_reference": "INV-2026-0042"
                    }
                  },
                  "titled": {
                    "summary": "Titled claim",
                    "value": {
                      "additional_debtor_ids": [],
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor_id": "40000000-0000-4000-8000-000000000001",
                      "dispute_reason": null,
                      "document_reference": null,
                      "enforceable_title": {
                        "amount": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "created_at": "2026-07-18T10:00:00Z",
                        "documents": [],
                        "file_number": "12-3456789-0-1",
                        "id": "31000000-0000-4000-8000-000000000001",
                        "issued_on": "2026-01-15",
                        "issuing_authority": "Amtsgericht Berlin",
                        "legally_binding_since": "2026-02-01",
                        "served_on": "2026-01-20",
                        "title_type": "enforcement_order",
                        "updated_at": "2026-07-18T10:00:00Z"
                      },
                      "events": [],
                      "id": "30000000-0000-4000-8000-000000000001",
                      "is_disputed": false,
                      "mandate_id": null,
                      "metadata": [],
                      "order_id": "20000000-0000-4000-8000-000000000001",
                      "payments": [],
                      "principal_amount": null,
                      "status": "draft",
                      "subject_matter": "Enforcement title",
                      "total_amount": {
                        "currency": "EUR",
                        "value": "2500.00"
                      },
                      "type": "titled",
                      "updated_at": "2026-07-18T10:00:00Z",
                      "your_reference": "TITLE-2026-0042"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Claim"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update claim",
        "tags": [
          "Claims"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/debtors/": {
      "get": {
        "description": "The reusable debtors of your company.\n\nList, retrieve, create, and PATCH. A supplied owned collection\n(addresses, bank accounts, communication channels, legal\nrepresentatives) replaces that collection completely; omitted\ncollections stay unchanged. A case's debtor is the case's own snapshot\n(published as `MandateDebtor` without an id) and is not a reusable\ndebtor: it is neither listed nor readable here.",
        "operationId": "list-debtors",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Exact capacity in which the debtor incurred the obligation: `consumer` or `business`.",
            "in": "query",
            "name": "acting_as",
            "schema": {
              "enum": [
                "business",
                "consumer"
              ],
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Return the debtor with this UUID.",
            "in": "query",
            "name": "id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of your debtor reference.",
            "in": "query",
            "name": "your_reference",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDebtorListList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List debtors",
        "tags": [
          "Debtors"
        ],
        "x-required-scopes": [
          "case:debtors:read"
        ]
      },
      "post": {
        "description": "The reusable debtors of your company.\n\nList, retrieve, create, and PATCH. A supplied owned collection\n(addresses, bank accounts, communication channels, legal\nrepresentatives) replaces that collection completely; omitted\ncollections stay unchanged. A case's debtor is the case's own snapshot\n(published as `MandateDebtor` without an id) and is not a reusable\ndebtor: it is neither listed nor readable here.",
        "operationId": "create-debtor",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "debtor-create": {
                  "value": {
                    "acting_as": "consumer",
                    "addresses": [
                      {
                        "city": "Berlin",
                        "country": "DE",
                        "postal_code": "10115",
                        "primary": true,
                        "street": "Example Street 12"
                      }
                    ],
                    "bank_accounts": [
                      {
                        "account_holder": "Alex Example",
                        "iban": "DE89370400440532013000"
                      }
                    ],
                    "communication_channels": [
                      {
                        "type": "email",
                        "value": "alex@example.test"
                      }
                    ],
                    "events": [
                      {
                        "description": null,
                        "location": null,
                        "occurence": "2026-05-01T09:00:00Z",
                        "title": "Customer registered",
                        "type": "registration",
                        "your_reference": null
                      }
                    ],
                    "metadata": [
                      {
                        "type": "user:reference",
                        "value": "CUSTOMER-1001"
                      }
                    ],
                    "person": {
                      "first_name": "Alex",
                      "last_name": "Example",
                      "salutation": "mx"
                    },
                    "your_reference": "CUSTOMER-1001"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DebtorWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtorDetail"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create debtor",
        "tags": [
          "Debtors"
        ],
        "x-required-scopes": [
          "case:debtors:write"
        ]
      }
    },
    "/v2/debtors/{id}/": {
      "get": {
        "description": "The reusable debtors of your company.\n\nList, retrieve, create, and PATCH. A supplied owned collection\n(addresses, bank accounts, communication channels, legal\nrepresentatives) replaces that collection completely; omitted\ncollections stay unchanged. A case's debtor is the case's own snapshot\n(published as `MandateDebtor` without an id) and is not a reusable\ndebtor: it is neither listed nor readable here.",
        "operationId": "get-debtor",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the debtor in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtorDetail"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get debtor",
        "tags": [
          "Debtors"
        ],
        "x-required-scopes": [
          "case:debtors:read"
        ]
      },
      "patch": {
        "description": "The reusable debtors of your company.\n\nList, retrieve, create, and PATCH. A supplied owned collection\n(addresses, bank accounts, communication channels, legal\nrepresentatives) replaces that collection completely; omitted\ncollections stay unchanged. A case's debtor is the case's own snapshot\n(published as `MandateDebtor` without an id) and is not a reusable\ndebtor: it is neither listed nor readable here.",
        "operationId": "update-debtor",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the debtor in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "debtor-aggregate-patch": {
                  "value": {
                    "communication_channels": [
                      {
                        "type": "email",
                        "value": "billing@example.test"
                      },
                      {
                        "type": "mobile_phone",
                        "value": "+4915123456789"
                      }
                    ],
                    "your_reference": "CUSTOMER-1001-UPDATED"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedDebtorWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtorDetail"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update debtor",
        "tags": [
          "Debtors"
        ],
        "x-required-scopes": [
          "case:debtors:write"
        ]
      }
    },
    "/v2/events/": {
      "get": {
        "description": "Return one page of the company's event feed, oldest first.",
        "operationId": "list-events",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return only events of these exact types. Repeat the parameter for several types.",
            "in": "query",
            "name": "event_type",
            "schema": {
              "items": {
                "enum": [
                  "dunning.handed_to_collection",
                  "dunning.level_advanced",
                  "invoice.cancelled",
                  "invoice.created",
                  "invoice.paid",
                  "invoice.reopened",
                  "invoice.written_off",
                  "mandate.balance_updated",
                  "mandate.correspondence.published",
                  "mandate.created",
                  "mandate.message.created",
                  "mandate.state.changed",
                  "mandate.status_update.published",
                  "order.accepted",
                  "order.expired",
                  "order.message.created",
                  "order.rejected",
                  "order.submitted",
                  "order.withdrawn",
                  "payment.reported",
                  "request_to_client.answered",
                  "request_to_client.created",
                  "single_mandate_statement.cancelled",
                  "single_mandate_statement.published",
                  "statement.cancelled",
                  "statement.published"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Opaque cursor taken from the `cursor` (or `next`) field of a previous page. Omit it to start at the oldest retained event (30 days). Entries become visible about 60 seconds after they are recorded, so a cursor never runs ahead of an event that is still being written.",
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "mixed-case-events": {
                    "summary": "Order, accepted-case, and invoice events",
                    "value": {
                      "cursor": "MjAyNi0wNy0xOFQxMjowMDowMCswMDowMHwz",
                      "next": null,
                      "results": [
                        {
                          "created_at": "2026-07-18T12:00:00Z",
                          "data": {
                            "claim_ids": [
                              "30000000-0000-4000-8000-000000000001"
                            ],
                            "company_id": "10000000-0000-4000-8000-000000000001",
                            "order_id": "20000000-0000-4000-8000-000000000001",
                            "order_url": "/v2/orders/20000000-0000-4000-8000-000000000001/"
                          },
                          "id": "00000000-0000-4000-8000-000000000001",
                          "type": "order.submitted"
                        },
                        {
                          "created_at": "2026-07-18T12:00:00Z",
                          "data": {
                            "company_id": "10000000-0000-4000-8000-000000000001",
                            "mandate_id": "50000000-0000-4000-8000-000000000001",
                            "mandate_url": "/v2/mandates/50000000-0000-4000-8000-000000000001/"
                          },
                          "id": "00000000-0000-4000-8000-000000000006",
                          "type": "mandate.created"
                        },
                        {
                          "created_at": "2026-07-18T12:00:00Z",
                          "data": {
                            "company_id": "10000000-0000-4000-8000-000000000001",
                            "invoice_id": "b0000000-0000-4000-8000-000000000001",
                            "invoice_url": "/mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/"
                          },
                          "id": "00000000-0000-4000-8000-000000000020",
                          "type": "invoice.created"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEventFeed"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List events",
        "tags": [
          "Events"
        ],
        "x-required-scopes": [
          "case:webhooks:read"
        ]
      }
    },
    "/v2/health/": {
      "get": {
        "description": "Return the unauthenticated Case Management API liveness response.",
        "operationId": "health-check",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseHealthResponse"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Health check",
        "tags": [
          "Health"
        ]
      }
    },
    "/v2/info/": {
      "get": {
        "description": "Return non-PII metadata about the calling credential and selected company. Partner credentials must select the company through X-On-Behalf-Of-Company.",
        "operationId": "get-case-credential-context",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "CredentialInfo": {
                    "summary": "Credential info",
                    "value": {
                      "company": "10000000-0000-4000-8000-000000000001",
                      "environment": "production",
                      "id": "c0000000-0000-4000-8000-000000000001",
                      "scopes": [
                        "case:orders:read",
                        "case:orders:write"
                      ],
                      "token_name": "Accounting integration"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CaseTokenInfoResponse"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get Case credential context",
        "tags": [
          "Info"
        ],
        "x-required-scopes": []
      }
    },
    "/v2/legal-forms/": {
      "get": {
        "description": "Return the authenticated, tenant-independent public catalog.",
        "operationId": "list-legal-forms",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LegalFormCatalog"
                  },
                  "type": "array"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List legal forms",
        "tags": [
          "Legal forms"
        ],
        "x-required-scopes": []
      }
    },
    "/v2/mandates/": {
      "get": {
        "description": "Accepted cases (Aktenzeichen).\n\nMain-case-centric: the list returns **main cases only**.\nSub-cases are reachable through the main case detail representation and\ndirect detail/subresource URLs, not a flat list expansion. Tenant-scoped by\nthe authenticated company.\n\nSub-resources of one mandate:\n\n  * payments — the reported, non-ignored payments\n  * documents — claim-document metadata and a proxy-stream download\n  * history — published client activity, related resources, and attachments.\n    A main case includes its subcases; a subcase includes only itself.\n\nThe sub-resource operations resolve the mandate **including sub-cases** —\nunlike the list, which hides sub-cases — so an individually-addressable\nsub-case's own track stays reachable. These public mandate operations are\nreads.",
        "operationId": "list-mandates",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Whether the accepted case is archived. When omitted, archived cases are hidden unless `updated_since` is set; with `updated_since` archived and active cases are both returned.",
            "in": "query",
            "name": "archived",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Created at or after this timestamp (inclusive).",
            "in": "query",
            "name": "created_after",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Created at or before this timestamp (inclusive).",
            "in": "query",
            "name": "created_before",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact legal stage of the accepted case.",
            "in": "query",
            "name": "legal_stage",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort fields: debtor `name`, `created`, total claim `amount`, or the latest published status title (`status`). Prefix a field with `-` for descending order. Defaults to `-created`; `updated_since` uses its synchronization order instead.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Payment state: `unpaid`, `partially_paid`, or `fully_paid`. Repeat the parameter to include any of several states.",
            "explode": true,
            "in": "query",
            "name": "payment_state",
            "schema": {
              "items": {
                "enum": [
                  "fully_paid",
                  "partially_paid",
                  "unpaid"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "Exact processing state. Repeat the parameter to include any of several states.",
            "explode": true,
            "in": "query",
            "name": "processing_state",
            "schema": {
              "items": {
                "enum": [
                  "canceled_by_client",
                  "canceled_by_service_provider",
                  "ended",
                  "in_progress",
                  "paused"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "A UUID matches the case, one of its subcases, or one of its claims. Otherwise searches case-insensitively by substring: debtor names (accents ignored), your debtor reference, current and previous case references, claim and document references, and, from three characters, the titles, texts and event codes of published status updates. Subcase matches return their main case. Debtor name and reference matches include production-mode debtors only, as in the portal.",
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of the current paywise case reference, or an exact match on a previous paywise reference.",
            "in": "query",
            "name": "reference_number",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by published open or answered client requests, or by having no published client requests. Repeat the parameter to include any of these categories.",
            "explode": true,
            "in": "query",
            "name": "requests",
            "schema": {
              "items": {
                "enum": [
                  "has_answered_requests_to_client",
                  "has_no_requests_to_client",
                  "has_open_requests_to_client"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMandateListList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandates",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:mandates:read"
        ]
      }
    },
    "/v2/mandates/{id}/": {
      "get": {
        "description": "Accepted cases (Aktenzeichen).\n\nMain-case-centric: the list returns **main cases only**.\nSub-cases are reachable through the main case detail representation and\ndirect detail/subresource URLs, not a flat list expansion. Tenant-scoped by\nthe authenticated company.\n\nSub-resources of one mandate:\n\n  * payments — the reported, non-ignored payments\n  * documents — claim-document metadata and a proxy-stream download\n  * history — published client activity, related resources, and attachments.\n    A main case includes its subcases; a subcase includes only itself.\n\nThe sub-resource operations resolve the mandate **including sub-cases** —\nunlike the list, which hides sub-cases — so an individually-addressable\nsub-case's own track stays reachable. These public mandate operations are\nreads.",
        "operationId": "get-mandate",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "With history=true, embed the typed related resource body.",
            "in": "query",
            "name": "expand",
            "schema": {
              "enum": [
                "history.related_resources"
              ],
              "type": "string"
            }
          },
          {
            "description": "Embed up to 100 unified history entries.",
            "in": "query",
            "name": "history",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "UUID of the accepted case in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "mandate-main-case": {
                    "value": {
                      "archived": false,
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": null,
                            "contract_date": null,
                            "description": null
                          },
                          "mandate_id": "50000000-0000-4000-8000-000000000001",
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "accepted",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "created_at": "2026-07-18T11:00:00Z",
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "id": "50000000-0000-4000-8000-000000000001",
                      "legal_balance": null,
                      "main_case": null,
                      "previous_reference_numbers": [],
                      "reference_number": "PW-2026-000123",
                      "state": {
                        "legal_stage": {
                          "code": "extrajudicial",
                          "label": "Außergerichtlich",
                          "label_key": "mandate.state.legal_stage.extrajudicial"
                        },
                        "payment": {
                          "code": "unpaid",
                          "label": "Unbezahlt",
                          "label_key": "mandate.state.payment.unpaid"
                        },
                        "processing": {
                          "code": "in_progress",
                          "label": "Laufend",
                          "label_key": "mandate.state.processing.in_progress"
                        }
                      },
                      "subcases": [],
                      "total_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "updated_at": "2026-07-18T11:00:00Z"
                    }
                  },
                  "mandate-subcase": {
                    "value": {
                      "archived": false,
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": null,
                            "contract_date": null,
                            "description": null
                          },
                          "mandate_id": "50000000-0000-4000-8000-000000000001",
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "accepted",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "created_at": "2026-07-18T11:00:00Z",
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "id": "50000000-0000-4000-8000-000000000002",
                      "legal_balance": null,
                      "main_case": {
                        "debtor": {
                          "acting_as": "consumer",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-05-01T09:00:00Z",
                              "title": "Customer registered",
                              "type": "registration",
                              "your_reference": null
                            }
                          ],
                          "legal_form": null,
                          "metadata": [
                            {
                              "type": "user:reference",
                              "value": "CUSTOMER-1001"
                            }
                          ],
                          "organization": null,
                          "person": {
                            "birth_date": null,
                            "first_name": "Alex",
                            "last_name": "Example",
                            "salutation": "mx"
                          },
                          "your_reference": "CUSTOMER-1001"
                        },
                        "id": "50000000-0000-4000-8000-000000000001",
                        "reference_number": "PW-2026-000123"
                      },
                      "previous_reference_numbers": [],
                      "reference_number": "PW-2026-000123-2",
                      "state": {
                        "legal_stage": {
                          "code": "extrajudicial",
                          "label": "Außergerichtlich",
                          "label_key": "mandate.state.legal_stage.extrajudicial"
                        },
                        "payment": {
                          "code": "unpaid",
                          "label": "Unbezahlt",
                          "label_key": "mandate.state.payment.unpaid"
                        },
                        "processing": {
                          "code": "in_progress",
                          "label": "Laufend",
                          "label_key": "mandate.state.processing.in_progress"
                        }
                      },
                      "subcases": [],
                      "total_amount": {
                        "currency": "EUR",
                        "value": "100.00"
                      },
                      "updated_at": "2026-07-18T11:00:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/MandateDetail"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:mandates:read"
        ]
      }
    },
    "/v2/mandates/{id}/documents/": {
      "get": {
        "description": "Accepted cases (Aktenzeichen).\n\nMain-case-centric: the list returns **main cases only**.\nSub-cases are reachable through the main case detail representation and\ndirect detail/subresource URLs, not a flat list expansion. Tenant-scoped by\nthe authenticated company.\n\nSub-resources of one mandate:\n\n  * payments — the reported, non-ignored payments\n  * documents — claim-document metadata and a proxy-stream download\n  * history — published client activity, related resources, and attachments.\n    A main case includes its subcases; a subcase includes only itself.\n\nThe sub-resource operations resolve the mandate **including sub-cases** —\nunlike the list, which hides sub-cases — so an individually-addressable\nsub-case's own track stays reachable. These public mandate operations are\nreads.",
        "operationId": "get-mandate-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the accepted case in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return entries changed at or after this timezone-aware RFC 3339 timestamp (inclusive). With it set, results are ordered by change time and then id instead of newest first, page by `cursor` instead of `offset`, and entries changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MandateDocumentPage"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate documents",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:mandates:read"
        ]
      }
    },
    "/v2/mandates/{id}/documents/{doc_id}/download/": {
      "get": {
        "description": "Accepted cases (Aktenzeichen).\n\nMain-case-centric: the list returns **main cases only**.\nSub-cases are reachable through the main case detail representation and\ndirect detail/subresource URLs, not a flat list expansion. Tenant-scoped by\nthe authenticated company.\n\nSub-resources of one mandate:\n\n  * payments — the reported, non-ignored payments\n  * documents — claim-document metadata and a proxy-stream download\n  * history — published client activity, related resources, and attachments.\n    A main case includes its subcases; a subcase includes only itself.\n\nThe sub-resource operations resolve the mandate **including sub-cases** —\nunlike the list, which hides sub-cases — so an individually-addressable\nsub-case's own track stays reachable. These public mandate operations are\nreads.",
        "operationId": "download-mandate-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Document UUID.",
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the accepted case in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:mandates:read"
        ]
      }
    },
    "/v2/mandates/{id}/history/": {
      "get": {
        "description": "Accepted cases (Aktenzeichen).\n\nMain-case-centric: the list returns **main cases only**.\nSub-cases are reachable through the main case detail representation and\ndirect detail/subresource URLs, not a flat list expansion. Tenant-scoped by\nthe authenticated company.\n\nSub-resources of one mandate:\n\n  * payments — the reported, non-ignored payments\n  * documents — claim-document metadata and a proxy-stream download\n  * history — published client activity, related resources, and attachments.\n    A main case includes its subcases; a subcase includes only itself.\n\nThe sub-resource operations resolve the mandate **including sub-cases** —\nunlike the list, which hides sub-cases — so an individually-addressable\nsub-case's own track stays reachable. These public mandate operations are\nreads.",
        "operationId": "get-mandate-history",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Embed the typed related resource body.",
            "in": "query",
            "name": "expand",
            "schema": {
              "enum": [
                "history.related_resources"
              ],
              "type": "string"
            }
          },
          {
            "description": "UUID of the accepted case in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return entries changed at or after this timezone-aware RFC 3339 timestamp (inclusive). With it set, results are ordered by change time and then id instead of newest first, page by `cursor` instead of `offset`, and entries changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "mandate-history": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "advance_type": null,
                          "attachments": [],
                          "description": "Please confirm the outstanding amount.",
                          "id": "b0000000-0000-4000-8000-000000000001",
                          "is_advance_request": false,
                          "occurred_at": "2026-07-18T11:05:00Z",
                          "related_resources": [
                            {
                              "body": {
                                "allowed_answer_types": "yes-no-freetext-on-no",
                                "answer": null,
                                "answered": false,
                                "answered_at": null,
                                "created_at": "2026-07-18T11:05:00Z",
                                "description": "We need your confirmation before continuing.",
                                "href": "https://api.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/",
                                "id": "80000000-0000-4000-8000-000000000001",
                                "mandate": {
                                  "href": "https://api.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/",
                                  "id": "50000000-0000-4000-8000-000000000001",
                                  "reference_number": "PW-2026-000123"
                                },
                                "question_attachments": [],
                                "title": "Please confirm the outstanding amount",
                                "updated_at": "2026-07-18T11:05:00Z"
                              },
                              "id": "80000000-0000-4000-8000-000000000001",
                              "type": "request_to_client",
                              "url": "https://api.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/"
                            }
                          ],
                          "source_mandate": {
                            "id": "50000000-0000-4000-8000-000000000001",
                            "reference_number": "PW-2026-000123",
                            "relation": "main_case"
                          },
                          "state": {
                            "legal_stage": {
                              "code": "extrajudicial",
                              "label": "Außergerichtlich",
                              "label_key": "mandate.state.legal_stage.extrajudicial"
                            },
                            "payment": {
                              "code": "unpaid",
                              "label": "Unbezahlt",
                              "label_key": "mandate.state.payment.unpaid"
                            },
                            "processing": {
                              "code": "in_progress",
                              "label": "Laufend",
                              "label_key": "mandate.state.processing.in_progress"
                            }
                          },
                          "text": "Please confirm the outstanding amount.",
                          "title": "Additional information required",
                          "type": "status_update",
                          "updated_at": "2026-07-18T11:05:00Z"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/MandateHistoryPage"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate history",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:mandates:read"
        ]
      }
    },
    "/v2/mandates/{id}/history/{entry_id}/attachments/{file_id}/download/": {
      "get": {
        "description": "Download a file explicitly published with a history entry. The entry must belong to the selected mandate's history: main case plus its subcases for a main-case URL, or only the selected subcase.",
        "operationId": "download-mandate-history-attachment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "History entry UUID.",
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Status attachment UUID.",
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the accepted case in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate history attachment",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:mandates:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/correspondence/": {
      "get": {
        "description": "Debtor correspondence of the case that the creditor may read: the same set the portal shows. `channel` is an open enumeration (`email` today). List rows omit `body` and `attachments`; read the item for both. Items become readable through a status or client-request publication; that moment counts as an update, so `updated_since` returns newly readable items.",
        "operationId": "list-mandate-correspondence",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Only this channel. Unknown channels yield an empty page.",
            "in": "query",
            "name": "channel",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only inbound (received from the debtor) or outbound (sent by paywise) items.",
            "in": "query",
            "name": "direction",
            "schema": {
              "enum": [
                "inbound",
                "outbound"
              ],
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return entries changed at or after this timezone-aware RFC 3339 timestamp (inclusive). With it set, results are ordered by change time and then id instead of newest first, page by `cursor` instead of `offset`, and entries changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "correspondence-list": {
                    "value": {
                      "count": 123,
                      "next": "http://api.example.org/accounts/?offset=400&limit=100",
                      "previous": "http://api.example.org/accounts/?offset=200&limit=100",
                      "results": [
                        {
                          "channel": "email",
                          "direction": "inbound",
                          "email": {
                            "cc": [],
                            "from": "debtor@example.test",
                            "to": [
                              "inkasso@paywise.de"
                            ]
                          },
                          "history_entry_ids": [
                            "f0000000-0000-4000-8000-000000000001"
                          ],
                          "id": "f3000000-0000-4000-8000-000000000001",
                          "occurred_at": "2026-08-27T10:58:00Z",
                          "pdf_url": "https://api-sandbox.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/pdf/",
                          "source_mandate": {
                            "id": "50000000-0000-4000-8000-000000000001",
                            "reference_number": "PW-2026-000042",
                            "relation": "main_case"
                          },
                          "subject": "Ratenzahlung",
                          "updated_at": "2026-08-27T11:05:00Z",
                          "url": "https://api-sandbox.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCorrespondenceListList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandate correspondence",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:correspondence:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/correspondence/{id}/": {
      "get": {
        "description": "Debtor correspondence of one accepted case, read-only.",
        "operationId": "get-mandate-correspondence-item",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the correspondence item in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "correspondence-detail": {
                    "value": {
                      "attachments": [
                        {
                          "download_url": "https://api-sandbox.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/attachments/logical_0123456789abcdef01234567/download/",
                          "filename": "kontoauszug.pdf",
                          "id": "logical_0123456789abcdef01234567",
                          "mime_type": "application/pdf",
                          "size_bytes": 48213,
                          "status": "available"
                        }
                      ],
                      "body": {
                        "complete": true,
                        "quoted_text": null,
                        "text": "Guten Tag, ich möchte in Raten zahlen."
                      },
                      "channel": "email",
                      "direction": "inbound",
                      "email": {
                        "cc": [],
                        "from": "debtor@example.test",
                        "to": [
                          "inkasso@paywise.de"
                        ]
                      },
                      "history_entry_ids": [
                        "f0000000-0000-4000-8000-000000000001"
                      ],
                      "id": "f3000000-0000-4000-8000-000000000001",
                      "occurred_at": "2026-08-27T10:58:00Z",
                      "pdf_url": "https://api-sandbox.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/pdf/",
                      "source_mandate": {
                        "id": "50000000-0000-4000-8000-000000000001",
                        "reference_number": "PW-2026-000042",
                        "relation": "main_case"
                      },
                      "subject": "Ratenzahlung",
                      "updated_at": "2026-08-27T11:05:00Z",
                      "url": "https://api-sandbox.paywise.de/v2/mandates/50000000-0000-4000-8000-000000000001/correspondence/f3000000-0000-4000-8000-000000000001/"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CorrespondenceDetail"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate correspondence item",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:correspondence:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/correspondence/{id}/attachments/{attachment_id}/download/": {
      "get": {
        "description": "Bytes of one attachment. `Content-Type` is detected from the bytes, never taken from the mail. 404 for unknown or unavailable attachments.",
        "operationId": "download-mandate-correspondence-attachment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque attachment identifier from the item's `attachments[].id`.",
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the correspondence item in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate correspondence attachment",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:correspondence:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/correspondence/{id}/pdf/": {
      "get": {
        "description": "Header block and plain text rendered by paywise; the original mail HTML is never rendered. 404 when no body is stored.",
        "operationId": "download-mandate-correspondence-pdf",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the correspondence item in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate correspondence PDF",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:correspondence:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/messages/": {
      "get": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "list-mandate-messages",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMessageReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandate messages",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      },
      "post": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "create-mandate-message",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "message-create": {
                  "value": {
                    "body": "The customer provided an updated invoice address.",
                    "documents": [],
                    "title": "Updated invoice address"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/MessageCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create mandate message",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/messages/{id}/": {
      "get": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "get-mandate-message",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the message in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate message",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      },
      "patch": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "update-mandate-message",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the message in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "message-patch": {
                  "value": {
                    "body": "Correction: the new invoice address applies from 1 August 2026.",
                    "title": "Updated invoice address (corrected)"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedMessagePatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update mandate message",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/messages/{message_id}/documents/": {
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "list-mandate-message-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandate message documents",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      },
      "post": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "create-mandate-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "document-base64": {
                  "value": {
                    "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "examples": {
                "document-multipart": {
                  "value": {
                    "file": "(binary PDF body)",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create mandate message document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/messages/{message_id}/documents/{id}/": {
      "delete": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "delete-mandate-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete mandate message document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      },
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "get-mandate-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate message document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/messages/{message_id}/documents/{id}/download/": {
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "download-mandate-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate message document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/payments/": {
      "get": {
        "description": "Immutable client payment reports under a main mandate or subcase.",
        "operationId": "list-mandate-payments",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPaymentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandate payments",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:payments:read"
        ]
      },
      "post": {
        "description": "Immutable client payment reports under a main mandate or subcase.",
        "operationId": "create-mandate-payment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "payment-report": {
                  "value": {
                    "amount": {
                      "currency": "EUR",
                      "value": "50.00"
                    },
                    "metadata": [
                      {
                        "type": "transaction:reference",
                        "value": "BANK-TRANSACTION-99812"
                      }
                    ],
                    "value_date": "2026-07-17",
                    "your_reference": "BANK-TRANSACTION-99812"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PaymentWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create mandate payment",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:payments:write"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/": {
      "get": {
        "description": "Published questions paywise asks the client about one case.\n\nlist/retrieve, plus `answer` to respond exactly once per request.\nTenant-scoped by the authenticated company; only published requests are\nvisible.",
        "operationId": "list-mandate-requests-to-client",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Whether the client has answered the request. Omit to include both answered and unanswered requests.",
            "in": "query",
            "name": "answered",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRequestToClientReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandate requests to client",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/{id}/": {
      "get": {
        "description": "Published questions paywise asks the client about one case.\n\nlist/retrieve, plus `answer` to respond exactly once per request.\nTenant-scoped by the authenticated company; only published requests are\nvisible.",
        "operationId": "get-mandate-request-to-client",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the client request in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestToClientRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate request to client",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/{id}/answer/": {
      "post": {
        "description": "Published questions paywise asks the client about one case.\n\nlist/retrieve, plus `answer` to respond exactly once per request.\nTenant-scoped by the authenticated company; only published requests are\nvisible.",
        "operationId": "answer-mandate-request-to-client",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the client request in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "request-to-client-answer": {
                  "value": {
                    "additional_comment": "Please continue processing.",
                    "documents": [],
                    "text": "The outstanding amount is correct."
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/AnswerWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestToClientRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranslationKeyError"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Answer mandate request to client",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:write"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/{id}/attachments/{attachment_id}/download/": {
      "get": {
        "description": "Proxy-stream one of the question's case-worker attachments.\n\nAttachments are resolved through the tenant-scoped request itself,\nso a caller can only reach attachments on a request its company owns.",
        "operationId": "download-mandate-request-to-client-attachment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the question attachment to download.",
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the client request in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate request to client attachment",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/{request_id}/answer/documents/": {
      "get": {
        "description": "Documents added to one v2 answer before its review task starts.",
        "operationId": "list-mandate-request-to-client-answer-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List mandate request to client answer documents",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      },
      "post": {
        "description": "Documents added to one v2 answer before its review task starts.",
        "operationId": "create-mandate-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "document-base64": {
                  "value": {
                    "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "examples": {
                "document-multipart": {
                  "value": {
                    "file": "(binary PDF body)",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create mandate request to client answer document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:write"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/{request_id}/answer/documents/{id}/": {
      "delete": {
        "description": "Documents added to one v2 answer before its review task starts.",
        "operationId": "delete-mandate-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete mandate request to client answer document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:write"
        ]
      },
      "get": {
        "description": "Documents added to one v2 answer before its review task starts.",
        "operationId": "get-mandate-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get mandate request to client answer document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/mandates/{mandate_id}/requests-to-client/{request_id}/answer/documents/{id}/download/": {
      "get": {
        "description": "Documents added to one v2 answer before its review task starts.",
        "operationId": "download-mandate-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent accepted case in this request.",
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download mandate request to client answer document",
        "tags": [
          "Mandates"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/orders/": {
      "get": {
        "description": "The collection orders of your company.\n\nCreate a draft with a referenced debtor and embedded claims,\nedit it while it is a draft, finalize it for review, and follow it to\nacceptance. Tenant-scoped by the authenticated company.",
        "operationId": "list-orders",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Created at or after this timestamp (inclusive).",
            "in": "query",
            "name": "created_after",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Created at or before this timestamp (inclusive).",
            "in": "query",
            "name": "created_before",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort fields: debtor `name`, `created`, total claim `amount`, or public order `status`. Prefix a field with `-` for descending order. Defaults to `-created`; `updated_since` uses its synchronization order instead.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A UUID matches the order or its debtor. Otherwise searches debtor names, claim references, document references, and claim subject matter by case-insensitive substring.",
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact public order status, including drafts whose expiry time has passed.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "accepted",
                "awaiting_client_response",
                "draft",
                "expired",
                "merged",
                "rejected",
                "submitted",
                "withdrawn"
              ],
              "type": "string"
            }
          },
          {
            "description": "Exact order variant: `invoice`, `rental`, or `titled`.",
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "invoice",
                "rental",
                "titled"
              ],
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedOrderList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List orders",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "post": {
        "description": "The collection orders of your company.\n\nCreate a draft with a referenced debtor and embedded claims,\nedit it while it is a draft, finalize it for review, and follow it to\nacceptance. Tenant-scoped by the authenticated company.",
        "operationId": "create-order",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "order-create-debtor-reference": {
                  "value": {
                    "additional_debtor_ids": [],
                    "claims": [
                      {
                        "additional_charges": [],
                        "document_date": "2026-06-05",
                        "document_reference": "2026-0042",
                        "documents": [],
                        "due_date": "2026-06-19",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-06-05T09:00:00Z",
                            "title": "Invoice issued",
                            "type": "claim",
                            "your_reference": "2026-0042"
                          }
                        ],
                        "is_disputed": false,
                        "items": [
                          {
                            "description": "Accessibility review",
                            "quantity": "2.5",
                            "unit": "hours",
                            "unit_price": {
                              "currency": "EUR",
                              "value": "40.00"
                            }
                          }
                        ],
                        "legal_basis": {
                          "claim_type_code": "H11",
                          "description": "Consulting agreement of 2026-05-01"
                        },
                        "metadata": [
                          {
                            "type": "comment",
                            "value": "Consulting invoice from the customer portal"
                          }
                        ],
                        "principal_amount": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "reminders": [
                          {
                            "date": "2026-07-01",
                            "due_date": "2026-07-08"
                          }
                        ],
                        "subject_matter": "Website accessibility consulting in June 2026",
                        "type": "receivable",
                        "your_reference": "INV-2026-0042"
                      }
                    ],
                    "creditor_obligation_fulfilled": true,
                    "debtor_id": "40000000-0000-4000-8000-000000000001",
                    "starting_approach": "extrajudicial"
                  }
                },
                "rental-order-inline": {
                  "value": {
                    "additional_debtor_ids": [],
                    "claims": [
                      {
                        "document_date": "2026-02-01",
                        "documents": [
                          {
                            "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                            "filename": "rent-February-2026.pdf",
                            "type": "claim_statement"
                          }
                        ],
                        "is_disputed": false,
                        "legal_basis": {
                          "claim_type_code": "H19"
                        },
                        "principal_amount": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "subject_matter": "Residential rent for February 2026",
                        "type": "receivable",
                        "your_reference": "RENT-2026-02"
                      }
                    ],
                    "creditor_obligation_fulfilled": true,
                    "debtor_id": "40000000-0000-4000-8000-000000000001",
                    "rental_agreement": {
                      "contract_date": "2026-01-10",
                      "documents": [
                        {
                          "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                          "filename": "rental-agreement.pdf",
                          "type": "rental_agreement"
                        }
                      ],
                      "monthly_rent": {
                        "currency": "EUR",
                        "value": "1200.00"
                      },
                      "property_address": {
                        "city": "Berlin",
                        "country": "DE",
                        "postal_code": "10115",
                        "street": "Rental Example Street 8"
                      }
                    },
                    "starting_approach": "extrajudicial",
                    "type": "rental"
                  }
                },
                "rental-order-staged": {
                  "value": {
                    "additional_debtor_ids": [],
                    "claims": [],
                    "creditor_obligation_fulfilled": true,
                    "debtor_id": "40000000-0000-4000-8000-000000000001",
                    "rental_agreement": {
                      "contract_date": "2026-01-10",
                      "monthly_rent": {
                        "currency": "EUR",
                        "value": "2400.00"
                      },
                      "property_address": {
                        "city": "Hamburg",
                        "country": "DE",
                        "postal_code": "20095",
                        "street": "Commercial Example Avenue 3"
                      }
                    },
                    "starting_approach": "extrajudicial",
                    "type": "rental"
                  }
                },
                "titled-order-inline": {
                  "value": {
                    "additional_debtor_ids": [],
                    "claims": [
                      {
                        "enforceable_title": {
                          "amount": {
                            "currency": "EUR",
                            "value": "2500.00"
                          },
                          "documents": [
                            {
                              "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                              "filename": "enforcement-order.pdf",
                              "type": "enforceable_title"
                            }
                          ],
                          "file_number": "12-3456789-0-1",
                          "issued_on": "2026-01-15",
                          "issuing_authority": "Amtsgericht Berlin",
                          "legally_binding_since": "2026-02-01",
                          "served_on": "2026-01-20",
                          "title_type": "enforcement_order"
                        },
                        "is_disputed": false,
                        "subject_matter": "Enforcement title",
                        "type": "titled",
                        "your_reference": "TITLE-2026-0042"
                      }
                    ],
                    "debtor_id": "40000000-0000-4000-8000-000000000001",
                    "success_fee_confirmed": true,
                    "type": "titled"
                  }
                },
                "titled-order-staged": {
                  "value": {
                    "additional_debtor_ids": [],
                    "claims": [],
                    "debtor_id": "40000000-0000-4000-8000-000000000001",
                    "success_fee_confirmed": false,
                    "type": "titled"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/OrderCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "invoice": {
                    "summary": "Invoice order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": null,
                            "contract_date": null,
                            "description": null
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "draft",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "starting_approach": "extrajudicial",
                      "status": "draft",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "invoice",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "rental": {
                    "summary": "Rental order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-02-05",
                          "dispute_reason": null,
                          "document_date": "2026-02-01",
                          "document_reference": null,
                          "documents": [],
                          "due_date": "2026-02-04",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": "H19",
                            "contract_date": "2026-01-10",
                            "description": null
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "1200.00"
                          },
                          "reminders": [],
                          "status": "draft",
                          "subject_matter": "Residential rent for February 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "1200.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "RENT-2026-02"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "rental_agreement": {
                        "contract_date": "2026-01-10",
                        "created_at": "2026-07-18T10:00:00Z",
                        "documents": [],
                        "due_rule": null,
                        "id": "21000000-0000-4000-8000-000000000001",
                        "monthly_rent": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "property_address": {
                          "city": "Berlin",
                          "country": "DE",
                          "postal_code": "10115",
                          "street": "Rental Example Street 8"
                        },
                        "updated_at": "2026-07-18T10:00:00Z"
                      },
                      "starting_approach": "extrajudicial",
                      "status": "draft",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "rental",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "titled": {
                    "summary": "Titled order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "dispute_reason": null,
                          "document_reference": null,
                          "enforceable_title": {
                            "amount": {
                              "currency": "EUR",
                              "value": "2500.00"
                            },
                            "created_at": "2026-07-18T10:00:00Z",
                            "documents": [],
                            "file_number": "12-3456789-0-1",
                            "id": "31000000-0000-4000-8000-000000000001",
                            "issued_on": "2026-01-15",
                            "issuing_authority": "Amtsgericht Berlin",
                            "legally_binding_since": "2026-02-01",
                            "served_on": "2026-01-20",
                            "title_type": "enforcement_order",
                            "updated_at": "2026-07-18T10:00:00Z"
                          },
                          "events": [],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "mandate_id": null,
                          "metadata": [],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": null,
                          "status": "draft",
                          "subject_matter": "Enforcement title",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "2500.00"
                          },
                          "type": "titled",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "TITLE-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "status": "draft",
                      "success_fee_confirmed": true,
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "titled",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create order",
        "tags": [
          "Orders"
        ],
        "x-paywise-request-example-by-response-example": {
          "invoice": "order-create-debtor-reference",
          "rental": "rental-order-inline",
          "titled": "titled-order-inline"
        },
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/orders/{id}/": {
      "delete": {
        "description": "The collection orders of your company.\n\nCreate a draft with a referenced debtor and embedded claims,\nedit it while it is a draft, finalize it for review, and follow it to\nacceptance. Tenant-scoped by the authenticated company.",
        "operationId": "delete-draft-order",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the order in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete draft order",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "get": {
        "description": "The collection orders of your company.\n\nCreate a draft with a referenced debtor and embedded claims,\nedit it while it is a draft, finalize it for review, and follow it to\nacceptance. Tenant-scoped by the authenticated company.",
        "operationId": "get-order",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the order in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "invoice": {
                    "summary": "Invoice order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": null,
                            "contract_date": null,
                            "description": null
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "draft",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "starting_approach": "extrajudicial",
                      "status": "draft",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "invoice",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "rental": {
                    "summary": "Rental order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-02-05",
                          "dispute_reason": null,
                          "document_date": "2026-02-01",
                          "document_reference": null,
                          "documents": [],
                          "due_date": "2026-02-04",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": "H19",
                            "contract_date": "2026-01-10",
                            "description": null
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "1200.00"
                          },
                          "reminders": [],
                          "status": "draft",
                          "subject_matter": "Residential rent for February 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "1200.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "RENT-2026-02"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "rental_agreement": {
                        "contract_date": "2026-01-10",
                        "created_at": "2026-07-18T10:00:00Z",
                        "documents": [],
                        "due_rule": null,
                        "id": "21000000-0000-4000-8000-000000000001",
                        "monthly_rent": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "property_address": {
                          "city": "Berlin",
                          "country": "DE",
                          "postal_code": "10115",
                          "street": "Rental Example Street 8"
                        },
                        "updated_at": "2026-07-18T10:00:00Z"
                      },
                      "starting_approach": "extrajudicial",
                      "status": "draft",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "rental",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "titled": {
                    "summary": "Titled order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "dispute_reason": null,
                          "document_reference": null,
                          "enforceable_title": {
                            "amount": {
                              "currency": "EUR",
                              "value": "2500.00"
                            },
                            "created_at": "2026-07-18T10:00:00Z",
                            "documents": [],
                            "file_number": "12-3456789-0-1",
                            "id": "31000000-0000-4000-8000-000000000001",
                            "issued_on": "2026-01-15",
                            "issuing_authority": "Amtsgericht Berlin",
                            "legally_binding_since": "2026-02-01",
                            "served_on": "2026-01-20",
                            "title_type": "enforcement_order",
                            "updated_at": "2026-07-18T10:00:00Z"
                          },
                          "events": [],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "mandate_id": null,
                          "metadata": [],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": null,
                          "status": "draft",
                          "subject_matter": "Enforcement title",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "2500.00"
                          },
                          "type": "titled",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "TITLE-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "status": "draft",
                      "success_fee_confirmed": true,
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "titled",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get order",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "patch": {
        "description": "Update the order's mutable fields while it is a draft.\n\nA supplied `additional_debtor_ids` array replaces its membership; omit it\nto preserve the links or send `[]` to unlink all additional debtors\nwithout deleting their records. Read full debtor details through\n`GET /v2/debtors/{id}/`.",
        "operationId": "update-order",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the order in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "order-draft-patch": {
                  "value": {
                    "confirmation_email": "billing@example.test",
                    "starting_approach": "extrajudicial"
                  }
                },
                "titled-success-fee-confirmation": {
                  "value": {
                    "success_fee_confirmed": true
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedOrderDecisionPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "invoice": {
                    "summary": "Invoice order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": null,
                            "contract_date": null,
                            "description": null
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "draft",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "starting_approach": "extrajudicial",
                      "status": "draft",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "invoice",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "rental": {
                    "summary": "Rental order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-02-05",
                          "dispute_reason": null,
                          "document_date": "2026-02-01",
                          "document_reference": null,
                          "documents": [],
                          "due_date": "2026-02-04",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": "H19",
                            "contract_date": "2026-01-10",
                            "description": null
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "1200.00"
                          },
                          "reminders": [],
                          "status": "draft",
                          "subject_matter": "Residential rent for February 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "1200.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "RENT-2026-02"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "rental_agreement": {
                        "contract_date": "2026-01-10",
                        "created_at": "2026-07-18T10:00:00Z",
                        "documents": [],
                        "due_rule": null,
                        "id": "21000000-0000-4000-8000-000000000001",
                        "monthly_rent": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "property_address": {
                          "city": "Berlin",
                          "country": "DE",
                          "postal_code": "10115",
                          "street": "Rental Example Street 8"
                        },
                        "updated_at": "2026-07-18T10:00:00Z"
                      },
                      "starting_approach": "extrajudicial",
                      "status": "draft",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "1200.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "rental",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "titled": {
                    "summary": "Titled order",
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "dispute_reason": null,
                          "document_reference": null,
                          "enforceable_title": {
                            "amount": {
                              "currency": "EUR",
                              "value": "2500.00"
                            },
                            "created_at": "2026-07-18T10:00:00Z",
                            "documents": [],
                            "file_number": "12-3456789-0-1",
                            "id": "31000000-0000-4000-8000-000000000001",
                            "issued_on": "2026-01-15",
                            "issuing_authority": "Amtsgericht Berlin",
                            "legally_binding_since": "2026-02-01",
                            "served_on": "2026-01-20",
                            "title_type": "enforcement_order",
                            "updated_at": "2026-07-18T10:00:00Z"
                          },
                          "events": [],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "mandate_id": null,
                          "metadata": [],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": null,
                          "status": "draft",
                          "subject_matter": "Enforcement title",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "2500.00"
                          },
                          "type": "titled",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "TITLE-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": "2026-10-16T10:00:00Z",
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "status": "draft",
                      "success_fee_confirmed": true,
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "2500.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "titled",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update order",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/orders/{id}/finalize/": {
      "post": {
        "description": "Finalize the order: validates the complete aggregate, makes it\nimmutable, and submits it for review. Declares no request body.\nAcceptance happens later during review and is announced via\n`order.accepted`.",
        "operationId": "finalize-order",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the order in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "idempotent-replay": {
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": "H05",
                            "contract_date": "2026-06-01",
                            "description": "Accessibility consulting agreed at EUR 40 per hour."
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "submitted",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": null,
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "starting_approach": "extrajudicial",
                      "status": "submitted",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "invoice",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  },
                  "order-finalize": {
                    "value": {
                      "additional_debtors": [],
                      "claims": [
                        {
                          "additional_charges": [],
                          "additional_charges_amount": {
                            "currency": "EUR",
                            "value": "0.00"
                          },
                          "additional_debtor_ids": [],
                          "created_at": "2026-07-18T10:00:00Z",
                          "debtor_id": "40000000-0000-4000-8000-000000000001",
                          "delay_date": "2026-07-09",
                          "dispute_reason": null,
                          "document_date": "2026-06-05",
                          "document_reference": "2026-0042",
                          "documents": [],
                          "due_date": "2026-06-19",
                          "events": [
                            {
                              "description": null,
                              "location": null,
                              "occurence": "2026-06-05T09:00:00Z",
                              "title": "Invoice issued",
                              "type": "claim",
                              "your_reference": "2026-0042"
                            }
                          ],
                          "id": "30000000-0000-4000-8000-000000000001",
                          "is_disputed": false,
                          "items": [],
                          "legal_basis": {
                            "claim_type_code": "H05",
                            "contract_date": "2026-06-01",
                            "description": "Accessibility consulting agreed at EUR 40 per hour."
                          },
                          "mandate_id": null,
                          "metadata": [
                            {
                              "type": "comment",
                              "value": "Consulting invoice from the customer portal"
                            }
                          ],
                          "order_id": "20000000-0000-4000-8000-000000000001",
                          "payments": [],
                          "principal_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "reminders": [],
                          "status": "submitted",
                          "subject_matter": "Website accessibility consulting in June 2026",
                          "total_amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "type": "receivable",
                          "updated_at": "2026-07-18T10:00:00Z",
                          "your_reference": "INV-2026-0042"
                        }
                      ],
                      "confirmation_email": null,
                      "created_at": "2026-07-18T10:00:00Z",
                      "creditor_obligation_fulfilled": true,
                      "debtor": {
                        "acting_as": "consumer",
                        "events": [
                          {
                            "description": null,
                            "location": null,
                            "occurence": "2026-05-01T09:00:00Z",
                            "title": "Customer registered",
                            "type": "registration",
                            "your_reference": null
                          }
                        ],
                        "id": "40000000-0000-4000-8000-000000000001",
                        "legal_form": null,
                        "metadata": [
                          {
                            "type": "user:reference",
                            "value": "CUSTOMER-1001"
                          }
                        ],
                        "organization": null,
                        "person": {
                          "birth_date": null,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "salutation": "mx"
                        },
                        "your_reference": "CUSTOMER-1001"
                      },
                      "expires_at": null,
                      "id": "20000000-0000-4000-8000-000000000001",
                      "mandate": null,
                      "merged_into": null,
                      "rejection": null,
                      "starting_approach": "extrajudicial",
                      "status": "submitted",
                      "totals": {
                        "charges": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "main_claims": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "order_value": {
                          "currency": "EUR",
                          "value": "100.00"
                        },
                        "payments": {
                          "currency": "EUR",
                          "value": "0.00"
                        }
                      },
                      "type": "invoice",
                      "updated_at": "2026-07-18T10:00:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Finalize order",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/orders/{id}/withdraw/": {
      "post": {
        "description": "Withdraw one submitted order before staff acceptance starts.",
        "operationId": "withdraw-order",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the order in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "order-withdraw": {
                  "value": {
                    "reason": "The customer paid before review began."
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/OrderWithdrawRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Withdraw order",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/orders/{order_id}/messages/": {
      "get": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "list-order-messages",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMessageReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List order messages",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      },
      "post": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "create-order-message",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "message-create": {
                  "value": {
                    "body": "The customer provided an updated invoice address.",
                    "documents": [],
                    "title": "Updated invoice address"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/MessageCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create order message",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      }
    },
    "/v2/orders/{order_id}/messages/{id}/": {
      "get": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "get-order-message",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the message in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get order message",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      },
      "patch": {
        "description": "Messages exchanged with paywise about one order or one case.",
        "operationId": "update-order-message",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the message in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "message-patch": {
                  "value": {
                    "body": "Correction: the new invoice address applies from 1 August 2026.",
                    "title": "Updated invoice address (corrected)"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedMessagePatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update order message",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      }
    },
    "/v2/orders/{order_id}/messages/{message_id}/documents/": {
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "list-order-message-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List order message documents",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      },
      "post": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "create-order-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "document-base64": {
                  "value": {
                    "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "examples": {
                "document-multipart": {
                  "value": {
                    "file": "(binary PDF body)",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create order message document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      }
    },
    "/v2/orders/{order_id}/messages/{message_id}/documents/{id}/": {
      "delete": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "delete-order-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete order message document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:write"
        ]
      },
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "get-order-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get order message document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      }
    },
    "/v2/orders/{order_id}/messages/{message_id}/documents/{id}/download/": {
      "get": {
        "description": "Documents below one parent resource: upload, list, download, delete.",
        "operationId": "download-order-message-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent message in this request.",
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download order message document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:messages:read"
        ]
      }
    },
    "/v2/orders/{order_id}/rental-agreement/": {
      "get": {
        "description": "Tenant-scoped resource collection of the authenticated company.",
        "operationId": "get-rental-agreement",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalAgreementRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get rental agreement",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "patch": {
        "description": "Tenant-scoped resource collection of the authenticated company.",
        "operationId": "update-rental-agreement",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "rental-agreement-due-rule": {
                  "value": {
                    "due_rule": {
                      "day": 5,
                      "kind": "business_day"
                    }
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedRentalAgreementWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RentalAgreementRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update rental agreement",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/orders/{order_id}/rental-agreement/documents/": {
      "get": {
        "description": "Documents owned by a rental order's agreement singleton.",
        "operationId": "list-rental-agreement-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List rental agreement documents",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      },
      "post": {
        "description": "Documents owned by a rental order's agreement singleton.",
        "operationId": "create-rental-agreement-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RentalAgreementDocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RentalAgreementDocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create rental agreement document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      }
    },
    "/v2/orders/{order_id}/rental-agreement/documents/{id}/": {
      "delete": {
        "description": "Documents owned by a rental order's agreement singleton.",
        "operationId": "delete-rental-agreement-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  },
                  "order-expired": {
                    "value": {
                      "code": "order_expired",
                      "detail": "The draft order has expired and can no longer be changed."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete rental agreement document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:write"
        ]
      },
      "get": {
        "description": "Documents owned by a rental order's agreement singleton.",
        "operationId": "get-rental-agreement-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get rental agreement document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      }
    },
    "/v2/orders/{order_id}/rental-agreement/documents/{id}/download/": {
      "get": {
        "description": "Documents owned by a rental order's agreement singleton.",
        "operationId": "download-rental-agreement-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download rental agreement document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:orders:read"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/": {
      "get": {
        "description": "Published questions about one order, including orders awaiting review.\n\nAnswer once using the advertised answer type. Closed orders reject answers\nwith 409. Review resumes after all published requests are answered.\nDocuments become downloadable when ready. Only the authenticated company's published requests\nare visible.",
        "operationId": "list-order-requests-to-client",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Whether the client has answered the request. Omit to include both answered and unanswered requests.",
            "in": "query",
            "name": "answered",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedOrderRequestToClientReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List order requests to client",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/{id}/": {
      "get": {
        "description": "Published questions about one order, including orders awaiting review.\n\nAnswer once using the advertised answer type. Closed orders reject answers\nwith 409. Review resumes after all published requests are answered.\nDocuments become downloadable when ready. Only the authenticated company's published requests\nare visible.",
        "operationId": "get-order-request-to-client",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the client request in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderRequestToClientRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get order request to client",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/{id}/answer/": {
      "post": {
        "description": "Published questions about one order, including orders awaiting review.\n\nAnswer once using the advertised answer type. Closed orders reject answers\nwith 409. Review resumes after all published requests are answered.\nDocuments become downloadable when ready. Only the authenticated company's published requests\nare visible.",
        "operationId": "answer-order-request-to-client",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the client request in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "order-request-to-client-answer": {
                  "value": {
                    "additional_comment": "The invoice is correct.",
                    "documents": [],
                    "text": "yes"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/AnswerWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderRequestToClientRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranslationKeyError"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Answer order request to client",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:write"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/{id}/attachments/{attachment_id}/download/": {
      "get": {
        "description": "Proxy-stream one of the question's case-worker attachments.\n\nAttachments are resolved through the tenant-scoped request itself,\nso a caller can only reach attachments on a request its company owns.",
        "operationId": "download-order-request-to-client-attachment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ID of the question attachment to download.",
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the client request in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download order request to client attachment",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/{request_id}/answer/documents/": {
      "get": {
        "description": "Documents on an order request answer, editable until staff review starts.",
        "operationId": "list-order-request-to-client-answer-documents",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDocumentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List order request to client answer documents",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      },
      "post": {
        "description": "Documents on an order request answer, editable until staff review starts.",
        "operationId": "create-order-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "document-base64": {
                  "value": {
                    "base64": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMTAwXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE4NgolJUVPRgo=",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            },
            "multipart/form-data": {
              "examples": {
                "document-multipart": {
                  "value": {
                    "file": "(binary PDF body)",
                    "filename": "invoice-2026-0042.pdf",
                    "type": "invoice"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/DocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create order request to client answer document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:write"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/{request_id}/answer/documents/{id}/": {
      "delete": {
        "description": "Documents on an order request answer, editable until staff review starts.",
        "operationId": "delete-order-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete order request to client answer document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:write"
        ]
      },
      "get": {
        "description": "Documents on an order request answer, editable until staff review starts.",
        "operationId": "get-order-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get order request to client answer document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/orders/{order_id}/requests-to-client/{request_id}/answer/documents/{id}/download/": {
      "get": {
        "description": "Documents on an order request answer, editable until staff review starts.",
        "operationId": "download-order-request-to-client-answer-document",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the document in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent order in this request.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the parent client request in this request.",
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download order request to client answer document",
        "tags": [
          "Orders"
        ],
        "x-required-scopes": [
          "case:requests_to_client:read"
        ]
      }
    },
    "/v2/payments/": {
      "get": {
        "description": "Read-only top-level payment collection.",
        "operationId": "list-payments",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return payments assigned to this claim UUID.",
            "in": "query",
            "name": "claim",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Return payments assigned to this accepted case UUID.",
            "in": "query",
            "name": "mandate",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Payment value date on or after this date (inclusive).",
            "in": "query",
            "name": "value_date_after",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Payment value date on or before this date (inclusive).",
            "in": "query",
            "name": "value_date_before",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of your payment reference.",
            "in": "query",
            "name": "your_reference",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPaymentReadList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List payments",
        "tags": [
          "Payments"
        ],
        "x-required-scopes": [
          "case:payments:read"
        ]
      }
    },
    "/v2/payments/{id}/": {
      "get": {
        "description": "Read-only top-level payment collection.",
        "operationId": "get-payment",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the payment in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get payment",
        "tags": [
          "Payments"
        ],
        "x-required-scopes": [
          "case:payments:read"
        ]
      }
    },
    "/v2/single-mandate-statements/": {
      "get": {
        "description": "Published per-case settlements (Aktenabrechnungen) and their PDF.",
        "operationId": "list-single-mandate-statements",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Booked on exactly this date.",
            "in": "query",
            "name": "booking_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Booking date on or after this date (inclusive).",
            "in": "query",
            "name": "booking_date_from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Booking date on or before this date (inclusive).",
            "in": "query",
            "name": "booking_date_to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Exact clearing number.",
            "in": "query",
            "name": "clearing_no",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact invoice number.",
            "in": "query",
            "name": "invoice_no",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Return statements for this accepted case UUID.",
            "in": "query",
            "name": "mandate",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort fields: `booking_date`, `period_start`, `period_end`, `created`, `updated`, `clearing_no`, or `invoice_no`. Prefix a field with `-` for descending order. Defaults to `-created`; `updated_since` uses its synchronization order instead.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact paywise case reference recorded on the statement.",
            "in": "query",
            "name": "reference_number",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Statement kind: interim, final, expenses invoice, transition to long-term monitoring, or negative closing. Use the corresponding enum value.",
            "in": "query",
            "name": "statement_type",
            "schema": {
              "enum": [
                "expenses_invoice",
                "final",
                "interim",
                "negative_closing",
                "transition_to_longtime_monitoring"
              ],
              "type": "string"
            }
          },
          {
            "description": "Return `published` statements that have not been cancelled, or `cancelled` statements.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "cancelled",
                "published"
              ],
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exact client reference recorded on the statement.",
            "in": "query",
            "name": "your_reference",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSingleMandateStatementListList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List single mandate statements",
        "tags": [
          "Single mandate statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/single-mandate-statements/{id}/": {
      "get": {
        "description": "Published per-case settlements (Aktenabrechnungen) and their PDF.",
        "operationId": "get-single-mandate-statement",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the per-case statement in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "single-mandate-statement": {
                    "value": {
                      "booking_date": "2026-07-15",
                      "cancelled_at": null,
                      "clearing_no": "A2026/000123",
                      "comment": null,
                      "created_at": "2026-07-15T06:00:00Z",
                      "file": {
                        "download_url": "https://api.paywise.de/v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/download/",
                        "filename": "aktenabrechnung_A2026-000123.pdf",
                        "media_type": "application/pdf"
                      },
                      "financials": {
                        "cost_burden": null,
                        "open_principal_claim": {
                          "currency": "EUR",
                          "value": "400.00"
                        },
                        "principal_claims": [
                          {
                            "amount": {
                              "currency": "EUR",
                              "value": "500.00"
                            },
                            "voucher_date": "2026-05-01",
                            "voucher_no": "RE-2026-001"
                          }
                        ],
                        "principal_claims_total": {
                          "currency": "EUR",
                          "value": "500.00"
                        },
                        "total_balance": {
                          "currency": "EUR",
                          "value": "81.00"
                        },
                        "vat_entries": [
                          {
                            "allocation_to_client_costs": null,
                            "allocation_to_client_expenses": null,
                            "allocation_to_default_interest": null,
                            "allocation_to_fee": {
                              "currency": "EUR",
                              "value": "15.97"
                            },
                            "allocation_to_fee_vat": {
                              "currency": "EUR",
                              "value": "3.03"
                            },
                            "allocation_to_main_claim": {
                              "currency": "EUR",
                              "value": "81.00"
                            },
                            "allocation_to_overpayment": null,
                            "allocation_to_success_commission": null,
                            "allocation_to_success_commission_vat": null,
                            "allocation_to_tax_free_expenses": null,
                            "allocation_to_taxable_expenses": null,
                            "allocation_to_taxable_expenses_vat": null,
                            "instalment_payments_to_client": null,
                            "payments_to_client": null,
                            "payments_to_dca": {
                              "currency": "EUR",
                              "value": "100.00"
                            },
                            "payout": {
                              "currency": "EUR",
                              "value": "81.00"
                            },
                            "total_payments": {
                              "currency": "EUR",
                              "value": "100.00"
                            },
                            "vat_rate": "0.19"
                          }
                        ]
                      },
                      "id": "a0000000-0000-4000-8000-000000000002",
                      "invoice_no": "R2026/000456",
                      "mandate": {
                        "id": "50000000-0000-4000-8000-000000000001",
                        "reference_number": "K26-757P3"
                      },
                      "payout_method": "transfer",
                      "period_end": "2026-06-30",
                      "period_start": "2026-06-01",
                      "pre_tax_deductible": true,
                      "reference_number": "K26-757P3",
                      "statement_type": "interim",
                      "status": "published",
                      "updated_at": "2026-07-15T06:00:00Z",
                      "your_reference": "W00150540"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SingleMandateStatementRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get single mandate statement",
        "tags": [
          "Single mandate statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/single-mandate-statements/{id}/download/": {
      "get": {
        "description": "Proxy the stored PDF without disclosing its storage location.",
        "operationId": "download-single-mandate-statement-pdf",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the per-case statement in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The Aktenabrechnung PDF as an authenticated attachment.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download single mandate statement PDF",
        "tags": [
          "Single mandate statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/statements/": {
      "get": {
        "description": "Published payout statements and their customer-visible breakdown.",
        "operationId": "list-statements",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Booking date on or after this date (inclusive).",
            "in": "query",
            "name": "booking_date_from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Booking date on or before this date (inclusive).",
            "in": "query",
            "name": "booking_date_to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Exact clearing number.",
            "in": "query",
            "name": "clearing_no",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact invoice number.",
            "in": "query",
            "name": "invoice_no",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Statements that include the accepted case with this paywise reference number, exact match.",
            "in": "query",
            "name": "mandate_reference_number",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated sort fields: `booking_date`, `period_start`, `period_end`, `created`, `updated`, `clearing_no`, or `invoice_no`. Prefix a field with `-` for descending order. Defaults to `-created`; `updated_since` uses its synchronization order instead.",
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Statement period ends on or after this date (inclusive).",
            "in": "query",
            "name": "period_end_from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Statement period ends on or before this date (inclusive).",
            "in": "query",
            "name": "period_end_to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Statement period starts on or after this date (inclusive).",
            "in": "query",
            "name": "period_start_from",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Statement period starts on or before this date (inclusive).",
            "in": "query",
            "name": "period_start_to",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "A UUID matches the statement. Otherwise searches clearing number, invoice number, and company name by case-insensitive substring. Related case, claim, and document references use exact, case-insensitive matches.",
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Return `published` statements that have not been cancelled, or `cancelled` statements.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "cancelled",
                "published"
              ],
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStatementListList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List statements",
        "tags": [
          "Statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/statements/{id}/": {
      "get": {
        "description": "Published payout statements and their customer-visible breakdown.",
        "operationId": "get-statement",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the statement in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "statement": {
                    "value": {
                      "booking_date": "2026-07-01",
                      "cancelled_at": null,
                      "clearing_no": "CLEARING-000042",
                      "comment": "June clearing run",
                      "created_at": "2026-07-01T06:00:00Z",
                      "files": [
                        {
                          "download_url": "https://api.paywise.de/v2/statements/a0000000-0000-4000-8000-000000000001/download/?type=full-pdf",
                          "filename": "statement_CLEARING-000042.pdf",
                          "media_type": "application/pdf",
                          "type": "full-pdf"
                        }
                      ],
                      "financials": {
                        "balance_before_outstanding_items_offsetting": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "outstanding_items_offset": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "total_balance": {
                          "currency": "EUR",
                          "value": "0.00"
                        },
                        "vat_entries": []
                      },
                      "id": "a0000000-0000-4000-8000-000000000001",
                      "invoice_no": "STATEMENT-000042",
                      "mandate_count": 2,
                      "mandates": [
                        {
                          "amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "closing": null,
                          "cost_burden": [],
                          "created_at": "2026-06-15T11:00:00Z",
                          "debtor": {
                            "acting_as": "consumer",
                            "events": [
                              {
                                "description": null,
                                "location": null,
                                "occurence": "2026-05-01T09:00:00Z",
                                "title": "Customer registered",
                                "type": "registration",
                                "your_reference": null
                              }
                            ],
                            "legal_form": null,
                            "metadata": [
                              {
                                "type": "user:reference",
                                "value": "CUSTOMER-1001"
                              }
                            ],
                            "organization": null,
                            "person": {
                              "birth_date": null,
                              "first_name": "Alex",
                              "last_name": "Example",
                              "salutation": "mx"
                            },
                            "your_reference": "CUSTOMER-1001"
                          },
                          "id": "50000000-0000-4000-8000-000000000003",
                          "reference_number": "PW-2026-000121",
                          "related_statements": [],
                          "state": {
                            "legal_stage": {
                              "code": "extrajudicial",
                              "label": "Außergerichtlich",
                              "label_key": "mandate.state.legal_stage.extrajudicial"
                            },
                            "payment": {
                              "code": "unpaid",
                              "label": "Unbezahlt",
                              "label_key": "mandate.state.payment.unpaid"
                            },
                            "processing": {
                              "code": "in_progress",
                              "label": "Laufend",
                              "label_key": "mandate.state.processing.in_progress"
                            }
                          },
                          "third_party_money": []
                        },
                        {
                          "amount": {
                            "currency": "EUR",
                            "value": "100.00"
                          },
                          "closing": null,
                          "cost_burden": [],
                          "created_at": "2026-06-15T11:00:00Z",
                          "debtor": {
                            "acting_as": "consumer",
                            "events": [
                              {
                                "description": null,
                                "location": null,
                                "occurence": "2026-05-01T09:00:00Z",
                                "title": "Customer registered",
                                "type": "registration",
                                "your_reference": null
                              }
                            ],
                            "legal_form": null,
                            "metadata": [
                              {
                                "type": "user:reference",
                                "value": "CUSTOMER-1001"
                              }
                            ],
                            "organization": null,
                            "person": {
                              "birth_date": null,
                              "first_name": "Alex",
                              "last_name": "Example",
                              "salutation": "mx"
                            },
                            "your_reference": "CUSTOMER-1001"
                          },
                          "id": "50000000-0000-4000-8000-000000000004",
                          "reference_number": "PW-2026-000122",
                          "related_statements": [],
                          "state": {
                            "legal_stage": {
                              "code": "extrajudicial",
                              "label": "Außergerichtlich",
                              "label_key": "mandate.state.legal_stage.extrajudicial"
                            },
                            "payment": {
                              "code": "unpaid",
                              "label": "Unbezahlt",
                              "label_key": "mandate.state.payment.unpaid"
                            },
                            "processing": {
                              "code": "in_progress",
                              "label": "Laufend",
                              "label_key": "mandate.state.processing.in_progress"
                            }
                          },
                          "third_party_money": []
                        }
                      ],
                      "period_end": "2026-06-30",
                      "period_start": "2026-06-01",
                      "published_at": "2026-07-01T06:00:00Z",
                      "status": "published",
                      "updated_at": "2026-07-01T06:00:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/StatementRead"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get statement",
        "tags": [
          "Statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/statements/{id}/download/": {
      "get": {
        "description": "Proxy one stored statement file without disclosing its storage location.\n\nThe type parameter selects the PDF (default) or one of the three\nExcel exports; a type whose file has not been transferred is 404.",
        "operationId": "download-statement",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the statement in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Which file to download: full-pdf (the statement document, the default), third-party-money-xlsx (Fremdgeldabrechnung), cost-burden-xlsx (Kostenbelastung) or closing-xlsx (Abschlussmeldungen). Each type is listed in the statement's files array once it is available.",
            "in": "query",
            "name": "type",
            "schema": {
              "default": "full-pdf",
              "enum": [
                "closing-xlsx",
                "cost-burden-xlsx",
                "full-pdf",
                "third-party-money-xlsx"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The statement PDF as an authenticated attachment.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The document storage is temporarily unavailable (`service_unavailable`); retry after `Retry-After` seconds.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying; the document storage was temporarily unavailable.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Download statement",
        "tags": [
          "Statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/statements/{id}/mandates/": {
      "get": {
        "description": "Page through the accepted cases included in one statement.\n\nSame rows as the mandates array of the statement detail, with\nlimit/offset pagination and filters on the case and claim references.",
        "operationId": "list-statement-cases",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of any claim document reference in the case, usually your invoice number.",
            "in": "query",
            "name": "document_reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the statement in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Case-insensitive substring of the paywise case reference.",
            "in": "query",
            "name": "reference_number",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Case-insensitive substring of any claim reference in the case, such as your order or contract reference.",
            "in": "query",
            "name": "your_reference",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementMandateRowPage"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List statement cases",
        "tags": [
          "Statements"
        ],
        "x-required-scopes": [
          "case:statements:read"
        ]
      }
    },
    "/v2/usage/": {
      "get": {
        "description": "Return an authoritative point-in-time snapshot of every rate-limit bucket applicable to the authenticated Case credential. The call itself counts against each applicable principal bucket: the token, the Partner for delegated traffic, and the active company.",
        "operationId": "get-rate-limit-headroom",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "EmptyOperationScopes": {
                    "description": "A Case credential with no operation scopes has only its principal buckets; the usage call itself is counted.",
                    "summary": "Empty operation scopes",
                    "value": {
                      "generated_at": "2026-07-17T10:00:00Z",
                      "limits": [
                        {
                          "limit": 600,
                          "remaining": 599,
                          "resets_at": "2026-07-17T10:01:00Z",
                          "scope": "token",
                          "used": 1,
                          "window_seconds": 60
                        },
                        {
                          "limit": 600,
                          "remaining": 599,
                          "resets_at": "2026-07-17T10:01:00Z",
                          "scope": "company",
                          "used": 1,
                          "window_seconds": 60
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get rate-limit headroom",
        "tags": [
          "Usage"
        ],
        "x-required-scopes": []
      }
    },
    "/v2/webhook-deliveries/": {
      "get": {
        "description": "Read-only webhook delivery log, plus manual redelivery.",
        "operationId": "list-webhook-deliveries",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact Case event type.",
            "in": "query",
            "name": "event_type",
            "schema": {
              "enum": [
                "order.submitted",
                "order.withdrawn",
                "order.rejected",
                "order.accepted",
                "order.expired",
                "mandate.created",
                "mandate.state.changed",
                "mandate.status_update.published",
                "mandate.balance_updated",
                "order.message.created",
                "mandate.message.created",
                "request_to_client.created",
                "request_to_client.answered",
                "payment.reported",
                "statement.published",
                "statement.cancelled",
                "single_mandate_statement.published",
                "single_mandate_statement.cancelled",
                "mandate.correspondence.published",
                "invoice.created",
                "invoice.paid",
                "invoice.cancelled",
                "invoice.written_off",
                "invoice.reopened",
                "dunning.level_advanced",
                "dunning.handed_to_collection"
              ],
              "type": "string"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Exact delivery state: `pending`, `delivering`, `retrying`, `success`, or `failed`.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "delivering",
                "failed",
                "pending",
                "retrying",
                "success"
              ],
              "type": "string"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Return only deliveries for this webhook subscription's UUID.",
            "in": "query",
            "name": "webhook",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWebhookDeliveryList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List webhook deliveries",
        "tags": [
          "Webhook deliveries"
        ],
        "x-required-scopes": [
          "case:webhooks:read"
        ]
      }
    },
    "/v2/webhook-deliveries/{id}/": {
      "get": {
        "description": "Read-only webhook delivery log, plus manual redelivery.",
        "operationId": "get-webhook-delivery",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook delivery in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get webhook delivery",
        "tags": [
          "Webhook deliveries"
        ],
        "x-required-scopes": [
          "case:webhooks:read"
        ]
      }
    },
    "/v2/webhook-deliveries/{id}/redeliver/": {
      "post": {
        "description": "Read-only webhook delivery log, plus manual redelivery.",
        "operationId": "redeliver-webhook-delivery",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook delivery in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseWebhookCommandResult"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Redeliver webhook delivery",
        "tags": [
          "Webhook deliveries"
        ],
        "x-required-scopes": [
          "case:webhooks:write"
        ]
      }
    },
    "/v2/webhooks/": {
      "get": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "list-webhooks",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation cursor for incremental synchronization, taken from the `next` URL of a previous page. Only valid together with `updated_since`: with `updated_since` set the list is ordered by change time and then id and pages by this cursor instead of `offset`, so a row that changes while you page is returned again later instead of pushing another row out of the result. Rows changed less than 60 seconds ago are held back until they are settled; use the largest `updated_at` you received as the next `updated_since`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Whether the webhook subscription is enabled. Omit to include both enabled and disabled subscriptions.",
            "in": "query",
            "name": "enabled",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Number of results to return (maximum 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Zero-based result offset. Cannot be combined with `updated_since`; follow the `next` URL (`cursor`) instead.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return rows changed at or after this timezone-aware RFC 3339 timestamp. Results are ordered by updated_at and id (a requested `ordering` is ignored), page by `cursor` instead of `offset`, and rows changed less than a minute ago are held back.",
            "in": "query",
            "name": "updated_since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWebhookList"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "List webhooks",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:read"
        ]
      },
      "post": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "create-webhook",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-create": {
                  "value": {
                    "description": "Primary integration webhook",
                    "enabled": true,
                    "events": [
                      "mandate.created",
                      "payment.reported"
                    ],
                    "url": "https://hooks.example.test/paywise"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseWebhookWithSecret"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Create webhook",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:write"
        ]
      }
    },
    "/v2/webhooks/{id}/": {
      "delete": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "delete-webhook",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook subscription in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No response body",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Delete webhook",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:write"
        ]
      },
      "get": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "get-webhook",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook subscription in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Return 304 with an empty body when the current `ETag` matches one of the supplied validators (or `*`).",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` validator still matches.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Get webhook",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:read"
        ]
      },
      "patch": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "update-webhook",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook subscription in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Apply the change only while the current `ETag` matches one of the supplied validators (or `*`); otherwise the request fails with `412 precondition_failed` and nothing is written.",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-patch": {
                  "value": {
                    "description": "Primary integration webhook (now with statements)",
                    "events": [
                      "mandate.created",
                      "payment.reported",
                      "statement.published"
                    ]
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PatchedWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong validator of this representation. Send it back as `If-None-Match` to skip an unchanged re-read (304) or as `If-Match` on PATCH/PUT/DELETE to fail with 412 when the resource changed.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Update webhook",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:write"
        ]
      }
    },
    "/v2/webhooks/{id}/rotate-secret/": {
      "post": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "rotate-webhook-secret",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook subscription in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseWebhookWithSecret"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Rotate webhook secret",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:write"
        ]
      }
    },
    "/v2/webhooks/{id}/test/": {
      "post": {
        "description": "Company-scoped webhook endpoint management.",
        "operationId": "test-webhook",
        "parameters": [
          {
            "description": "Required when a Partner key calls the Case Management API; rejected for direct Case keys. Contains the entitled paywise company UUID.",
            "in": "header",
            "name": "X-On-Behalf-Of-Company",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "UUID of the webhook subscription in this request.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-test": {
                  "value": {
                    "event": "payment.reported"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/CaseWebhookTestEventRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseWebhookCommandResult"
                }
              }
            },
            "description": "",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "validation-error": {
                    "value": {
                      "code": "validation_error",
                      "detail": "The request contains invalid data.",
                      "errors": [
                        {
                          "code": "invalid",
                          "field": "claims[0].due_date",
                          "message": "Due date must not precede the document date."
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "authentication-error": {
                    "value": {
                      "code": "not_authenticated",
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not-found-error": {
                    "value": {
                      "code": "not_found",
                      "detail": "The requested resource was not found."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict-error": {
                    "value": {
                      "code": "conflict",
                      "detail": "The resource changed state and cannot accept this command."
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Integer seconds to wait before retrying a throttled request.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Standard error response.",
            "headers": {
              "Cache-Control": {
                "description": "Cacheability directive. Authenticated responses use `private, no-store`; the legal-form catalog may use `private, max-age=86400`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Paywise-Environment": {
                "description": "Environment that produced the response.",
                "schema": {
                  "enum": [
                    "production",
                    "sandbox"
                  ],
                  "type": "string"
                }
              },
              "X-Paywise-Request-Id": {
                "description": "Fresh server-assigned correlation id for this response. Caller-provided request ids are ignored.",
                "schema": {
                  "format": "uuid",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "caseBearerAuth": []
          },
          {
            "partnerBearerAuth": []
          }
        ],
        "summary": "Test webhook",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "case:webhooks:write"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production environment",
      "url": "https://api.paywise.de"
    },
    {
      "description": "Sandbox environment",
      "url": "https://api-sandbox.paywise.de"
    }
  ],
  "tags": [
    {
      "description": "Submit orders and manage them until acceptance.",
      "name": "Orders"
    },
    {
      "description": "Stable claim resources and their current relationships.",
      "name": "Claims"
    },
    {
      "description": "Accepted cases: state, published history and documents.",
      "name": "Mandates"
    },
    {
      "description": "Debtor master data reused across orders.",
      "name": "Debtors"
    },
    {
      "description": "Payments reported by you and booked by paywise.",
      "name": "Payments"
    },
    {
      "description": "Files attached to claims and other resources.",
      "name": "Documents"
    },
    {
      "description": "Collective statements (Sammelabrechnungen).",
      "name": "Statements"
    },
    {
      "description": "Per-case statements (Aktenabrechnungen).",
      "name": "Single mandate statements"
    },
    {
      "description": "Webhook endpoints and their signing secrets.",
      "name": "Webhooks"
    },
    {
      "description": "Delivery log and redelivery of webhook events.",
      "name": "Webhook deliveries"
    },
    {
      "description": "Ordered feed of the events webhooks deliver.",
      "name": "Events"
    },
    {
      "description": "Reference catalog of legal forms.",
      "name": "Legal forms"
    },
    {
      "description": "The authenticated credential and its context.",
      "name": "Info"
    },
    {
      "description": "Rate-limit headroom of the credential.",
      "name": "Usage"
    },
    {
      "description": "Availability of the API.",
      "name": "Health"
    }
  ]
}
