{
  "components": {
    "parameters": {},
    "schemas": {
      "AddressList": {
        "properties": {
          "addresses": {
            "items": {
              "properties": {
                "house": {
                  "description": "Адрес указан с точностью до дома: только такой адрес определяет суд",
                  "type": "boolean"
                },
                "place": {
                  "description": "Населённый пункт и район",
                  "type": "string"
                },
                "value": {
                  "description": "Адрес",
                  "type": "string"
                }
              },
              "required": [
                "value",
                "place",
                "house"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "addresses"
        ],
        "type": "object"
      },
      "Calculation": {
        "allOf": [
          {
            "oneOf": [
              {
                "properties": {
                  "input": {
                    "$ref": "#/components/schemas/StateFeeInput"
                  },
                  "kind": {
                    "enum": [
                      "state-fee"
                    ],
                    "type": "string"
                  },
                  "result": {
                    "$ref": "#/components/schemas/StateFeeResult"
                  }
                },
                "required": [
                  "kind",
                  "input",
                  "result"
                ],
                "type": "object"
              },
              {
                "properties": {
                  "input": {
                    "$ref": "#/components/schemas/PenaltyInput"
                  },
                  "kind": {
                    "enum": [
                      "penalty"
                    ],
                    "type": "string"
                  },
                  "result": {
                    "$ref": "#/components/schemas/PenaltyResult"
                  }
                },
                "required": [
                  "kind",
                  "input",
                  "result"
                ],
                "type": "object"
              },
              {
                "properties": {
                  "input": {
                    "$ref": "#/components/schemas/IndexationInput"
                  },
                  "kind": {
                    "enum": [
                      "indexation"
                    ],
                    "type": "string"
                  },
                  "result": {
                    "$ref": "#/components/schemas/IndexationResult"
                  }
                },
                "required": [
                  "kind",
                  "input",
                  "result"
                ],
                "type": "object"
              },
              {
                "properties": {
                  "input": {
                    "$ref": "#/components/schemas/JurisdictionInput"
                  },
                  "kind": {
                    "enum": [
                      "jurisdiction"
                    ],
                    "type": "string"
                  },
                  "result": {
                    "$ref": "#/components/schemas/JurisdictionResult"
                  }
                },
                "required": [
                  "kind",
                  "input",
                  "result"
                ],
                "type": "object"
              }
            ]
          },
          {
            "properties": {
              "amount": {
                "description": "Итог расчёта в рублях",
                "type": "number"
              },
              "id": {
                "description": "Идентификатор расчёта",
                "format": "uuid",
                "type": "string"
              },
              "name": {
                "description": "Название; null — несохранённый расчёт из недавних",
                "type": [
                  "string",
                  "null"
                ]
              },
              "saved_at": {
                "description": "Когда расчёт сохранён, ISO 8601",
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "description": "Когда расчёт изменён, ISO 8601",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "amount",
              "saved_at",
              "updated_at"
            ],
            "type": "object"
          },
          {
            "properties": {
              "payment": {
                "$ref": "#/components/schemas/PaymentDetails"
              }
            },
            "required": [
              "payment"
            ],
            "type": "object"
          }
        ]
      },
      "CalculationCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CalculationDraft"
          },
          {
            "properties": {
              "name": {
                "description": "Название сохранённого расчёта",
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "CalculationDraft": {
        "oneOf": [
          {
            "properties": {
              "input": {
                "$ref": "#/components/schemas/StateFeeInput"
              },
              "kind": {
                "enum": [
                  "state-fee"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "input"
            ],
            "type": "object"
          },
          {
            "properties": {
              "input": {
                "$ref": "#/components/schemas/PenaltyInput"
              },
              "kind": {
                "enum": [
                  "penalty"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "input"
            ],
            "type": "object"
          },
          {
            "properties": {
              "input": {
                "$ref": "#/components/schemas/IndexationInput"
              },
              "kind": {
                "enum": [
                  "indexation"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "input"
            ],
            "type": "object"
          },
          {
            "properties": {
              "input": {
                "$ref": "#/components/schemas/JurisdictionInput"
              },
              "kind": {
                "enum": [
                  "jurisdiction"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "input"
            ],
            "type": "object"
          }
        ]
      },
      "CalculationList": {
        "properties": {
          "recent": {
            "description": "Несохранённые расчёты за последнюю неделю, не больше пяти",
            "items": {
              "$ref": "#/components/schemas/CalculationSummary"
            },
            "type": "array"
          },
          "saved": {
            "description": "Сохранённые расчёты",
            "items": {
              "$ref": "#/components/schemas/CalculationSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "recent",
          "saved"
        ],
        "type": "object"
      },
      "CalculationRename": {
        "properties": {
          "name": {
            "description": "Название; null убирает расчёт из сохранённых в недавние",
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CalculationSources": {
        "properties": {
          "sources": {
            "items": {
              "properties": {
                "id": {
                  "description": "Идентификатор расчёта",
                  "type": "string"
                },
                "kind": {
                  "description": "Вид расчёта",
                  "type": "string"
                },
                "name": {
                  "description": "Название расчёта",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variables": {
                  "additionalProperties": true,
                  "description": "Переменные блоков «Расчёт» и «Цена иска»",
                  "type": "object"
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "variables"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "sources"
        ],
        "type": "object"
      },
      "CalculationSummary": {
        "properties": {
          "amount": {
            "description": "Итог расчёта в рублях",
            "type": "number"
          },
          "id": {
            "description": "Идентификатор расчёта",
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "description": "Вид расчёта: state-fee — госпошлина, penalty — неустойка, indexation — индексация, jurisdiction — подсудность",
            "enum": [
              "state-fee",
              "penalty",
              "indexation",
              "jurisdiction"
            ],
            "type": "string"
          },
          "name": {
            "description": "Название; null — несохранённый расчёт из недавних",
            "type": [
              "string",
              "null"
            ]
          },
          "saved_at": {
            "description": "Когда расчёт сохранён, ISO 8601",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "Когда расчёт изменён, ISO 8601",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "amount",
          "saved_at",
          "updated_at"
        ],
        "type": "object"
      },
      "CalculatorError": {
        "properties": {
          "error": {
            "description": "Описание ошибки",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Court": {
        "description": "Суд по официальным данным",
        "properties": {
          "address": {
            "description": "Адрес суда",
            "type": "string"
          },
          "code": {
            "description": "Код суда",
            "type": "string"
          },
          "court_type": {
            "description": "Тип суда: AS — арбитражный суд субъекта, AA — апелляционный арбитражный, AO — арбитражный суд округа, AI — Суд по интеллектуальным правам, RS — районный, MS — мировой судья, OS — суд субъекта, AJ/KJ — апелляционный/кассационный общей юрисдикции, GV/OV/AV/KV — военные суды, VS — Верховный Суд",
            "type": "string"
          },
          "name": {
            "description": "Название суда",
            "type": "string"
          },
          "oktmo": {
            "description": "ОКТМО по месту нахождения суда, 8 цифр; null — не определён",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "name",
          "court_type",
          "address",
          "oktmo"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "CourtList": {
        "properties": {
          "courts": {
            "items": {
              "$ref": "#/components/schemas/Court"
            },
            "type": "array"
          }
        },
        "required": [
          "courts"
        ],
        "type": "object"
      },
      "CourtRef": {
        "description": "Суд, в который подаётся заявление: для реквизитов платёжки",
        "properties": {
          "code": {
            "description": "Код суда в справочнике судов (DaData)",
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "description": "Название суда",
            "maxLength": 300,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "type": "object"
      },
      "DebtDocument": {
        "description": "Документ-основание суммы долга",
        "properties": {
          "date": {
            "anyOf": [
              {
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "type": "string"
              },
              {
                "enum": [
                  ""
                ],
                "type": "string"
              }
            ],
            "description": "Дата документа, YYYY-MM-DD"
          },
          "from": {
            "$ref": "#/components/schemas/DebtParty"
          },
          "kind": {
            "description": "Вид документа: upd — УПД, waybill — товарная накладная, act — акт, invoice — счёт на оплату, payment_order — платёжное поручение, other — иной",
            "enum": [
              "upd",
              "waybill",
              "act",
              "invoice",
              "payment_order",
              "other"
            ],
            "type": "string"
          },
          "number": {
            "description": "Номер документа",
            "maxLength": 60,
            "type": "string"
          },
          "to": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtParty"
              },
              {
                "description": "Покупатель, заказчик или получатель"
              }
            ]
          }
        },
        "required": [
          "kind",
          "number",
          "date"
        ],
        "type": "object"
      },
      "DebtParties": {
        "description": "Кредитор и должник",
        "properties": {
          "creditor": {
            "$ref": "#/components/schemas/DebtSide"
          },
          "debtor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtSide"
              },
              {
                "description": "Должник"
              }
            ]
          }
        },
        "type": "object"
      },
      "DebtParty": {
        "description": "Продавец, исполнитель или плательщик",
        "properties": {
          "inn": {
            "description": "ИНН",
            "pattern": "^(\\d{10}|\\d{12})$/u",
            "type": "string"
          },
          "kpp": {
            "description": "КПП",
            "pattern": "^\\d{9}$/u",
            "type": "string"
          },
          "name": {
            "description": "Наименование стороны",
            "maxLength": 300,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "inn"
        ],
        "type": "object"
      },
      "DebtRecognition": {
        "properties": {
          "documents": {
            "description": "Распознанные документы в порядке загрузки",
            "items": {
              "properties": {
                "amount": {
                  "description": "Сумма к оплате или оплаченная сумма в рублях",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "date": {
                  "description": "Дата документа",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "due": {
                  "description": "Срок оплаты, если он указан в документе",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "file": {
                  "description": "Имя файла",
                  "type": "string"
                },
                "from": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DebtParty"
                    },
                    {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  ]
                },
                "issues": {
                  "description": "Что не удалось подтвердить по тексту документа",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "kind": {
                  "description": "Вид документа; null — не опознан",
                  "enum": [
                    "upd",
                    "waybill",
                    "act",
                    "invoice",
                    "payment_order",
                    "other",
                    null
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "number": {
                  "description": "Номер документа",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "paid": {
                  "description": "Дата списания со счёта плательщика",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DebtParty"
                    },
                    {
                      "description": "Покупатель, заказчик или получатель",
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "file",
                "kind",
                "number",
                "date",
                "amount",
                "due",
                "paid",
                "from",
                "to",
                "issues"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "documents"
        ],
        "type": "object"
      },
      "DebtSide": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DebtParty"
          },
          {
            "properties": {
              "own": {
                "description": "Одна из организаций команды",
                "type": "boolean"
              }
            },
            "required": [
              "own"
            ],
            "type": "object"
          }
        ],
        "description": "Кредитор"
      },
      "IndexationInput": {
        "properties": {
          "calc_amount": {
            "description": "Присуждённая судом сумма в рублях",
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "calc_document": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtDocument"
              },
              {
                "description": "Документ-основание суммы"
              }
            ]
          },
          "calc_from": {
            "description": "Начало индексации: день вынесения решения, а по взысканию за счёт бюджета — день поступления исполнительных документов",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "calc_to": {
            "description": "День фактического исполнения судебного акта, YYYY-MM-DD",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "charges": {
            "description": "Увеличение задолженности в период индексации",
            "items": {
              "properties": {
                "amount": {
                  "description": "Сумма в рублях",
                  "exclusiveMinimum": 0,
                  "type": "number"
                },
                "date": {
                  "description": "Дата движения, YYYY-MM-DD",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "document": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DebtDocument"
                    },
                    {
                      "description": "Документ-основание"
                    }
                  ]
                },
                "review": {
                  "description": "Требует решения пользователя: причина. Такое движение хранится, но не учитывается в расчёте",
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "date",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "exclusions": {
            "description": "Периоды, за которые индексация не начисляется: возврат исполнительных документов без исполнения (ч. 4 ст. 208 ГПК РФ)",
            "items": {
              "properties": {
                "from": {
                  "description": "Начало исключаемого периода",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "reason": {
                  "description": "Причина исключения",
                  "type": "string"
                },
                "to": {
                  "description": "Конец исключаемого периода (включительно)",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "parties": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtParties"
              },
              {
                "description": "Взыскатель и должник"
              }
            ]
          },
          "payments": {
            "description": "Частичные оплаты: с даты платежа индексируется остаток",
            "items": {
              "properties": {
                "amount": {
                  "description": "Сумма в рублях",
                  "exclusiveMinimum": 0,
                  "type": "number"
                },
                "date": {
                  "description": "Дата движения, YYYY-MM-DD",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "document": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DebtDocument"
                    },
                    {
                      "description": "Документ-основание"
                    }
                  ]
                },
                "review": {
                  "description": "Требует решения пользователя: причина. Такое движение хранится, но не учитывается в расчёте",
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "date",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "start": {
            "description": "С какого момента исчисляется индексация: decision — со дня решения, due — со дня, когда выплата должна была быть произведена, writ — со дня поступления исполнительных документов",
            "enum": [
              "decision",
              "due",
              "writ"
            ],
            "type": "string"
          },
          "until_today": {
            "description": "Расчёт ведётся по сегодняшний день: при открытии сохранённого расчёта конец периода сдвигается на текущую дату",
            "type": "boolean"
          }
        },
        "required": [
          "calc_amount",
          "calc_from",
          "calc_to"
        ],
        "type": "object"
      },
      "IndexationResult": {
        "properties": {
          "calc_days": {
            "description": "Дней неисполнения судебного акта",
            "type": "number"
          },
          "calc_debt": {
            "description": "Остаток присуждённой суммы на дату исполнения",
            "type": "number"
          },
          "calc_result": {
            "description": "Сумма индексации в рублях",
            "type": "number"
          },
          "calc_total": {
            "description": "Остаток долга вместе с индексацией",
            "type": "number"
          },
          "calc_zeroed": {
            "description": "Расчёт дал отрицательную величину из-за дефляции и приравнен к нулю",
            "type": "boolean"
          },
          "cpi_from": {
            "description": "Первый месяц имеющегося ряда ИПЦ",
            "type": "string"
          },
          "cpi_to": {
            "description": "Последний опубликованный месяц ИПЦ",
            "type": "string"
          },
          "periods": {
            "description": "Помесячная разбивка расчёта",
            "items": {
              "properties": {
                "amount": {
                  "description": "Начислено за отрезок",
                  "type": "number"
                },
                "base": {
                  "description": "Индексируемая сумма на начало отрезка",
                  "type": "number"
                },
                "days": {
                  "description": "Дней, за которые начислена индексация",
                  "type": "number"
                },
                "days_in_month": {
                  "description": "Дней в месяце",
                  "type": "number"
                },
                "excluded_days": {
                  "description": "Дней, исключённых из расчёта",
                  "type": "number"
                },
                "from": {
                  "description": "Начало отрезка внутри месяца",
                  "type": "string"
                },
                "index": {
                  "description": "ИПЦ к предыдущему месяцу, %",
                  "type": "number"
                },
                "month": {
                  "description": "Месяц, YYYY-MM",
                  "type": "string"
                },
                "to": {
                  "description": "Конец отрезка внутри месяца",
                  "type": "string"
                }
              },
              "required": [
                "month",
                "from",
                "to",
                "days",
                "days_in_month",
                "excluded_days",
                "index",
                "base",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "calc_days",
          "calc_result",
          "calc_debt",
          "calc_total",
          "calc_zeroed",
          "cpi_from",
          "cpi_to",
          "periods"
        ],
        "type": "object"
      },
      "JurisdictionInput": {
        "properties": {
          "claim_price": {
            "description": "Цена иска в рублях",
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "contract_court": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CourtRef"
              },
              {
                "description": "Суд, согласованный сторонами в договоре"
              }
            ]
          },
          "court": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CourtRef"
              },
              {
                "description": "Суд, выбранный из кандидатов, когда по адресу их несколько"
              }
            ]
          },
          "defendant": {
            "allOf": [
              {
                "$ref": "#/components/schemas/JurisdictionParty"
              },
              {
                "description": "Ответчик"
              }
            ]
          },
          "dispute": {
            "description": "Спор: debt — взыскание долга по договору, damages — возмещение убытков, consumer — защита прав потребителей, labor — трудовой спор, injury — вред здоровью, realty — права на недвижимость, non_property — неимущественное требование",
            "enum": [
              "debt",
              "damages",
              "consumer",
              "labor",
              "injury",
              "realty",
              "non_property"
            ],
            "type": "string"
          },
          "plaintiff": {
            "$ref": "#/components/schemas/JurisdictionParty"
          },
          "property_address": {
            "description": "Адрес недвижимости для споров о правах на неё",
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "venue": {
            "description": "Выбранное истцом основание при альтернативной подсудности",
            "enum": [
              "defendant",
              "plaintiff",
              "property",
              "contract"
            ],
            "type": "string"
          }
        },
        "required": [
          "plaintiff",
          "defendant",
          "dispute"
        ],
        "type": "object"
      },
      "JurisdictionParty": {
        "description": "Истец",
        "properties": {
          "address": {
            "description": "Адрес организации или место жительства гражданина",
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "inn": {
            "description": "ИНН",
            "pattern": "^(\\d{10}|\\d{12})$/u",
            "type": "string"
          },
          "kind": {
            "description": "organization — организация, entrepreneur — предприниматель, person — гражданин",
            "enum": [
              "organization",
              "entrepreneur",
              "person"
            ],
            "type": "string"
          },
          "kpp": {
            "description": "КПП организации — для платёжки",
            "pattern": "^\\d{9}$/u",
            "type": "string"
          },
          "name": {
            "description": "Наименование или ФИО",
            "maxLength": 300,
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "JurisdictionResult": {
        "properties": {
          "court": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Court"
              },
              {
                "description": "Суд, в который подаётся иск"
              }
            ]
          },
          "court_type": {
            "description": "Вид суда: arbitration — арбитражный, general — общей юрисдикции",
            "enum": [
              "arbitration",
              "general"
            ],
            "type": "string"
          },
          "fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StateFeeResult"
              },
              {
                "description": "Госпошлина"
              }
            ]
          },
          "issues": {
            "description": "Чего не хватает для точного ответа",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "level": {
            "description": "Звено: arbitration — арбитражный суд, district — районный суд, magistrate — мировой судья",
            "enum": [
              "arbitration",
              "district",
              "magistrate"
            ],
            "type": "string"
          },
          "reason": {
            "description": "Почему этот суд по предметной подсудности",
            "properties": {
              "label": {
                "type": "string"
              },
              "ref": {
                "type": "string"
              }
            },
            "required": [
              "label",
              "ref"
            ],
            "type": "object"
          },
          "venue": {
            "description": "Выбранное основание; null — истцу нужно выбрать",
            "enum": [
              "defendant",
              "plaintiff",
              "property",
              "contract",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "venues": {
            "description": "Основания территориальной подсудности",
            "items": {
              "$ref": "#/components/schemas/JurisdictionVenue"
            },
            "type": "array"
          }
        },
        "required": [
          "court_type",
          "level",
          "reason",
          "venues",
          "venue",
          "court",
          "fee",
          "issues"
        ],
        "type": "object"
      },
      "JurisdictionVenue": {
        "properties": {
          "address": {
            "description": "Адрес, по которому определяется суд",
            "type": "string"
          },
          "court": {
            "$ref": "#/components/schemas/Court"
          },
          "id": {
            "description": "Основание подсудности: defendant — по адресу ответчика, plaintiff — по месту жительства истца, property — по месту нахождения недвижимости, contract — суд по договору",
            "enum": [
              "defendant",
              "plaintiff",
              "property",
              "contract"
            ],
            "type": "string"
          },
          "issue": {
            "description": "Почему суд не определён: address_not_found — адрес не найден, house_required — нужен адрес с номером дома, house_unregistered — дома нет в ФИАС и точных координат у него нет, not_bound — дом не привязан к суду в официальных данных, conflict — официальные данные противоречивы, source_unavailable — ГАС «Правосудие» не ответила, region_unknown — регион не определён",
            "enum": [
              "address_not_found",
              "house_required",
              "house_unregistered",
              "not_bound",
              "conflict",
              "source_unavailable",
              "region_unknown",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "description": "Основание подсудности",
            "type": "string"
          },
          "place": {
            "description": "Населённый пункт и район",
            "type": "string"
          },
          "ref": {
            "description": "Норма",
            "type": "string"
          },
          "source": {
            "description": "Откуда взят суд: territory — границы территорий судов на официальном портале, gas — привязка дома в ГАС «Правосудие», region — арбитражный суд субъекта",
            "enum": [
              "territory",
              "gas",
              "region",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "source_title": {
            "description": "Название официального источника",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "label",
          "ref",
          "court",
          "source",
          "source_title",
          "issue"
        ],
        "type": "object"
      },
      "PaymentAccount": {
        "description": "Счёт списания",
        "properties": {
          "bank": {
            "description": "Наименование банка",
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "bik": {
            "description": "БИК банка",
            "pattern": "^\\d{9}$/u",
            "type": "string"
          },
          "corr_account": {
            "description": "Корреспондентский счёт банка",
            "pattern": "^\\d{20}$/u",
            "type": "string"
          },
          "number": {
            "description": "Расчётный счёт",
            "pattern": "^\\d{20}$/u",
            "type": "string"
          }
        },
        "required": [
          "number",
          "bik",
          "bank"
        ],
        "type": "object"
      },
      "PaymentDetails": {
        "description": "Плательщик, представитель и счёт для платёжки",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/PaymentAccount"
          },
          "court_oktmo": {
            "description": "ОКТМО, введённый вручную для суда, у которого он не определился по адресу",
            "properties": {
              "court_code": {
                "description": "Код суда в справочнике судов (DaData)",
                "maxLength": 40,
                "minLength": 1,
                "type": "string"
              },
              "oktmo": {
                "description": "ОКТМО, 8 цифр",
                "pattern": "^\\d{8}$/u",
                "type": "string"
              }
            },
            "required": [
              "court_code",
              "oktmo"
            ],
            "type": "object"
          },
          "payer": {
            "$ref": "#/components/schemas/PaymentParty"
          },
          "representative": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentParty"
              },
              {
                "description": "Представитель, со счёта которого уплачивается пошлина"
              }
            ]
          }
        },
        "required": [
          "payer"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "PaymentOrder": {
        "properties": {
          "amount": {
            "description": "Сумма (поле 7)",
            "type": "number"
          },
          "amount_words": {
            "description": "Сумма прописью (поле 6)",
            "type": "string"
          },
          "basis": {
            "description": "Основание платежа (поле 106)",
            "type": "string"
          },
          "court": {
            "description": "Суд",
            "type": "string"
          },
          "date": {
            "description": "Дата, YYYY-MM-DD (поле 4)",
            "type": "string"
          },
          "document": {
            "description": "Номер документа (поле 108)",
            "type": "string"
          },
          "document_date": {
            "description": "Дата документа (поле 109)",
            "type": "string"
          },
          "kbk": {
            "description": "КБК (поле 104)",
            "type": "string"
          },
          "number": {
            "description": "Номер (поле 3)",
            "type": "string"
          },
          "oktmo": {
            "description": "ОКТМО (поле 105)",
            "type": "string"
          },
          "operation": {
            "description": "Вид операции (поле 18)",
            "type": "string"
          },
          "payer": {
            "description": "Плательщик",
            "properties": {
              "account": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PaymentAccount"
                  },
                  {
                    "description": "Счёт и банк плательщика (поля 9–12)",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                ]
              },
              "inn": {
                "description": "ИНН плательщика (поле 60)",
                "type": "string"
              },
              "kpp": {
                "description": "КПП плательщика (поле 102)",
                "type": "string"
              },
              "name": {
                "description": "Плательщик (поле 8)",
                "type": "string"
              }
            },
            "required": [
              "inn",
              "kpp",
              "name",
              "account"
            ],
            "type": "object"
          },
          "period": {
            "description": "Налоговый период (поле 107)",
            "type": "string"
          },
          "priority": {
            "description": "Очерёдность (поле 21)",
            "type": "string"
          },
          "purpose": {
            "description": "Назначение платежа (поле 24)",
            "type": "string"
          },
          "recipient": {
            "description": "Получатель",
            "properties": {
              "account": {
                "description": "Казначейский счёт (поле 17)",
                "type": "string"
              },
              "bank": {
                "description": "Банк получателя (поле 13)",
                "type": "string"
              },
              "bank_account": {
                "description": "Единый казначейский счёт (поле 15)",
                "type": "string"
              },
              "bank_city": {
                "description": "Город банка получателя",
                "type": "string"
              },
              "bik": {
                "description": "БИК (поле 14)",
                "type": "string"
              },
              "checked_at": {
                "description": "Дата сверки реквизитов",
                "type": "string"
              },
              "inn": {
                "description": "ИНН получателя (поле 61)",
                "type": "string"
              },
              "kpp": {
                "description": "КПП получателя (поле 103)",
                "type": "string"
              },
              "name": {
                "description": "Получатель (поле 16)",
                "type": "string"
              }
            },
            "required": [
              "name",
              "inn",
              "kpp",
              "bank",
              "bank_city",
              "bik",
              "bank_account",
              "account",
              "checked_at"
            ],
            "type": "object"
          },
          "status": {
            "description": "Статус плательщика (поле 101)",
            "type": "string"
          },
          "uin": {
            "description": "Код — УИН (поле 22)",
            "type": "string"
          }
        },
        "required": [
          "number",
          "date",
          "amount",
          "amount_words",
          "status",
          "payer",
          "recipient",
          "kbk",
          "oktmo",
          "uin",
          "basis",
          "period",
          "document",
          "document_date",
          "operation",
          "priority",
          "purpose",
          "court"
        ],
        "type": "object"
      },
      "PaymentOrderInput": {
        "properties": {
          "account": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentAccount"
              },
              {
                "description": "Счёт списания: представителя, а без него — плательщика"
              }
            ]
          },
          "amount": {
            "description": "Сумма пошлины в рублях",
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "court_code": {
            "description": "Код суда в справочнике судов (DaData)",
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          },
          "court_oktmo": {
            "description": "ОКТМО суда из его реквизитов для уплаты госпошлины — учитывается, только если ОКТМО не определился по адресу суда",
            "pattern": "^\\d{8}$/u",
            "type": "string"
          },
          "date": {
            "description": "Дата платёжного поручения, по умолчанию сегодня",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "number": {
            "description": "Номер платёжного поручения",
            "pattern": "^\\d{1,6}$/u",
            "type": "string"
          },
          "payer": {
            "$ref": "#/components/schemas/PaymentParty"
          },
          "representative": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentParty"
              },
              {
                "description": "Представитель, со счёта которого уплачивается пошлина"
              }
            ]
          },
          "subject": {
            "description": "Суть обращения для назначения платежа, например «к ООО «Вектор» о взыскании 480 000 руб.»",
            "maxLength": 160,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "court_code",
          "payer"
        ],
        "type": "object"
      },
      "PaymentParty": {
        "description": "Сторона дела, за которую уплачивается пошлина",
        "properties": {
          "inn": {
            "description": "ИНН: 10 цифр у организации, 12 — у гражданина и предпринимателя",
            "pattern": "^(\\d{10}|\\d{12})$/u",
            "type": "string"
          },
          "kind": {
            "description": "organization — организация, entrepreneur — предприниматель, person — гражданин",
            "enum": [
              "organization",
              "entrepreneur",
              "person"
            ],
            "type": "string"
          },
          "kpp": {
            "description": "КПП организации",
            "pattern": "^\\d{9}$/u",
            "type": "string"
          },
          "name": {
            "description": "Наименование организации, ФИО предпринимателя или гражданина",
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "kind",
          "name",
          "inn"
        ],
        "type": "object"
      },
      "PenaltyInput": {
        "properties": {
          "calc_amount": {
            "description": "Сумма долга в рублях",
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "calc_document": {
            "$ref": "#/components/schemas/DebtDocument"
          },
          "calc_from": {
            "description": "Начало периода просрочки, YYYY-MM-DD",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "calc_rate": {
            "description": "Ставка: «1/300» | «1/150» | «1/130» (доля ключевой ставки), «key» (ст. 395 ГК РФ), «0.1» (процент в день)",
            "minLength": 1,
            "type": "string"
          },
          "calc_to": {
            "description": "Конец периода просрочки, YYYY-MM-DD",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "cap": {
            "description": "Ограничение неустойки по договору",
            "oneOf": [
              {
                "properties": {
                  "kind": {
                    "enum": [
                      "percent"
                    ],
                    "type": "string"
                  },
                  "value": {
                    "description": "Процент от суммы долга",
                    "exclusiveMinimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "properties": {
                  "kind": {
                    "enum": [
                      "amount"
                    ],
                    "type": "string"
                  },
                  "value": {
                    "description": "Предельная сумма в рублях",
                    "exclusiveMinimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "charges": {
            "description": "Увеличение суммы долга: с указанной даты начисление идёт на увеличенный остаток",
            "items": {
              "properties": {
                "amount": {
                  "description": "Сумма увеличения долга в рублях",
                  "exclusiveMinimum": 0,
                  "type": "number"
                },
                "date": {
                  "description": "Первый день просрочки по дополнительному долгу, YYYY-MM-DD",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "document": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DebtDocument"
                    },
                    {
                      "description": "Документ-основание"
                    }
                  ]
                },
                "review": {
                  "description": "Требует решения пользователя: причина. Такое движение хранится, но не учитывается в расчёте",
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "date",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "court_type": {
            "description": "Суд, в который подаётся иск: с ним рассчитывается госпошлина с цены иска (долг и начисления)",
            "enum": [
              "arbitration",
              "general"
            ],
            "type": "string"
          },
          "exclusions": {
            "description": "Периоды, за которые неустойка не начисляется",
            "items": {
              "properties": {
                "from": {
                  "description": "Начало исключаемого периода",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "reason": {
                  "description": "Причина: форс-мажор, просрочка кредитора и т.п.",
                  "type": "string"
                },
                "to": {
                  "description": "Конец исключаемого периода (включительно)",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "moratorium": {
            "description": "Мораторий 01.04.2022–01.10.2022 (постановление Правительства РФ № 497). По умолчанию применяется; передайте false, если должник отказался от моратория",
            "type": "boolean"
          },
          "parties": {
            "$ref": "#/components/schemas/DebtParties"
          },
          "payments": {
            "description": "Частичные оплаты: с даты платежа начисление идёт на остаток долга",
            "items": {
              "properties": {
                "amount": {
                  "description": "Сумма оплаты в рублях",
                  "exclusiveMinimum": 0,
                  "type": "number"
                },
                "date": {
                  "description": "Дата оплаты, YYYY-MM-DD",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "document": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DebtDocument"
                    },
                    {
                      "description": "Документ-основание"
                    }
                  ]
                },
                "review": {
                  "description": "Требует решения пользователя: причина. Такое движение хранится, но не учитывается в расчёте",
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "date",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "until_today": {
            "description": "Расчёт ведётся по сегодняшний день: при открытии сохранённого расчёта конец периода сдвигается на текущую дату",
            "type": "boolean"
          }
        },
        "required": [
          "calc_amount",
          "calc_from",
          "calc_to",
          "calc_rate"
        ],
        "type": "object"
      },
      "PenaltyResult": {
        "properties": {
          "calc_accrued": {
            "description": "Начислено до применения ограничения",
            "type": "number"
          },
          "calc_capped": {
            "description": "Применено договорное ограничение неустойки",
            "type": "boolean"
          },
          "calc_days": {
            "description": "Дней, за которые начислено (без исключённых периодов)",
            "type": "number"
          },
          "calc_fee": {
            "description": "Госпошлина с цены иска (долг и начисления), если указан court_type",
            "type": "number"
          },
          "calc_fee_basis": {
            "description": "Правовое основание расчёта госпошлины",
            "type": "string"
          },
          "calc_result": {
            "description": "Начисленная неустойка/проценты в рублях",
            "type": "number"
          },
          "calc_total": {
            "description": "Долг + начисления, в рублях",
            "type": "number"
          },
          "periods": {
            "description": "Разбивка по периодам действия ставки",
            "items": {
              "properties": {
                "amount": {
                  "description": "Начислено за период",
                  "type": "number"
                },
                "base": {
                  "description": "Остаток долга в периоде",
                  "type": "number"
                },
                "days": {
                  "description": "Дней в периоде",
                  "type": "number"
                },
                "excluded": {
                  "description": "Причина исключения периода (moratorium или пользовательская)",
                  "type": "string"
                },
                "from": {
                  "description": "Начало периода действия ставки",
                  "type": "string"
                },
                "rate": {
                  "description": "Ставка периода, %",
                  "type": "number"
                },
                "to": {
                  "description": "Конец периода действия ставки",
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to",
                "days",
                "rate",
                "base",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "calc_days",
          "calc_result",
          "calc_total",
          "calc_accrued",
          "calc_capped",
          "periods"
        ],
        "type": "object"
      },
      "ProblemDetails": {
        "description": "Ошибка в формате Problem Details (RFC 9457)",
        "properties": {
          "code": {
            "description": "Стабильный машиночитаемый код ошибки",
            "type": "string"
          },
          "detail": {
            "description": "Пояснение для человека",
            "type": "string"
          },
          "errors": {
            "description": "Ошибки валидации по полям",
            "items": {
              "properties": {
                "name": {
                  "description": "Имя поля",
                  "type": "string"
                },
                "pointer": {
                  "description": "JSON Pointer на поле",
                  "type": "string"
                },
                "reason": {
                  "description": "Причина",
                  "type": "string"
                },
                "rule": {
                  "description": "Нарушенное правило",
                  "type": "string"
                }
              },
              "required": [
                "reason"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "instance": {
            "description": "Путь запроса, в котором возникла ошибка",
            "type": "string"
          },
          "request_id": {
            "description": "Идентификатор запроса для обращения в поддержку",
            "type": "string"
          },
          "status": {
            "description": "HTTP-статус",
            "type": "integer"
          },
          "title": {
            "description": "Краткое описание",
            "type": "string"
          },
          "trace_id": {
            "description": "Идентификатор трассы",
            "type": "string"
          },
          "type": {
            "description": "URI типа ошибки, ведёт на описание в документации",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "type": "object"
      },
      "StateFeeBreakdown": {
        "description": "Детализация расчёта",
        "properties": {
          "base": {
            "description": "Фиксированная часть ставки",
            "type": "number"
          },
          "capped": {
            "description": "Применён предельный размер пошлины",
            "type": "boolean"
          },
          "excess": {
            "description": "Сумма превышения над порогом",
            "type": "number"
          },
          "factor": {
            "description": "Множитель ставки (судебный приказ — 0.5)",
            "type": "number"
          },
          "gross": {
            "description": "Пошлина по требованию до льготы",
            "type": "number"
          },
          "kind": {
            "description": "Способ расчёта",
            "enum": [
              "scale",
              "percent",
              "flat",
              "choice",
              "exempt"
            ],
            "type": "string"
          },
          "minApplied": {
            "description": "Применён минимальный размер пошлины",
            "type": "boolean"
          },
          "note": {
            "description": "Пояснение к освобождению",
            "type": "string"
          },
          "over": {
            "description": "Порог, свыше которого начисляется процент",
            "type": "number"
          },
          "percent": {
            "description": "Процент от суммы превышения",
            "type": "number"
          }
        },
        "required": [
          "kind",
          "gross"
        ],
        "type": "object"
      },
      "StateFeeCategories": {
        "properties": {
          "categories": {
            "description": "Типы заявлений для выбранного суда",
            "items": {
              "$ref": "#/components/schemas/StateFeeCategory"
            },
            "type": "array"
          }
        },
        "required": [
          "categories"
        ],
        "type": "object"
      },
      "StateFeeCategory": {
        "properties": {
          "amountLabel": {
            "description": "Подпись поля суммы",
            "type": "string"
          },
          "field": {
            "description": "Имя поля выбора",
            "type": "string"
          },
          "id": {
            "description": "Ключ типа заявления для поля type",
            "type": "string"
          },
          "label": {
            "description": "Название типа заявления",
            "type": "string"
          },
          "needs": {
            "description": "Что требуется для расчёта: amount — цена иска, choice — выбор варианта, none — ничего",
            "enum": [
              "amount",
              "choice",
              "none"
            ],
            "type": "string"
          },
          "options": {
            "description": "Варианты выбора",
            "items": {
              "properties": {
                "label": {
                  "description": "Подпись варианта",
                  "type": "string"
                },
                "value": {
                  "description": "Значение для поля choice",
                  "type": "string"
                }
              },
              "required": [
                "value",
                "label"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "label",
          "needs"
        ],
        "type": "object"
      },
      "StateFeeClaim": {
        "properties": {
          "category": {
            "description": "Категория заявления (id из GET /state-fee/categories)",
            "minLength": 1,
            "type": "string"
          },
          "choice": {
            "description": "Выбранный вариант (для категорий с needs=choice)",
            "type": "string"
          },
          "claim_price": {
            "description": "Цена иска в рублях (для категорий с needs=amount)",
            "exclusiveMinimum": 0,
            "type": "number"
          }
        },
        "required": [
          "category"
        ],
        "type": "object"
      },
      "StateFeeExemption": {
        "properties": {
          "basis": {
            "description": "Норма НК РФ",
            "type": "string"
          },
          "id": {
            "description": "Ключ основания льготы для поля exemption",
            "type": "string"
          },
          "label": {
            "description": "Название льготной категории",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "basis"
        ],
        "type": "object"
      },
      "StateFeeExemptionApplied": {
        "description": "Применённая льгота",
        "properties": {
          "basis": {
            "description": "Норма НК РФ",
            "type": "string"
          },
          "deducted": {
            "description": "Сумма, на которую уменьшена пошлина",
            "type": "number"
          },
          "id": {
            "description": "Основание льготы",
            "type": "string"
          },
          "label": {
            "description": "Название льготной категории",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "basis",
          "deducted"
        ],
        "type": "object"
      },
      "StateFeeExemptions": {
        "properties": {
          "exemptions": {
            "description": "Основания льгот для выбранного суда",
            "items": {
              "$ref": "#/components/schemas/StateFeeExemption"
            },
            "type": "array"
          }
        },
        "required": [
          "exemptions"
        ],
        "type": "object"
      },
      "StateFeeInput": {
        "properties": {
          "category": {
            "description": "Категория заявления при одном требовании",
            "minLength": 1,
            "type": "string"
          },
          "choice": {
            "description": "Выбранный вариант при одном требовании",
            "type": "string"
          },
          "claim_price": {
            "description": "Цена иска в рублях при одном требовании",
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "claims": {
            "description": "Требования в одном иске; пошлины складываются. Альтернатива полям category/claim_price/choice",
            "items": {
              "$ref": "#/components/schemas/StateFeeClaim"
            },
            "minItems": 1,
            "type": "array"
          },
          "court": {
            "$ref": "#/components/schemas/CourtRef"
          },
          "court_type": {
            "description": "Вид суда: arbitration — арбитражный, general — общей юрисдикции",
            "enum": [
              "arbitration",
              "general"
            ],
            "type": "string"
          },
          "exemption": {
            "description": "Основание льготы (id из GET /state-fee/exemptions): освобождение либо вычет пошлины с 1 млн ₽",
            "type": "string"
          }
        },
        "required": [
          "court_type"
        ],
        "type": "object"
      },
      "StateFeeLine": {
        "properties": {
          "basis": {
            "description": "Правовое основание",
            "type": "string"
          },
          "breakdown": {
            "$ref": "#/components/schemas/StateFeeBreakdown"
          },
          "category": {
            "description": "Категория заявления",
            "type": "string"
          },
          "fee": {
            "description": "Пошлина по требованию в рублях",
            "type": "number"
          },
          "label": {
            "description": "Название категории",
            "type": "string"
          }
        },
        "required": [
          "category",
          "label",
          "fee",
          "basis",
          "breakdown"
        ],
        "type": "object"
      },
      "StateFeeResult": {
        "properties": {
          "basis": {
            "description": "Правовое основание расчёта",
            "type": "string"
          },
          "exemption": {
            "$ref": "#/components/schemas/StateFeeExemptionApplied"
          },
          "fee": {
            "description": "Размер госпошлины в рублях с учётом льготы",
            "type": "number"
          },
          "lines": {
            "description": "Расчёт по каждому требованию",
            "items": {
              "$ref": "#/components/schemas/StateFeeLine"
            },
            "type": "array"
          }
        },
        "required": [
          "fee",
          "basis",
          "lines"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "dpop": {
        "bearerFormat": "JWT",
        "description": "Access token, привязанный к ключу клиента по RFC 9449: заголовок `Authorization: DPoP <token>` и заголовок `DPoP` с доказательством для каждого запроса. Сервер выдаёт `DPoP-Nonce`, который клиент включает в доказательство.",
        "scheme": "dpop",
        "type": "http"
      },
      "mutualTLS": {
        "description": "Access token, привязанный к клиентскому сертификату по RFC 8705: заголовок `Authorization: Bearer <token>` поверх mTLS-соединения тем же сертификатом.",
        "type": "mutualTLS"
      },
      "oauth2": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.legalstack.ru/oauth/authorize",
            "scopes": {
              "calculators:read": "Read calculators reference data",
              "calculators:write": "Run and store calculations"
            },
            "tokenUrl": "https://api.legalstack.ru/oauth/token"
          },
          "clientCredentials": {
            "scopes": {
              "calculators:read": "Read calculators reference data",
              "calculators:write": "Run and store calculations"
            },
            "tokenUrl": "https://api.legalstack.ru/oauth/token"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "title": "LegalStack Calculator API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/calculators/addresses": {
      "get": {
        "operationId": "get_api_v1_calculators_addresses",
        "parameters": [
          {
            "description": "Адрес",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "description": "Адрес",
              "maxLength": 300,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressList"
                }
              }
            },
            "description": "Адреса"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочник адресов недоступен"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Подсказки адресов для определения подсудности",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/calculations": {
      "get": {
        "operationId": "get_api_v1_calculators_calculations",
        "parameters": [
          {
            "description": "Поиск по названию сохранённых расчётов",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "description": "Поиск по названию сохранённых расчётов",
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationList"
                }
              }
            },
            "description": "Расчёты пользователя"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Недавние и сохранённые расчёты пользователя",
        "tags": [
          "calculators"
        ]
      },
      "post": {
        "operationId": "post_api_v1_calculators_calculations",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Calculation"
                }
              }
            },
            "description": "Расчёт сохранён"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочные данные не покрывают период"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочные данные не загружены"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Выполнить расчёт и сохранить его: без названия — в недавние, с названием — в сохранённые",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/calculations/document": {
      "post": {
        "operationId": "post_api_v1_calculators_calculations_document",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Документ расчёта"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочные данные не покрывают период"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочные данные не загружены"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Документ расчёта в формате DOCX для приложения к иску",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/calculations/{id}": {
      "delete": {
        "operationId": "delete_api_v1_calculators_calculations_id",
        "parameters": [
          {
            "description": "Идентификатор расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор расчёта",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Расчёт удалён"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Удалить расчёт",
        "tags": [
          "calculators"
        ]
      },
      "get": {
        "operationId": "get_api_v1_calculators_calculations_id",
        "parameters": [
          {
            "description": "Идентификатор расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор расчёта",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Calculation"
                }
              }
            },
            "description": "Расчёт"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Расчёт с исходными данными и результатом",
        "tags": [
          "calculators"
        ]
      },
      "patch": {
        "operationId": "patch_api_v1_calculators_calculations_id",
        "parameters": [
          {
            "description": "Идентификатор расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор расчёта",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationRename"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Calculation"
                }
              }
            },
            "description": "Название изменено"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Сохранить расчёт под названием, переименовать или вернуть в недавние",
        "tags": [
          "calculators"
        ]
      },
      "put": {
        "operationId": "put_api_v1_calculators_calculations_id",
        "parameters": [
          {
            "description": "Идентификатор расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор расчёта",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Calculation"
                }
              }
            },
            "description": "Расчёт обновлён"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочные данные не покрывают период"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочные данные не загружены"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Пересчитать расчёт с новыми исходными данными",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/calculations/{id}/documents/{documentId}": {
      "delete": {
        "operationId": "delete_api_v1_calculators_calculations_id_documents_documentId",
        "parameters": [
          {
            "description": "Идентификатор сохранённого расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор сохранённого расчёта",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Идентификатор документа СмартДокс",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "description": "Идентификатор документа СмартДокс",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Документ больше не получает данные расчёта"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Расчёт не найден"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Запретить документу СмартДокс брать данные из расчёта",
        "tags": [
          "calculators"
        ]
      },
      "put": {
        "operationId": "put_api_v1_calculators_calculations_id_documents_documentId",
        "parameters": [
          {
            "description": "Идентификатор сохранённого расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор сохранённого расчёта",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Идентификатор документа СмартДокс",
            "in": "path",
            "name": "documentId",
            "required": true,
            "schema": {
              "description": "Идентификатор документа СмартДокс",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Документ получает данные расчёта"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Расчёт не найден"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Расчёт не сохранён"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Разрешить документу СмартДокс брать данные из расчёта",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/calculations/{id}/payment": {
      "delete": {
        "operationId": "delete_api_v1_calculators_calculations_id_payment",
        "parameters": [
          {
            "description": "Идентификатор расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор расчёта",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Calculation"
                }
              }
            },
            "description": "Платёжные данные удалены"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Убрать из расчёта платёжные данные",
        "tags": [
          "calculators"
        ]
      },
      "put": {
        "operationId": "put_api_v1_calculators_calculations_id_payment",
        "parameters": [
          {
            "description": "Идентификатор расчёта",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Идентификатор расчёта",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentDetails"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Calculation"
                }
              }
            },
            "description": "Платёжные данные сохранены"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Реквизиты указаны неверно"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Сохранить в расчёте плательщика, представителя и счёт для платёжки",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/courts": {
      "get": {
        "operationId": "get_api_v1_calculators_courts",
        "parameters": [
          {
            "description": "Название суда или населённый пункт",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "description": "Название суда или населённый пункт",
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Типы судов через запятую, например AS,AA",
            "in": "query",
            "name": "types",
            "required": false,
            "schema": {
              "description": "Типы судов через запятую, например AS,AA",
              "pattern": "^[A-Z]{2}(,[A-Z]{2})*$/u",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourtList"
                }
              }
            },
            "description": "Найденные суды"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочник судов недоступен"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Поиск суда в справочнике судов",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/courts/{code}": {
      "get": {
        "operationId": "get_api_v1_calculators_courts_code",
        "parameters": [
          {
            "description": "Код суда в справочнике судов (DaData)",
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "description": "Код суда в справочнике судов (DaData)",
              "maxLength": 40,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Court"
                }
              }
            },
            "description": "Суд"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Суд не найден в справочнике"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочник судов недоступен"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Суд из справочника с ОКТМО по месту нахождения",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/debt-documents/recognize": {
      "post": {
        "operationId": "post_api_v1_calculators_debt-documents_recognize",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "files": {
                    "description": "PDF или DOCX: УПД, накладные, акты, счета на оплату, платёжные поручения",
                    "items": {
                      "format": "binary",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "files"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtRecognition"
                }
              }
            },
            "description": "Данные документов с отметками о том, что не подтверждено текстом"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Файлы не загружены или не подходят"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Файл слишком большой"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Исчерпан лимит распознавания команды"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Распознавание документов недоступно"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Распознать документы, изменяющие долг: суммы, даты, стороны",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/debt-documents/warm": {
      "post": {
        "operationId": "post_api_v1_calculators_debt-documents_warm",
        "responses": {
          "202": {
            "description": "Подготовка запущена"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Подготовить распознавание документов, пока пользователь выбирает файлы",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/indexation": {
      "post": {
        "operationId": "post_api_v1_calculators_indexation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexationResult"
                }
              }
            },
            "description": "Рассчитанная индексация с помесячной разбивкой"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Период выходит за пределы опубликованных ИПЦ"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Данные ИПЦ не загружены"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Индексация присуждённых сумм по ИПЦ Росстата (ст. 208 ГПК РФ, ст. 183 АПК РФ, ст. 189.1 КАС РФ)",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/internal/calculation-sources": {
      "post": {
        "operationId": "post_api_v1_calculators_internal_calculation-sources",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "document_id": {
                    "description": "Документ, для которого читаются источники",
                    "format": "uuid",
                    "type": "string"
                  },
                  "ids": {
                    "description": "Расчёты, на которые ссылаются блоки документа",
                    "items": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  }
                },
                "required": [
                  "document_id",
                  "ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationSources"
                }
              }
            },
            "description": "Переменные расчётов, разрешённых документу"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Данные расчётов для документа СмартДокс (только для smartdoc-service)",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/jurisdiction": {
      "post": {
        "operationId": "post_api_v1_calculators_jurisdiction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JurisdictionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JurisdictionResult"
                }
              }
            },
            "description": "Подсудность и госпошлина"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочник судов недоступен"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Подсудность: арбитражный суд, районный суд или мировой судья, конкретный суд по адресу и госпошлина (ст. 23, 24, 28–32 ГПК РФ, ст. 27, 35–38 АПК РФ)",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/payment-orders": {
      "post": {
        "operationId": "post_api_v1_calculators_payment-orders",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOrder"
                }
              }
            },
            "description": "Платёжное поручение"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Реквизиты не сформировать"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочник судов недоступен"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Реквизиты платёжного поручения на госпошлину по приказу Минфина № 58н",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/payment-orders/file": {
      "post": {
        "operationId": "post_api_v1_calculators_payment-orders_file",
        "parameters": [
          {
            "description": "bank — файл для клиент-банка (1CClientBankExchange), pdf — форма 0401060",
            "in": "query",
            "name": "format",
            "required": true,
            "schema": {
              "description": "bank — файл для клиент-банка (1CClientBankExchange), pdf — форма 0401060",
              "enum": [
                "bank",
                "pdf"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/plain; charset=windows-1251": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Файл платёжного поручения"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Реквизиты не сформировать"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Справочник судов недоступен"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Файл платёжного поручения: для загрузки в клиент-банк или PDF по форме 0401060",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/penalty": {
      "post": {
        "operationId": "post_api_v1_calculators_penalty",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PenaltyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PenaltyResult"
                }
              }
            },
            "description": "Рассчитанная неустойка с разбивкой по периодам"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Данные ключевой ставки не покрывают период"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Данные ключевой ставки не загружены"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Расчёт неустойки: доля ключевой ставки ЦБ, проценты ст. 395 ГК РФ или процент в день",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/state-fee": {
      "post": {
        "operationId": "post_api_v1_calculators_state-fee",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StateFeeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateFeeResult"
                }
              }
            },
            "description": "Рассчитанная госпошлина"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorError"
                }
              }
            },
            "description": "Некорректные входные данные"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Расчёт государственной пошлины (ст. 333.19, 333.21 НК РФ) с учётом льгот и нескольких требований",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/state-fee/categories": {
      "get": {
        "operationId": "get_api_v1_calculators_state-fee_categories",
        "parameters": [
          {
            "description": "Вид суда: arbitration — арбитражный, general — общей юрисдикции",
            "in": "query",
            "name": "court_type",
            "required": true,
            "schema": {
              "description": "Вид суда: arbitration — арбитражный, general — общей юрисдикции",
              "enum": [
                "arbitration",
                "general"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateFeeCategories"
                }
              }
            },
            "description": "Типы заявлений"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Типы заявлений для расчёта госпошлины",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/calculators/state-fee/exemptions": {
      "get": {
        "operationId": "get_api_v1_calculators_state-fee_exemptions",
        "parameters": [
          {
            "description": "Вид суда: arbitration — арбитражный, general — общей юрисдикции",
            "in": "query",
            "name": "court_type",
            "required": true,
            "schema": {
              "description": "Вид суда: arbitration — арбитражный, general — общей юрисдикции",
              "enum": [
                "arbitration",
                "general"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateFeeExemptions"
                }
              }
            },
            "description": "Основания льгот"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Некорректный запрос: не прошла валидация параметров или тела"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Токен отсутствует, недействителен или истёк"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Недостаточно прав или scope"
          }
        },
        "security": [
          {
            "dpop": []
          },
          {
            "oauth2": [
              "calculators:write"
            ]
          }
        ],
        "summary": "Основания льгот по госпошлине (ст. 333.36, 333.37 НК РФ)",
        "tags": [
          "calculators"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Публичный API LegalStack",
      "url": "https://api.legalstack.ru"
    }
  ],
  "tags": [
    {
      "description": "Калькуляторы: расчёты госпошлины, неустойки, индексации и процессуальных сроков.",
      "name": "calculators",
      "x-displayName": "Расчёты"
    }
  ],
  "webhooks": {}
}
