arm-ka-docs/contracts/ex-payload-v1.schema.json
2026-11-06 23:25:40 +04:00

2398 lines
56 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ex-payload-v1.schema.json",
"title": "Элемент среза ЕХ: ex_snapshot_item.payload, версия 1.0",
"description": "Конверт замороженных данных элемента среза ЕХ (context/05-domain-rules.md §15). data — ответ API экрана рабочей версии на момент верификации без полей редактирования; у primary_document payload нет. Сгенерировано scripts/kfo_contract/gen_ex_payload.py — руками не править.",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"item_type",
"units",
"generated_at",
"source_version_no",
"data"
],
"properties": {
"schema_version": {
"const": "1.0"
},
"item_type": {
"type": "string",
"enum": [
"summary_osv",
"vgo_pairs",
"chess",
"kfo_balance",
"kfo_income",
"goodwill",
"corrections",
"other_report",
"version_card"
]
},
"units": {
"type": "string",
"enum": [
"rub",
"thousand_rub",
"none"
]
},
"generated_at": {
"type": "string",
"format": "date-time"
},
"source_version_no": {
"type": "integer",
"minimum": 1
},
"data": {
"type": "object"
}
},
"allOf": [
{
"if": {
"properties": {
"item_type": {
"const": "summary_osv"
}
}
},
"then": {
"properties": {
"units": {
"const": "rub"
},
"data": {
"$ref": "#/$defs/SummaryOsvData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "vgo_pairs"
}
}
},
"then": {
"properties": {
"units": {
"const": "rub"
},
"data": {
"$ref": "#/$defs/VgoPairsData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "chess"
}
}
},
"then": {
"properties": {
"units": {
"const": "rub"
},
"data": {
"$ref": "#/$defs/ChessData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "kfo_balance"
}
}
},
"then": {
"properties": {
"units": {
"const": "thousand_rub"
},
"data": {
"$ref": "#/$defs/KfoBalanceData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "kfo_income"
}
}
},
"then": {
"properties": {
"units": {
"const": "thousand_rub"
},
"data": {
"$ref": "#/$defs/KfoIncomeData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "goodwill"
}
}
},
"then": {
"properties": {
"units": {
"const": "rub"
},
"data": {
"$ref": "#/$defs/GoodwillData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "corrections"
}
}
},
"then": {
"properties": {
"units": {
"const": "rub"
},
"data": {
"$ref": "#/$defs/CorrectionsData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "other_report"
}
}
},
"then": {
"properties": {
"units": {
"const": "thousand_rub"
},
"data": {
"$ref": "#/$defs/OtherReportData"
}
}
}
},
{
"if": {
"properties": {
"item_type": {
"const": "version_card"
}
}
},
"then": {
"properties": {
"units": {
"const": "none"
},
"data": {
"$ref": "#/$defs/VersionCardData"
}
}
}
}
],
"$defs": {
"KfoLineCompanyOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"legal_entity_id": {
"type": "string",
"format": "uuid"
},
"client_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "«По данным клиента», тыс. руб.; строки расходов приведены к −|x| (§8 «КФО» п. 2)"
},
"vgo_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "«В т. ч. взаимные», тыс. руб. до целых, со знаком строки (п. 6)"
},
"cleaned_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "«Очищенные показатели» = client_amount − vgo_amount"
},
"share_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,3}\\.\\d{2}$",
"description": "«Доля в показателе по группе, %» от bank_amount строки, ROUND_HALF_UP; null при нулевом итоге или |доля| ≥ 1000 %"
}
},
"required": [
"legal_entity_id",
"client_amount",
"vgo_amount",
"cleaned_amount",
"share_percent"
]
},
"KfoLineOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"line_code": {
"type": "string",
"description": "код строки бланка редакции на отчётную дату или GOODWILL"
},
"line_name": {
"type": "string"
},
"ordinal": {
"type": "integer",
"description": "порядок строки в бланке"
},
"is_total": {
"type": "boolean",
"description": "итоговая строка бланка (1100, 1600, 2100 …)"
},
"is_threshold_base": {
"type": "boolean",
"description": "строка — база порога (1300, 1600, 2110 или 2200), подсветка при превышении"
},
"companies": {
"type": "array",
"items": {
"$ref": "#/$defs/KfoLineCompanyOut"
},
"description": "по компаниям в порядке KfoResultOut.companies; у GOODWILL — пусто"
},
"sum_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "Σ client_amount"
},
"vgo_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "Σ vgo_amount = eliminated_auto + eliminated_manual"
},
"eliminated_auto": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
},
"eliminated_manual": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
},
"goodwill_adjust": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "Σ G — у GOODWILL и итогов 1100, 1600"
},
"bank_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
],
"description": "«КФО, подготовленная банком» = sum_amount − vgo_amount + goodwill_adjust"
},
"deviation_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"description": "«Расхождения» (§8 «КФО» п. 9); у итогов — null"
},
"comment": {
"type": [
"string",
"null"
],
"maxLength": 2000
}
},
"required": [
"line_code",
"line_name",
"ordinal",
"is_total",
"is_threshold_base",
"companies",
"sum_amount",
"vgo_amount",
"eliminated_auto",
"eliminated_manual",
"goodwill_adjust",
"bank_amount",
"deviation_amount",
"comment"
]
},
"KfoStatementOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"lines": {
"type": "array",
"items": {
"$ref": "#/$defs/KfoLineOut"
}
}
},
"required": [
"lines"
]
},
"KfoThresholdOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"deviation_total": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
},
"base_kind": {
"type": "string",
"enum": [
"NET_ASSETS",
"BALANCE_TOTAL",
"SALES_PROFIT",
"REVENUE"
]
},
"base_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
},
"limit_percent": {
"type": "string",
"enum": [
"10.00",
"1.00"
]
},
"limit_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
},
"deviation_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d+\\.\\d{2}$",
"description": "deviation_total / base_amount × 100; null при нулевой базе"
},
"exceeded": {
"type": "boolean",
"description": "deviation_total > limit_amount (равно — норма)"
}
},
"required": [
"deviation_total",
"base_kind",
"base_amount",
"limit_percent",
"limit_amount",
"deviation_percent",
"exceeded"
]
},
"KfoSummaryOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"balance": {
"$ref": "#/$defs/KfoThresholdOut"
},
"income": {
"$ref": "#/$defs/KfoThresholdOut"
}
},
"required": [
"balance",
"income"
]
},
"KfoCompanyOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"legal_entity_id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"inn": {
"type": "string"
}
},
"required": [
"legal_entity_id",
"name",
"inn"
]
},
"KfoCorrectionsOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"count": {
"type": "integer",
"minimum": 0
},
"amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
}
},
"required": [
"count",
"amount"
],
"description": "агрегаты с применённой корректировкой и Σ их исключений, тыс. руб."
},
"KfoRequisitesOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"company_group_name": {
"type": "string"
},
"related_group_name": {
"type": [
"string",
"null"
]
},
"reporting_date": {
"type": "string",
"format": "date"
},
"version_no": {
"type": "integer"
},
"version_status": {
"type": "string",
"description": "consolidation_version.status (enum consolidation_status DBML)",
"enum": [
"INITIATED",
"DOCUMENTS_PROCESSING",
"DATA_CORRECTION",
"CONSOLIDATION_RF",
"ADJUSTMENT",
"VERIFICATION_RF",
"CONSOLIDATION_GO",
"VERIFICATION_GO",
"VERIFIED",
"CANCELLED",
"REJECTED",
"ARCHIVED"
]
},
"scenario": {
"type": "string",
"enum": [
"CREATE",
"CONFIRM"
]
},
"approach": {
"type": "string",
"enum": [
"BASIC",
"EXTENDED"
]
},
"methodology_deviations": {
"type": [
"string",
"null"
],
"maxLength": 4000
},
"uob_decision_no": {
"type": [
"string",
"null"
]
},
"uob_decision_date": {
"type": [
"string",
"null"
],
"format": "date"
},
"corrections_balance": {
"$ref": "#/$defs/KfoCorrectionsOut"
},
"corrections_income": {
"$ref": "#/$defs/KfoCorrectionsOut"
}
},
"required": [
"company_group_name",
"related_group_name",
"reporting_date",
"version_no",
"version_status",
"scenario",
"approach",
"methodology_deviations",
"uob_decision_no",
"uob_decision_date",
"corrections_balance",
"corrections_income"
]
},
"KfoGoodwillOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"enabled": {
"type": "boolean"
},
"total": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$",
"examples": [
"588500.00"
]
}
},
"required": [
"enabled",
"total"
]
},
"KfoWarningOut": {
"type": "object",
"additionalProperties": true,
"properties": {
"code": {
"type": "string",
"enum": [
"FORM_MISSING",
"FORM_AMBIGUOUS",
"FORM_UNITS_UNKNOWN",
"LINE_OUTSIDE_BLANK",
"UNALLOCATED_ROWS",
"INCOME_RULES_MISSING",
"GOODWILL_NOT_APPLIED",
"GOODWILL_ROW_REASSIGNED",
"CORRECTION_SUPERSEDED_BY_GOODWILL"
]
},
"message": {
"type": "string"
},
"legal_entity_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"statement_type": {
"type": [
"string",
"null"
],
"enum": [
"balance",
"income",
null
]
},
"count": {
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
]
},
"KfoBalanceData": {
"allOf": [
{
"type": "object",
"properties": {
"version_id": {
"type": "string",
"format": "uuid"
},
"computed_at": {
"type": "string",
"format": "date-time"
},
"is_frozen": {
"type": "boolean"
},
"units": {
"type": "string",
"const": "thousand_rub"
},
"companies": {
"type": "array",
"items": {
"$ref": "#/$defs/KfoCompanyOut"
}
},
"requisites": {
"$ref": "#/$defs/KfoRequisitesOut"
},
"summary": {
"$ref": "#/$defs/KfoSummaryOut"
},
"justification_required": {
"type": "boolean"
},
"threshold_justification": {
"type": [
"string",
"null"
],
"maxLength": 4000
},
"goodwill": {
"$ref": "#/$defs/KfoGoodwillOut"
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/$defs/KfoWarningOut"
}
},
"balance": {
"$ref": "#/$defs/KfoStatementOut"
}
},
"required": [
"version_id",
"computed_at",
"is_frozen",
"units",
"companies",
"requisites",
"summary",
"justification_required",
"threshold_justification",
"goodwill",
"warnings",
"balance"
],
"additionalProperties": true,
"description": "KfoResultOut без editable/read_only_reason, только отчёт ББ",
"not": {
"required": [
"income"
]
}
},
{
"properties": {
"is_frozen": {
"const": true
},
"companies": {
"minItems": 1
},
"requisites": {
"properties": {
"version_status": {
"const": "VERIFIED"
}
}
}
}
}
]
},
"KfoIncomeData": {
"allOf": [
{
"type": "object",
"properties": {
"version_id": {
"type": "string",
"format": "uuid"
},
"computed_at": {
"type": "string",
"format": "date-time"
},
"is_frozen": {
"type": "boolean"
},
"units": {
"type": "string",
"const": "thousand_rub"
},
"companies": {
"type": "array",
"items": {
"$ref": "#/$defs/KfoCompanyOut"
}
},
"requisites": {
"$ref": "#/$defs/KfoRequisitesOut"
},
"summary": {
"$ref": "#/$defs/KfoSummaryOut"
},
"justification_required": {
"type": "boolean"
},
"threshold_justification": {
"type": [
"string",
"null"
],
"maxLength": 4000
},
"goodwill": {
"$ref": "#/$defs/KfoGoodwillOut"
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/$defs/KfoWarningOut"
}
},
"income": {
"$ref": "#/$defs/KfoStatementOut"
}
},
"required": [
"version_id",
"computed_at",
"is_frozen",
"units",
"companies",
"requisites",
"summary",
"justification_required",
"threshold_justification",
"goodwill",
"warnings",
"income"
],
"additionalProperties": true,
"description": "KfoResultOut без editable/read_only_reason, только отчёт ОФР",
"not": {
"required": [
"balance"
]
}
},
{
"properties": {
"is_frozen": {
"const": true
},
"companies": {
"minItems": 1
},
"requisites": {
"properties": {
"version_status": {
"const": "VERIFIED"
}
}
}
}
}
]
},
"Ref": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": true
},
"UserRef": {
"type": "object",
"properties": {
"user_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"full_name": {
"type": "string"
}
},
"required": [
"user_id",
"full_name"
],
"additionalProperties": true,
"description": "Пользователь с ФИО на дату верификации (user_id — справочно, app_user не удаляется)"
},
"ConsolidatedRowOut": {
"type": "object",
"properties": {
"legal_entity_id": {
"type": "string",
"format": "uuid"
},
"legal_entity_name": {
"type": "string"
},
"legal_entity_inn": {
"type": [
"string",
"null"
]
},
"account_code": {
"type": [
"string",
"null"
]
},
"period": {
"type": "string"
},
"is_cumulative": {
"type": "boolean"
},
"counterparty_name": {
"type": [
"string",
"null"
]
},
"counterparty_inn": {
"type": [
"string",
"null"
]
},
"counterparty_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"counterparty_entity_name": {
"type": [
"string",
"null"
]
},
"counterparty_entity_inn": {
"type": [
"string",
"null"
]
},
"counterparty_type": {
"type": "string",
"enum": [
"GSK",
"GK",
"EXTERNAL"
]
},
"match_kind": {
"type": [
"string",
"null"
]
},
"opening_debit": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"opening_credit": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"turnover_debit": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"turnover_credit": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"closing_debit": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"closing_credit": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"legal_entity_id",
"legal_entity_name",
"legal_entity_inn",
"account_code",
"period",
"is_cumulative",
"counterparty_name",
"counterparty_inn",
"counterparty_id",
"counterparty_entity_name",
"counterparty_entity_inn",
"counterparty_type",
"match_kind",
"opening_debit",
"opening_credit",
"turnover_debit",
"turnover_credit",
"closing_debit",
"closing_credit"
],
"additionalProperties": true,
"description": "ConsolidatedRowOut (dev/api-contract-slice-4.md §3); entry_ids, warnings — справочно, необязательны"
},
"OsvGapOut": {
"type": "object",
"properties": {
"legal_entity_id": {
"type": "string",
"format": "uuid"
},
"legal_entity_name": {
"type": "string"
},
"account_code": {
"type": "string"
},
"missing_quarters": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Q1",
"Q2",
"Q3",
"Q4"
]
}
}
},
"required": [
"legal_entity_id",
"legal_entity_name",
"account_code",
"missing_quarters"
],
"additionalProperties": true
},
"OsvSummaryOut": {
"type": "object",
"properties": {
"rows_total": {
"type": "integer"
},
"gaps": {
"type": "array",
"items": {
"$ref": "#/$defs/OsvGapOut"
}
}
},
"required": [
"rows_total",
"gaps"
],
"additionalProperties": true
},
"SummaryOsvData": {
"type": "object",
"properties": {
"rows": {
"type": "array",
"items": {
"$ref": "#/$defs/ConsolidatedRowOut"
}
},
"summary": {
"$ref": "#/$defs/OsvSummaryOut"
}
},
"required": [
"rows",
"summary"
],
"additionalProperties": true
},
"CorrectionEntryOut": {
"type": "object",
"properties": {
"entry_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"minItems": 1
},
"legal_entity_id": {
"type": "string",
"format": "uuid"
},
"counterparty_id": {
"type": "string",
"format": "uuid"
},
"account_code": {
"type": "string"
},
"side": {
"type": "string",
"enum": [
"D",
"K"
]
},
"amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"decision": {
"type": "string"
}
},
"required": [
"entry_ids",
"legal_entity_id",
"counterparty_id",
"account_code",
"side",
"amount",
"decision"
],
"additionalProperties": true,
"description": "строка ОСВ агрегата (нужна выгрузке таблицы корректировок)"
},
"AggregateSideOut": {
"type": "object",
"properties": {
"article_line": {
"type": [
"string",
"null"
]
},
"accounts": {
"type": "array",
"items": {
"type": "string"
}
},
"amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/$defs/CorrectionEntryOut"
}
}
},
"required": [
"article_line",
"accounts",
"amount",
"entries"
],
"additionalProperties": true
},
"CorrectionLineOut": {
"type": "object",
"properties": {
"line_code": {
"type": "string"
},
"amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"line_code",
"amount"
],
"additionalProperties": true
},
"CorrectionBalanceOut": {
"type": "object",
"properties": {
"debit_total": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"credit_total": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"difference": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"difference_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d+\\.\\d{2}$"
},
"remainder_1": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"remainder_2": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"debit_total",
"credit_total",
"difference",
"difference_percent",
"remainder_1",
"remainder_2"
],
"additionalProperties": true
},
"CorrectionPairOut": {
"type": "object",
"properties": {
"side_1": {
"$ref": "#/$defs/AggregateSideOut"
},
"side_2": {
"$ref": "#/$defs/AggregateSideOut"
},
"deviation_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"deviation_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d+\\.\\d{2}$"
}
},
"required": [
"side_1",
"side_2",
"deviation_amount",
"deviation_percent"
],
"additionalProperties": true
},
"CorrectionRuleOut": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"rule_no": {
"type": "integer"
},
"article_1_line": {
"type": [
"string",
"null"
]
},
"article_2_line": {
"type": [
"string",
"null"
]
},
"side_1": {
"type": "string",
"enum": [
"D",
"K"
]
},
"measure": {
"type": "string"
},
"company_1_accounts": {
"type": "array",
"items": {
"type": "string"
}
},
"company_2_accounts": {
"type": "array",
"items": {
"type": "string"
}
},
"company_1_excluded": {
"type": "array",
"items": {
"type": "string"
}
},
"company_2_excluded": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"rule_no",
"article_1_line",
"article_2_line",
"side_1",
"measure",
"company_1_accounts",
"company_2_accounts",
"company_1_excluded",
"company_2_excluded"
],
"additionalProperties": true,
"description": "Правило элиминации на дату верификации (CorrectionRuleOut)"
},
"CorrectionOut": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"APPLIED"
]
},
"version_no": {
"type": "integer"
},
"debit": {
"type": "array",
"items": {
"$ref": "#/$defs/CorrectionLineOut"
}
},
"credit": {
"type": "array",
"items": {
"$ref": "#/$defs/CorrectionLineOut"
}
},
"comment": {
"type": "string"
},
"balance": {
"$ref": "#/$defs/CorrectionBalanceOut"
},
"updated_by": {
"anyOf": [
{
"$ref": "#/$defs/Ref"
},
{
"type": "null"
}
]
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"status",
"version_no",
"debit",
"credit",
"comment",
"balance",
"updated_by",
"updated_at"
],
"additionalProperties": true,
"description": "CorrectionOut; в срезе только APPLIED"
},
"CorrectionAggregateOut": {
"type": "object",
"properties": {
"rule_no": {
"type": "integer"
},
"company_1": {
"$ref": "#/$defs/Ref"
},
"company_2": {
"$ref": "#/$defs/Ref"
},
"side_1": {
"$ref": "#/$defs/AggregateSideOut"
},
"side_2": {
"$ref": "#/$defs/AggregateSideOut"
},
"pairs": {
"type": "array",
"items": {
"$ref": "#/$defs/CorrectionPairOut"
}
},
"deviation_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"deviation_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d+\\.\\d{2}$"
},
"exceeds_threshold": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"AUTO",
"DISCREPANCY",
"ONE_SIDED",
"MANUAL"
]
},
"eliminated_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"correction": {
"anyOf": [
{
"$ref": "#/$defs/CorrectionOut"
},
{
"type": "null"
}
]
}
},
"required": [
"rule_no",
"company_1",
"company_2",
"side_1",
"side_2",
"pairs",
"deviation_amount",
"deviation_percent",
"exceeds_threshold",
"status",
"eliminated_amount",
"correction"
],
"additionalProperties": true
},
"UnallocatedEntryOut": {
"type": "object",
"properties": {
"entry_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"minItems": 1
},
"owner": {
"$ref": "#/$defs/Ref"
},
"counterparty": {
"$ref": "#/$defs/Ref"
},
"account_code": {
"type": "string"
},
"side": {
"type": "string",
"enum": [
"D",
"K"
]
},
"amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"reason": {
"type": "string"
},
"excluded": {
"type": "boolean"
}
},
"required": [
"entry_ids",
"owner",
"counterparty",
"account_code",
"side",
"amount",
"reason",
"excluded"
],
"additionalProperties": true
},
"CorrectionTotalsOut": {
"type": "object",
"properties": {
"amount_1": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"amount_2": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"deviation_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"correction_debit": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"correction_credit": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"amount_1",
"amount_2",
"deviation_amount",
"correction_debit",
"correction_credit"
],
"additionalProperties": true
},
"CorrectionTableData": {
"type": "object",
"properties": {
"statement_type": {
"type": "string",
"enum": [
"balance",
"income"
]
},
"rules_version_no": {
"type": "integer"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/$defs/CorrectionRuleOut"
},
"minItems": 1
},
"aggregates": {
"type": "array",
"items": {
"$ref": "#/$defs/CorrectionAggregateOut"
}
},
"unallocated": {
"type": "array",
"items": {
"$ref": "#/$defs/UnallocatedEntryOut"
}
},
"totals": {
"$ref": "#/$defs/CorrectionTotalsOut"
}
},
"required": [
"statement_type",
"rules_version_no",
"rules",
"aggregates",
"unallocated",
"totals"
],
"additionalProperties": true,
"description": "CorrectionTableOut без editable/read_only_reason"
},
"VgoPairsData": {
"type": "object",
"properties": {
"balance": {
"$ref": "#/$defs/CorrectionTableData"
},
"income": {
"anyOf": [
{
"$ref": "#/$defs/CorrectionTableData"
},
{
"type": "null"
}
]
}
},
"required": [
"balance",
"income"
],
"additionalProperties": true
},
"CorrectionsData": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"statement_type": {
"type": "string",
"enum": [
"balance",
"income"
]
},
"rule_no": {
"type": "integer"
},
"company_1": {
"$ref": "#/$defs/Ref"
},
"company_2": {
"$ref": "#/$defs/Ref"
},
"correction": {
"$ref": "#/$defs/CorrectionOut"
}
},
"required": [
"statement_type",
"rule_no",
"company_1",
"company_2",
"correction"
],
"additionalProperties": true
}
}
},
"required": [
"items"
],
"additionalProperties": true
},
"MatrixCellOut": {
"type": "object",
"properties": {
"company_a_id": {
"type": "string",
"format": "uuid"
},
"company_b_id": {
"type": "string",
"format": "uuid"
},
"amount_a": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"amount_b": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"variance_amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"variance_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d+\\.\\d{2}$"
},
"exceeds_threshold": {
"type": "boolean"
},
"one_sided": {
"type": "boolean"
},
"skipped_osv_entry_count": {
"type": "integer"
}
},
"required": [
"company_a_id",
"company_b_id",
"amount_a",
"amount_b",
"variance_amount",
"variance_percent",
"exceeds_threshold",
"one_sided",
"skipped_osv_entry_count"
],
"additionalProperties": true
},
"IntercompanyMatrixOut": {
"type": "object",
"properties": {
"companies": {
"type": "array",
"items": {
"$ref": "#/$defs/Ref"
},
"minItems": 1
},
"cells": {
"type": "array",
"items": {
"$ref": "#/$defs/MatrixCellOut"
}
},
"total_debit": {
"type": "object",
"propertyNames": {
"format": "uuid"
},
"additionalProperties": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"total_credit": {
"type": "object",
"propertyNames": {
"format": "uuid"
},
"additionalProperties": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
}
},
"required": [
"companies",
"cells",
"total_debit",
"total_credit"
],
"additionalProperties": true,
"description": "IntercompanyMatrixOut; osv_entry_ids_* — справочно"
},
"ResultTableOut": {
"type": "object",
"properties": {
"companies": {
"type": "array",
"items": {
"$ref": "#/$defs/Ref"
}
},
"articles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"amounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"company_id": {
"type": "string",
"format": "uuid"
},
"amount": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"company_id",
"amount"
],
"additionalProperties": true
}
},
"group_total": {
"type": "string",
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"code",
"name",
"amounts",
"group_total"
],
"additionalProperties": true
}
}
},
"required": [
"companies",
"articles"
],
"additionalProperties": true
},
"ChessData": {
"type": "object",
"properties": {
"matrix_all": {
"$ref": "#/$defs/IntercompanyMatrixOut"
},
"presets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rule_no": {
"type": "integer"
},
"statement_type": {
"type": "string",
"enum": [
"balance",
"income"
]
},
"rules_version_no": {
"type": "integer"
},
"rule": {
"$ref": "#/$defs/CorrectionRuleOut"
},
"matrix": {
"$ref": "#/$defs/IntercompanyMatrixOut"
}
},
"required": [
"rule_no",
"statement_type",
"rules_version_no",
"rule",
"matrix"
],
"additionalProperties": true
}
},
"result_table": {
"$ref": "#/$defs/ResultTableOut"
}
},
"required": [
"matrix_all",
"presets",
"result_table"
],
"additionalProperties": true
},
"GoodwillTotalsOut": {
"type": "object",
"properties": {
"financial_investment_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"charter_capital_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"participation_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"goodwill_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"goodwill_in_kfo_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
}
},
"required": [
"financial_investment_amount",
"charter_capital_amount",
"participation_amount",
"goodwill_amount",
"goodwill_in_kfo_amount"
],
"additionalProperties": true
},
"GoodwillRowOut": {
"type": "object",
"properties": {
"head_legal_entity": {
"$ref": "#/$defs/Ref"
},
"subsidiary_legal_entity": {
"$ref": "#/$defs/Ref"
},
"ownership_share": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,5}\\.\\d{2}$"
},
"financial_investment_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"charter_capital_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"additional_capital_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"participation_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"goodwill_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"include_in_kfo": {
"type": "boolean"
},
"comment": {
"type": [
"string",
"null"
]
},
"has_investments": {
"type": "boolean"
}
},
"required": [
"head_legal_entity",
"subsidiary_legal_entity",
"ownership_share",
"financial_investment_amount",
"charter_capital_amount",
"additional_capital_amount",
"participation_amount",
"goodwill_amount",
"include_in_kfo",
"comment",
"has_investments"
],
"additionalProperties": true
},
"GoodwillData": {
"type": "object",
"properties": {
"goodwill_enabled": {
"const": true
},
"rows": {
"type": "array",
"items": {
"$ref": "#/$defs/GoodwillRowOut"
}
},
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"head_legal_entity": {
"$ref": "#/$defs/Ref"
},
"totals": {
"$ref": "#/$defs/GoodwillTotalsOut"
}
},
"required": [
"head_legal_entity",
"totals"
],
"additionalProperties": true
}
},
"totals": {
"$ref": "#/$defs/GoodwillTotalsOut"
}
},
"required": [
"goodwill_enabled",
"rows",
"groups",
"totals"
],
"additionalProperties": true,
"description": "GoodwillTableOut без editable/read_only_reason; пишется только при goodwill_enabled"
},
"OtherReportData": {
"type": "object",
"properties": {
"report_kind": {
"const": "client_kfo_comparison"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"statement_type": {
"type": "string",
"enum": [
"balance",
"income"
]
},
"line_code": {
"type": "string"
},
"line_name": {
"type": "string"
},
"client_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"client_vgo_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"bank_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"bank_vgo_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"deviation_amount": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,16}\\.\\d{2}$"
},
"deviation_percent": {
"type": [
"string",
"null"
],
"pattern": "^-?\\d{1,5}\\.\\d{2}$"
},
"deviation_reason": {
"type": [
"string",
"null"
]
},
"comment": {
"type": [
"string",
"null"
]
}
},
"required": [
"statement_type",
"line_code",
"line_name",
"client_amount",
"client_vgo_amount",
"bank_amount",
"bank_vgo_amount",
"deviation_amount",
"deviation_percent",
"deviation_reason",
"comment"
],
"additionalProperties": true
}
}
},
"required": [
"report_kind",
"lines"
],
"additionalProperties": true
},
"VersionCardData": {
"type": "object",
"properties": {
"company_group": {
"$ref": "#/$defs/Ref"
},
"related_group": {
"$ref": "#/$defs/Ref"
},
"reporting_date": {
"type": "string",
"format": "date"
},
"year": {
"type": "integer"
},
"quarter": {
"type": "string",
"enum": [
"Q1",
"Q2",
"Q3",
"Q4"
]
},
"version_no": {
"type": "integer"
},
"scenario": {
"type": "string",
"enum": [
"CREATE",
"CONFIRM"
]
},
"approach": {
"type": "string",
"enum": [
"BASIC",
"EXTENDED"
]
},
"goodwill_enabled": {
"type": "boolean"
},
"initiator": {
"$ref": "#/$defs/UserRef"
},
"initiator_office": {
"$ref": "#/$defs/Ref"
},
"members": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"legal_entity_id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"inn": {
"type": "string"
},
"is_head_entity": {
"type": "boolean"
}
},
"required": [
"legal_entity_id",
"name",
"inn",
"is_head_entity"
],
"additionalProperties": true
}
},
"history": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"from_status": {
"type": [
"string",
"null"
],
"enum": [
"INITIATED",
"DOCUMENTS_PROCESSING",
"DATA_CORRECTION",
"CONSOLIDATION_RF",
"ADJUSTMENT",
"VERIFICATION_RF",
"CONSOLIDATION_GO",
"VERIFICATION_GO",
"VERIFIED",
"CANCELLED",
"REJECTED",
"ARCHIVED",
null
]
},
"to_status": {
"type": "string",
"enum": [
"INITIATED",
"DOCUMENTS_PROCESSING",
"DATA_CORRECTION",
"CONSOLIDATION_RF",
"ADJUSTMENT",
"VERIFICATION_RF",
"CONSOLIDATION_GO",
"VERIFICATION_GO",
"VERIFIED",
"CANCELLED",
"REJECTED",
"ARCHIVED"
]
},
"changed_by": {
"$ref": "#/$defs/UserRef"
},
"changed_at": {
"type": "string",
"format": "date-time"
},
"comment": {
"type": [
"string",
"null"
]
}
},
"required": [
"from_status",
"to_status",
"changed_by",
"changed_at",
"comment"
],
"additionalProperties": true
}
},
"verified_by": {
"$ref": "#/$defs/UserRef"
},
"verified_at": {
"type": "string",
"format": "date-time"
},
"uob_decision_no": {
"type": [
"string",
"null"
]
},
"uob_decision_date": {
"type": [
"string",
"null"
],
"format": "date"
},
"methodology_deviations": {
"type": [
"string",
"null"
]
}
},
"required": [
"company_group",
"related_group",
"reporting_date",
"year",
"quarter",
"version_no",
"scenario",
"approach",
"goodwill_enabled",
"initiator",
"initiator_office",
"members",
"history",
"verified_by",
"verified_at",
"uob_decision_no",
"uob_decision_date",
"methodology_deviations"
],
"additionalProperties": true,
"description": "Карточка версии на дату верификации (DOC-274687 доп. 4; новый item_type v5.26)"
}
}
}