{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anytax/json-schema/anytax-filing-response-dto-schema.json",
  "title": "FilingResponseDto",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anytax-openapi.json#/components/schemas/FilingResponseDto",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Unique filing identifier"
    },
    "status": {
      "type": "string",
      "description": "Filing lifecycle status.\n\n**States:**\n- `inProgress`: User is answering questions\n- `prepared`: All sections 100% complete, ready for identity verification\n- `identityVerified`: User verified identity, can confirm filing\n- `inReview`: User confirmed, under review by AnyTax (read-only)\n- `submitted`: Filed with finanzamt\n- `deleted`: Deleted",
      "enum": [
        "inProgress",
        "prepared",
        "identityVerified",
        "inReview",
        "submitted",
        "deleted"
      ]
    },
    "statusChangedAt": {
      "format": "date-time",
      "type": "string",
      "description": "Timestamp when status last changed"
    },
    "completed": {
      "type": "boolean",
      "description": "Whether the filing has been fully completed"
    },
    "year": {
      "type": "number",
      "description": "Tax year for this filing (derived from scenario)"
    },
    "isJointFiling": {
      "type": "boolean",
      "description": "Whether the filing is a joint filing"
    },
    "firstNamePersonA": {
      "type": "string",
      "description": "First name of the first person"
    },
    "lastNamePersonA": {
      "type": "string",
      "description": "Last name of the first person"
    },
    "firstNamePersonB": {
      "type": "string",
      "description": "First name of the second person"
    },
    "lastNamePersonB": {
      "type": "string",
      "description": "Last name of the second person"
    },
    "scenario": {
      "description": "Scenario this filing belongs to",
      "allOf": [
        {
          "$ref": "#/$defs/FilingScenarioDto"
        }
      ]
    },
    "createdAt": {
      "format": "date-time",
      "type": "string",
      "description": "Filing creation timestamp"
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string",
      "description": "Filing last update timestamp"
    },
    "prefillPromptDismissed": {
      "type": "boolean",
      "description": "Whether the cross-year prefill prompt has been dismissed for this filing (declined or applied)."
    }
  },
  "required": [
    "uuid",
    "status",
    "statusChangedAt",
    "completed",
    "year",
    "isJointFiling",
    "firstNamePersonA",
    "lastNamePersonA",
    "firstNamePersonB",
    "lastNamePersonB",
    "scenario",
    "createdAt",
    "updatedAt",
    "prefillPromptDismissed"
  ],
  "$defs": {
    "FilingScenarioDto": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "Unique scenario identifier"
        },
        "name": {
          "description": "Scenario display name (translated)",
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/$defs/TranslationDto"
            }
          ]
        },
        "description": {
          "description": "Scenario description (translated)",
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/$defs/TranslationDto"
            }
          ]
        },
        "year": {
          "type": "number",
          "description": "Tax year for this scenario"
        }
      },
      "required": [
        "uuid",
        "year"
      ]
    },
    "TranslationDto": {
      "type": "object",
      "properties": {
        "de": {
          "type": "string",
          "description": "German text"
        },
        "en": {
          "type": "string",
          "description": "English text"
        }
      },
      "required": [
        "de",
        "en"
      ]
    }
  }
}