{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/obolusfinanz-de/json-schema/obolusfinanz-de-taxcompare-request-schema.json",
  "title": "TaxcompareRequest",
  "description": "Input for a multi-country salary comparison. Use at least two countries, tax_year, and either salary_ct/annual_gross for shared_gross or local_median_gross without a salary. Results are annual major-currency estimates.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/obolusfinanz-de-openapi.yml#/components/schemas/TaxcompareRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "age": {
      "type": "integer",
      "minimum": 18,
      "maximum": 100,
      "default": 35,
      "description": "Adult age in the selected tax year."
    },
    "regions": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Country-keyed tax regions, for example CH: ZH. Omitted regions use country defaults, reported in calculation_profile."
    },
    "salary_ct": {
      "type": "integer",
      "minimum": 0,
      "description": "Preferred salary input for MCP calls. Salary in minor units for the selected period, for example 5000000 for EUR 50,000. With period=annual this is annual salary; with period=monthly this is monthly salary and Obolus annualizes it for the comparison. Required for shared_gross mode unless annual_gross is provided as a legacy alias."
    },
    "annual_gross": {
      "type": "number",
      "description": "Backward-compatible annual gross salary alias in major currency units, not cents. Prefer salary_ct. Example: 50000 means 50,000 in the selected currency. Required for shared_gross mode only when salary_ct is not provided; optional and ignored when omitted for local_median_gross."
    },
    "gross_mode": {
      "type": "string",
      "enum": [
        "shared_gross",
        "local_median_gross"
      ],
      "default": "shared_gross",
      "description": "Comparison basis. Use shared_gross for the same user-provided annual gross across all countries. Use local_median_gross for country-specific editorial median gross benchmarks. Defaults to shared_gross when omitted."
    },
    "period": {
      "type": "string",
      "enum": [
        "annual",
        "monthly"
      ],
      "default": "annual",
      "description": "Period for salary_ct. Use annual when salary_ct is the annual gross salary. Use monthly when salary_ct is one monthly gross salary; taxcompare annualizes it before comparing countries. annual_gross is always annual and ignores this field."
    },
    "person_type": {
      "type": "string",
      "enum": [
        "single",
        "married"
      ],
      "default": "single",
      "description": "Broad household assumption for comparison. single maps to joint_assessment=false; married maps to joint_assessment=true unless joint_assessment is provided explicitly. For precise country-specific filing details, use berechne."
    },
    "joint_assessment": {
      "type": "boolean",
      "default": false,
      "description": "Broad joint filing / joint assessment assumption for comparable country-level estimates. For precise country-specific filing details, use berechne."
    },
    "children": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Number of children or dependents used as a broad comparison assumption. Country-specific child allowance and credit rules are simplified for comparability."
    },
    "tax_year": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "description": "Tax year, for example 2026. The same tax year is applied to every selected country."
    },
    "countries": {
      "type": "array",
      "minItems": 2,
      "items": {
        "type": "string",
        "enum": [
          "DE",
          "AT",
          "US",
          "CH",
          "CA",
          "AU",
          "UK",
          "IE"
        ]
      },
      "description": "List of country tax systems to compare. Use at least two countries for a comparison. Supported values: DE, AT, CH, US, UK, IE, CA, AU."
    },
    "currency": {
      "type": "string",
      "enum": [
        "eur",
        "usd",
        "chf",
        "cad",
        "aud",
        "gbp",
        "EUR",
        "USD",
        "CHF",
        "CAD",
        "AUD",
        "GBP"
      ],
      "description": "Input and output currency: EUR, USD, CHF, CAD, AUD, GBP, or lower-case equivalents. Results normalize currency codes to lower-case. Unlike berechne, taxcompare prefers salary_ct for salary input and returns major currency units."
    }
  },
  "required": [
    "countries",
    "currency",
    "tax_year"
  ]
}