{
  "openapi": "3.1.0",
  "info": {
    "title": "Számolj vele Agent Calculator",
    "version": "1.0.0",
    "description": "Read-only tax estimates using the existing site engine. Public JSON API and MCP service available at https://szamoljvele.hu. Preserve eligibility, warnings and expense bases."
  },
  "servers": [
    {
      "url": "https://szamoljvele.hu"
    }
  ],
  "paths": {
    "/api/agent/calculate": {
      "post": {
        "operationId": "calculate_hungarian_business_tax",
        "summary": "Magyar vállalkozói adók becslése",
        "description": "Estimate one Hungarian tax regime for a supplied scenario using the same engine as szamoljvele.hu. Annual HUF revenue excluding VAT; explicit tax year and mode parameters. Read-only: does not read or change saved calculator inputs. Respect eligibility, incomeBasis, draft status and model warnings. Not a tax filing or professional advice.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taxYear": {
                    "type": "integer",
                    "enum": [
                      2026,
                      2027
                    ],
                    "description": "Required calculation year. 2027 wage-based values retain the 2026 baseline."
                  },
                  "annualRevenueHuf": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000.0,
                    "description": "Annual revenue excluding VAT, in Hungarian forints. Always annual HUF, not monthly or EUR/USD."
                  },
                  "taxMode": {
                    "type": "string",
                    "enum": [
                      "atalany",
                      "kata",
                      "vszja",
                      "kiva"
                    ],
                    "description": "Tax regime to estimate."
                  },
                  "parameters": {
                    "type": "object",
                    "description": "Mode-specific parameters, as specified by the matching oneOf branch."
                  }
                },
                "required": [
                  "taxYear",
                  "annualRevenueHuf",
                  "taxMode",
                  "parameters"
                ],
                "additionalProperties": false,
                "oneOf": [
                  {
                    "properties": {
                      "taxMode": {
                        "const": "atalany"
                      },
                      "parameters": {
                        "type": "object",
                        "properties": {
                          "employment": {
                            "type": "string",
                            "enum": [
                              "main",
                              "side",
                              "retired"
                            ],
                            "description": "main: full-time entrepreneur; side: at least 36 hours/week employment or full-time student; retired: own-right pensioner."
                          },
                          "costRatio": {
                            "type": "string",
                            "enum": [
                              "general",
                              "80%",
                              "90%"
                            ],
                            "description": "Activity-dependent expense ratio, not a free tax optimization choice. general is 45% in 2026 and 50% in 2027."
                          },
                          "qualifiedActivity": {
                            "type": "boolean",
                            "description": "Whether the full-time main activity requires qualifications; affects minimum contribution base. Required for main employment."
                          },
                          "hipaMethod": {
                            "type": "string",
                            "enum": [
                              "simple",
                              "general"
                            ],
                            "description": "Local business tax method. simple uses revenue bands when available; general uses revenue less permitted HIPA deductions. Default: simple."
                          },
                          "annualHipaDeductionsHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual permitted HIPA deductions in HUF; not all actual expenses qualify. Used only with general method; default 0."
                          }
                        },
                        "required": [
                          "employment",
                          "costRatio"
                        ],
                        "additionalProperties": false,
                        "allOf": [
                          {
                            "if": {
                              "properties": {
                                "employment": {
                                  "const": "main"
                                }
                              }
                            },
                            "then": {
                              "required": [
                                "qualifiedActivity"
                              ]
                            }
                          }
                        ]
                      }
                    }
                  },
                  {
                    "properties": {
                      "taxMode": {
                        "const": "kata"
                      },
                      "parameters": {
                        "type": "object",
                        "properties": {
                          "employment": {
                            "type": "string",
                            "enum": [
                              "main",
                              "side",
                              "retired"
                            ],
                            "description": "main: full-time entrepreneur; side: at least 36 hours/week employment or full-time student; retired: own-right pensioner."
                          },
                          "clients": {
                            "type": "string",
                            "enum": [
                              "private",
                              "business"
                            ],
                            "description": "private: income only from private individuals; business: companies/other entrepreneurs also pay."
                          },
                          "kataRules": {
                            "type": "string",
                            "enum": [
                              "current",
                              "proposal"
                            ],
                            "description": "current: current KATA rules; proposal: draft new KATA for 2027 only, not enacted law."
                          },
                          "businessRevenuePercent": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "Business-payer share of total revenue, required for business clients in the proposal scenario."
                          },
                          "largestClientPercent": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "Largest business payer plus its related companies as percentage of total revenue, required for business clients in the proposal scenario; cannot exceed businessRevenuePercent."
                          },
                          "employerClient": {
                            "type": "string",
                            "enum": [
                              "no",
                              "yes"
                            ],
                            "description": "Whether a payer is a current/former employer within 24 months, successor or related company. Required for business clients in the proposal scenario."
                          },
                          "hipaMethod": {
                            "type": "string",
                            "enum": [
                              "simple",
                              "general"
                            ],
                            "description": "Local business tax method. simple uses revenue bands when available; general uses revenue less permitted HIPA deductions. Default: simple."
                          },
                          "annualHipaDeductionsHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual permitted HIPA deductions in HUF; not all actual expenses qualify. Used only with general method; default 0."
                          }
                        },
                        "required": [
                          "employment",
                          "clients",
                          "kataRules"
                        ],
                        "additionalProperties": false,
                        "allOf": [
                          {
                            "if": {
                              "properties": {
                                "clients": {
                                  "const": "business"
                                },
                                "kataRules": {
                                  "const": "proposal"
                                }
                              }
                            },
                            "then": {
                              "required": [
                                "businessRevenuePercent",
                                "largestClientPercent",
                                "employerClient"
                              ]
                            }
                          }
                        ]
                      }
                    }
                  },
                  {
                    "properties": {
                      "taxMode": {
                        "const": "vszja"
                      },
                      "parameters": {
                        "type": "object",
                        "properties": {
                          "annualExpensesHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual actual, deductible business expenses in HUF, excluding the owner withdrawal and taxes calculated here."
                          },
                          "monthlyGrossWithdrawalHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Monthly owner withdrawal (kivét), before tax, in HUF."
                          }
                        },
                        "required": [
                          "annualExpensesHuf",
                          "monthlyGrossWithdrawalHuf"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  {
                    "properties": {
                      "taxMode": {
                        "const": "kiva"
                      },
                      "parameters": {
                        "type": "object",
                        "properties": {
                          "annualExpensesHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual company expenses in HUF, excluding the owner salary and taxes calculated here."
                          },
                          "monthlyGrossSalaryHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Monthly gross owner salary in HUF."
                          }
                        },
                        "required": [
                          "annualExpensesHuf",
                          "monthlyGrossSalaryHuf"
                        ],
                        "additionalProperties": false
                      }
                    }
                  }
                ]
              },
              "example": {
                "taxYear": 2026,
                "annualRevenueHuf": 18000000,
                "taxMode": "atalany",
                "parameters": {
                  "employment": "side",
                  "costRatio": "general",
                  "hipaMethod": "simple"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculated estimate, including eligibility and warnings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        },
                        "currency": {
                          "const": "HUF"
                        },
                        "taxYear": {
                          "type": "integer",
                          "enum": [
                            2026,
                            2027
                          ]
                        },
                        "estimateOnly": {
                          "const": true
                        },
                        "rulesReviewedAt": {
                          "type": "string"
                        },
                        "wageBaselineYear": {
                          "const": 2026
                        },
                        "assumptions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rulesUrl": {
                          "type": "string"
                        },
                        "result": {
                          "type": "object",
                          "properties": {
                            "taxMode": {
                              "type": "string",
                              "enum": [
                                "atalany",
                                "kata",
                                "vszja",
                                "kiva"
                              ],
                              "description": "Calculated tax mode."
                            },
                            "label": {
                              "type": "string"
                            },
                            "eligible": {
                              "type": "boolean"
                            },
                            "endsAtYearEnd": {
                              "type": "boolean"
                            },
                            "rulesStatus": {
                              "type": "string",
                              "enum": [
                                "current_rules",
                                "projection",
                                "draft_proposal"
                              ]
                            },
                            "annualRevenueHuf": {
                              "type": "number"
                            },
                            "publicChargesAnnualHuf": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "remainingAnnualHuf": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "remainingMonthlyHuf": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "effectiveRate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "incomeBasis": {
                              "type": "string",
                              "enum": [
                                "after_taxes_before_actual_expenses",
                                "after_taxes_and_declared_expenses"
                              ]
                            },
                            "deductedActualExpensesAnnualHuf": {
                              "type": "number"
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "text"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "breakdown": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "annualValueHuf": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "label",
                                  "annualValueHuf"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "taxMode",
                            "label",
                            "eligible",
                            "endsAtYearEnd",
                            "rulesStatus",
                            "annualRevenueHuf",
                            "publicChargesAnnualHuf",
                            "remainingAnnualHuf",
                            "remainingMonthlyHuf",
                            "effectiveRate",
                            "incomeBasis",
                            "deductedActualExpensesAnnualHuf",
                            "warnings",
                            "breakdown"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ok",
                        "currency",
                        "taxYear",
                        "estimateOnly",
                        "rulesReviewedAt",
                        "wageBaselineYear",
                        "assumptions",
                        "rulesUrl",
                        "result"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": false
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "INVALID_INPUT",
                                "CALCULATION_ERROR"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ok",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Scenario validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        },
                        "currency": {
                          "const": "HUF"
                        },
                        "taxYear": {
                          "type": "integer",
                          "enum": [
                            2026,
                            2027
                          ]
                        },
                        "estimateOnly": {
                          "const": true
                        },
                        "rulesReviewedAt": {
                          "type": "string"
                        },
                        "wageBaselineYear": {
                          "const": 2026
                        },
                        "assumptions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rulesUrl": {
                          "type": "string"
                        },
                        "result": {
                          "type": "object",
                          "properties": {
                            "taxMode": {
                              "type": "string",
                              "enum": [
                                "atalany",
                                "kata",
                                "vszja",
                                "kiva"
                              ],
                              "description": "Calculated tax mode."
                            },
                            "label": {
                              "type": "string"
                            },
                            "eligible": {
                              "type": "boolean"
                            },
                            "endsAtYearEnd": {
                              "type": "boolean"
                            },
                            "rulesStatus": {
                              "type": "string",
                              "enum": [
                                "current_rules",
                                "projection",
                                "draft_proposal"
                              ]
                            },
                            "annualRevenueHuf": {
                              "type": "number"
                            },
                            "publicChargesAnnualHuf": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "remainingAnnualHuf": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "remainingMonthlyHuf": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "effectiveRate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "incomeBasis": {
                              "type": "string",
                              "enum": [
                                "after_taxes_before_actual_expenses",
                                "after_taxes_and_declared_expenses"
                              ]
                            },
                            "deductedActualExpensesAnnualHuf": {
                              "type": "number"
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "text"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "breakdown": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "annualValueHuf": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "label",
                                  "annualValueHuf"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "taxMode",
                            "label",
                            "eligible",
                            "endsAtYearEnd",
                            "rulesStatus",
                            "annualRevenueHuf",
                            "publicChargesAnnualHuf",
                            "remainingAnnualHuf",
                            "remainingMonthlyHuf",
                            "effectiveRate",
                            "incomeBasis",
                            "deductedActualExpensesAnnualHuf",
                            "warnings",
                            "breakdown"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ok",
                        "currency",
                        "taxYear",
                        "estimateOnly",
                        "rulesReviewedAt",
                        "wageBaselineYear",
                        "assumptions",
                        "rulesUrl",
                        "result"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": false
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "INVALID_INPUT",
                                "CALCULATION_ERROR"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ok",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/compare": {
      "post": {
        "operationId": "compare_hungarian_tax_modes",
        "summary": "Adózási módok összehasonlítása",
        "description": "Compare two to four supplied independent Hungarian tax-mode profiles at the same annual HUF revenue and year. No ranking or recommendation is implied. KATA/atalany remaining cash is BEFORE actual expenses; VSZJA/KIVA deduct their declared expenses. Read-only; no saved settings are used or changed.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taxYear": {
                    "type": "integer",
                    "enum": [
                      2026,
                      2027
                    ],
                    "description": "Required calculation year. 2027 wage-based values retain the 2026 baseline."
                  },
                  "annualRevenueHuf": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000.0,
                    "description": "Annual revenue excluding VAT, in Hungarian forints. Always annual HUF, not monthly or EUR/USD."
                  },
                  "profiles": {
                    "type": "object",
                    "properties": {
                      "atalany": {
                        "type": "object",
                        "properties": {
                          "employment": {
                            "type": "string",
                            "enum": [
                              "main",
                              "side",
                              "retired"
                            ],
                            "description": "main: full-time entrepreneur; side: at least 36 hours/week employment or full-time student; retired: own-right pensioner."
                          },
                          "costRatio": {
                            "type": "string",
                            "enum": [
                              "general",
                              "80%",
                              "90%"
                            ],
                            "description": "Activity-dependent expense ratio, not a free tax optimization choice. general is 45% in 2026 and 50% in 2027."
                          },
                          "qualifiedActivity": {
                            "type": "boolean",
                            "description": "Whether the full-time main activity requires qualifications; affects minimum contribution base. Required for main employment."
                          },
                          "hipaMethod": {
                            "type": "string",
                            "enum": [
                              "simple",
                              "general"
                            ],
                            "description": "Local business tax method. simple uses revenue bands when available; general uses revenue less permitted HIPA deductions. Default: simple."
                          },
                          "annualHipaDeductionsHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual permitted HIPA deductions in HUF; not all actual expenses qualify. Used only with general method; default 0."
                          }
                        },
                        "required": [
                          "employment",
                          "costRatio"
                        ],
                        "additionalProperties": false,
                        "allOf": [
                          {
                            "if": {
                              "properties": {
                                "employment": {
                                  "const": "main"
                                }
                              }
                            },
                            "then": {
                              "required": [
                                "qualifiedActivity"
                              ]
                            }
                          }
                        ]
                      },
                      "kata": {
                        "type": "object",
                        "properties": {
                          "employment": {
                            "type": "string",
                            "enum": [
                              "main",
                              "side",
                              "retired"
                            ],
                            "description": "main: full-time entrepreneur; side: at least 36 hours/week employment or full-time student; retired: own-right pensioner."
                          },
                          "clients": {
                            "type": "string",
                            "enum": [
                              "private",
                              "business"
                            ],
                            "description": "private: income only from private individuals; business: companies/other entrepreneurs also pay."
                          },
                          "kataRules": {
                            "type": "string",
                            "enum": [
                              "current",
                              "proposal"
                            ],
                            "description": "current: current KATA rules; proposal: draft new KATA for 2027 only, not enacted law."
                          },
                          "businessRevenuePercent": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "Business-payer share of total revenue, required for business clients in the proposal scenario."
                          },
                          "largestClientPercent": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "Largest business payer plus its related companies as percentage of total revenue, required for business clients in the proposal scenario; cannot exceed businessRevenuePercent."
                          },
                          "employerClient": {
                            "type": "string",
                            "enum": [
                              "no",
                              "yes"
                            ],
                            "description": "Whether a payer is a current/former employer within 24 months, successor or related company. Required for business clients in the proposal scenario."
                          },
                          "hipaMethod": {
                            "type": "string",
                            "enum": [
                              "simple",
                              "general"
                            ],
                            "description": "Local business tax method. simple uses revenue bands when available; general uses revenue less permitted HIPA deductions. Default: simple."
                          },
                          "annualHipaDeductionsHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual permitted HIPA deductions in HUF; not all actual expenses qualify. Used only with general method; default 0."
                          }
                        },
                        "required": [
                          "employment",
                          "clients",
                          "kataRules"
                        ],
                        "additionalProperties": false,
                        "allOf": [
                          {
                            "if": {
                              "properties": {
                                "clients": {
                                  "const": "business"
                                },
                                "kataRules": {
                                  "const": "proposal"
                                }
                              }
                            },
                            "then": {
                              "required": [
                                "businessRevenuePercent",
                                "largestClientPercent",
                                "employerClient"
                              ]
                            }
                          }
                        ]
                      },
                      "vszja": {
                        "type": "object",
                        "properties": {
                          "annualExpensesHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual actual, deductible business expenses in HUF, excluding the owner withdrawal and taxes calculated here."
                          },
                          "monthlyGrossWithdrawalHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Monthly owner withdrawal (kivét), before tax, in HUF."
                          }
                        },
                        "required": [
                          "annualExpensesHuf",
                          "monthlyGrossWithdrawalHuf"
                        ],
                        "additionalProperties": false
                      },
                      "kiva": {
                        "type": "object",
                        "properties": {
                          "annualExpensesHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Annual company expenses in HUF, excluding the owner salary and taxes calculated here."
                          },
                          "monthlyGrossSalaryHuf": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000000.0,
                            "description": "Monthly gross owner salary in HUF."
                          }
                        },
                        "required": [
                          "annualExpensesHuf",
                          "monthlyGrossSalaryHuf"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "minProperties": 2,
                    "description": "Two to four independent tax-mode profiles. Each mode uses only its own supplied expenses and compensation."
                  }
                },
                "required": [
                  "taxYear",
                  "annualRevenueHuf",
                  "profiles"
                ],
                "additionalProperties": false
              },
              "example": {
                "taxYear": 2026,
                "annualRevenueHuf": 18000000,
                "profiles": {
                  "atalany": {
                    "employment": "main",
                    "qualifiedActivity": false,
                    "costRatio": "general"
                  },
                  "kata": {
                    "employment": "main",
                    "clients": "private",
                    "kataRules": "current"
                  },
                  "vszja": {
                    "annualExpensesHuf": 1500000,
                    "monthlyGrossWithdrawalHuf": 322800
                  },
                  "kiva": {
                    "annualExpensesHuf": 1500000,
                    "monthlyGrossSalaryHuf": 322800
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculated estimate, including eligibility and warnings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        },
                        "currency": {
                          "const": "HUF"
                        },
                        "taxYear": {
                          "type": "integer",
                          "enum": [
                            2026,
                            2027
                          ]
                        },
                        "estimateOnly": {
                          "const": true
                        },
                        "rulesReviewedAt": {
                          "type": "string"
                        },
                        "wageBaselineYear": {
                          "const": 2026
                        },
                        "assumptions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rulesUrl": {
                          "type": "string"
                        },
                        "results": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 4,
                          "items": {
                            "type": "object",
                            "properties": {
                              "taxMode": {
                                "type": "string",
                                "enum": [
                                  "atalany",
                                  "kata",
                                  "vszja",
                                  "kiva"
                                ],
                                "description": "Calculated tax mode."
                              },
                              "label": {
                                "type": "string"
                              },
                              "eligible": {
                                "type": "boolean"
                              },
                              "endsAtYearEnd": {
                                "type": "boolean"
                              },
                              "rulesStatus": {
                                "type": "string",
                                "enum": [
                                  "current_rules",
                                  "projection",
                                  "draft_proposal"
                                ]
                              },
                              "annualRevenueHuf": {
                                "type": "number"
                              },
                              "publicChargesAnnualHuf": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "remainingAnnualHuf": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "remainingMonthlyHuf": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "effectiveRate": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "incomeBasis": {
                                "type": "string",
                                "enum": [
                                  "after_taxes_before_actual_expenses",
                                  "after_taxes_and_declared_expenses"
                                ]
                              },
                              "deductedActualExpensesAnnualHuf": {
                                "type": "number"
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string"
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "text"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "breakdown": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "annualValueHuf": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "label",
                                    "annualValueHuf"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "taxMode",
                              "label",
                              "eligible",
                              "endsAtYearEnd",
                              "rulesStatus",
                              "annualRevenueHuf",
                              "publicChargesAnnualHuf",
                              "remainingAnnualHuf",
                              "remainingMonthlyHuf",
                              "effectiveRate",
                              "incomeBasis",
                              "deductedActualExpensesAnnualHuf",
                              "warnings",
                              "breakdown"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "ok",
                        "currency",
                        "taxYear",
                        "estimateOnly",
                        "rulesReviewedAt",
                        "wageBaselineYear",
                        "assumptions",
                        "rulesUrl",
                        "results"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": false
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "INVALID_INPUT",
                                "CALCULATION_ERROR"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ok",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Scenario validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        },
                        "currency": {
                          "const": "HUF"
                        },
                        "taxYear": {
                          "type": "integer",
                          "enum": [
                            2026,
                            2027
                          ]
                        },
                        "estimateOnly": {
                          "const": true
                        },
                        "rulesReviewedAt": {
                          "type": "string"
                        },
                        "wageBaselineYear": {
                          "const": 2026
                        },
                        "assumptions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rulesUrl": {
                          "type": "string"
                        },
                        "results": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 4,
                          "items": {
                            "type": "object",
                            "properties": {
                              "taxMode": {
                                "type": "string",
                                "enum": [
                                  "atalany",
                                  "kata",
                                  "vszja",
                                  "kiva"
                                ],
                                "description": "Calculated tax mode."
                              },
                              "label": {
                                "type": "string"
                              },
                              "eligible": {
                                "type": "boolean"
                              },
                              "endsAtYearEnd": {
                                "type": "boolean"
                              },
                              "rulesStatus": {
                                "type": "string",
                                "enum": [
                                  "current_rules",
                                  "projection",
                                  "draft_proposal"
                                ]
                              },
                              "annualRevenueHuf": {
                                "type": "number"
                              },
                              "publicChargesAnnualHuf": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "remainingAnnualHuf": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "remainingMonthlyHuf": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "effectiveRate": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "incomeBasis": {
                                "type": "string",
                                "enum": [
                                  "after_taxes_before_actual_expenses",
                                  "after_taxes_and_declared_expenses"
                                ]
                              },
                              "deductedActualExpensesAnnualHuf": {
                                "type": "number"
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string"
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "text"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "breakdown": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "annualValueHuf": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "label",
                                    "annualValueHuf"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "taxMode",
                              "label",
                              "eligible",
                              "endsAtYearEnd",
                              "rulesStatus",
                              "annualRevenueHuf",
                              "publicChargesAnnualHuf",
                              "remainingAnnualHuf",
                              "remainingMonthlyHuf",
                              "effectiveRate",
                              "incomeBasis",
                              "deductedActualExpensesAnnualHuf",
                              "warnings",
                              "breakdown"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "ok",
                        "currency",
                        "taxYear",
                        "estimateOnly",
                        "rulesReviewedAt",
                        "wageBaselineYear",
                        "assumptions",
                        "rulesUrl",
                        "results"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": false
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "INVALID_INPUT",
                                "CALCULATION_ERROR"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ok",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
