{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anytax/json-schema/anytax-eur-answer-dto-schema.json",
  "title": "EurAnswerDto",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anytax-openapi.json#/components/schemas/EurAnswerDto",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "eur"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "complete"
      ],
      "description": "`complete` is only accepted once every year-end allowance is answered."
    },
    "business": {
      "$ref": "#/$defs/EurBusinessDto"
    },
    "kleinunternehmer": {
      "type": "boolean",
      "description": "Kleinunternehmer (§19 UStG): no VAT fields are used."
    },
    "amounts": {
      "type": "object",
      "additionalProperties": {
        "type": "number"
      },
      "description": "Euro amounts keyed by EÜR field name (e.g. `exp_telecom`)."
    },
    "vatCharged": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "inc_rental",
          "inc_tax_exempt"
        ]
      }
    },
    "commute": {
      "$ref": "#/$defs/EurCommuteDto"
    },
    "vehicleMethod": {
      "type": "string",
      "enum": [
        "one_percent",
        "logbook"
      ]
    },
    "vehicles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EurVehicleYearDto"
      }
    },
    "homeOffice": {
      "$ref": "#/$defs/EurHomeOfficeDto"
    },
    "goodsTaken": {
      "$ref": "#/$defs/EurGoodsTakenDto"
    },
    "sections": {
      "$ref": "#/$defs/EurSectionsDto"
    },
    "assetsMode": {
      "type": "string",
      "enum": [
        "items",
        "totals"
      ],
      "description": "`totals`: software, office and other equipment are entered as yearly group totals in `assetTotals`; vehicles stay in `assets`."
    },
    "assetTotals": {
      "description": "Business share only. `special7g` is ignored for `intangible`.",
      "allOf": [
        {
          "$ref": "#/$defs/EurAssetTotalsByGroupDto"
        }
      ]
    },
    "assetSaleProceeds": {
      "type": "number",
      "minimum": 0,
      "maximum": 999999999999.99,
      "description": "Net sale price of items sold (totals mode)."
    },
    "assets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EurAssetDto"
      }
    },
    "trips": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EurTripDto"
      }
    },
    "privateTrips": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EurPrivateTripDto"
      }
    },
    "gifts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EurGiftDto"
      }
    },
    "entertainmentOtherReason": {
      "type": "string",
      "maxLength": 999
    }
  },
  "required": [
    "type",
    "status",
    "business",
    "kleinunternehmer",
    "amounts"
  ],
  "$defs": {
    "EurAddressDto": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string",
          "maxLength": 25
        },
        "houseNumber": {
          "type": "string",
          "maxLength": 9
        },
        "houseNumberSuffix": {
          "type": "string",
          "maxLength": 6
        },
        "zipCode": {
          "type": "string",
          "maxLength": 10
        },
        "city": {
          "type": "string",
          "maxLength": 25
        },
        "country": {
          "type": "string",
          "maxLength": 56
        },
        "countryCode": {
          "type": "string",
          "maxLength": 3
        },
        "state": {
          "type": "string",
          "maxLength": 25
        },
        "extraInfo": {
          "type": "string",
          "maxLength": 999
        }
      }
    },
    "EurAssetDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 64,
          "description": "Unique within the block; any string."
        },
        "equipmentClass": {
          "type": "string",
          "enum": [
            "computer_hardware",
            "software_licences",
            "mobile_phone",
            "photo_video_audio",
            "office_furniture",
            "office_machines",
            "vehicle_car",
            "vehicle_motorcycle",
            "bicycle",
            "tools_equipment",
            "other"
          ]
        },
        "origin": {
          "type": "string",
          "enum": [
            "new",
            "owned",
            "leased"
          ]
        },
        "description": {
          "type": "string",
          "maxLength": 999
        },
        "purchaseDate": {
          "type": "string",
          "format": "date"
        },
        "cost": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "usefulLifeYears": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "businessPct": {
          "type": "number",
          "minimum": 1,
          "maximum": 100
        },
        "bookValueStart": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "special7g": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99,
          "description": "§7g special depreciation claimed this year."
        },
        "special7gEarlier": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99,
          "description": "§7g special depreciation claimed in earlier years."
        },
        "listPrice": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99,
          "description": "Gross list price (vehicles)."
        },
        "propulsion": {
          "type": "string",
          "enum": [
            "combustion",
            "electric",
            "plug_in_hybrid"
          ]
        },
        "disposal": {
          "type": "string",
          "enum": [
            "sold",
            "withdrawn",
            "scrapped",
            "lost"
          ]
        },
        "disposalDate": {
          "type": "string",
          "format": "date"
        },
        "disposalProceeds": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        }
      },
      "required": [
        "id",
        "equipmentClass"
      ]
    },
    "EurAssetTotalsByGroupDto": {
      "type": "object",
      "properties": {
        "intangible": {
          "$ref": "#/$defs/EurAssetTotalsDto"
        },
        "office": {
          "$ref": "#/$defs/EurAssetTotalsDto"
        },
        "other": {
          "$ref": "#/$defs/EurAssetTotalsDto"
        }
      }
    },
    "EurAssetTotalsDto": {
      "type": "object",
      "properties": {
        "cost": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "bvStart": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "additions": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "special7g": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "afa": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "disposals": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        }
      }
    },
    "EurBusinessDto": {
      "type": "object",
      "properties": {
        "taxNumber": {
          "type": "string",
          "maxLength": 20
        },
        "name": {
          "type": "string",
          "maxLength": 999
        },
        "address": {
          "$ref": "#/$defs/EurAddressDto"
        },
        "businessId": {
          "type": "string",
          "maxLength": 17,
          "description": "Wirtschafts-Identifikationsnummer, e.g. `DE123456788-00001`."
        },
        "activity": {
          "type": "string",
          "maxLength": 999
        },
        "kind": {
          "type": "string",
          "enum": [
            "trade",
            "freelancer",
            "other_self_employed"
          ],
          "description": "Legal form of the business."
        },
        "owner": {
          "type": "string",
          "enum": [
            "person_a",
            "person_b",
            "both"
          ],
          "description": "Who runs the business in a joint filing."
        },
        "closed": {
          "type": "string",
          "enum": [
            "no",
            "sold",
            "transferred_free"
          ]
        },
        "closureAdjustment": {
          "type": "number",
          "description": "Gain (positive) or loss (negative) from closing the business."
        },
        "propertyWithdrawn": {
          "type": "boolean"
        }
      }
    },
    "EurCommuteDto": {
      "type": "object",
      "properties": {
        "declaredNone": {
          "type": "boolean",
          "description": "No commute between home and business premises."
        },
        "oneWayKm": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        "days": {
          "type": "integer",
          "minimum": 0,
          "maximum": 366
        },
        "months": {
          "description": "Months 1–12.",
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      }
    },
    "EurGiftDto": {
      "type": "object",
      "properties": {
        "recipient": {
          "type": "string",
          "maxLength": 200
        },
        "amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        }
      }
    },
    "EurGoodsLineDto": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "maxLength": 999
        },
        "amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        }
      }
    },
    "EurGoodsTakenDto": {
      "type": "object",
      "properties": {
        "answer": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ]
        },
        "lines": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "$ref": "#/$defs/EurGoodsLineDto"
          }
        }
      }
    },
    "EurHomeOfficeDto": {
      "type": "object",
      "properties": {
        "answer": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ]
        },
        "room": {
          "type": "string",
          "enum": [
            "all",
            "part",
            "no"
          ]
        },
        "roomMonths": {
          "description": "Months 1–12.",
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "otherWorkplace": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ]
        },
        "daysYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 366
        },
        "daysOtherMonths": {
          "type": "integer",
          "minimum": 0,
          "maximum": 366
        },
        "daysRoomMonths": {
          "type": "integer",
          "minimum": 0,
          "maximum": 366
        },
        "roomCosts": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "method": {
          "type": "string",
          "enum": [
            "actual",
            "flat",
            "daily"
          ]
        },
        "secondHomeConfirmed": {
          "type": "boolean"
        }
      }
    },
    "EurPrivateTripDto": {
      "type": "object",
      "properties": {
        "vehicleType": {
          "type": "string",
          "enum": [
            "car",
            "other_motorised"
          ]
        },
        "km": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        }
      },
      "required": [
        "vehicleType"
      ]
    },
    "EurSectionsDto": {
      "type": "object",
      "properties": {
        "assets": {
          "type": "boolean"
        },
        "trips": {
          "type": "boolean"
        },
        "privateTrips": {
          "type": "boolean"
        },
        "gifts": {
          "type": "boolean"
        },
        "meals": {
          "type": "boolean"
        },
        "privateMoney": {
          "type": "boolean"
        }
      }
    },
    "EurTripDto": {
      "type": "object",
      "properties": {
        "countryEn": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 120
        },
        "cityEn": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 120
        },
        "fullDays": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        },
        "partialDays": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        }
      }
    },
    "EurVehicleYearDto": {
      "type": "object",
      "properties": {
        "assetId": {
          "type": "string",
          "maxLength": 64,
          "description": "`id` of the vehicle in `assets`."
        },
        "businessPct": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "privateUseMonths": {
          "type": "integer",
          "minimum": 0,
          "maximum": 12
        },
        "totalKm": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        "businessKm": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        "commuteKm": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        "leasing": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "taxInsurance": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        },
        "operating": {
          "type": "number",
          "minimum": 0,
          "maximum": 999999999999.99
        }
      },
      "required": [
        "assetId"
      ]
    }
  }
}