{"openapi":"3.0.0","paths":{"/public/status":{"get":{"description":"Confirms the public API is reachable. Does not check dependencies.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |","operationId":"PublicController_getStatus","parameters":[],"responses":{"200":{"description":""}},"summary":"Liveness check","tags":["Public API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/public/health":{"get":{"description":"Public, unauthenticated endpoint reporting the deployed version and system state. Returns HTTP 200 when healthy and HTTP 503 when a dependency (database) is unavailable.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |","operationId":"PublicController_getHealth","parameters":[],"responses":{"200":{"description":""}},"summary":"Health check","tags":["Public API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/user/me/settings":{"get":{"description":"Returns the personal data and preferences stored for the user of the access token: name, login and e-mail address, contact data, date of birth, tax identification number, notification preferences, consent flags, role and partner account.\n\n- A user who has no settings yet gets them created with the defaults on the first call.\n- Change the values with `PUT /api/v1/user/me/settings`; change name, login and e-mail address with `PUT /api/v1/user/me/profile`.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The settings of the user. |","operationId":"UserApiController_getUserSettings","parameters":[],"responses":{"200":{"description":"The settings of the user.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSettingsDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"security":[{"bearer":[]}],"summary":"Get the settings of the signed-in user","tags":["User API"],"x-anytax-docs-enriched":true},"put":{"description":"Changes contact data, date of birth, tax identification number, notification preferences and the two optional consent flags of the user of the access token.\n\n- A partial update despite the method: only the fields that are sent change, all others keep their value.\n- `privacyConsent` cannot be changed here; name, login and e-mail address are changed with `PUT /api/v1/user/me/profile`.\n- The response holds the settings after the change. Unlike `GET /api/v1/user/me/settings` it carries no `role`, `partnerId` or `partner`.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `phoneNumber` | string | No | Phone number, free text. |\n| `emailNotifications` | boolean | No | Whether the user wants notifications by e-mail. |\n| `smsNotifications` | boolean | No | Whether the user wants notifications by text message. |\n| `emailConsent` | boolean | No | Whether the user agrees to receive the newsletter. |\n| `partnerDataConsent` | boolean | No | Whether the user agrees that the partner may use their data. |\n| `address` | string | No | Street and house number. |\n| `city` | string | No | City. |\n| `country` | string | No | Country, free text. |\n| `postalCode` | string | No | Postal code. |\n| `dateOfBirth` | string | No | Date of birth as an ISO 8601 date (`YYYY-MM-DD`) or timestamp. Returned as a UTC timestamp. |\n| `taxId` | string | No | German tax identification number (Steuer-ID). Stored as sent; not validated. |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The settings of the user after the change. |\n| `400` | The request body failed validation. |","operationId":"UserApiController_updateUserSettings","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSettingsDto"}}}},"responses":{"200":{"description":"The settings of the user after the change.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSettingsUpdateResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["dateOfBirth must be a valid ISO 8601 date string"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/settings","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"security":[{"bearer":[]}],"summary":"Update the settings of the signed-in user","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/onboarding-consent/status":{"get":{"description":"Tells whether the user still has to give the required consent to the processing of sensitive personal data for the version of the consent texts currently in force.\n\n- `required: true` means no such consent is recorded: show the consent texts to the user and record the decision with `POST /api/v1/user/me/onboarding-consent`.\n- The status is informational. No other operation checks it or is rejected while consent is missing, so an integration that collects consent in its own terms decides for itself whether to record it here.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The consent status. |","operationId":"UserApiController_getOnboardingConsentStatus","parameters":[],"responses":{"200":{"description":"The consent status.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/OnboardingConsentStatusDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"security":[{"bearer":[]}],"summary":"Get the consent status of the signed-in user","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/onboarding-consent":{"post":{"description":"Stores the consent decisions of the user, together with the exact texts that were shown, as a permanent record for the version of the consent texts currently in force, and returns the resulting status.\n\n- The item of type `gdpr_sensitive_data` must be present with `accepted: true`; otherwise nothing is stored and the call answers 400.\n- The settings of the user are updated in the same step: `privacyConsent` becomes `true`, `emailConsent` takes the decision on `marketing_newsletter` and `partnerDataConsent` the decision on `partner_data_use`. A type that is not sent counts as not given.\n- Only the first record per version counts. A repeated call for the same version stores nothing, changes nothing and returns the current status with 200, so retrying is safe. Later changes to the optional consents go through `PUT /api/v1/user/me/settings`.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `locale` | enum | Yes | en, de |\n| `consents` | object[] | Yes | items: ConsentItemDto |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The consent status after the call. |\n| `400` | The request body failed validation, or the required consent was not given. |","operationId":"UserApiController_submitOnboardingConsent","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitOnboardingConsentDto"}}}},"responses":{"200":{"description":"The consent status after the call.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/OnboardingConsentStatusDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation, or the required consent was not given.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Required consent not given":{"summary":"Required consent not given","value":{"success":false,"error":{"code":"Bad Request","message":"GDPR sensitive data consent is required"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/onboarding-consent","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Validation failed":{"summary":"Validation failed","value":{"success":false,"error":{"code":"Bad Request","message":["locale must be one of the following values: en, de"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/onboarding-consent","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}}},"security":[{"bearer":[]}],"summary":"Record the consent of the signed-in user","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/profile":{"put":{"description":"Changes the given name, family name, login and e-mail address of the user of the access token and returns the four values after the change.\n\n- A partial update despite the method: only the fields that are sent change.\n- A new e-mail address takes effect at once, without a confirmation step, and no e-mail is sent. It becomes the address the user signs in with: after the change `POST /api/v1/partner/users/login` and `POST /api/v1/auth/login` expect the new address. Access tokens already issued stay valid.\n- The e-mail address must not be used by another account of the same partner account, nor by an account that belongs to no partner account; the login must be unique across all accounts. A clash answers 409 and changes nothing.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | No | Valid email address |\n| `login` | string | No | min length: 6 |\n| `name` | string | No | min length: 2 |\n| `surname` | string | No | min length: 2 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Name, login and e-mail address of the user after the change. |\n| `400` | The request body failed validation. |\n| `409` | The e-mail address or the login is already used by another account. |","operationId":"UserApiController_updateUserProfile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserProfileDto"}}}},"responses":{"200":{"description":"Name, login and e-mail address of the user after the change.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["email must be an email","Login cannot be less than 6 characters"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/profile","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"409":{"description":"The e-mail address or the login is already used by another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Login taken":{"summary":"Login taken","value":{"success":false,"error":{"code":"Conflict","message":"User with this login already exists"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/profile","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"E-mail address used by an account outside any partner account":{"summary":"E-mail address used by an account outside any partner account","value":{"success":false,"error":{"code":"Conflict","message":"User with this email already exists"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/profile","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"E-mail address taken within the partner account":{"summary":"E-mail address taken within the partner account","value":{"success":false,"error":{"code":"CONFLICT","message":"A record with the same value already exists."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/profile","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}}},"security":[{"bearer":[]}],"summary":"Update name, login and e-mail of the signed-in user","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/identity-verification/status":{"get":{"description":"Returns how far the identity check of the user has got. The check itself runs in a hosted flow opened with the link from `POST /api/v1/user/me/identity-verification/link`.\n\n- While the stored status is not `verified`, each call fetches the latest result of the check and stores a change, so poll this operation after sending the user to the link.\n- When the status turns `verified`, the income tax filings of the user that were waiting in the status `prepared` move to `identityVerified`.\n- Bookkeeping operations do not depend on this status.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The identity verification status. |","operationId":"UserApiController_getIdentityVerificationStatus","parameters":[],"responses":{"200":{"description":"The identity verification status.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/IdentityVerificationStatusDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"security":[{"bearer":[]}],"summary":"Get the identity verification status of the signed-in user","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/identity-verification/link":{"post":{"description":"Creates a link to the hosted identity check — an identity document plus a liveness check — for the user of the access token and sets the identity verification status of the user to `pending`.\n\n- Open the link in the browser of the user. It stops working after 30 minutes; call the operation again for a new one.\n- Read the outcome with `GET /api/v1/user/me/identity-verification/status`.\n- A user whose identity is already verified cannot start a new check: the call answers 403.\n- Bookkeeping operations do not depend on identity verification.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The link to the hosted identity check. |\n| `403` | The identity of the user is already verified. |","operationId":"UserApiController_getIdentityVerificationLink","parameters":[],"responses":{"201":{"description":"The link to the hosted identity check.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/IdentityVerificationLinkDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"403":{"description":"The identity of the user is already verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Forbidden","message":"Identity already verified"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/identity-verification/link","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"security":[{"bearer":[]}],"summary":"Create an identity verification link","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/support":{"post":{"description":"Sends a message to the support team by e-mail, together with the contact data given in the request.\n\n- Name and e-mail address of the sender are taken from the request body, not from the account of the access token.\n- The request is not stored and cannot be read back or tracked through the API; a repeated call sends a second message.\n- Limit: 10 requests per minute per user. The user has one counter for all operations, so this call is also rejected with 429 when the user made more than 10 calls in the current window.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `requestType` | enum | Yes | Support, Suggestion, Feature Request, Others |\n| `name` | string | Yes | Name of the sender, passed on to the support team. Not taken from the account. |\n| `email` | string (email) | Yes | Valid email address |\n| `phone` | string | No | Phone number for a call back, free text. |\n| `message` | string | Yes | min length: 10 |\n| `locale` | string | No | Language of the user, `en` or `de`. Selects the language of the confirmation text in the response and is passed on to the support team. English when omitted. |\n| `meta` | object | No | Free-form context for the support team, as key-value pairs. Every pair is shown as-is in the request the support team receives. |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The message was handed over for delivery to the support team. |\n| `400` | The request body failed validation. |","operationId":"UserApiController_submitSupportRequest","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequestDto"}}}},"responses":{"200":{"description":"The message was handed over for delivery to the support team.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSupportRequestResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["message must be longer than or equal to 10 characters"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/support","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"security":[{"bearer":[]}],"summary":"Send a support request","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/user/me/account-closure-request":{"post":{"description":"Sends a request to close the account of the user of the access token to the support team. The account is closed by the support team, not by this call. It is the only way to ask for an account to be closed through the API; there is no operation that deletes a user directly.\n\n- The call itself changes nothing: the account, its data and its access tokens keep working until the support team has acted.\n- Name, e-mail address and identifier of the user are taken from the account, not from the request body.\n- A repeated call sends a second request. Limit: 3 requests per minute per user. The user has one counter for all operations, so this call is also rejected with 429 when the user made more than 3 calls in the current window.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `message` | string | No | max length: 2000 |\n| `locale` | string | No | Language of the user, `en` or `de`. Selects the language of the confirmation text in the response and is passed on to the support team. English when omitted. |\n| `meta` | object | No | Free-form context for the support team, as key-value pairs. Every pair is shown as-is in the request the support team receives. |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The closure request was handed over for delivery to the support team. |\n| `400` | The request body failed validation. |","operationId":"UserApiController_requestAccountClosure","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountClosureRequestDto"}}}},"responses":{"200":{"description":"The closure request was handed over for delivery to the support team.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSupportRequestResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["message must be shorter than or equal to 2000 characters"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/user/me/account-closure-request","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"security":[{"bearer":[]}],"summary":"Request closure of the account","tags":["User API"],"x-anytax-docs-enriched":true}},"/api/v1/auth/register":{"post":{"description":"Creates an account from an e-mail address and a password and sends a 6-digit one-time code to that address. No token is returned: `POST /api/v1/auth/verify-otp` confirms the address with the code and issues the access token. The response carries `registrationStatus`, normally `\"active\"`. In some cases a registration that is not made through the partner operations ends as `\"pending\"`; while it is, `POST /api/v1/auth/verify-otp` and `POST /api/v1/auth/login` answer 403.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- The account is created under the partner account named by `X-Partner-Slug`, with the role `user`. An account with `registrationStatus` `\"active\"` gets a welcome e-mail along with the code.\n- If an account with this e-mail address already exists under that partner account, nothing is created or changed: a new code is sent to the existing account and the response is the same.\n- `login` must be unique across all accounts; a taken login answers 409.\n- A code is valid for 5 minutes and works once; a newer code replaces the earlier one. After 5 wrong codes the current code stops working and checking codes for the account is blocked for 5 minutes; requesting a new code does not lift the block. `POST /api/v1/auth/send-otp` sends a new code.\n- Answers 201. Limit: 5 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 5.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | Yes | Valid email address |\n| `password` | string (password) | Yes | min length: 8 |\n| `login` | string | Yes | min length: 6 |\n| `name` | string | Yes | min length: 2 |\n| `surname` | string | Yes | min length: 2 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The account exists and a one-time code was sent to the e-mail address. |\n| `400` | The request body failed validation, or the Turnstile token is missing or was rejected. |\n| `401` | No partner account could be determined for the request, or the partner account is not active. |\n| `403` | Registration is not available for this request. |\n| `409` | The login is already used by another account. |","operationId":"AuthApiController_registerWithOtp","parameters":[{"name":"X-Partner-Slug","in":"header","description":"Slug of the partner account the user belongs to. Required whenever the request is sent to the API host directly; only a request that arrives on the host name of a partner account is attributed to that partner without it. When no partner account can be determined the request is rejected with 401.","required":true,"schema":{"type":"string","example":"acme-bank"}},{"name":"X-Turnstile-Token","in":"header","description":"Cloudflare Turnstile token from the widget on the form. Each token works once. A missing or rejected token answers 400 with the code `TURNSTILE_FAILED`.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDto"}}}},"responses":{"201":{"description":"The account exists and a one-time code was sent to the e-mail address.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthOtpSentResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}},"example":{"success":true,"data":{"message":"Registration successful. Please verify your email with the OTP sent to complete the process.","email":"anna.schmidt@example.com","otpSent":true,"registrationStatus":"active"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","responseTime":42}}}}},"400":{"description":"The request body failed validation, or the Turnstile token is missing or was rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Invalid request body":{"summary":"Invalid request body","value":{"success":false,"error":{"code":"Bad Request","message":["password is not strong enough","Login cannot be less than 6 characters"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Turnstile check missing or failed":{"summary":"Turnstile check missing or failed","value":{"success":false,"error":{"code":"TURNSTILE_FAILED","message":"Please confirm you are not a robot and try again."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"401":{"description":"No partner account could be determined for the request, or the partner account is not active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Partner account not determined":{"summary":"Partner account not determined","value":{"success":false,"error":{"code":"Unauthorized","message":"Unable to determine which portal you are using. Please access this page via your usual login link."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Partner account not active":{"summary":"Partner account not active","value":{"success":false,"error":{"code":"Unauthorized","message":"This portal is currently inactive."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"403":{"description":"Registration is not available for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Forbidden","message":"Registration is currently not available."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"409":{"description":"The login is already used by another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Conflict","message":"User with this login already exists"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"summary":"Register a user with e-mail and password","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/login":{"post":{"description":"Checks the e-mail address and the password and, when both are correct, sends a 6-digit one-time code to the address. No token is returned yet: complete the sign-in with `POST /api/v1/auth/verify-otp`.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- The account is looked up under the partner account named by `X-Partner-Slug`; when none is found there, an account with that address that belongs to no partner account is used. An unknown e-mail address and a wrong password answer with the same 401.\n- A code is valid for 5 minutes and works once; a newer code replaces the earlier one. After 5 wrong codes the current code stops working and checking codes for the account is blocked for 5 minutes; requesting a new code does not lift the block.\n- Answers 201. Limit: 10 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 10.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | Yes | Valid email address |\n| `password` | string (password) | Yes | min length: 6 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The credentials are correct and a one-time code was sent to the e-mail address. |\n| `400` | The request body failed validation, or the Turnstile token is missing or was rejected. |\n| `401` | The e-mail address or the password is wrong, no partner account could be determined for the request, or the partner account is not active. |\n| `403` | The credentials are correct but the registration of the account was rejected. |","operationId":"AuthApiController_loginWithOtp","parameters":[{"name":"X-Partner-Slug","in":"header","description":"Slug of the partner account the user belongs to. Required whenever the request is sent to the API host directly; only a request that arrives on the host name of a partner account is attributed to that partner without it. When no partner account can be determined the request is rejected with 401.","required":true,"schema":{"type":"string","example":"acme-bank"}},{"name":"X-Turnstile-Token","in":"header","description":"Cloudflare Turnstile token from the widget on the form. Each token works once. A missing or rejected token answers 400 with the code `TURNSTILE_FAILED`.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"201":{"description":"The credentials are correct and a one-time code was sent to the e-mail address.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthOtpSentResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation, or the Turnstile token is missing or was rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Invalid request body":{"summary":"Invalid request body","value":{"success":false,"error":{"code":"Bad Request","message":["email must be an email","password must be longer than or equal to 6 characters"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Turnstile check missing or failed":{"summary":"Turnstile check missing or failed","value":{"success":false,"error":{"code":"TURNSTILE_FAILED","message":"Please confirm you are not a robot and try again."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"401":{"description":"The e-mail address or the password is wrong, no partner account could be determined for the request, or the partner account is not active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Wrong e-mail address or password":{"summary":"Wrong e-mail address or password","value":{"success":false,"error":{"code":"Unauthorized","message":"Invalid credentials"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Partner account not determined":{"summary":"Partner account not determined","value":{"success":false,"error":{"code":"Unauthorized","message":"Unable to determine which portal you are using. Please access this page via your usual login link."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Partner account not active":{"summary":"Partner account not active","value":{"success":false,"error":{"code":"Unauthorized","message":"This portal is currently inactive."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"403":{"description":"The credentials are correct but the registration of the account was rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Forbidden","message":"Your registration request was not approved."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"summary":"Start sign-in with e-mail and password","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/verify-otp":{"post":{"description":"Checks the 6-digit code sent by `POST /api/v1/auth/login`, `POST /api/v1/auth/register` or `POST /api/v1/auth/send-otp` and returns the access token of the user: a Bearer JWT valid for one hour. There is no refresh token; `POST /api/v1/auth/refresh` renews the token while it is still valid.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- Send `X-Requested-With: XMLHttpRequest` and `X-Partner-Slug`.\n- The code completes a sign-in only when `POST /api/v1/auth/login` or `POST /api/v1/auth/register` succeeded for the account within the last 15 minutes. A code requested with `POST /api/v1/auth/send-otp` alone does not sign in.\n- A code is valid for 5 minutes and works once; a newer code replaces the earlier one. After 5 wrong codes the current code stops working and checking codes for the account is blocked for 5 minutes; requesting a new code does not lift the block.\n- The first successful call marks the e-mail address of the account as confirmed.\n- The token is also set as an HttpOnly session cookie for browser clients; a client that sends `Authorization: Bearer` can ignore the cookie.\n- Every failed check — wrong, expired or missing code, or a blocked account — answers 401. Answers 201 on success. Limit: 10 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 10.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | Yes | Valid email address |\n| `otp` | integer | Yes | 100000–999999 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The code is correct. The access token and the user who signed in. |\n| `400` | The request body failed validation. |\n| `401` | The code was not accepted, a required header is missing, no partner account could be determined, or the account or its partner account is not active. |","operationId":"AuthApiController_verifyOTPAndLogin","parameters":[{"name":"X-Partner-Slug","in":"header","description":"Slug of the partner account the user belongs to. Required whenever the request is sent to the API host directly; only a request that arrives on the host name of a partner account is attributed to that partner without it. When no partner account can be determined the request is rejected with 401.","required":true,"schema":{"type":"string","example":"acme-bank"}},{"name":"X-Requested-With","in":"header","description":"Must be exactly `XMLHttpRequest`. A request without this header is rejected with 401 `Missing CSRF header`.","required":true,"schema":{"type":"string","enum":["XMLHttpRequest"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpDto"}}}},"responses":{"201":{"description":"The code is correct. The access token and the user who signed in.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthVerifyOtpResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["OTP must be a 6-digit number"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"401":{"description":"The code was not accepted, a required header is missing, no partner account could be determined, or the account or its partner account is not active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Wrong code or unknown e-mail address":{"summary":"Wrong code or unknown e-mail address","value":{"success":false,"error":{"code":"Unauthorized","message":"Invalid OTP"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Code expired":{"summary":"Code expired","value":{"success":false,"error":{"code":"Unauthorized","message":"OTP has expired. Please request a new one."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"No code was requested":{"summary":"No code was requested","value":{"success":false,"error":{"code":"Unauthorized","message":"No OTP found. Please go back and log in again to receive a new code."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Blocked after 5 wrong codes":{"summary":"Blocked after 5 wrong codes","value":{"success":false,"error":{"code":"Unauthorized","message":"Too many failed attempts. Try again in 287 seconds."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"X-Requested-With header missing":{"summary":"X-Requested-With header missing","value":{"success":false,"error":{"code":"Unauthorized","message":"Missing CSRF header"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Partner account not determined":{"summary":"Partner account not determined","value":{"success":false,"error":{"code":"Unauthorized","message":"Unable to determine which portal you are using. Please access this page via your usual login link."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Partner account not active":{"summary":"Partner account not active","value":{"success":false,"error":{"code":"Unauthorized","message":"This portal is currently inactive."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Registration rejected":{"summary":"Registration rejected","value":{"success":false,"error":{"code":"Unauthorized","message":"Account is no longer active"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/verify-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}}},"summary":"Complete sign-in with the one-time code","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/reset-password-with-otp":{"post":{"description":"Sets a new password for an account after checking a 6-digit one-time code. Request the code with `POST /api/v1/auth/send-otp` first.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- Send `X-Requested-With: XMLHttpRequest` and `X-Partner-Slug`.\n- A code is valid for 5 minutes and works once; a newer code replaces the earlier one. After 5 wrong codes the current code stops working and checking codes for the account is blocked for 5 minutes; requesting a new code does not lift the block.\n- On success every access token issued for the user before stops working (401 `Token has been invalidated`), whichever operation issued it, and the user receives an e-mail saying the password was changed. The user has to sign in again.\n- Answers 201 with an empty object. Limit: 10 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 10.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | Yes | Valid email address |\n| `otp` | integer | Yes | 100000–999999 |\n| `password` | string (password) | Yes | min length: 8 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The password was changed. The payload is an empty object. |\n| `400` | The request body failed validation. |\n| `401` | The code was not accepted, a required header is missing, or no partner account could be determined. |","operationId":"AuthApiController_resetPasswordWithOTP","parameters":[{"name":"X-Partner-Slug","in":"header","description":"Slug of the partner account the user belongs to. Required whenever the request is sent to the API host directly; only a request that arrives on the host name of a partner account is attributed to that partner without it. When no partner account can be determined the request is rejected with 401.","required":true,"schema":{"type":"string","example":"acme-bank"}},{"name":"X-Requested-With","in":"header","description":"Must be exactly `XMLHttpRequest`. A request without this header is rejected with 401 `Missing CSRF header`.","required":true,"schema":{"type":"string","enum":["XMLHttpRequest"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordWithOtpDto"}}}},"responses":{"201":{"description":"The password was changed. The payload is an empty object.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","description":"Always an empty object.","additionalProperties":{"type":"string"},"maxProperties":0,"example":{}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["OTP must be a 6-digit number","password is not strong enough"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"401":{"description":"The code was not accepted, a required header is missing, or no partner account could be determined.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Wrong code or unknown e-mail address":{"summary":"Wrong code or unknown e-mail address","value":{"success":false,"error":{"code":"Unauthorized","message":"Invalid OTP"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Code expired":{"summary":"Code expired","value":{"success":false,"error":{"code":"Unauthorized","message":"OTP has expired. Please request a new one."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"No code was requested":{"summary":"No code was requested","value":{"success":false,"error":{"code":"Unauthorized","message":"No OTP found. Please go back and log in again to receive a new code."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Blocked after 5 wrong codes":{"summary":"Blocked after 5 wrong codes","value":{"success":false,"error":{"code":"Unauthorized","message":"Too many failed attempts. Try again in 287 seconds."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"X-Requested-With header missing":{"summary":"X-Requested-With header missing","value":{"success":false,"error":{"code":"Unauthorized","message":"Missing CSRF header"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Partner account not determined":{"summary":"Partner account not determined","value":{"success":false,"error":{"code":"Unauthorized","message":"Unable to determine which portal you are using. Please access this page via your usual login link."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-with-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}}},"summary":"Set a new password with a one-time code","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/refresh":{"post":{"description":"Returns a new access token, valid for one hour, for the user of the token the request is made with. Authenticate with the current access token; it must not have expired. There are no refresh tokens: the operation needs no request body and ignores one that is sent.\n\n- An expired token cannot be renewed: the call answers 401 and the user has to sign in again — with `POST /api/v1/partner/users/login` for a partner backend, with `POST /api/v1/auth/login` otherwise.\n- The token used for the call is not revoked; it stays valid until its own expiry.\n- A partner backend can skip this operation altogether and call `POST /api/v1/partner/users/login` whenever it needs a fresh token.\n- The new token is also set as an HttpOnly session cookie for browser clients.\n- Answers 201. Limit: 20 requests per minute per user. The user has one counter for all operations, so this call is also rejected with 429 when the user made more than 20 calls in the current window.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `refreshToken` | string | No | Not used. The operation reads no request body: the value is ignored and the field can be left out. Only a value that is not a string is rejected with 400. |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | A new access token and the user it belongs to. |\n| `400` | A request body was sent and failed validation. |","operationId":"AuthApiController_refreshBearerToken","parameters":[],"requestBody":{"required":false,"description":"Not needed. Send no body or an empty object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshBearerTokenDto"}}}},"responses":{"201":{"description":"A new access token and the user it belongs to.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthRefreshResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"A request body was sent and failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["refreshToken must be a string"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/refresh","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"security":[{"bearer":[]}],"summary":"Renew the access token","tags":["Auth API"],"x-anytax-docs-enriched":true}},"/api/v1/auth/request-password-reset":{"post":{"description":"Sends an e-mail with a password reset link to the address. The link carries a token that is valid for one hour and is accepted by `POST /api/v1/auth/reset-password`.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- The response is the same whether or not an account exists, so it does not reveal which addresses are registered.\n- The link is sent only to accounts that are not attached to a partner account. For an account under a partner account nothing is sent; such an account sets a new password with `POST /api/v1/auth/send-otp` followed by `POST /api/v1/auth/reset-password-with-otp`.\n- Answers 201. Limit: 5 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 5.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | Yes | Valid email address |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The request was accepted. Sent whether or not a link went out. |\n| `400` | The request body failed validation, or the Turnstile token is missing or was rejected. |","operationId":"AuthApiController_requestPasswordReset","parameters":[{"name":"X-Turnstile-Token","in":"header","description":"Cloudflare Turnstile token from the widget on the form. Each token works once. A missing or rejected token answers 400 with the code `TURNSTILE_FAILED`.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPasswordResetDto"}}}},"responses":{"201":{"description":"The request was accepted. Sent whether or not a link went out.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthMessageResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation, or the Turnstile token is missing or was rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Invalid request body":{"summary":"Invalid request body","value":{"success":false,"error":{"code":"Bad Request","message":["Please provide a valid email address"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/request-password-reset","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Turnstile check missing or failed":{"summary":"Turnstile check missing or failed","value":{"success":false,"error":{"code":"TURNSTILE_FAILED","message":"Please confirm you are not a robot and try again."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/request-password-reset","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}}},"summary":"Request a password reset link","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/reset-password":{"post":{"description":"Sets a new password using the token from the link e-mailed by `POST /api/v1/auth/request-password-reset`. The token is valid for one hour.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- On success every access token issued for the user before stops working (401 `Token has been invalidated`) and the user receives an e-mail saying the password was changed. The user has to sign in again.\n- Any problem with the token — malformed, expired, not a reset token, or issued for an account that can no longer be found — answers the same 401.\n- Answers 201. Limit: 5 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 5.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `token` | string | Yes | Reset token from the link in the e-mail sent by `POST /api/v1/auth/request-password-reset`. Valid for one hour. |\n| `password` | string (password) | Yes | min length: 8 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The password was changed. |\n| `400` | The request body failed validation. |\n| `401` | The reset token was not accepted. |","operationId":"AuthApiController_resetPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordDto"}}}},"responses":{"201":{"description":"The password was changed.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthMessageResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}},"example":{"success":true,"data":{"message":"Password has been reset successfully"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","responseTime":42}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["password is not strong enough"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"401":{"description":"The reset token was not accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Unauthorized","message":"Invalid or expired token "},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"summary":"Set a new password with a reset token","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/reset-password-authenticated":{"post":{"description":"Sets a new password for the user of the access token. The current password is not asked for.\n\n- On success every access token of the user stops working, including the one used for this call (401 `Token has been invalidated` afterwards); the response says so with `logoutRequired`. The user has to sign in again.\n- The user receives an e-mail saying the password was changed.\n- Users created with `POST /api/v1/partner/users/register` sign in without a password, so a partner backend has no need for this operation.\n- Answers 201.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `password` | string (password) | Yes | min length: 8 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The password was changed and all access tokens of the user were invalidated. |\n| `400` | The request body failed validation. |","operationId":"AuthApiController_resetPasswordAuthenticated","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordAuthenticatedDto"}}}},"responses":{"201":{"description":"The password was changed and all access tokens of the user were invalidated.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthPasswordChangedResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["password is not strong enough"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/reset-password-authenticated","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"security":[{"bearer":[]}],"summary":"Change the password of the signed-in user","tags":["Auth API"],"x-anytax-docs-enriched":true}},"/api/v1/auth/send-otp":{"post":{"description":"Sends a new 6-digit one-time code to the e-mail address when an active account with that address exists under the partner account named by `X-Partner-Slug`, or, failing that, an active account with that address that belongs to no partner account. Use it to send the code again during sign-in or registration, and to start a password change with `POST /api/v1/auth/reset-password-with-otp`.\n\nThis operation belongs to the e-mail, password and one-time-code sign-in used by the hosted web application and by users who register themselves. A partner backend does not need it: it creates users with `POST /api/v1/partner/users/register` and signs them in with `POST /api/v1/partner/users/login`.\n\n- The response is the same whether or not a code was sent, so it does not reveal which addresses are registered.\n- A code is valid for 5 minutes and works once; a newer code replaces the earlier one. After 5 wrong codes the current code stops working and checking codes for the account is blocked for 5 minutes; requesting a new code does not lift the block.\n- Answers 201. Limit: 10 requests per minute per calling address. The count is shared with every other call made without an access token from that address — the other Auth API calls and the Partner Platform calls — and this call is rejected with 429 once that shared count exceeds 10.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string (email) | Yes | Valid email address |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The request was accepted. Sent whether or not a code went out. |\n| `400` | The request body failed validation, or the Turnstile token is missing or was rejected. |\n| `401` | No partner account could be determined for the request. |","operationId":"AuthApiController_sendOTP","parameters":[{"name":"X-Partner-Slug","in":"header","description":"Slug of the partner account the user belongs to. Required whenever the request is sent to the API host directly; only a request that arrives on the host name of a partner account is attributed to that partner without it. When no partner account can be determined the request is rejected with 401.","required":true,"schema":{"type":"string","example":"acme-bank"}},{"name":"X-Turnstile-Token","in":"header","description":"Cloudflare Turnstile token from the widget on the form. Each token works once. A missing or rejected token answers 400 with the code `TURNSTILE_FAILED`.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOtpDto"}}}},"responses":{"201":{"description":"The request was accepted. Sent whether or not a code went out.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthOtpRequestedResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation, or the Turnstile token is missing or was rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Invalid request body":{"summary":"Invalid request body","value":{"success":false,"error":{"code":"Bad Request","message":["Please provide a valid email address"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/send-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Turnstile check missing or failed":{"summary":"Turnstile check missing or failed","value":{"success":false,"error":{"code":"TURNSTILE_FAILED","message":"Please confirm you are not a robot and try again."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/send-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"401":{"description":"No partner account could be determined for the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Unauthorized","message":"Unable to determine which portal you are using. Please access this page via your usual login link."},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/auth/send-otp","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"summary":"Send a one-time code by e-mail","tags":["Auth API"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/auth/me":{"get":{"description":"Returns the account the access token belongs to. Use it to check that a token is still accepted and to read the name, e-mail address and role of the user.\n\n- `id` is returned only for accounts with the role `admin`. A partner backend already has the identifier of the user from `POST /api/v1/partner/users/login`.\n- Contact data, date of birth and consent flags are in `GET /api/v1/user/me/settings`.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The signed-in user. |","operationId":"AuthApiController_getProfile","parameters":[],"responses":{"200":{"description":"The signed-in user.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthCurrentUserResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}},"example":{"success":true,"data":{"login":"annaschmidt","email":"anna.schmidt@example.com","name":"Anna","surname":"Schmidt","role":"user","verified":true,"appEnv":"production"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","responseTime":42}}}}}},"security":[{"bearer":[]}],"summary":"Get the signed-in user","tags":["Auth API"],"x-anytax-docs-enriched":true}},"/api/v1/auth/logout":{"post":{"description":"Removes the session cookie that `POST /api/v1/auth/verify-otp` and `POST /api/v1/auth/refresh` set for browser clients.\n\n- Nothing is revoked on the server: an access token sent as `Authorization: Bearer` keeps working until it expires. A client that holds the token itself, such as a partner backend, ends a session by discarding the token and has no need for this operation.\n- Send `X-Requested-With: XMLHttpRequest`; without it the call answers 401 `Missing CSRF header`.\n- Answers 201.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The session cookie was removed. |","operationId":"AuthApiController_logout","parameters":[{"name":"X-Requested-With","in":"header","description":"Must be exactly `XMLHttpRequest`. A request without this header is rejected with 401 `Missing CSRF header`.","required":true,"schema":{"type":"string","enum":["XMLHttpRequest"]}}],"responses":{"201":{"description":"The session cookie was removed.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthLogoutResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"security":[{"bearer":[]}],"summary":"End the browser session","tags":["Auth API"],"x-anytax-docs-enriched":true}},"/api/v1/filing":{"post":{"description":"Creates a new tax filing for the authenticated user. The filing is associated with a tax scenario which defines the form structure and questions.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `scenarioUUID` | string (uuid) | Yes | UUID |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | Filing created successfully |\n| `400` | Bad request - Returns error code `SCENARIO_INACTIVE` when attempting to create a filing for an inactive scenario |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Scenario not found |","operationId":"FilingApiController_createFiling","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFilingRequestDto"}}}},"responses":{"201":{"description":"Filing created successfully","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Bad request - Returns error code `SCENARIO_INACTIVE` when attempting to create a filing for an inactive scenario","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilingErrorResponseDto"}}}},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Scenario not found"}},"security":[{"bearer":[]}],"summary":"Create a new tax filing","tags":["Filing API"],"x-anytax-docs-enriched":true},"get":{"description":"Retrieves all tax filings belonging to the authenticated user.\n\n**Use this endpoint to:**\n- Display a list of user's filings on a dashboard\n- Show filing status and scenario information\n- Allow users to select a filing to continue working on\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | List of user filings retrieved successfully |\n| `401` | Unauthorized - valid authentication token required |","operationId":"FilingApiController_getAllFilings","parameters":[],"responses":{"200":{"description":"List of user filings retrieved successfully","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/FilingResponseDto"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"}},"security":[{"bearer":[]}],"summary":"Get all filings","tags":["Filing API"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}":{"get":{"description":"Retrieves a specific filing by its UUID. Returns filing metadata including scenario, year, creation date, and completion status. Only returns filings owned by the authenticated user.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Filing retrieved successfully |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to user |","operationId":"FilingApiController_getFilingByUUID","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"200":{"description":"Filing retrieved successfully","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to user"}},"security":[{"bearer":[]}],"summary":"Get filing by UUID","tags":["Filing API"],"x-anytax-docs-enriched":true},"delete":{"description":"Deletes a filing by transitioning its status to `deleted`.\n\n**Ownership:** Only the owner of the filing may delete it; any other filing returns `404 Not Found`.\n\n**Status restriction:** A filing can no longer be deleted once it has reached `inReview` or `submitted` status.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `204` | Filing deleted successfully |\n| `401` | Unauthorized — valid authentication token required |\n| `403` | Forbidden — filing has reached `inReview` or `submitted` status and can no longer be deleted |\n| `404` | Filing not found or does not belong to the requesting user |","operationId":"FilingApiController_deleteFiling","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"204":{"description":"Filing deleted successfully"},"401":{"description":"Unauthorized — valid authentication token required"},"403":{"description":"Forbidden — filing has reached `inReview` or `submitted` status and can no longer be deleted"},"404":{"description":"Filing not found or does not belong to the requesting user"}},"security":[{"bearer":[]}],"summary":"Delete a filing","tags":["Filing API"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/calculation":{"get":{"description":"Computes the estimated tax calculation for a filing based on current answers.\n\n**Use this endpoint to:**\n- Show users their estimated tax refund or payment\n- Display detailed breakdown of income, deductions, and tax liability\n\n**Joint filing (Ehegattensplitting):** When the filing uses joint assessment, Person A values use the primary field name and Person B values use the same name with a `Spouse` suffix (for example `salariedIncome` / `salariedIncomeSpouse`, `incomeTaxDeductionFromWages` / `incomeTaxDeductionFromWagesSpouse`). Spouse fields are omitted for single filings.\n\nWith `breakdown=false` (default), nested categories are collapsed to totals; per-spouse income fields `salariedIncomeSpouse` and `ageReliefAmountSpouse` are still returned when applicable. With `breakdown=true`, the full nested structure includes all per-spouse line items.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Tax calculation (summary or detailed breakdown depending on `breakdown` query param) |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to user |","operationId":"FilingApiController_getFilingCalculation","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}},{"name":"breakdown","required":false,"in":"query","description":"When `true`, returns `TaxCalculationBreakdownResponseDto` with nested per-category objects and per-spouse fields. When `false` or omitted, returns `TaxCalculationSummaryResponseDto` (totals only, plus `salariedIncomeSpouse` / `ageReliefAmountSpouse` when joint).","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Tax calculation (summary or detailed breakdown depending on `breakdown` query param)","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"oneOf":[{"$ref":"#/components/schemas/TaxCalculationSummaryResponseDto"},{"$ref":"#/components/schemas/TaxCalculationBreakdownResponseDto"}]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to user"}},"security":[{"bearer":[]}],"summary":"Get tax calculation","tags":["Filing API"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/tax-assessment/result":{"get":{"description":"Returns a lean view of the tax assessment (Bescheid) the Finanzamt issued for a\nsubmitted filing, suited for displaying the result to the taxpayer.\n\n**Polling:** while the assessment is not yet available this returns HTTP `200` with\n`status: \"pending\"` (never `404`), so you can poll this endpoint on a schedule.\n\n**Statuses:** `pending` (not yet available), `available` (assessment data is ready),\n`failed` (retrieval/parsing failed permanently).\n\nWhen `status` is `available`, `result` holds the settlement (`amount` in signed euros —\nnegative = refund — and `kind`), `assessmentDate` is the Bescheiddatum (ISO 8601), and\n`officialStatement` lists the tax-office statement paragraphs. `result` and\n`officialStatement` are `null` for any non-`available` status.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Tax assessment result retrieved. Returns `status: \"pending\"` when not yet available. |\n| `400` | Invalid `filingUUID` format (must be a UUID) |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to the caller |","operationId":"FilingApiController_getFilingTaxAssessmentResult","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"200":{"description":"Tax assessment result retrieved. Returns `status: \"pending\"` when not yet available.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TaxAssessmentResultDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid `filingUUID` format (must be a UUID)"},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to the caller"}},"security":[{"bearer":[]}],"summary":"Get tax assessment result (Bescheid)","tags":["Filing API"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/production-file":{"get":{"description":"Returns the signed download URL of the latest already-submitted production-file\nPDF for a filing. This reads stored data only — it never regenerates the PDF or calls ELSTER.\n\n**Use this endpoint to** drive \"View full PDF\" / \"Download PDF\" buttons after a filing has been\nsubmitted.\n\n`pdfUrl` is a time-limited signed URL of the latest stored production-file PDF; `submittedAt`\nis that file's submission timestamp (ISO 8601); `transferTicket` is its submission transfer\nticket. All three are `null` when no production file exists yet for the filing.\n\nA filing with an EÜR is submitted as two returns (income tax + Anlage EÜR), each with its own PDF.\n`pdfs` lists the latest PDF of each return, income tax first; the top-level fields describe the\nfirst entry.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Production-file download URL retrieved. Fields are `null` when none exists yet. |\n| `400` | Invalid `filingUUID` format (must be a UUID) |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to the caller |","operationId":"FilingApiController_getFilingProductionFile","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"200":{"description":"Production-file download URL retrieved. Fields are `null` when none exists yet.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingProductionFileResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid `filingUUID` format (must be a UUID)"},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to the caller"}},"security":[{"bearer":[]}],"summary":"Get production-file download URL","tags":["Filing API"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/confirm":{"post":{"description":"Sends the filing for review by AnyTax. Filing becomes read-only after confirmation.\n\n**Requires:** Filing in `identityVerified` state\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Filing sent for review |\n| `400` | Filing not in `identityVerified` state — error code: `INVALID_STATE_TRANSITION` |\n| `404` | Filing not found |","operationId":"FilingApiController_confirmFiling","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"200":{"description":"Filing sent for review","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Filing not in `identityVerified` state — error code: `INVALID_STATE_TRANSITION`"},"404":{"description":"Filing not found"}},"security":[{"bearer":[]}],"summary":"Confirm filing","tags":["Filing API"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/documents":{"get":{"description":"Available only when supporting documents are enabled for the partner account; otherwise 403. A foreign or unknown filing returns 404.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `403` | Supporting documents are not enabled |\n| `404` | Filing not found |","operationId":"FilingDocumentApiController_list","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingDocumentListResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"403":{"description":"Supporting documents are not enabled"},"404":{"description":"Filing not found"}},"security":[{"bearer":[]}],"summary":"List supporting documents of a filing","tags":["Supporting documents"],"x-anytax-docs-enriched":true},"post":{"description":"Stores a PDF supporting document for the filing. Limits per filing: PDF only, not password-protected; at most 10 MB per file, 100 pages per file, 20 files and 36.91 MB in total. Identical files (same SHA-256) are rejected with 409.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |\n| `400` | Not a PDF, encrypted PDF, PDF over 100 pages, or per-filing document limit reached |\n| `403` | Supporting documents are not enabled |\n| `404` | Filing not found |\n| `409` | An identical file was already uploaded; `details.documentUuid` names it |\n| `413` | File larger than 10 MB |","operationId":"FilingDocumentApiController_upload","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Limits per filing: PDF only, not password-protected; at most 10 MB per file, 100 pages per file, 20 files and 36.91 MB in total. Identical files (same SHA-256) are rejected with 409.","content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PDF file, at most 10 MB"},"source":{"type":"string","enum":["partner","user"],"default":"partner"},"title":{"type":"string","maxLength":120,"description":"Display title; defaults to the file name"}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingDocumentResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Not a PDF, encrypted PDF, PDF over 100 pages, or per-filing document limit reached"},"403":{"description":"Supporting documents are not enabled"},"404":{"description":"Filing not found"},"409":{"description":"An identical file was already uploaded; `details.documentUuid` names it"},"413":{"description":"File larger than 10 MB"}},"security":[{"bearer":[]}],"summary":"Upload a supporting document (PDF)","tags":["Supporting documents"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/documents/submit":{"post":{"description":"Sends every document that has not been sent yet to the tax office as an ELSTER message attached to the return (Steuernummer, tax year, persons). Documents already sent are not sent again. The response is the transmission: `status` `submitted` with a `transferTicket`, or `failed` with `errorMessage`. Before calling this, show the user the ELSTER notice that attachments are scanned on the tax administration servers and may be deleted when found harmful (see the partner integration guide).\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `text` | string | No | max length: 15000 |\n| `taxNumber` | string | No | max length: 20 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |\n| `400` | No documents to send, or the return has no Steuernummer (`details.code` = `tax_number_required`: repeat the call with `taxNumber`), or the given tax number is not valid |\n| `403` | Supporting documents are not enabled |\n| `404` | Filing not found |\n| `503` | The ELSTER service is unavailable; nothing was sent |","operationId":"FilingDocumentApiController_submit","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFilingDocumentsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingDocumentSubmissionResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"No documents to send, or the return has no Steuernummer (`details.code` = `tax_number_required`: repeat the call with `taxNumber`), or the given tax number is not valid"},"403":{"description":"Supporting documents are not enabled"},"404":{"description":"Filing not found"},"503":{"description":"The ELSTER service is unavailable; nothing was sent"}},"security":[{"bearer":[]}],"summary":"Send the stored documents to the tax office","tags":["Supporting documents"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/documents/submissions":{"get":{"description":"Newest first. Each transmission names the documents it carried.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `403` | Supporting documents are not enabled |\n| `404` | Filing not found |","operationId":"FilingDocumentApiController_submissions","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingDocumentSubmissionListResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"403":{"description":"Supporting documents are not enabled"},"404":{"description":"Filing not found"}},"security":[{"bearer":[]}],"summary":"List the transmissions of supporting documents to the tax office","tags":["Supporting documents"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/documents/{documentUuid}":{"delete":{"description":"Only documents not yet sent to the tax office can be deleted; a sent one returns 409.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `204` | Deleted |\n| `403` | Supporting documents are not enabled |\n| `404` | Filing or document not found |\n| `409` | The document was already sent to the tax office |","operationId":"FilingDocumentApiController_remove","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"type":"string"}},{"name":"documentUuid","required":true,"in":"path","description":"Document UUID","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"403":{"description":"Supporting documents are not enabled"},"404":{"description":"Filing or document not found"},"409":{"description":"The document was already sent to the tax office"}},"security":[{"bearer":[]}],"summary":"Delete a supporting document","tags":["Supporting documents"],"x-anytax-docs-enriched":true}},"/api/v1/filing/{filingUUID}/documents/{documentUuid}/download":{"get":{"description":"Returns a signed URL valid for 15 minutes.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `403` | Supporting documents are not enabled |\n| `404` | Filing or document not found |","operationId":"FilingDocumentApiController_download","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"type":"string"}},{"name":"documentUuid","required":true,"in":"path","description":"Document UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/FilingDocumentDownloadResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"403":{"description":"Supporting documents are not enabled"},"404":{"description":"Filing or document not found"}},"security":[{"bearer":[]}],"summary":"Get a download URL for a supporting document","tags":["Supporting documents"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/{questionUUID}":{"put":{"description":"Updates the value of an existing answer. Returns the updated question state, and optionally the next question if includeNext=true. When `value.type` is `wageTax`, include `value.taxYear` (must match the filing’s scenario year and `input.taxYear` on the question; see `WageTaxAnswer2024Dto` / `WageTaxAnswer2025Dto`).\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Answer saved successfully |\n| `400` | Validation failed |\n| `404` | Answer not found |\n| `409` | Filing is read-only (`inReview` or `submitted`). Code `FILING_READ_ONLY`. Body includes `error.details.messages` with paired `en` and `de` paragraphs for the UI (plus `filingUUID` and `status`). |\n| `410` | Filing has been deleted |","operationId":"AnswerApiController_updateAnswer","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}},{"name":"questionUUID","required":true,"in":"path","description":"Question UUID","schema":{"format":"uuid","example":"12a55b49-05c3-455a-b48c-705dc401bca3","type":"string"}},{"name":"includeNext","required":false,"in":"query","description":"When true, the response includes `nextQuestion` — the next unanswered question in the flow. Saves a separate GET call.","schema":{"example":true,"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnswerDto"}}}},"responses":{"200":{"description":"Answer saved successfully","schema":{"example":{"question":{"uuid":"12a55b49-05c3-455a-b48c-705dc401bca3","status":{"answered":true,"complete":true}},"nextQuestion":{"uuid":"next-question-uuid","display":{"text":{"en":"What is your surname?","de":"Wie lautet Ihr Nachname?"}},"input":{"type":"text","placeholder":{"en":"","de":""}},"answer":{"type":"empty"},"status":{"answered":false,"complete":false},"navigation":{"section":{"uuid":"section-uuid","name":{"en":"About You","de":""}},"subsection":{"uuid":"subsection-uuid","name":{"en":"Personal Details","de":""}}}}}},"content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UpdateAnswerResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"example":{"error":"ANSWER_VALIDATION_FAILED","message":"Answer validation failed","details":{"validationMode":"error","validationMessage":{"de":"Ungültiges Format","en":"Invalid format"},"validationReason":"regex_mismatch"}}}}}},"404":{"description":"Answer not found"},"409":{"description":"Filing is read-only (`inReview` or `submitted`). Code `FILING_READ_ONLY`. Body includes `error.details.messages` with paired `en` and `de` paragraphs for the UI (plus `filingUUID` and `status`)."},"410":{"description":"Filing has been deleted"}},"security":[{"bearer":[]}],"summary":"Save answer","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/{questionUUID}/one-more":{"post":{"description":"Creates an additional instance of a repeatable question (e.g., adding another employer). Returns the first question of the new instance to navigate there.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | New instance created |\n| `404` | Answer not found |\n| `409` | Filing is read-only (`inReview` or `submitted`). Code `FILING_READ_ONLY`. Body includes `error.details.messages` with paired `en` and `de` paragraphs for the UI (plus `filingUUID` and `status`). |\n| `410` | Filing has been deleted |","operationId":"AnswerApiController_createOneMoreAnswer","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","type":"string"}},{"name":"questionUUID","required":true,"in":"path","description":"Question UUID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"New instance created","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/OneMoreResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"404":{"description":"Answer not found"},"409":{"description":"Filing is read-only (`inReview` or `submitted`). Code `FILING_READ_ONLY`. Body includes `error.details.messages` with paired `en` and `de` paragraphs for the UI (plus `filingUUID` and `status`)."},"410":{"description":"Filing has been deleted"}},"security":[{"bearer":[]}],"summary":"Add repeatable answer","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/prefill":{"post":{"description":"Applies key-value pairs to a filing's answers in a single call. Values are stored with `answered: false` so the user sees them as prefilled defaults.\n\n**Use this endpoint to:**\n- Seed a filing with data from an external source (e.g. accounting software)\n- Update previously prefilled values (upsert semantics -- each call overwrites)\n- Partially prefill: only send the keys you have data for\n\n**Behavior:**\n- Best-effort processing: valid keys are applied, invalid ones return warnings\n- The response always includes the full filing object and a prefill summary\n- Array values create multiple instances (e.g. `selfemp_cost: [1200, 450]` creates 2 equipment entries)\n- Progress stays at 0% until the user confirms answers through normal navigation\n\n**EÜR (`eur` block):** fills the EÜR element as a whole. Invalid fields or list items are dropped with a warning keyed by their path (e.g. `eur.business.businessId`); calculated values (allowances, depreciation, private use) return `CALCULATED_VALUE` and are computed by AnyTax instead. The block is not applied when the EÜR already holds values that did not come from a partner prefill (`ALREADY_EDITED`). The legal form is `business.kind` (`trade`, `freelancer`, `other_self_employed`); there is no `legalForm` field. Every asset needs an `id` unique within the block; an asset without one is dropped.\n\n**Removing a prefill:** send `{ \"clear\": true }` to remove the prefill from the filing again — every value still marked as prefilled is blanked. Values the user has already confirmed or edited are kept. Idempotent; any other keys in a `clear` request are ignored.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `personal` | object | No | — |\n| `selfEmployment` | object | No | — |\n| `crypto` | object | No | — |\n| `eur` | object | No | — |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Prefill processed. Check `prefill.warnings` for any keys that could not be applied. |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to user |\n| `409` | Filing is read-only (`inReview` or `submitted`). Code `FILING_READ_ONLY`. Includes `error.details.messages` with full `en` and `de` copy. |\n| `410` | Filing has been deleted |","operationId":"AnswerApiController_prefill","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the filing to prefill","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefillRequestDto"},"examples":{"minimal":{"summary":"Minimal prefill (just name)","value":{"personal":{"firstName":"Max","lastName":"Mustermann"}}},"personalData":{"summary":"Personal data with address","value":{"personal":{"firstName":"Max","lastName":"Mustermann","dateOfBirth":"1990-05-15","taxId":12345678901,"address":{"street":"Chausseestraße","houseNumber":"37","zipCode":"10115","city":"Berlin","state":"Berlin","country":"Germany"}}}},"fullFreelancer":{"summary":"Full freelancer prefill with costs","value":{"personal":{"firstName":"Max","lastName":"Mustermann","dateOfBirth":"1990-05-15","taxId":12345678901,"address":{"street":"Chausseestraße","houseNumber":"37","zipCode":"10115","city":"Berlin","state":"Berlin","country":"Germany"}},"selfEmployment":{"isSelfEmployed":true,"profession":"Software Developer","revenue":85000,"vatReceived":16150,"phoneAndInternet":600,"accountingCosts":1200,"booksAndSoftware":350,"equipmentItems":[{"cost":1200,"depreciationYears":3},{"cost":450}]}}},"eur":{"summary":"EÜR (Anlage EÜR + AVEÜR) from bookkeeping","value":{"eur":{"business":{"name":"Mustermann Design","activity":"Grafikdesign","kind":"freelancer","owner":"person_a","closed":"no","propertyWithdrawn":false,"businessId":"DE123456788-00001","address":{"street":"Chausseestraße","houseNumber":"37","zipCode":"10115","city":"Berlin"}},"kleinunternehmer":false,"amounts":{"se_revenue_vat_taxable":62000,"se_vat_collected":11780,"exp_it_software":840,"exp_telecom":600,"exp_legal_tax_advisory":1200,"se_input_vat":1450},"commute":{"oneWayKm":18,"days":160,"months":[1,2,3,4,5,6,7,8,9,10,11,12]},"homeOffice":{"answer":"no"},"goodsTaken":{"answer":"no"},"sections":{"assets":true,"gifts":true},"assets":[{"id":"laptop-2025","equipmentClass":"computer_hardware","origin":"new","description":"Laptop","purchaseDate":"2025-03-14","cost":2000,"usefulLifeYears":1,"businessPct":100}],"gifts":[{"recipient":"Client A","amount":30}]}}}}}}},"responses":{"200":{"description":"Prefill processed. Check `prefill.warnings` for any keys that could not be applied.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PrefillResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to user"},"409":{"description":"Filing is read-only (`inReview` or `submitted`). Code `FILING_READ_ONLY`. Includes `error.details.messages` with full `en` and `de` copy."},"410":{"description":"Filing has been deleted"}},"security":[{"bearer":[]}],"summary":"Prefill a filing with known data","tags":["Answer API"],"x-anytax-docs-enriched":true},"get":{"description":"Returns the prefilled data a partner sent for this filing that the user has not confirmed or edited yet.\n\n**Shape:** identical to the `POST` request body, so a client can render the values, let the user edit them, and send the result straight back to `POST /api/v1/answer/{filingUUID}/prefill`.\n\n**Behavior:**\n- Only fields that carry a value are returned; a block with nothing prefilled is omitted entirely\n- A value loses its prefilled marker as soon as the user confirms or edits it, and then stops being returned here\n- A filing with nothing prefilled answers with `partnerSlug: null` and no blocks\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to user |\n| `410` | Filing has been deleted |","operationId":"AnswerApiController_getPrefill","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the filing to read the prefill from","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PrefillDataResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to user"},"410":{"description":"Filing has been deleted"}},"security":[{"bearer":[]}],"summary":"Read the prefill sitting on a filing","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/prefill-sources":{"get":{"description":"Lists the current user's filings that can be used to pre-fill personal data into a new filing (ANTX-817). A filing qualifies once it is no longer editable — status `inReview`, `submitted` or `processed`. Newest tax year first. Empty when the user has no such filing.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |","operationId":"AnswerApiController_prefillSources","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PrefillSourcesResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"security":[{"bearer":[]}],"summary":"List prefill sources","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/prefill-from-filing":{"post":{"description":"Copies the selected personal sub-sections from a prior filing into this filing, across tax years (ANTX-817). The source must be one of the filings returned by `GET /v1/answer/prefill-sources` (status `inReview`, `submitted` or `processed`). Spouse data is included only when both `includeSpouse` is set and the source filing was a joint filing. Values are written with `answered: false` and a `prefilledSourceYear` provenance flag — the user still confirms every field. Best-effort: keys that cannot be mapped are returned in `prefill.warnings`.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `sourceFilingUUID` | string (uuid) | Yes | UUID |\n| `sections` | enum[] | Yes | Which personal sub-sections to pre-fill |\n| `includeSpouse` | boolean | No | Also pre-fill spouse data (only applied when the source filing was a joint filing) |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |\n| `400` | Source filing is still editable |\n| `409` | Target filing is read-only (`inReview`/`submitted`) |","operationId":"AnswerApiController_prefillFromFiling","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Target filing UUID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrossYearPrefillRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/CrossYearPrefillResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Source filing is still editable"},"409":{"description":"Target filing is read-only (`inReview`/`submitted`)"}},"security":[{"bearer":[]}],"summary":"Pre-fill personal data from a prior filing","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/prefill-decline":{"post":{"description":"Marks the prefill prompt as dismissed for this filing so it is not shown again (ANTX-817).\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `204` | Prompt dismissed |","operationId":"AnswerApiController_prefillDecline","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Prompt dismissed"}},"security":[{"bearer":[]}],"summary":"Decline the prefill prompt","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/questions/{questionUUID}/viewed":{"post":{"description":"Records that a question was rendered to the user (analytics only — no answer is stored). Enables accurate drop-off attribution and per-question timing. Fire-and-forget: returns 204 with no body.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `204` | Question view recorded |\n| `404` | Filing not found |","operationId":"AnswerApiController_markQuestionViewed","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","type":"string"}},{"name":"questionUUID","required":true,"in":"path","description":"Question UUID","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Question view recorded"},"404":{"description":"Filing not found"}},"security":[{"bearer":[]}],"summary":"Record a question view","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/answer/{filingUUID}/section/{sectionUUID}/reset":{"delete":{"description":"Resets every answer in the specified sub-section (and any nested sub-sections) back to their unanswered default state. The sub-section is identified by its RuleSnapshot UUID, which already encodes the correct person in a joint filing — no additional filtering is needed. If the filing was in \"prepared\" status it will drop back to \"inProgress\".\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `204` | Answers reset successfully |\n| `403` | Filing is locked (inReview or submitted) |\n| `404` | Filing or section not found |","operationId":"AnswerApiController_resetSectionAnswers","parameters":[{"name":"filingUUID","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"sectionUUID","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Answers reset successfully"},"403":{"description":"Filing is locked (inReview or submitted)"},"404":{"description":"Filing or section not found"}},"security":[{"bearer":[]}],"summary":"Reset all answers in a sub-section","tags":["Answer API"],"x-anytax-docs-enriched":true}},"/api/v1/question/{filingUUID}/current":{"get":{"description":"Returns the question the user should answer next in their filing journey.\n\n**Use this endpoint to:**\n- Load the current question when user opens the questionnaire\n- Navigate to the next question after submission\n- Resume a user's session from where they left off\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Current question with full context for rendering |\n| `401` | Unauthorized - valid JWT token required |\n| `404` | Filing not found or questionnaire is complete |\n| `500` | Internal server error |","operationId":"QuestionApiController_getCurrentQuestion","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the tax filing","schema":{"example":"fb7ff01b-4e60-4db7-b326-76d656e47619","type":"string"}}],"responses":{"200":{"description":"Current question with full context for rendering","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/CurrentQuestionDto","example":{"uuid":"1b465de5-b35f-4c4e-80a8-810ec7cb0da3","display":{"text":{"de":"Möchtest du einen Titel hinzufügen?","en":"Would you like to add a title?"},"subtitle":{"de":"Warum ist das wichtig?...","en":"Why is this important?..."},"tooltip":null},"input":{"type":"binary","validation":{"yes":{"uuid":"e0bc3de3-597f-50dd-ab61-0b0d97ab5194"},"no":{"uuid":"9f171ee5-5247-5c87-8312-ceb20485443f"}}},"answer":{"type":"binary","selected":false},"status":{"answered":true,"complete":true},"navigation":{"section":{"uuid":"10dbc465-91d0-5efe-8f65-f8b0bf3029d5","name":{"de":"","en":"About You"}},"subsection":{"uuid":"a07d8e46-1234-5678-9abc-def012345678","name":{"de":"","en":"Personal Details"}}}}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid JWT token required"},"404":{"description":"Filing not found or questionnaire is complete"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get current question","tags":["Question API"],"x-anytax-docs-enriched":true}},"/api/v1/question/{filingUUID}/next":{"get":{"description":"Returns the next question in the filing journey, or null when the questionnaire is complete.\n\n**Use this endpoint to:**\n- Navigate forward after submitting an answer\n- Skip to the next unanswered question\n\n**Navigation behavior:**\n- If currentQuestionUUID is provided, returns the question after it\n- If not provided, returns the next unanswered question based on navigation context\n- Returns null (204) when all questions are answered\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Next question with navigation context |\n| `204` | Questionnaire complete - no more questions |\n| `401` | Unauthorized - valid JWT token required |\n| `404` | Filing not found |\n| `500` | Internal server error |","operationId":"QuestionApiController_getNextQuestion","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the tax filing","schema":{"example":"fb7ff01b-4e60-4db7-b326-76d656e47619","type":"string"}},{"name":"currentQuestionUUID","required":false,"in":"query","description":"UUID of the current question to navigate from","schema":{"example":"12a55b49-05c3-455a-b48c-705dc401bca3","type":"string"}}],"responses":{"200":{"description":"Next question with navigation context","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/CurrentQuestionDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"204":{"description":"Questionnaire complete - no more questions"},"401":{"description":"Unauthorized - valid JWT token required"},"404":{"description":"Filing not found"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get next question","tags":["Question API"],"x-anytax-docs-enriched":true}},"/api/v1/question/{filingUUID}/back":{"get":{"description":"Returns the previous question in the filing journey.\n\n**Use this endpoint to:**\n- Navigate backward in the questionnaire\n- Allow users to review and edit previous answers\n\n**Navigation behavior:**\n- Returns the question immediately before the current one\n- Returns null (204) when at the first question\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Previous question with navigation context |\n| `204` | No previous question - at the beginning |\n| `401` | Unauthorized - valid JWT token required |\n| `404` | Filing or question not found |\n| `500` | Internal server error |","operationId":"QuestionApiController_getPreviousQuestion","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the tax filing","schema":{"example":"fb7ff01b-4e60-4db7-b326-76d656e47619","type":"string"}},{"name":"currentQuestionUUID","required":true,"in":"query","description":"UUID of the current question to navigate back from","schema":{"example":"12a55b49-05c3-455a-b48c-705dc401bca3","type":"string"}}],"responses":{"200":{"description":"Previous question with navigation context","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/CurrentQuestionDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"204":{"description":"No previous question - at the beginning"},"401":{"description":"Unauthorized - valid JWT token required"},"404":{"description":"Filing or question not found"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get previous question","tags":["Question API"],"x-anytax-docs-enriched":true}},"/api/v1/question/{filingUUID}/section/{sectionUUID}":{"get":{"description":"Returns all answered questions in a section plus the next unanswered one.\n\n**Use this endpoint to:**\n- Display a summary of completed questions in a section\n- Show progress through a section\n- Allow users to review/edit previous answers\n\n**Breadcrumb behavior:**\nQuestions are returned in depth-first order, stopping at the first unanswered question.\nThis creates a \"breadcrumb trail\" showing the user's journey through the section.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Array of questions in breadcrumb order |\n| `401` | Unauthorized - valid JWT token required |\n| `404` | Filing or section not found |\n| `500` | Internal server error |","operationId":"QuestionApiController_getQuestionsBySection","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the tax filing","schema":{"example":"fb7ff01b-4e60-4db7-b326-76d656e47619","type":"string"}},{"name":"sectionUUID","required":true,"in":"path","description":"UUID of the section to fetch questions from","schema":{"example":"10dbc465-91d0-5efe-8f65-f8b0bf3029d5","type":"string"}}],"responses":{"200":{"description":"Array of questions in breadcrumb order","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionDto"},"example":[{"uuid":"12a55b49-05c3-455a-b48c-705dc401bca3","display":{"text":{"de":"Wie lautet Ihr Vorname?","en":"What is your first name?"},"subtitle":null,"tooltip":null},"input":{"type":"text","placeholder":{"de":"","en":""}},"answer":{"type":"text","text":"Annie"},"status":{"answered":true,"complete":true}},{"uuid":"a6898875-94dd-49b0-bb70-68bd0c6164a5","display":{"text":{"de":"Möchtest du einen Titel hinzufügen?","en":"Would you like to add a title?"},"subtitle":{"de":"Warum ist das wichtig?...","en":"Why is this important?..."},"tooltip":null},"input":{"type":"binary","validation":{"yes":{"uuid":"e0bc3de3-597f-50dd-ab61-0b0d97ab5194"},"no":{"uuid":"9f171ee5-5247-5c87-8312-ceb20485443f"}}},"answer":{"type":"binary","selected":true},"status":{"answered":true,"complete":true}},{"uuid":"7112220f-f7e0-4830-92e3-e01de473d3f5","display":{"text":{"de":"Besondere Tätigkeiten","en":"Special Activities"},"subtitle":null,"tooltip":null},"input":{"type":"multiSelect","options":[{"uuid":"a364b9d1-86ed-52cf-9cff-8b74987a41a4","label":{"de":"Vorstandsmitglied","en":"Board member"}},{"uuid":"a4d51db2-7325-56e4-aacc-24a8671a34d5","label":{"de":"Angestellt","en":"Employed"}}],"validation":{"noneOption":null}},"answer":{"type":"multiSelect","selected":[{"uuid":"a364b9d1-86ed-52cf-9cff-8b74987a41a4","label":{"de":"Vorstandsmitglied","en":"Board member"}}]},"status":{"answered":true,"complete":true}},{"uuid":"f9a21fdf-cd83-4c15-976e-d201908fffe8","display":{"text":{"de":"Deutsches Konto","en":"German Bank Account"},"subtitle":null,"tooltip":null},"input":{"type":"text","placeholder":{"de":"DE...","en":"DE..."},"validation":{"preset":"iban"}},"answer":{"type":"text","text":"DE89370400440532013000"},"status":{"answered":true,"complete":true},"validation":{"errorMessage":{"de":"Ungültige IBAN","en":"Invalid IBAN"},"warningMessage":null}},{"uuid":"a3fffb01-3aa2-4c12-bcd6-1f29472bb885","display":{"text":{"de":"Rentenbefreiung?","en":"Pension exemption?"},"subtitle":null,"tooltip":null},"input":{"type":"binary","validation":{"yes":{"uuid":"c1d2e3f4-5678-90ab-cdef-1234567890ab"},"no":{"uuid":"d2e3f4a5-6789-01bc-def0-2345678901bc"}}},"answer":{"type":"empty"},"status":{"answered":false,"complete":false}}]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid JWT token required"},"404":{"description":"Filing or section not found"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get questions in a section","tags":["Question API"],"x-anytax-docs-enriched":true}},"/api/v1/question/{filingUUID}/{questionUUID}":{"get":{"description":"Returns a single question with its current answer.\n\n**Use this endpoint to:**\n- Fetch a specific question by UUID\n- Reload a question after submission to verify the answer was saved\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Question with current answer and navigation |\n| `401` | Unauthorized - valid JWT token required |\n| `404` | Filing or question not found |\n| `500` | Internal server error |","operationId":"QuestionApiController_getQuestion","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"UUID of the tax filing","schema":{"example":"fb7ff01b-4e60-4db7-b326-76d656e47619","type":"string"}},{"name":"questionUUID","required":true,"in":"path","description":"UUID of the question to fetch","schema":{"example":"12a55b49-05c3-455a-b48c-705dc401bca3","type":"string"}}],"responses":{"200":{"description":"Question with current answer and navigation","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/CurrentQuestionDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid JWT token required"},"404":{"description":"Filing or question not found"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get a single question","tags":["Question API"],"x-anytax-docs-enriched":true}},"/api/v1/scenarios":{"get":{"description":"Retrieves tax scenarios for the specified year that the user can interact with. Returns all active scenarios (available for new filings) plus any inactive scenarios where the user has existing filings.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Scenarios with user filings retrieved successfully |\n| `401` | Unauthorized - valid authentication token required |\n| `500` | Internal server error |","operationId":"ScenarioApiController_getScenarios","parameters":[{"name":"year","required":false,"in":"query","description":"Tax year to filter scenarios. If not provided, returns all scenarios.","schema":{"enum":[2022,2023,2024,2025,2026],"type":"number"}}],"responses":{"200":{"description":"Scenarios with user filings retrieved successfully","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScenarioWithFilingsDto"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get scenarios","tags":["Scenario API"],"x-anytax-docs-enriched":true}},"/api/v1/scenarios/{scenarioUUID}":{"get":{"description":"Retrieves a specific tax scenario with the user's filings and progress information.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Scenario with user filings retrieved successfully |\n| `404` | Scenario not found |\n| `500` | Internal server error |","operationId":"ScenarioApiController_getScenarioByUUID","parameters":[{"name":"scenarioUUID","required":true,"in":"path","description":"Unique scenario identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440002","type":"string"}}],"responses":{"200":{"description":"Scenario with user filings retrieved successfully","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ScenarioWithFilingsDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"404":{"description":"Scenario not found"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get scenario by UUID","tags":["Scenario API"],"x-anytax-docs-enriched":true}},"/api/v1/wage-tax/process-document":{"post":{"description":"Uploads and processes a Lohnsteuerbescheinigung (wage tax certificate) PDF using OCR. Extracts structured data fields such as gross wages, tax withheld, and employer information.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Document processed successfully |\n| `400` | No file uploaded |\n| `500` | Failed to process document |","operationId":"WageTaxApiController_processDocumentOcr","parameters":[],"requestBody":{"required":true,"description":"Wage tax certificate PDF file","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"PDF file to process"}},"required":["file"]}}}},"responses":{"200":{"description":"Document processed successfully","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/WageTaxOcrResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"No file uploaded"},"500":{"description":"Failed to process document"}},"security":[{"bearer":[]}],"summary":"Process wage tax certificate","tags":["Wage Tax API"],"x-anytax-docs-enriched":true}},"/api/v1/navigation/sections/{filingUUID}":{"get":{"description":"Returns the section hierarchy for a tax filing. Sections group related questions and include completion progress (0-100%) to track filing status.\n\nEach node includes `usedFor` (`personA` = self, `personB` = spouse). Before joint filing is confirmed (`isJointFiling: false` on `GET /api/v1/filing/{filingUUID}`), only `personA` subsections are returned. After the user confirms joint filing, `personB` subsections are included.\n\n**Partner UI:** Ignore `usedFor` on top-level sections (always show the default section name). On subsections, filter by `usedFor` when `isJointFiling` is true to show Self / Spouse tabs. See the **Joint Filing Integration Guide** in this documentation for full examples.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Section hierarchy with subsections |\n| `404` | Filing or scenario not found |\n| `500` | Internal server error |","operationId":"NavigationApiController_getQuestionaryMenu","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Unique filing identifier","schema":{"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001","type":"string"}}],"responses":{"200":{"description":"Section hierarchy with subsections","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/NavigationNodeDto"},"example":[{"uuid":"b2ac8f1d-9b2e-5fec-bf59-3031df49c83f","name":{"de":"","en":"About You"},"ruleType":"section","icon":"user","enabled":true,"progress":0,"completed":false,"usedFor":"personA","subsections":[{"uuid":"f51d56fd-d75a-59dd-bf8d-7d28ce0a4c3b","name":{"de":"","en":"Personal Details"},"ruleType":"section","enabled":true,"progress":0,"completed":false,"usedFor":"personA"}]},{"uuid":"15163f39-8693-53b2-9024-4127797cf9b8","name":{"de":"Einkommen","en":"Income"},"ruleType":"section","icon":"briefcase","enabled":true,"progress":45,"completed":false,"usedFor":"personA","subsections":[{"uuid":"28f5f0ab-cc29-588f-a36c-17739447b609","name":{"de":"Lohnsteuerbescheinigung","en":"Wage Tax Certificate"},"ruleType":"section","enabled":true,"progress":100,"completed":true,"usedFor":"personA"},{"uuid":"a91bc2de-7e20-4a11-9c58-462f2c7bb6b7","name":{"de":"Lohnsteuerbescheinigung","en":"Wage Tax Certificate"},"ruleType":"section","enabled":true,"progress":0,"completed":false,"usedFor":"personB"},{"uuid":"f87bc1f3-9f15-5f98-9f57-462f2c7bb6b6","name":{"de":"Pendeln","en":"Commute Costs"},"ruleType":"section","enabled":true,"progress":65,"completed":false,"usedFor":"personA"}]}]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"404":{"description":"Filing or scenario not found"},"500":{"description":"Internal server error"}},"security":[{"bearer":[]}],"summary":"Get tax filing sections","tags":["Navigation API"],"x-anytax-docs-enriched":true}},"/api/v1/tax-saving-tip/{filingUUID}":{"get":{"description":"Returns enabled tips for the filing tax year whose JEXL expression evaluates to true against current answer values and the filing tax calculation breakdown.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Matching tax saving tips for the filing |\n| `401` | Unauthorized - valid authentication token required |\n| `404` | Filing not found or does not belong to user |","operationId":"getTaxSavingTips","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}}],"responses":{"200":{"description":"Matching tax saving tips for the filing","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TaxSavingTipsForFilingResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"},"404":{"description":"Filing not found or does not belong to user"}},"security":[{"bearer":[]}],"summary":"Get tax saving tips for a filing","tags":["Tax Saving Tip API"],"x-anytax-docs-enriched":true}},"/api/v1/filing-eligibility-check/questions":{"get":{"description":"Auth: either a partner bearer token from POST /api/v1/partner/token (no end-user account required — for a partner backend calling on behalf of an anonymous, pre-signup end user), or your own normal session token if you're already logged in. Returns all 4 questions with stable question/option ids, copy, helper text, callout blocks, exclusive/clearing flags, and a questionSetVersion. Cache by (taxYear, locale) — content only changes when questionSetVersion changes.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |","operationId":"FilingEligibilityCheckApiController_getQuestions","parameters":[{"name":"taxYear","required":true,"in":"query","description":"Tax year the questions apply to","schema":{"example":2025,"type":"number"}},{"name":"locale","required":true,"in":"query","description":"Language to return question copy in","schema":{"type":"string","enum":["en","de"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/EligibilityQuestionsResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"summary":"Fetch the eligibility question set for a tax year","tags":["Filing Eligibility Check"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/filing-eligibility-check/evaluate":{"post":{"description":"Auth: either a partner bearer token (anonymous, pre-signup — nothing is created for the end user until they later register with AnyTax) or your own session token if logged in (pass `scenarioUUID` in that case so the result ties into the same filing-eligibility gate as the rest of the filing flow). Accepts partial answer sets. Returns \"unsupported\" as soon as any submitted question is disqualifying, without requiring the rest. Returns \"supported\" only once all 4 questions are present and clean. Otherwise returns \"pending\". Evaluates against the exact questionSetVersion requested, even if it is no longer the current one, so a caller mid-flow on a cached version is never broken by a later wording bump.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `taxYear` | number | Yes | Tax year the answers apply to |\n| `questionSetVersion` | string | Yes | The questionSetVersion returned by GET /filing-eligibility-check/questions for this taxYear |\n| `locale` | enum | Yes | en, de |\n| `answers` | object | Yes | Answers so far, keyed by questionId. Partial answer sets are accepted — omit a question that has not been answered yet. |\n| `scenarioUUID` | string (uuid) | No | UUID |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |","operationId":"FilingEligibilityCheckApiController_evaluate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateEligibilityDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/EvaluateEligibilityResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"summary":"Evaluate a (possibly partial) set of eligibility answers","tags":["Filing Eligibility Check"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/filing-eligibility-check/notify":{"post":{"description":"Auth: either a partner bearer token (anonymous — no end-user account, login, or session required; `email` in the body is required) or your own session token if logged in (the `email` in the body is ignored in that case — we use your account's own address, so you can't register someone else's email under your session). Lands in the same store either way. Repeat signups for the same email/taxYear/partner update the existing record rather than creating duplicates.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `email` | string | No | Where to send a message once this taxYear becomes supported. Required when calling with a partner bearer token. Ignored (and not required) when calling with your own logged-in session — we use your account's own email instead, so you can't register someone else's email under your session. |\n| `taxYear` | number | Yes | Which tax year this signup is about — usually the taxYear you just evaluated. |\n| `questionSetVersion` | string | No | The questionSetVersion you evaluated against, if you have one. Purely a record-keeping field — omit it if this signup didn't follow an evaluate() call. |\n| `triggeredBy` | object[] | No | items: TriggeredByEntryDto |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |","operationId":"FilingEligibilityCheckApiController_notify","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEligibilityDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/NotifyEligibilityResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}}},"summary":"Capture a \"notify me when supported\" email for an unsupported result","tags":["Filing Eligibility Check"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/partner/users/login":{"post":{"description":"Returns an access token for a user who already exists under your partner account. Call it from your backend with your `slug`, your `clientSecret` and the e-mail address of the user; the secret must never reach a browser or a mobile client.\n\nTogether with `POST /api/v1/partner/users/register` this is the way in for an integration that works through the API alone. The e-mail, password and one-time-code operations in the Auth API section are the sign-in of the hosted web application and are not needed here.\n\n- `accessToken` is a Bearer JWT valid for one hour (`expiresIn` is 3600 seconds). No refresh token and no cookie are issued. Send it as `Authorization: Bearer <accessToken>` on every other call: the token alone identifies the user and your partner account.\n- To continue after an hour, call this operation again at any time, or call `POST /api/v1/auth/refresh` while the token is still valid. Once the token has expired only this operation works. Every call issues a new token and leaves earlier ones valid until they expire.\n- The user is looked up by e-mail address, in lower case, within your partner account only. An address registered under another partner account is not found.\n\n**Limits.** 1000 requests per minute per calling address. The count is shared with every other call made without an access token from that address, including the Auth API calls, whose own limits are far lower: a burst of Partner Platform calls can make a following Auth API call answer 429, and Auth API calls count against the 1000. After 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is answered with 429 until that minute is over — correct credentials included.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `slug` | string | Yes | 1–64 characters |\n| `clientSecret` | string | Yes | 1–512 characters |\n| `email` | string (email) | Yes | Valid email address |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | The access token and the user it was issued for. |\n| `400` | The request body failed validation. |\n| `401` | The slug is unknown, the client secret is wrong or the partner account is not active — all three answer the same way. Also returned when the user exists but is not active. |\n| `404` | No user with this e-mail address exists under your partner account. Create one with `POST /api/v1/partner/users/register`. |\n| `429` | Two causes share the same error body and both carry `Retry-After` (whole seconds remaining). - **Request limit** — the shared count of calls made without an access token from one calling address exceeded 1000 within one minute. - **Failed credential checks** — after 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is rejected until that minute is over, correct credentials included. Correct the credentials before retrying. Wait at least the supplied duration; add jitter and bound retries. `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe the current window on every response to a request that was counted. Rejections before the request is counted carry none of them: 401 for a missing or invalid access token, 400 for a body that is not valid JSON, and 413 for a JSON body over its byte limit. |","operationId":"PartnerApiController_partnerUserLogin","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserLoginDto"}}}},"responses":{"200":{"description":"The access token and the user it was issued for.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PartnerUserTokenResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["email must be an email"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"401":{"description":"The slug is unknown, the client secret is wrong or the partner account is not active — all three answer the same way. Also returned when the user exists but is not active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Wrong partner credentials":{"summary":"Wrong partner credentials","value":{"success":false,"error":{"code":"Unauthorized","message":"Invalid credentials"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"User account not active":{"summary":"User account not active","value":{"success":false,"error":{"code":"Unauthorized","message":"User account is not active"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"404":{"description":"No user with this e-mail address exists under your partner account. Create one with `POST /api/v1/partner/users/register`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Not Found","message":"User not found for this partner"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"429":{"description":"Two causes share the same error body and both carry `Retry-After` (whole seconds remaining).\n\n- **Request limit** — the shared count of calls made without an access token from one calling address exceeded 1000 within one minute.\n- **Failed credential checks** — after 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is rejected until that minute is over, correct credentials included. Correct the credentials before retrying.\n\nWait at least the supplied duration; add jitter and bound retries. `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe the current window on every response to a request that was counted. Rejections before the request is counted carry none of them: 401 for a missing or invalid access token, 400 for a body that is not valid JSON, and 413 for a JSON body over its byte limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Request limit exceeded":{"summary":"Request limit exceeded","value":{"success":false,"error":{"code":"TOO_MANY_REQUESTS","message":"ThrottlerException: Too Many Requests"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Too many failed credential checks":{"summary":"Too many failed credential checks","value":{"success":false,"error":{"code":"TOO_MANY_REQUESTS","message":"ThrottlerException: Too Many Requests"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/login","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window ends.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds remaining before the request or credential-failure window expires; rounded up to at least one second.","schema":{"type":"integer"}}}}},"summary":"Sign in a user with partner credentials","tags":["Partner platform"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/partner/users/register":{"post":{"description":"Creates a user under your partner account and returns an access token for that user in the same response. Call it once per user from your backend with your `slug` and `clientSecret`; the secret must never reach a browser or a mobile client. For every later session call `POST /api/v1/partner/users/login`.\n\nThis is how an integration that works through the API alone brings its users in. The e-mail, password and one-time-code registration in the Auth API section belongs to the hosted web application and is not needed here.\n\n- The account is active immediately: no confirmation step, no one-time code, and no e-mail is sent to the user. The user gets no password.\n- E-mail addresses are stored in lower case and are unique within your partner account; the same address may exist under another partner account as a separate user.\n- Not idempotent: a second call with the same e-mail address answers 409 and changes nothing. After a 409, or after a response you never received, obtain the token with `POST /api/v1/partner/users/login`.\n- `accessToken` is a Bearer JWT valid for one hour (`expiresIn` is 3600 seconds), without a refresh token or a cookie. Keep `user.id`.\n\n**Limits.** 1000 requests per minute per calling address. The count is shared with every other call made without an access token from that address, including the Auth API calls, whose own limits are far lower: a burst of Partner Platform calls can make a following Auth API call answer 429, and Auth API calls count against the 1000. After 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is answered with 429 until that minute is over — correct credentials included.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `slug` | string | Yes | 1–64 characters |\n| `clientSecret` | string | Yes | 1–512 characters |\n| `email` | string (email) | Yes | Valid email address |\n| `name` | string | Yes | min length: 2 |\n| `surname` | string | Yes | min length: 2 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The user was created. The access token and the new user. |\n| `400` | The request body failed validation. |\n| `401` | The slug is unknown, the client secret is wrong or the partner account is not active — all three answer the same way. |\n| `409` | A user with this e-mail address already exists under your partner account. |\n| `429` | Two causes share the same error body and both carry `Retry-After` (whole seconds remaining). - **Request limit** — the shared count of calls made without an access token from one calling address exceeded 1000 within one minute. - **Failed credential checks** — after 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is rejected until that minute is over, correct credentials included. Correct the credentials before retrying. Wait at least the supplied duration; add jitter and bound retries. `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe the current window on every response to a request that was counted. Rejections before the request is counted carry none of them: 401 for a missing or invalid access token, 400 for a body that is not valid JSON, and 413 for a JSON body over its byte limit. |","operationId":"PartnerApiController_partnerUserRegister","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserRegisterDto"}}}},"responses":{"201":{"description":"The user was created. The access token and the new user.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PartnerUserTokenResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["email must be an email","Name cannot be less than 2 characters","surname may only contain letters, spaces, hyphens, apostrophes, and periods"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"401":{"description":"The slug is unknown, the client secret is wrong or the partner account is not active — all three answer the same way.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Unauthorized","message":"Invalid credentials"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"409":{"description":"A user with this e-mail address already exists under your partner account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Conflict","message":"User with this email already exists for this partner"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"429":{"description":"Two causes share the same error body and both carry `Retry-After` (whole seconds remaining).\n\n- **Request limit** — the shared count of calls made without an access token from one calling address exceeded 1000 within one minute.\n- **Failed credential checks** — after 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is rejected until that minute is over, correct credentials included. Correct the credentials before retrying.\n\nWait at least the supplied duration; add jitter and bound retries. `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe the current window on every response to a request that was counted. Rejections before the request is counted carry none of them: 401 for a missing or invalid access token, 400 for a body that is not valid JSON, and 413 for a JSON body over its byte limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Request limit exceeded":{"summary":"Request limit exceeded","value":{"success":false,"error":{"code":"TOO_MANY_REQUESTS","message":"ThrottlerException: Too Many Requests"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Too many failed credential checks":{"summary":"Too many failed credential checks","value":{"success":false,"error":{"code":"TOO_MANY_REQUESTS","message":"ThrottlerException: Too Many Requests"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/users/register","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window ends.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds remaining before the request or credential-failure window expires; rounded up to at least one second.","schema":{"type":"integer"}}}}},"summary":"Create a user with partner credentials","tags":["Partner platform"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/partner/sso/token":{"post":{"description":"Issues a single-use code that signs one of your users in to the hosted web application without a second login. It is only needed when you send users to the hosted web application; an integration that works through the API alone, with its own user interface, never calls it.\n\n- Call it from your backend with your `slug`, your `clientSecret` and `userId` — the `user.id` returned by `POST /api/v1/partner/users/register` or `POST /api/v1/partner/users/login`.\n- The response contains `ssoCode` and `expiresIn` and nothing else; no URL is returned. To use the code, redirect the browser of the user to `GET /api/v1/partner/sso/exchange?code=<ssoCode>` on this API host. That request consumes the code, starts the session of the user in the hosted web application of your partner account and forwards the browser to `returnPath`. If the browser already holds a valid session of a different user, the code is not consumed and the browser is forwarded to a confirmation step of the hosted web application instead.\n- The code is valid for 60 seconds and works once: create it immediately before the redirect. A code that has expired or was already used does not sign the user in; the browser is forwarded to an error notice of the hosted web application.\n- No access token is returned and none is needed for the redirect.\n\n**Limits.** 1000 requests per minute per calling address. The count is shared with every other call made without an access token from that address, including the Auth API calls, whose own limits are far lower: a burst of Partner Platform calls can make a following Auth API call answer 429, and Auth API calls count against the 1000. After 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is answered with 429 until that minute is over — correct credentials included.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `slug` | string | Yes | 1–64 characters |\n| `clientSecret` | string | Yes | 1–512 characters |\n| `userId` | integer | Yes | min: 1 |\n| `returnPath` | string | No | max length: 512 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | The single-use code and its lifetime. |\n| `400` | The request body failed validation. |\n| `401` | The slug is unknown, the client secret is wrong or the partner account is not active — all three answer the same way. Also returned when the user exists but is not active. |\n| `404` | No user with this `userId` exists under your partner account. |\n| `429` | Two causes share the same error body and both carry `Retry-After` (whole seconds remaining). - **Request limit** — the shared count of calls made without an access token from one calling address exceeded 1000 within one minute. - **Failed credential checks** — after 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is rejected until that minute is over, correct credentials included. Correct the credentials before retrying. Wait at least the supplied duration; add jitter and bound retries. `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe the current window on every response to a request that was counted. Rejections before the request is counted carry none of them: 401 for a missing or invalid access token, 400 for a body that is not valid JSON, and 413 for a JSON body over its byte limit. |","operationId":"PartnerApiController_createSsoCode","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSsoTokenDto"}}}},"responses":{"201":{"description":"The single-use code and its lifetime.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PartnerSsoCodeResponseDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Bad Request","message":["userId must be a positive number"]},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/sso/token","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"401":{"description":"The slug is unknown, the client secret is wrong or the partner account is not active — all three answer the same way. Also returned when the user exists but is not active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Wrong partner credentials":{"summary":"Wrong partner credentials","value":{"success":false,"error":{"code":"Unauthorized","message":"Invalid credentials"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/sso/token","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"User account not active":{"summary":"User account not active","value":{"success":false,"error":{"code":"Unauthorized","message":"User account is not active"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/sso/token","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}}},"404":{"description":"No user with this `userId` exists under your partner account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"example":{"success":false,"error":{"code":"Not Found","message":"User not found for this partner"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/sso/token","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}},"429":{"description":"Two causes share the same error body and both carry `Retry-After` (whole seconds remaining).\n\n- **Request limit** — the shared count of calls made without an access token from one calling address exceeded 1000 within one minute.\n- **Failed credential checks** — after 20 calls with wrong credentials within one minute from the same address for the same `slug`, every further call is rejected until that minute is over, correct credentials included. Correct the credentials before retrying.\n\nWait at least the supplied duration; add jitter and bound retries. `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` describe the current window on every response to a request that was counted. Rejections before the request is counted carry none of them: 401 for a missing or invalid access token, 400 for a body that is not valid JSON, and 413 for a JSON body over its byte limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"},"examples":{"Request limit exceeded":{"summary":"Request limit exceeded","value":{"success":false,"error":{"code":"TOO_MANY_REQUESTS","message":"ThrottlerException: Too Many Requests"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/sso/token","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}},"Too many failed credential checks":{"summary":"Too many failed credential checks","value":{"success":false,"error":{"code":"TOO_MANY_REQUESTS","message":"ThrottlerException: Too Many Requests"},"meta":{"timestamp":"2026-01-15T10:30:00.000Z","path":"/api/v1/partner/sso/token","requestId":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}}}}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window ends.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds remaining before the request or credential-failure window expires; rounded up to at least one second.","schema":{"type":"integer"}}}}},"summary":"Create a single sign-on code for a user","tags":["Partner platform"],"security":[{"bearer":[]}],"x-anytax-docs-enriched":true}},"/api/v1/countries":{"get":{"description":"Reference data for the country field of an address answer: send a `code` from this list as `countryCode`. Ordered by German label. The list only changes with a release, so it is safe to cache.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `401` | Unauthorized - valid authentication token required |","operationId":"getCountries","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/CountryResponseDto"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"401":{"description":"Unauthorized - valid authentication token required"}},"security":[{"bearer":[]}],"summary":"List selectable countries","tags":["Country API"],"x-anytax-docs-enriched":true}},"/api/v1/eur/{filingUUID}/preview":{"post":{"description":"Returns every calculated value of an `eur` answer (allowances, depreciation, private use, splits, AVEÜR group totals, profit) and what still blocks completing it. Nothing is saved; drafts are accepted.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `type` | enum | Yes | eur |\n| `status` | enum | Yes | draft, complete |\n| `business` | object | Yes | — |\n| `kleinunternehmer` | boolean | Yes | Kleinunternehmer (§19 UStG): no VAT fields are used. |\n| `amounts` | object | Yes | Euro amounts keyed by EÜR field name (e.g. `exp_telecom`). |\n| `vatCharged` | enum[] | No | — |\n| `commute` | object | No | — |\n| `vehicleMethod` | enum | No | one_percent, logbook |\n| `vehicles` | object[] | No | items: EurVehicleYearDto |\n| `homeOffice` | object | No | — |\n| `goodsTaken` | object | No | — |\n| `sections` | object | No | — |\n| `assetsMode` | enum | No | items, totals |\n| `assetTotals` | object | No | — |\n| `assetSaleProceeds` | number | No | 0–999999999999.99 |\n| `assets` | object[] | No | items: EurAssetDto |\n| `trips` | object[] | No | items: EurTripDto |\n| `privateTrips` | object[] | No | items: EurPrivateTripDto |\n| `gifts` | object[] | No | items: EurGiftDto |\n| `entertainmentOtherReason` | string | No | max length: 999 |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Calculated values |\n| `400` | Answer value is malformed |\n| `404` | Filing not found |","operationId":"EurApiController_preview","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EurAnswerDto"}}}},"responses":{"200":{"description":"Calculated values"},"400":{"description":"Answer value is malformed"},"404":{"description":"Filing not found"}},"security":[{"bearer":[]}],"summary":"Calculate an EÜR answer","tags":["EÜR API"],"x-anytax-docs-enriched":true}},"/api/v1/eur/{filingUUID}/meal-destinations":{"get":{"description":"Destinations with their full-day and 8h+ rates for the filing's tax year (BMF table). The first entry, with `countryEn: null`, is Germany.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Destinations with rates |\n| `404` | Filing not found |","operationId":"EurApiController_mealDestinations","parameters":[{"name":"filingUUID","required":true,"in":"path","description":"Filing UUID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Destinations with rates"},"404":{"description":"Filing not found"}},"security":[{"bearer":[]}],"summary":"List meal-allowance destinations","tags":["EÜR API"],"x-anytax-docs-enriched":true}},"/api/v1/vast/{filingUUID}/authorizations":{"get":{"description":"Returns the status of the access to the user’s ELSTER data and the known tax ID and date of birth (from the filing, else the account settings). An open request is re-checked with ELSTER at most once a minute. `enabled: false` means ELSTER import is not offered.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `404` | Filing not found or does not belong to user |","operationId":"VastApiController_getStatus","parameters":[{"name":"filingUUID","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/VastStatusDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"404":{"description":"Filing not found or does not belong to user"}},"security":[{"bearer":[]}],"summary":"Get the user’s ELSTER access status","tags":["ELSTER Import API"],"x-anytax-docs-enriched":true},"post":{"description":"Records the user’s consent and asks ELSTER for access to their data for all tax years, valid for 10 years unless removed. An open or approved access that already exists for the tax ID is returned instead of a new request; `replace: true` cancels the pending request first. The user then approves it in Mein ELSTER or with the activation code that arrives by post. `taxId` and `dateOfBirth` are saved to the account settings and the filing where they differ.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `consent` | boolean | Yes | The user consents to AnyTax retrieving their ELSTER data. Must be true. |\n| `taxId` | string | Yes | The user’s tax ID (IdNr). Saved to the account settings and the filing where it differs. |\n| `dateOfBirth` | string | Yes | The user’s date of birth. Saved to the account settings and the filing where it differs. |\n| `replace` | boolean | No | Cancel the pending request first and send a new one (\"request again\"). |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |\n| `400` | Invalid tax ID or date of birth, or no consent |\n| `409` | `ELSTER_REQUEST_LIMIT`: access for this tax ID was already requested today (ELSTER accepts one request per day). |\n| `422` | ELSTER rejected the request. Error code: `ELSTER_REQUEST_REJECTED`; `details` carries `elsterCode` and `elsterText` |\n| `429` | More than 5 ELSTER calls (request, activate, import, remove) per user and minute |\n| `503` | ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE` |","operationId":"VastApiController_request","parameters":[{"name":"filingUUID","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestVastAuthorizationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/VastAuthorizationDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid tax ID or date of birth, or no consent"},"409":{"description":"`ELSTER_REQUEST_LIMIT`: access for this tax ID was already requested today (ELSTER accepts one request per day)."},"422":{"description":"ELSTER rejected the request. Error code: `ELSTER_REQUEST_REJECTED`; `details` carries `elsterCode` and `elsterText`"},"429":{"description":"More than 5 ELSTER calls (request, activate, import, remove) per user and minute"},"503":{"description":"ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE`"}},"security":[{"bearer":[]}],"summary":"Request access to the user’s ELSTER data","tags":["ELSTER Import API"],"x-anytax-docs-enriched":true}},"/api/v1/vast/{filingUUID}/import":{"post":{"description":"Imports every wage tax certificate (Lohnsteuerbescheinigung) ELSTER holds for the filing’s tax year (2024 or 2025), one certificate per employer, as unconfirmed values the user then confirms. Certificates the user entered are kept (`existingCertificates` counts them); importing again replaces the unconfirmed imported ones. Requires approved access. Receipts appear at ELSTER at the earliest the day after approval.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |\n| `400` | Tax year not supported |\n| `409` | ELSTER access is not approved, or the filing is in review or submitted |\n| `422` | ELSTER rejected the request. Error code: `ELSTER_REQUEST_REJECTED`; `details` carries `elsterCode` and `elsterText` |\n| `429` | More than 5 ELSTER calls (request, activate, import, remove) per user and minute |\n| `503` | ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE` |","operationId":"VastApiController_importWageCertificates","parameters":[{"name":"filingUUID","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/VastImportResultDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Tax year not supported"},"409":{"description":"ELSTER access is not approved, or the filing is in review or submitted"},"422":{"description":"ELSTER rejected the request. Error code: `ELSTER_REQUEST_REJECTED`; `details` carries `elsterCode` and `elsterText`"},"429":{"description":"More than 5 ELSTER calls (request, activate, import, remove) per user and minute"},"503":{"description":"ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE`"}},"security":[{"bearer":[]}],"summary":"Import the wage tax certificates from ELSTER","tags":["ELSTER Import API"],"x-anytax-docs-enriched":true}},"/api/v1/vast/authorizations/{id}/activate":{"post":{"description":"Five wrong codes cancel the request at ELSTER; a new request is then needed.\n\n**Request body**\n\n| Field | Type | Required | Constraints |\n| ----- | ---- | -------- | ----------- |\n| `code` | string | Yes | Activation code from the tax office letter |\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `201` | — |\n| `409` | The request is not open |\n| `422` | ELSTER rejected the request. Error code: `ELSTER_REQUEST_REJECTED`; `details` carries `elsterCode` and `elsterText` |\n| `429` | More than 5 ELSTER calls (request, activate, import, remove) per user and minute |\n| `503` | ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE` |","operationId":"VastApiController_activate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateVastAuthorizationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/VastAuthorizationDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"409":{"description":"The request is not open"},"422":{"description":"ELSTER rejected the request. Error code: `ELSTER_REQUEST_REJECTED`; `details` carries `elsterCode` and `elsterText`"},"429":{"description":"More than 5 ELSTER calls (request, activate, import, remove) per user and minute"},"503":{"description":"ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE`"}},"security":[{"bearer":[]}],"summary":"Approve an open request with the activation code from the letter","tags":["ELSTER Import API"],"x-anytax-docs-enriched":true}},"/api/v1/vast/authorizations/{id}":{"delete":{"description":"Withdraws an open or approved access. Values already imported stay in the filing.\n\n**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | — |\n| `409` | Access is not active |\n| `429` | More than 5 ELSTER calls (request, activate, import, remove) per user and minute |\n| `503` | ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE` |","operationId":"VastApiController_revoke","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/VastAuthorizationDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"409":{"description":"Access is not active"},"429":{"description":"More than 5 ELSTER calls (request, activate, import, remove) per user and minute"},"503":{"description":"ELSTER import is turned off or ELSTER is unreachable. Error code: `ELSTER_UNAVAILABLE`"}},"security":[{"bearer":[]}],"summary":"Remove access to the user’s ELSTER data","tags":["ELSTER Import API"],"x-anytax-docs-enriched":true}},"/estimator":{"get":{"operationId":"EstimatorController_getEstimate","parameters":[{"name":"x-api-key","required":true,"in":"header","description":"API key for authentication","schema":{"type":"string"}},{"name":"income","required":true,"in":"query","description":"What was your gross income from employment?","schema":{"example":50000,"type":"number"}},{"name":"distanceToWork","required":true,"in":"query","description":"How far was your one-way distance to work?","schema":{"example":10,"type":"number"}},{"name":"workFromHomeDays","required":true,"in":"query","description":"How many days did you work from home?","schema":{"example":50,"type":"number"}},{"name":"workExpenses","required":false,"in":"query","description":"Other work-related expenses (Laptop etc)?","schema":{"example":1000,"type":"number"}},{"name":"specialExpenses","required":false,"in":"query","description":"Special expenses (like Childcare, school fees, own education costs)","schema":{"example":0,"type":"number"}},{"name":"taxWithheld","required":false,"in":"query","description":"Would you like to enter your actual income tax withheld for a more detailed result? ","schema":{"type":"number"}},{"name":"married","required":true,"in":"query","description":"Were you married during the tax year and would file jointly?","schema":{"example":false,"type":"boolean"}},{"name":"children","required":true,"in":"query","description":"How many children did you have?","schema":{"example":2,"type":"number"}},{"name":"householdServices","required":false,"in":"query","description":"Household-related services and craftsmen's services (labour costs only)","schema":{"example":400,"type":"number"}},{"name":"spouseIncome","required":false,"in":"query","description":"Spouse’s gross income","schema":{"example":30000,"type":"number"}},{"name":"spouseDistanceToWork","required":false,"in":"query","description":"How far for your spouse was your one-way distance to work?","schema":{"example":15,"type":"number"}},{"name":"spouseWorkFromHomeDays","required":false,"in":"query","description":"How many days did your spouse work from home?","schema":{"example":100,"type":"number"}},{"name":"spouseWorkExpenses","required":false,"in":"query","description":"Spouse other work-related expenses (Laptop etc)?","schema":{"example":0,"type":"number"}},{"name":"spouseSpecialExpenses","required":false,"in":"query","description":"Spouse special expenses (like Childcare, school fees, own education costs)","schema":{"example":500,"type":"number"}},{"name":"spouseHouseholdServices","required":false,"in":"query","description":"Spouse household-related services and craftsmen's services (labour costs only)","schema":{"example":200,"type":"number"}}],"responses":{"200":{"description":"Calculated tax details","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ResponseEstimatorDto"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized - Invalid API key"}},"summary":"Estimate the tax refund or liability","tags":["Estimator"],"security":[{"bearer":[]}],"description":"**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Calculated tax details |\n| `400` | Invalid input |\n| `401` | Unauthorized - Invalid API key |","x-anytax-docs-enriched":true}},"/estimator/all":{"get":{"operationId":"EstimatorController_getAllFilings","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"example":100,"type":"number"}},{"name":"filter","required":false,"in":"query","description":"filter out test values?","schema":{"example":"true","type":"string"}}],"responses":{"200":{"description":"Ok"},"404":{"description":"Not ok"}},"tags":["Estimator"],"security":[{"bearer":[]}],"description":"**Responses**\n\n| Status | Meaning |\n| ------ | ------- |\n| `200` | Ok |\n| `404` | Not ok |","x-anytax-docs-enriched":true}}},"info":{"title":"Anytax Public API v1","description":"## Machine-readable resources\n\n| Resource | URL | Use for |\n|---|---|---|\n| OpenAPI JSON | `/v1-json` | Import into Cursor / Copilot / Claude Projects as a spec file |\n| OpenAPI YAML | `/v1-yaml` | Same spec in YAML for tools that prefer `.yaml` |\n| LLM guide | `/llms.txt` | AI agents that fetch `llms.txt` for narrative docs |\n\n---\n\n# AnyTax Partner Integration Guide\n\nThis guide is written for **integration teams** embedding AnyTax into an existing product. It explains how to authenticate your end users, call our public REST APIs from your backend, and follow security expectations for a production SaaS integration. You will find authentication flows, endpoint reference, sequence diagrams, and reference implementations in **TypeScript**, **Java**, and **Python**.\n\n---\n\n### Table of contents\n\n1. [Overview](#description/overview)\n2. [Prerequisites](#description/prerequisites)\n3. [Authentication Endpoints](#description/authentication-endpoints)\n   - [Register a User](#description/1-register-a-user)\n   - [Login a User](#description/2-login-a-user)\n4. [Protected API Endpoints](#description/protected-api-endpoints)\n   - [Get User Profile](#description/3-get-user-profile)\n   - [List Scenarios](#description/4-list-scenarios)\n   - [List Filings](#description/5-list-filings)\n   - [Create a Filing](#description/6-create-a-filing)\n   - [Prefill a Filing](#description/7-prefill-a-filing)\n   - [Refresh Token](#description/8-refresh-token)\n5. [Partner-Initiated SSO (Silent Login)](#description/partner-initiated-sso-white-label-silent-login)\n   - [SSO quickstart (step by step)](#description/sso-quickstart-step-by-step)\n   - [Mint an SSO code](#description/9-mint-an-sso-code)\n   - [Exchange the code](#description/10-exchange-the-code-browser-redirect)\n6. [Return to partner (white-label)](#description/return-to-partner-white-label)\n7. [Supporting documents](#description/supporting-documents)\n8. [Integration Architecture](#description/integration-architecture)\n   - [Option A — Server Proxy](#description/option-a-server-proxy)\n   - [Option B — Client Direct](#description/option-b-client-direct-browser-to-antx-be)\n9. [Sequence Diagrams](#description/sequence-diagrams)\n10. [Complete Code Examples](#description/complete-code-examples)\n    - [TypeScript / Node.js](#description/typescript-nodejs)\n    - [Java](#description/java)\n    - [Python](#description/python)\n11. [Error Handling](#description/error-handling)\n12. [Security Best Practices](#description/security-best-practices)\n13. [Import from ELSTER](#description/import-from-elster)\n\n---\n\n## Overview\n\nAnyTax is a multi-tenant platform. As a **partner**, you integrate your application so your customers can complete German tax filings without leaving your product experience. At a high level you will:\n\n- **Provision** end-user accounts under your partner tenant using server-to-server calls (no OTP in this flow).\n- **Authenticate** returning users and obtain JWT access tokens for API access.\n- **Orchestrate** tax scenarios, filings, answers, and related flows through the same public APIs your users would use in our first-party experience.\n\nEnd users are scoped by **`(email + partner)`**: the same email may exist for different partners without collision.\n\n### How the integration works\n\n1. During onboarding, AnyTax issues a **partner slug** and **client secret** for your environment.\n2. Your **backend** calls register or login with those credentials plus the end user’s email.\n3. AnyTax returns a **JWT access token** (RS256, short-lived; see [Refresh Token](#description/8-refresh-token)).\n4. Your services use that token in the `Authorization` header for all subsequent calls on behalf of that user.\n\n---\n\n## Prerequisites\n\n| Item              | Description                                                                          |\n| ----------------- | ------------------------------------------------------------------------------------ |\n| **Partner slug**  | Stable identifier for your partner tenant (for example `my-partner`).                |\n| **Client secret** | Rotatable credential issued with your slug. **Use only on trusted servers.**         |\n| **Base URL**      | Environment-specific API origin (for example `https://api.anytax.io` in production). |\n\n> **Security:** Treat the client secret like any other production API key. Register and login requests must originate from **your backend**—never from a browser bundle, mobile app, or public repository.\n\n---\n\n## Authentication Endpoints\n\n### 1. Register a User\n\nCreates a new user under your partner and returns a JWT token.\n\n|                |                                                                      |\n| -------------- | -------------------------------------------------------------------- |\n| **URL**        | `POST /api/v1/partner/users/register`                                |\n| **Auth**       | None (public endpoint, authenticated by partner credentials in body) |\n| **Rate Limit** | 10 requests per minute                                               |\n\n**Request Body:**\n\n```json\n{\n  \"slug\": \"my-partner\",\n  \"clientSecret\": \"your-secret-here\",\n  \"email\": \"user@example.com\",\n  \"name\": \"Max\",\n  \"surname\": \"Mustermann\"\n}\n```\n\n| Field          | Type   | Required | Constraints         |\n| -------------- | ------ | -------- | ------------------- |\n| `slug`         | string | Yes      | 1–64 characters     |\n| `clientSecret` | string | Yes      | 1–512 characters    |\n| `email`        | string | Yes      | Valid email address |\n| `name`         | string | Yes      | Min 2 characters    |\n| `surname`      | string | Yes      | Min 2 characters    |\n\n**Success Response (201):**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"accessToken\": \"eyJhbGciOiJSUzI1NiIs...\",\n    \"expiresIn\": 3600,\n    \"user\": {\n      \"id\": 42,\n      \"email\": \"user@example.com\",\n      \"name\": \"Max\",\n      \"surname\": \"Mustermann\"\n    }\n  },\n  \"meta\": {\n    \"timestamp\": \"2026-04-15T12:00:00.000Z\",\n    \"responseTime\": 245\n  }\n}\n```\n\n**Error Responses:**\n\n| Status                     | Condition                                            |\n| -------------------------- | ---------------------------------------------------- |\n| `401 Unauthorized`         | Invalid slug or client secret                        |\n| `409 Conflict`             | User with this email already exists for your partner |\n| `422 Unprocessable Entity` | Validation failed (missing/invalid fields)           |\n\n---\n\n### 2. Login a User\n\nAuthenticates an existing partner user and returns a fresh JWT token.\n\n|                |                                                                      |\n| -------------- | -------------------------------------------------------------------- |\n| **URL**        | `POST /api/v1/partner/users/login`                                   |\n| **Auth**       | None (public endpoint, authenticated by partner credentials in body) |\n| **Rate Limit** | 30 requests per minute                                               |\n\n**Request Body:**\n\n```json\n{\n  \"slug\": \"my-partner\",\n  \"clientSecret\": \"your-secret-here\",\n  \"email\": \"user@example.com\"\n}\n```\n\n| Field          | Type   | Required | Constraints         |\n| -------------- | ------ | -------- | ------------------- |\n| `slug`         | string | Yes      | 1–64 characters     |\n| `clientSecret` | string | Yes      | 1–512 characters    |\n| `email`        | string | Yes      | Valid email address |\n\n**Success Response (200):**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"accessToken\": \"eyJhbGciOiJSUzI1NiIs...\",\n    \"expiresIn\": 3600,\n    \"user\": {\n      \"id\": 42,\n      \"email\": \"user@example.com\",\n      \"name\": \"Max\",\n      \"surname\": \"Mustermann\"\n    }\n  },\n  \"meta\": {\n    \"timestamp\": \"2026-04-15T12:00:00.000Z\",\n    \"responseTime\": 120\n  }\n}\n```\n\n**Error Responses:**\n\n| Status             | Condition                                       |\n| ------------------ | ----------------------------------------------- |\n| `401 Unauthorized` | Invalid slug or client secret                   |\n| `404 Not Found`    | No user with this email exists for your partner |\n\n---\n\n## Protected API Endpoints\n\nAll protected endpoints require a valid JWT token in the `Authorization` header:\n\n```\nAuthorization: Bearer <accessToken>\n```\n\n### 3. Get User Profile\n\n|          |                       |\n| -------- | --------------------- |\n| **URL**  | `GET /api/v1/auth/me` |\n| **Auth** | Bearer token          |\n\n**Response (200):**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 42,\n    \"login\": \"maxmustermann_my-partner_ab12cd34\",\n    \"email\": \"user@example.com\",\n    \"name\": \"Max\",\n    \"surname\": \"Mustermann\",\n    \"role\": \"user\",\n    \"verified\": true\n  }\n}\n```\n\n`id` is the same numeric user id that Register and Login return, and the value the white-label app passes as `userId` in your return URL (see [Return to partner](#description/return-to-partner-white-label)).\n\n---\n\n### 4. List Scenarios\n\nReturns all available tax scenarios, optionally filtered by year. Each scenario includes the current user's filings for that scenario.\n\n|                  |                                          |\n| ---------------- | ---------------------------------------- |\n| **URL**          | `GET /api/v1/scenarios`                  |\n| **Auth**         | Bearer token                             |\n| **Query Params** | `year` (optional) — e.g., `2024`, `2025` |\n\n**Response (200):**\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"uuid\": \"a1b2c3d4-...\",\n      \"name\": { \"en\": \"Standard Tax Return\", \"de\": \"Standard Steuererklärung\" },\n      \"description\": { \"en\": \"For employed individuals\", \"de\": \"Für Angestellte\" },\n      \"year\": 2025,\n      \"version\": 1,\n      \"status\": \"active\",\n      \"deadline\": \"2026-07-31T00:00:00.000Z\",\n      \"filings\": [\n        {\n          \"uuid\": \"f1e2d3c4-...\",\n          \"status\": \"inProgress\",\n          \"statusChangedAt\": \"2026-04-10T08:30:00.000Z\",\n          \"progress\": 45,\n          \"createdAt\": \"2026-04-10T08:30:00.000Z\",\n          \"updatedAt\": \"2026-04-14T12:00:00.000Z\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n| Scenario Status | Description                  |\n| --------------- | ---------------------------- |\n| `active`        | Open for new filings         |\n| `review`        | Under review, no new filings |\n| `inactive`      | Closed                       |\n\n---\n\n### 5. List Filings\n\nReturns all filings belonging to the authenticated user.\n\n|          |                      |\n| -------- | -------------------- |\n| **URL**  | `GET /api/v1/filing` |\n| **Auth** | Bearer token         |\n\n**Response (200):**\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"uuid\": \"f1e2d3c4-...\",\n      \"status\": \"inProgress\",\n      \"statusChangedAt\": \"2026-04-10T08:30:00.000Z\",\n      \"completed\": false,\n      \"year\": 2025,\n      \"isJointFiling\": false,\n      \"firstNamePersonA\": \"Max\",\n      \"lastNamePersonA\": \"Mustermann\",\n      \"firstNamePersonB\": null,\n      \"lastNamePersonB\": null,\n      \"scenario\": {\n        \"uuid\": \"a1b2c3d4-...\",\n        \"name\": { \"en\": \"Standard Tax Return\", \"de\": \"Standard Steuererklärung\" },\n        \"description\": { \"en\": \"For employed individuals\", \"de\": \"Für Angestellte\" },\n        \"year\": 2025\n      },\n      \"createdAt\": \"2026-04-10T08:30:00.000Z\",\n      \"updatedAt\": \"2026-04-14T12:00:00.000Z\"\n    }\n  ]\n}\n```\n\n| Filing Status      | Description                        |\n| ------------------ | ---------------------------------- |\n| `inProgress`       | User is filling out the form       |\n| `prepared`         | Form is complete, ready for review |\n| `identityVerified` | Identity has been verified         |\n| `inReview`         | Under review by AntX               |\n| `submitted`        | Submitted to the tax authority     |\n| `deleted`          | Deleted                            |\n\n---\n\n### 6. Create a Filing\n\nCreates a new tax filing for the user under a given scenario.\n\n|          |                       |\n| -------- | --------------------- |\n| **URL**  | `POST /api/v1/filing` |\n| **Auth** | Bearer token          |\n\n**Request Body:**\n\n```json\n{\n  \"scenarioUUID\": \"a1b2c3d4-...\"\n}\n```\n\n| Field          | Type          | Required | Description                                 |\n| -------------- | ------------- | -------- | ------------------------------------------- |\n| `scenarioUUID` | string (UUID) | Yes      | UUID of the scenario to create a filing for |\n\n**Success Response (201):**\n\nReturns the created filing in the same shape as the [List Filings](#description/5-list-filings) response (single object, not array).\n\n**Error Responses:**\n\n| Status            | Condition                                  |\n| ----------------- | ------------------------------------------ |\n| `400 Bad Request` | Scenario is inactive (`SCENARIO_INACTIVE`) |\n| `404 Not Found`   | Scenario UUID not found                    |\n\n---\n\n### 7. Prefill a Filing\n\nSeeds a filing's answers with data you already hold (e.g. from accounting software, KYC, CRM) so the user opens a partially-completed return instead of a blank one. Best-effort: known keys are applied, unknown ones come back as warnings.\n\n|          |                                            |\n| -------- | ------------------------------------------ |\n| **URL**  | `POST /api/v1/answer/{filingUUID}/prefill` |\n| **Auth** | Bearer token                               |\n\n**Behavior**\n\n- **Best-effort.** Valid fields are written; invalid ones produce per-key warnings in the response (no all-or-nothing failure).\n- **Upsert.** Calling again with the same field overwrites the previous prefill value.\n- **Partial.** Send only the fields you have. Omit anything you don't.\n- **Defaults, not answers.** Prefilled values are stored with `answered: false`, so progress stays at 0% until the user confirms each value during normal navigation. The user sees them as defaults they can change.\n- **Provenance.** While a value stays unconfirmed, question and answer responses report it under `status.prefilledFromPartner` (your partner slug), and the filing UI shows a \"Pre-filled from [partner]\" label beneath it. The marker is cleared as soon as the user confirms or edits the value.\n- **Filing must be writable.** Returns `409 FILING_READ_ONLY` for `inReview` / `submitted` filings, `410 Gone` for deleted filings.\n\n**Request Body**\n\nThe body is grouped into `personal`, `selfEmployment`, `crypto`, and `eur`. All groups and every field within them are **optional** — send only what you have.\n\nExample:\n\n```json\n{\n  \"personal\": {\n    \"firstName\": \"Max\",\n    \"lastName\": \"Mustermann\",\n    \"dateOfBirth\": \"1990-05-15\",\n    \"taxId\": 12345678901,\n    \"iban\": \"DE89370400440532013000\",\n    \"address\": {\n      \"street\": \"Chausseestraße\",\n      \"houseNumber\": \"37\",\n      \"zipCode\": \"10115\",\n      \"city\": \"Berlin\",\n      \"state\": \"Berlin\",\n      \"country\": \"Germany\"\n    }\n  },\n  \"selfEmployment\": {\n    \"isSelfEmployed\": true,\n    \"profession\": \"Software Developer\",\n    \"revenue\": 85000,\n    \"vatReceived\": 16150,\n    \"phoneAndInternet\": 600,\n    \"accountingCosts\": 1200,\n    \"booksAndSoftware\": 350,\n    \"equipmentItems\": [{ \"cost\": 1200, \"depreciationYears\": 3 }, { \"cost\": 450 }],\n    \"otherCosts\": [{ \"description\": \"Cloud hosting\", \"amount\": 2400 }]\n  }\n}\n```\n\nThe tables below list, for every field: its JSON type, the expected format, where to source the value on your side, and how AnyTax uses it.\n\n**`personal` fields**\n\n| Field         | Type   | Where to source it                                                              | Format & notes                                                                                              |\n| ------------- | ------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |\n| `firstName`   | string | Your user account / profile data                                                | Legal first name as it should appear on the tax return                                                      |\n| `lastName`    | string | Your user account / profile data                                                | Legal last name                                                                                             |\n| `dateOfBirth` | string | Your user account / KYC data                                                    | ISO 8601 (`YYYY-MM-DD`)                                                                                     |\n| `taxId`       | number | Provided by the user — printed on Finanzamt letters and payslips (Steuer-IdNr.) | 11-digit German tax identification number, digits only                                                      |\n| `iban`        | string | Provided by the user — the account the tax refund should be paid to             | German IBAN (`DE` + 20 characters)                                                                          |\n| `address`     | object | Current residential address from your user profile                              | See subfields below. Determines the responsible Finanzamt, so it must be the user's registered home address |\n\n`address` subfields — `street`, `houseNumber`, `zipCode`, `city`, `state`, `country` are required when `address` is sent; `houseNumberSuffix` and `extraInfo` default to empty string. `state` is the German Bundesland of the address.\n\n**`selfEmployment` fields**\n\nAll amounts are annual totals for the filing's tax year, in euros. Source them from the user's bookkeeping / invoicing records in your product (issued invoices for income, categorized expense records for costs).\n\n| Field               | Type             | Where to source it                                            | Notes                                                                                                                    |\n| ------------------- | ---------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| `isSelfEmployed`    | boolean          | Whether the user ran a self-employed activity in the tax year | Gates the whole self-employment section                                                                                  |\n| `profession`        | string           | User profile / registration data                              | Professional title used for freelance work                                                                               |\n| `businessName`      | string           | User profile / registration data                              | Registered business name, if any                                                                                         |\n| `businessTaxNumber` | string           | Finanzamt correspondence of the business                      | Steuernummer for self-employment (often differs from personal Tax ID)                                                    |\n| `revenue`           | number           | Sum of net invoice amounts for the tax year                   | Total revenue                                                                                                            |\n| `vatReceived`       | number           | VAT lines of issued invoices / USt records                    | VAT collected from clients                                                                                               |\n| `vatRefund`         | number           | Finanzamt VAT refunds received in the tax year                | VAT refund received                                                                                                      |\n| `costOfGoods`       | number           | Expense records, goods/materials category                     | Cost of raw materials / goods bought for resale                                                                          |\n| `externalServices`  | number           | Expense records, subcontractor category                       | Payments to other freelancers / subcontractors                                                                           |\n| `rentCosts`         | number           | Expense records, rent category                                | Office / co-working rent                                                                                                 |\n| `separateRoomCosts` | number           | Expense records, home-office room costs                       | Dedicated home-office room costs                                                                                         |\n| `workFromHomeDays`  | number           | User-confirmed count                                          | Days worked from home                                                                                                    |\n| `phoneAndInternet`  | number           | Expense records, communication category                       | Business phone + internet                                                                                                |\n| `trainingCosts`     | number           | Expense records, training category                            | Training, workshops, courses                                                                                             |\n| `accountingCosts`   | number           | Expense records, advisory category                            | Tax advisor / lawyer / bookkeeping software                                                                              |\n| `marketingCosts`    | number           | Expense records, marketing category                           | Advertising and marketing                                                                                                |\n| `booksAndSoftware`  | number           | Expense records, supplies category                            | Books, software, office supplies                                                                                         |\n| `businessInsurance` | number           | Expense records, insurance category                           | Business insurance                                                                                                       |\n| `travelCosts`       | number           | Expense records, travel category                              | Flights, trains, public transport                                                                                        |\n| `hotelCosts`        | number           | Expense records, travel category                              | Hotel / accommodation for business trips                                                                                 |\n| `mealCosts`         | number           | Expense records, meals category                               | Business meals                                                                                                           |\n| `carLeaseCosts`     | number           | Expense records, vehicle category                             | Annual car lease                                                                                                         |\n| `otherCarCosts`     | number           | Expense records, vehicle category                             | Other car-related business costs                                                                                         |\n| `equipmentItems`    | array of objects | Asset purchases of the tax year                               | Each item → one equipment instance. `{ cost, depreciationYears? }`. `depreciationYears` only relevant when `cost > 800`. |\n| `otherCosts`        | array of objects | Expense records that fit no category above                    | Each item → one \"other cost\" instance. `{ description, amount }`.                                                        |\n\n**`crypto` fields**\n\nSource these values from the user's crypto tax report for the filing's tax year (the German tax report produced by the exchange / portfolio tracker). Each field maps to one line or section total of that report.\n\n| Field                       | Type          | Where to source it (report line)                                                                | Notes                                                                                                                                           |\n| --------------------------- | ------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |\n| `incomeTypes`               | array of enum | The report's non-empty income sections: private sales, capital income, other/recurring income   | Multi-select — send one enum value per income type present. See enum values below.                                                              |\n| `saleDescription`           | string        | Free text; use the report reference (e.g. `Refer cointracking report`) unless the user edits it | Description of the private sale income (§ 23 EStG)                                                                                              |\n| `saleRevenue`               | integer       | Private-sales section — total sale price within the 1-year holding period                       | Whole euros                                                                                                                                     |\n| `saleAcquisitionCosts`      | integer       | Private-sales section — total acquisition costs of the sold assets                              | Whole euros                                                                                                                                     |\n| `capitalGainsDomestic`      | integer       | Report value for Anlage KAP line 18 — gains from domestic exchanges                             | Whole euros                                                                                                                                     |\n| `capitalGainsInternational` | integer       | Report value for Anlage KAP line 19 — gains from international exchanges                        | Whole euros                                                                                                                                     |\n| `capitalGainsForwardProfit` | integer       | Report value for Anlage KAP line 21 — margin / derivatives / futures gains                      | Whole euros. **2024 tax year only** — when omitted, derived as `capitalGainsDomestic + capitalGainsInternational` (only if the sum is positive) |\n| `capitalGainsForwardLoss`   | integer       | Report value for Anlage KAP line 24 — margin / derivatives / futures losses                     | Whole euros. **2024 tax year only**                                                                                                             |\n| `recurringDescription`      | string        | Free text; use the report reference (e.g. `Refer cointracking report`) unless the user edits it | Description of the recurring crypto income (§ 22 Nr. 3 EStG). Needed for 2024 filings; not required for 2025                                    |\n| `recurringRevenue`          | integer       | Other-income section total — sum of staking, lending, mining, airdrops, bonuses                 | Whole euros                                                                                                                                     |\n| `capitalIncomeTypes`        | array of enum | Optional — when omitted, AnyTax derives it from the capital-gains fields you send               | Multi-select. See the derivation rules and enum values below.                                                                                   |\n\nAll money amounts are **whole-euro integers** — a fractional value is rejected with an `INVALID_VALUE_TYPE` warning and the field is skipped.\n\n`incomeTypes` enum values:\n\n| Value                               | Selects                                                                        |\n| ----------------------------------- | ------------------------------------------------------------------------------ |\n| `income_from_sale_of_crypto_assets` | Private sale of crypto within the 1-year holding period (§ 23 EStG)            |\n| `capital_income_from_crypto`        | Crypto capital income (§ 20 EStG)                                              |\n| `recurring_income_from_crypto`      | Recurring crypto income — mining, staking, lending, airdrops (§ 22 Nr. 3 EStG) |\n\n`capitalIncomeTypes` enum values (send explicitly, or omit and let AnyTax derive them):\n\n| Value                                     | Selected automatically when you send…                                                     |\n| ----------------------------------------- | ----------------------------------------------------------------------------------------- |\n| `domestic_crypto_capital_income`          | `capitalGainsDomestic`                                                                    |\n| `foreign_crypto_capital_income`           | `capitalGainsInternational`                                                               |\n| `crypto_profit_from_forward_transactions` | any of `capitalGainsDomestic` / `capitalGainsInternational` / `capitalGainsForwardProfit` |\n| `crypto_loss_from_forward_transactions`   | `capitalGainsForwardLoss`                                                                 |\n\nThe two forward-transaction values only exist for **tax year 2024** filings. A derived selection is\nautomatically limited to the options the filing's tax year offers, so for a 2025 filing the\ncapital-gains fields select the domestic/foreign options only. Sending `capitalIncomeTypes`\nexplicitly with a value the tax year does not offer is rejected with an `INVALID_VALUE_TYPE`\nwarning and the field is skipped.\n\nExample:\n\n```json\n{\n  \"crypto\": {\n    \"incomeTypes\": [\"income_from_sale_of_crypto_assets\", \"recurring_income_from_crypto\"],\n    \"saleDescription\": \"Refer cointracking report\",\n    \"saleRevenue\": 125192,\n    \"saleAcquisitionCosts\": 131629,\n    \"recurringDescription\": \"Refer cointracking report\",\n    \"recurringRevenue\": 69\n  }\n}\n```\n\n> AnyTax sets the underlying \"crypto details\" and \"crypto sale dates\" flags automatically whenever a `crypto` block is prefilled — you don't send these yourself: `crypto_details_tf` is set to true (the user provides detailed figures) and `crypto_sale_dates_tf` is set to false (per-transaction sale dates come from the report, not from manual entry). When no crypto data is sent, both flags stay unset.\n>\n> `capitalGainsForwardProfit` and `capitalGainsForwardLoss` only apply to tax year 2024 filings; for other years send the domestic/international gains only.\n>\n> Like every prefilled value, `crypto` fields carry the provenance marker described above and are shown in the filing UI with a \"Pre-filled from [partner]\" label until the user confirms or edits them.\n\n**`eur` block (Anlage EÜR + AVEÜR)**\n\nFills the user's EÜR (profit and loss statement for one business) from the tax year's bookkeeping. The block has the same fields as the `eur` answer, without `type` and `status`; the full schema is `PrefillEurDto` in the API reference. Unlike the other groups, the EÜR is written as a whole: each call replaces the previous EÜR prefill.\n\n| Field                                 | Type    | Notes                                                                                                                                                                                                                                                                                            |\n| ------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `business`                            | object  | Name, activity, address, `taxNumber`, `businessId` (Wirtschafts-IdNr., e.g. `DE123456788-00001`). The legal form is `kind` (`trade`, `freelancer`, `other_self_employed`); there is no `legalForm` field                                                                                         |\n| `kleinunternehmer`                    | boolean | Small-business VAT exemption (§ 19 UStG). When `true`, VAT amounts and `vatCharged` are not used and are dropped with a warning                                                                                                                                                                  |\n| `amounts`                             | object  | Euro amounts keyed by EÜR category code (e.g. `se_revenue_vat_taxable`, `exp_telecom`, `se_input_vat`). Cents are allowed; amounts must be non-negative                                                                                                                                          |\n| `commute`, `homeOffice`, `goodsTaken` | objects | Inputs for the year-end allowances. AnyTax calculates the allowances themselves                                                                                                                                                                                                                  |\n| `sections`                            | object  | Which optional sections apply (`assets`, `trips`, `privateTrips`, `gifts`, `meals`, `privateMoney`)                                                                                                                                                                                              |\n| `assets`                              | array   | Fixed assets for the depreciation schedule (AVEÜR). Every asset needs an `id` unique within the block (any string up to 64 characters); an asset without one is dropped                                                                                                                          |\n| `vehicles`                            | array   | Year figures per business vehicle. `assetId` must be the `id` of a vehicle in `assets` (`vehicle_car` / `vehicle_motorcycle`); other items are dropped                                                                                                                                           |\n| `trips`                               | array   | Business trips for the meal allowance. `countryEn` / `cityEn` as listed by `GET /api/v1/eur/{filingUUID}/meal-destinations` (case does not matter); `null` or `\"Germany\"` for Germany. A country with several rates needs its `cityEn` (e.g. `\"Other Areas\"`); an unknown destination is dropped |\n| `privateTrips`, `gifts`               | arrays  | Further list inputs; see the schema for their fields                                                                                                                                                                                                                                             |\n\nCalculated values (allowances, depreciation, private use, e.g. `commuter_allowance` or `exp_afa_movable`) are always computed by AnyTax: sending one in `amounts` returns a `CALCULATED_VALUE` warning and the value is ignored.\n\nThe block is best effort: an invalid field or list item is dropped with a warning keyed by its path (e.g. `eur.business.businessId`, `eur.amounts.exp_foo`, `eur.assets.1`), and the rest is applied. The whole block is not applied (warning key `eur`, code `ALREADY_EDITED`) when the user's EÜR already holds values that did not come from a partner prefill.\n\nExample:\n\n```json\n{\n  \"eur\": {\n    \"business\": {\n      \"name\": \"Mustermann Design\",\n      \"activity\": \"Grafikdesign\",\n      \"kind\": \"freelancer\",\n      \"businessId\": \"DE123456788-00001\",\n      \"address\": {\n        \"street\": \"Chausseestraße\",\n        \"houseNumber\": \"37\",\n        \"zipCode\": \"10115\",\n        \"city\": \"Berlin\"\n      }\n    },\n    \"kleinunternehmer\": false,\n    \"amounts\": {\n      \"se_revenue_vat_taxable\": 62000,\n      \"se_vat_collected\": 11780,\n      \"exp_telecom\": 600,\n      \"se_input_vat\": 1450.5\n    },\n    \"sections\": { \"assets\": true },\n    \"assets\": [\n      {\n        \"id\": \"laptop-2025\",\n        \"equipmentClass\": \"computer_hardware\",\n        \"description\": \"Laptop\",\n        \"purchaseDate\": \"2025-03-14\",\n        \"cost\": 2000,\n        \"usefulLifeYears\": 1,\n        \"businessPct\": 100\n      }\n    ]\n  }\n}\n```\n\n**Success Response (200) — all keys applied**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"filing\": {\n      \"uuid\": \"550e8400-e29b-41d4-a716-446655440001\",\n      \"status\": \"inProgress\",\n      \"completed\": false,\n      \"year\": 2024,\n      \"scenario\": {\n        \"uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n        \"name\": { \"en\": \"Income Tax 2024\", \"de\": \"Einkommensteuer 2024\" }\n      }\n    },\n    \"prefill\": {\n      \"applied\": 5,\n      \"warnings\": []\n    }\n  },\n  \"meta\": { \"timestamp\": \"2026-04-15T12:00:00.000Z\", \"responseTime\": 120 }\n}\n```\n\n**Success Response (200) — partial success with warnings**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"filing\": { \"uuid\": \"550e8400-...\", \"status\": \"inProgress\", \"year\": 2024 },\n    \"prefill\": {\n      \"applied\": 3,\n      \"warnings\": [\n        {\n          \"key\": \"fake_key\",\n          \"code\": \"UNKNOWN_KEY\",\n          \"message\": \"Variable key 'fake_key' does not exist in this scenario.\"\n        },\n        {\n          \"key\": \"selfemp_rev\",\n          \"code\": \"INVALID_VALUE_TYPE\",\n          \"message\": \"Expected a number for 'selfemp_rev' (amount), got string.\"\n        }\n      ]\n    }\n  }\n}\n```\n\n> The response always returns the full filing object plus a `prefill` summary. Treat a non-empty `warnings` array as your signal to log/alert — the request still returned `200`.\n\n**Warning codes**\n\n| Code                     | Meaning                                                                        |\n| ------------------------ | ------------------------------------------------------------------------------ |\n| `UNKNOWN_KEY`            | Key isn't recognized for this scenario                                         |\n| `INVALID_VALUE_TYPE`     | Wrong primitive type (e.g. string for a number field)                          |\n| `INVALID_DATE_FORMAT`    | Date wasn't ISO 8601 `YYYY-MM-DD`                                              |\n| `INVALID_ADDRESS_FORMAT` | Address object missing required subfields                                      |\n| `INVALID_BOOLEAN`        | Expected `true` / `false`                                                      |\n| `CALCULATED_VALUE`       | EÜR amount that AnyTax calculates itself; ignored                              |\n| `ALREADY_EDITED`         | The user's EÜR already holds their own values; the `eur` block was not applied |\n\nWarnings for the `eur` block are keyed by the field's dotted path (e.g. `eur.business.businessId`, `eur.assets.1`).\n\n**Error Responses**\n\n| Status | Condition                                                          |\n| ------ | ------------------------------------------------------------------ |\n| `401`  | Missing or invalid Bearer token                                    |\n| `404`  | Filing UUID not found or does not belong to the authenticated user |\n| `409`  | `FILING_READ_ONLY` — filing is in `inReview` or `submitted` state  |\n| `410`  | Filing has been deleted                                            |\n\n**TypeScript example**\n\n```typescript\nasync function prefillFiling(\n  token: string,\n  filingUUID: string,\n  data: {\n    personal?: Record<string, unknown>;\n    selfEmployment?: Record<string, unknown>;\n    crypto?: Record<string, unknown>;\n    eur?: Record<string, unknown>;\n  },\n) {\n  const result = await antxRequest<{\n    filing: Filing;\n    prefill: { applied: number; warnings: { key: string; code: string; message: string }[] };\n  }>(`/api/v1/answer/${filingUUID}/prefill`, {\n    method: 'POST',\n    headers: authHeaders(token),\n    body: JSON.stringify(data),\n  });\n\n  if (result.prefill.warnings.length > 0) {\n    console.warn('Some prefill keys were not applied:', result.prefill.warnings);\n  }\n\n  return result;\n}\n\n// Usage — only send what you have\nawait prefillFiling(token, filing.uuid, {\n  personal: {\n    firstName: 'Max',\n    lastName: 'Mustermann',\n    iban: 'DE89370400440532013000',\n  },\n  selfEmployment: {\n    isSelfEmployed: true,\n    revenue: 85000,\n    equipmentItems: [{ cost: 1200, depreciationYears: 3 }],\n  },\n});\n```\n\n**Python example**\n\n```python\ndef prefill_filing(token: str, filing_uuid: str, data: dict) -> dict:\n    resp = requests.post(\n        f\"{BASE_URL}/api/v1/answer/{filing_uuid}/prefill\",\n        headers=_auth_headers(token),\n        json=data,\n    )\n    result = _handle_response(resp)\n    warnings = result[\"prefill\"][\"warnings\"]\n    if warnings:\n        print(f\"Prefill warnings: {warnings}\")\n    return result\n\n\nprefill_filing(token, filing[\"uuid\"], {\n    \"personal\": {\n        \"firstName\": \"Max\",\n        \"lastName\": \"Mustermann\",\n        \"iban\": \"DE89370400440532013000\",\n    },\n    \"selfEmployment\": {\n        \"isSelfEmployed\": True,\n        \"revenue\": 85000,\n        \"equipmentItems\": [{\"cost\": 1200, \"depreciationYears\": 3}],\n    },\n})\n```\n\n**Pre-fill without the review screen**\n\nBy default a prefilled filing is shown to the user on a review screen first. On request, AnyTax can switch that screen off for your partner account: the user then opens the prefilled filing directly in the question flow, with the prefilled values as defaults to confirm. For the smoothest handoff, mint the SSO code (see [Mint an SSO code](#description/9-mint-an-sso-code)) with `returnPath` set to `/filing?filingUUID=<filingUUID>`.\n\n**What is NOT yet supported via prefill**\n\nThe prefill endpoint currently covers personal data, self-employment income/costs, crypto income (sale, capital, and recurring income under §§ 20, 22, 23 EStG), and the EÜR (Anlage EÜR + AVEÜR). The following are **not** prefill-able and must be entered through the questionnaire flow:\n\n- Wage tax certificate data (Lohnsteuerbescheinigung) — use the dedicated [Wage Tax API](#tag/wage-tax-api) instead\n- Spouse / joint filing data\n- Children and dependents\n- Capital income other than crypto (stocks, dividends, interest), rental income\n- Insurance contributions (health, pension, KV/PV/RV)\n- Charitable donations\n- Property / real estate\n- Education and training (non-business)\n- Disability and other special deductions\n\nIf you need additional fields in prefill, contact the AnyTax team — the supported set is expanding.\n\n---\n\n### 8. Refresh Token\n\nIssues a new JWT when the current one is close to expiry. The existing token must still be valid.\n\n|                |                                        |\n| -------------- | -------------------------------------- |\n| **URL**        | `POST /api/v1/auth/refresh`            |\n| **Auth**       | Bearer token (the one being refreshed) |\n| **Rate Limit** | 20 requests per minute                 |\n\n**Request Body:** empty `{}` or omitted.\n\n**Response (200):**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"accessToken\": \"eyJhbGciOiJSUzI1NiIs...\",\n    \"user\": {\n      \"email\": \"user@example.com\",\n      \"login\": \"maxmustermann_my-partner_ab12cd34\",\n      \"name\": \"Max\",\n      \"surname\": \"Mustermann\",\n      \"role\": \"user\",\n      \"verified\": true\n    }\n  }\n}\n```\n\n---\n\n## Partner-Initiated SSO (White-Label Silent Login)\n\nSend a user from your product (e.g. your online portal) straight into their AntX\nwhite-label instance, already logged in — no second login screen. This builds on the\nendpoints above: you provision the user (Register/Login), optionally create and prefill a\nfiling, then hand the browser off via a short-lived code.\n\n**How it differs from Login (endpoint 2):** `users/login` returns a JWT to _your backend_\nfor server-to-server API calls. SSO instead establishes a _browser session_ on the AntX\nwhite-label domain, so the user lands in the app UI authenticated. Use Login for API access;\nuse SSO to drop the user into the AntX web app.\n\n### SSO quickstart (step by step)\n\nFollow these five steps end to end to add silent login to your product. Everything except the\nfinal browser redirect runs on **your backend** — the client secret must never reach a browser.\n\n**Before you start, you need (issued by AntX during onboarding):**\n\n- your partner **`slug`** and **`clientSecret`**;\n- your white-label host — `https://{slug}.anytax.io` (AntX serves it for your account);\n- the API base URL for your environment (for example `https://api.anytax.io` in production).\n\n**Step 1 — Provision the end user (first time), or log them in (afterwards).** Create the user\nunder your partner the first time you see them; on later visits call `users/login` instead. Both\nreturn the user's `id`, which you need in step 2.\n\n```bash\n# First time — register:\ncurl -X POST https://api.anytax.io/api/v1/partner/users/register \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"slug\":\"my-partner\",\"clientSecret\":\"YOUR_SECRET\",\"email\":\"user@example.com\",\"name\":\"Max\",\"surname\":\"Mustermann\"}'\n\n# Returning user — login (409 on register means the user already exists):\ncurl -X POST https://api.anytax.io/api/v1/partner/users/login \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"slug\":\"my-partner\",\"clientSecret\":\"YOUR_SECRET\",\"email\":\"user@example.com\"}'\n```\n\nKeep `data.user.id` from the response.\n\n**Step 2 — Mint a single-use SSO code, immediately before you redirect.** Do not mint it in\nadvance: the code lives **60 seconds** and can be used **once**.\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/partner/sso/token \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"slug\":\"my-partner\",\"clientSecret\":\"YOUR_SECRET\",\"userId\":42,\"returnPath\":\"/filing\"}'\n# -> { \"success\": true, \"data\": { \"ssoCode\": \"…\", \"expiresIn\": 60 } }\n```\n\n`returnPath` is where the user lands after login — a rooted, same-origin path such as `/filing`\nor `/filing/{filingUUID}`. Anything that is not a safe relative path is replaced with the default.\n\n**Step 3 — Build the redirect URL** from your white-label host and the code (URL-encode the code):\n\n```\nhttps://{slug}.anytax.io/auth/sso?code={ssoCode}\n```\n\n**Step 4 — Redirect the user's browser** to that URL — a `302` from your backend. That is the\nentire handoff; you never call the exchange endpoint yourself.\n\n**Step 5 — The user lands authenticated.** AntX validates and consumes the code, sets the session\ncookie on the shared `.anytax.io` domain, and forwards the browser to your `returnPath`. If the\ncode is missing, expired, or already used, the landing page shows a \"couldn't sign you in\" screen\nwith a link to normal login. If a **different** AntX account is already signed in on that browser,\nthe user is asked to confirm switching accounts before the session is replaced.\n\n**Getting it right — checklist:**\n\n- Call register / login / token **only from your backend.** Never ship `clientSecret` to a\n  browser, mobile app, or public repository.\n- **Mint the code right before the redirect.** It is single-use and expires in 60 seconds — do not\n  pre-generate, cache, or reuse it. A page refresh on the exchange will fail; mint a fresh code.\n- Send the browser to **`/auth/sso?code=…` on your white-label host**, never to the API endpoint\n  directly, and URL-encode the code.\n- Pass a real `returnPath` that exists in the app (for example `/filing`); the default is `/filing`.\n- One code establishes one session. For another login, mint another code.\n\nThe subsections below are the full request/response reference for the two endpoints used above.\n\n### 9. Mint an SSO code\n\nCall this from your backend for a user you have already provisioned.\n\n|                |                                           |\n| -------------- | ----------------------------------------- |\n| **URL**        | `POST /api/v1/partner/sso/token`          |\n| **Auth**       | Partner credentials in body (server-side) |\n| **Rate Limit** | 30 requests per minute                    |\n\n**Request Body:**\n\n```json\n{\n  \"slug\": \"my-partner\",\n  \"clientSecret\": \"your-secret-here\",\n  \"userId\": 42,\n  \"returnPath\": \"/filing/550e8400-e29b-41d4-a716-446655440001\"\n}\n```\n\n- `userId` — the `user.id` returned by Register/Login. The user must belong to your partner\n  account and be active.\n- `returnPath` — optional same-origin path to land on (must start with a single `/`).\n  Defaults to `/filing`. Anything that is not a safe relative path is replaced with the\n  default (open-redirect protection).\n\n**Response (201):**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"ssoCode\": \"b3RvX2NvZGVfZXhhbXBsZV8zMmJ5dGVz\",\n    \"expiresIn\": 60\n  }\n}\n```\n\n`ssoCode` is single-use and expires in **60 seconds** — mint it immediately before the\nredirect, not in advance. `401` if partner credentials are invalid or the user is inactive;\n`404` if no user with that id belongs to your partner account.\n\n### 10. Exchange the code (browser redirect)\n\nThe mint response gives you **only the `ssoCode`** — no redirect URL. Your backend builds the\nredirect itself and sends the user's browser to your white-label landing page. This is **not**\na JSON API call.\n\nConstruct the URL from your white-label host and the code:\n\n```\nhttps://{your-slug}.anytax.io/auth/sso?code={ssoCode}\n```\n\n- `{your-slug}.anytax.io` — the white-label host AntX serves for your partner account.\n- `{ssoCode}` — the value from the mint response in step 9, URL-encoded.\n\nThen, immediately after minting, issue a `302` from your backend to that URL, for example:\n\n```\nhttps://your-brand.anytax.io/auth/sso?code=b3RvX2NvZGVfZXhhbXBsZV8zMmJ5dGVz\n```\n\nAntX validates and consumes the code (single use, unexpired, partner + user still active),\nsets the session cookie on the shared `.anytax.io` domain, and `302`-redirects the browser to\n`returnPath` on your white-label subdomain — the user lands authenticated, e.g. directly on\nthe filing you prefilled.\n\nIf the code is missing, expired, or already used, the landing page shows a \"couldn't sign you\nin\" message with a link to normal login. No user data ever travels in the browser redirect —\nonly the opaque `ssoCode`.\n\nIf the user already has a session for a **different** AnyTax account in that browser, the\nlanding page first asks them to confirm switching accounts instead of silently replacing their\nsession; the sign-in completes only once they confirm. Normal handoffs (no existing session, or\nthe same user) are unaffected.\n\n---\n\n## Return to partner (white-label)\n\nPartners can send users back to their own product from the white-label app.\n\n**Setup.** Set the return URL in the partner dashboard under **Settings**. It must be an absolute `https` URL with a domain name (up to 2048 characters); clearing the field removes it. The configured value is returned as `returnUrl`, together with your display `name`, by `GET /api/v1/partner/by-slug/{slug}` (both are `null` when not set).\n\n**Behavior.** When a return URL is configured, the white-label app shows a **\"Back to {partner name}\"** button. Clicking it ends the user's AnyTax session and redirects the browser to your return URL with these query parameters appended:\n\n| Parameter    | Description                                        |\n| ------------ | -------------------------------------------------- |\n| `userId`     | The AnyTax user id (as returned by Register/Login) |\n| `filingUUID` | The filing the user was working on                 |\n| `status`     | The current status of that filing                  |\n\nQuery parameters already present on your return URL are preserved. Example:\n\n```\nhttps://portal.example.com/tax/done?ref=abc  ->\nhttps://portal.example.com/tax/done?ref=abc&userId=42&filingUUID=550e8400-e29b-41d4-a716-446655440001&status=inProgress\n```\n\nBecause the session ends, the user's next visit needs a new SSO handoff (see [Partner-Initiated SSO](#description/partner-initiated-sso-white-label-silent-login)); mint a fresh code and redirect again.\n\n---\n\n## Supporting documents\n\nAttach PDF documents (for example receipts or statements) to a filing. The feature is enabled per partner account by AnyTax on request. When it is enabled, a user whose return has been submitted finds **Submit additional documents** on the filing overview of the white-label app and can add and remove documents there. To bring a user straight to that screen, for example after the tax office has asked for documents, mint an SSO code (see [Mint an SSO code](#description/9-mint-an-sso-code)) with `returnPath` set to `/filing/{year}/{filingUUID}/documents`. Documents are stored with the return until they are sent to the tax office as an ELSTER message attached to the return (see [Send the documents to the tax office](#description/send-the-documents-to-the-tax-office)).\n\nAll endpoints use a user Bearer token and refer to a filing of that user. A filing that does not exist or belongs to someone else returns `404`; if the feature is not enabled for your partner account, every endpoint returns `403`.\n\n**Limits (per filing)**\n\n- PDF only; encrypted or password-protected PDFs are rejected.\n- At most 10 MB per file and 100 pages per PDF.\n- At most 20 files and 36.91 MB in total.\n- An identical file (same content) cannot be uploaded twice: `409`, with the existing document's id in `details.documentUuid`.\n\nA file larger than 10 MB is rejected with `413`; the other violations of the file rules and limits return `400` with a descriptive message; an identical file returns `409` as described above.\n\n### List documents\n\n|          |                                             |\n| -------- | ------------------------------------------- |\n| **URL**  | `GET /api/v1/filing/{filingUUID}/documents` |\n| **Auth** | Bearer token                                |\n\n```bash\ncurl https://api.anytax.io/api/v1/filing/550e8400-e29b-41d4-a716-446655440001/documents \\\n  -H 'Authorization: Bearer YOUR_JWT'\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"documents\": [\n      {\n        \"uuid\": \"7d0b5d0e-5f0c-4d5e-9c53-2a3f4f6b8a11\",\n        \"title\": \"Receipt March\",\n        \"fileName\": \"receipt-march.pdf\",\n        \"source\": \"partner\",\n        \"sizeBytes\": 183422,\n        \"pageCount\": 2,\n        \"sha256\": \"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\",\n        \"status\": \"stored\",\n        \"createdAt\": \"2026-10-30T09:15:00.000Z\"\n      }\n    ]\n  }\n}\n```\n\n`status` is `stored` until the document has been sent, `submitted` once it has been sent to the tax office (`submittedAt` and `submissionUuid` are then set), or `rejected` when the tax office later reported a problem with the transmission the document was part of. Treat unknown values as forward-compatible.\n\n### Upload a document\n\n|          |                                              |\n| -------- | -------------------------------------------- |\n| **URL**  | `POST /api/v1/filing/{filingUUID}/documents` |\n| **Auth** | Bearer token                                 |\n\nMultipart form data:\n\n- `file` — the PDF (required).\n- `source` — who supplied the document: `partner` (default) or `user`.\n- `title` — optional display title, up to 120 characters; defaults to the file name.\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/filing/550e8400-e29b-41d4-a716-446655440001/documents \\\n  -H 'Authorization: Bearer YOUR_JWT' \\\n  -F 'file=@receipt-march.pdf;type=application/pdf' \\\n  -F 'source=partner' \\\n  -F 'title=Receipt March'\n```\n\n**Response (201):** `{ \"success\": true, \"data\": { \"document\": { … } } }` with the same document fields as in the list.\n\n### Delete a document\n\n|          |                                                               |\n| -------- | ------------------------------------------------------------- |\n| **URL**  | `DELETE /api/v1/filing/{filingUUID}/documents/{documentUuid}` |\n| **Auth** | Bearer token                                                  |\n\n```bash\ncurl -X DELETE https://api.anytax.io/api/v1/filing/550e8400-e29b-41d4-a716-446655440001/documents/7d0b5d0e-5f0c-4d5e-9c53-2a3f4f6b8a11 \\\n  -H 'Authorization: Bearer YOUR_JWT'\n```\n\nReturns `204` with no body; `404` if the filing or document is not found.\n\n### Download a document\n\n|          |                                                                     |\n| -------- | ------------------------------------------------------------------- |\n| **URL**  | `GET /api/v1/filing/{filingUUID}/documents/{documentUuid}/download` |\n| **Auth** | Bearer token                                                        |\n\n```bash\ncurl https://api.anytax.io/api/v1/filing/550e8400-e29b-41d4-a716-446655440001/documents/7d0b5d0e-5f0c-4d5e-9c53-2a3f4f6b8a11/download \\\n  -H 'Authorization: Bearer YOUR_JWT'\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"url\": \"https://…\",\n    \"expiresAt\": \"2026-10-30T09:30:00.000Z\"\n  }\n}\n```\n\nThe URL is valid for 15 minutes; request a new one when it expires.\n\n---\n\n### Send the documents to the tax office\n\n|          |                                                     |\n| -------- | --------------------------------------------------- |\n| **URL**  | `POST /api/v1/filing/{filingUUID}/documents/submit` |\n| **Auth** | Bearer token                                        |\n\nSends every document that has not been sent yet to the tax office as an ELSTER message attached to the return (Steuernummer, tax year, the persons of the return). Documents that were already sent are not sent again; add further documents later and call the endpoint again. The user must have seen the ELSTER notice about the automated check of attachments before the call (see below).\n\nJSON body, both fields optional:\n\n- `text` — a note to the tax office, up to 15,000 characters.\n- `taxNumber` — the Steuernummer of the return in any common format. Only needed when the call was rejected with `details.code` = `tax_number_required`, which happens when neither the return nor a tax assessment of the user carries a Steuernummer. The white-label app asks the user for it in that case.\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/filing/550e8400-e29b-41d4-a716-446655440001/documents/submit \\\n  -H 'Authorization: Bearer YOUR_JWT' \\\n  -H 'Content-Type: application/json' \\\n  -d '{ \"text\": \"Receipts for the capital gains in Anlage SO.\" }'\n```\n\n**Response (201):**\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"submission\": {\n      \"uuid\": \"2f1a7f1e-4a4b-4e7c-9b2a-6d7f9c0e1a22\",\n      \"status\": \"submitted\",\n      \"transferTicket\": \"et1234567890abcdef\",\n      \"errorMessage\": null,\n      \"documentUuids\": [\"7d0b5d0e-5f0c-4d5e-9c53-2a3f4f6b8a11\"],\n      \"createdAt\": \"2026-11-06T09:30:00.000Z\"\n    }\n  }\n}\n```\n\n`status` of a transmission:\n\n- `submitted` — accepted by the tax office; `transferTicket` identifies the transmission.\n- `failed` — the message was not accepted before it reached the tax office; `errorMessage` says why. The documents stay `stored` and can be sent again.\n- `rejected` — the tax office later reported that it had to delete at least one attachment of this transmission (for example after the virus check); the documents of the transmission show `rejected` too. The officer at the tax office is informed and may request the document by post.\n- `validated` — the message was only checked, nothing was sent. Returned on test environments.\n\nErrors: `400` when there are no documents to send, when the Steuernummer is missing (`details.code` = `tax_number_required`) or not valid; `503` when the ELSTER service is unavailable (nothing was sent). A document that has been sent cannot be deleted any more (`409`).\n\n**Notice to show the user before sending.** The tax administration requires that the user sees the following text (German original, binding wording) before documents with attachments are transmitted. The white-label app shows it in the confirmation step; a partner app sending through the API must show it as well.\n\n> Ihre Anhänge werden auf den Servern der Finanzverwaltung automatisiert auf schadhafte Inhalte (z. B. Viren, Trojaner, etc.) geprüft. Zudem werden zum Schutz der Systeme in der Finanzverwaltung aktive Inhalte (z. B. interaktive Elemente, Schaltflächen, sich selbständig aktualisierende Texte) aus allen Anhängen entfernt. Sollte einer Ihrer Anhänge bei der Prüfung als schadhaft identifiziert werden, wird dieser gelöscht und gelangt nicht zur Bearbeitung in das Finanzamt. Weitere Anhänge, die nicht als schadhaft identifiziert wurden, werden nicht gelöscht. Jede Löschung eines Anhangs wird im System der Finanzverwaltung dokumentiert und der zuständige Bearbeiter im Finanzamt erhält die Information, dass der Anhang gelöscht wurde. Der Bearbeiter kann daraufhin nochmals mit Ihnen in Kontakt treten und den Anhang beispielsweise postalisch anfordern. Eine Kontaktaufnahme von Ihrer Seite ist daher nicht erforderlich und führt zu keiner Beschleunigung des Prozesses. Die Löschung eines Anhangs oder die Entfernung aktiver Elemente hat keine Auswirkung auf das eigentliche Formular oder den Antrag. Ausschließlich das eingereichte Formular oder der Antrag sind für eine Fristwahrung relevant. Da digitale Dokumente änderbar sind, stellen sie lediglich ein Mittel der Glaubhaftmachung dar. Bitte verwahren Sie daher weiterhin das Original.\n\n### List the transmissions\n\n|          |                                                         |\n| -------- | ------------------------------------------------------- |\n| **URL**  | `GET /api/v1/filing/{filingUUID}/documents/submissions` |\n| **Auth** | Bearer token                                            |\n\nReturns the transmissions of the filing, newest first, each with the fields shown above.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"submissions\": [\n      {\n        \"uuid\": \"…\",\n        \"status\": \"submitted\",\n        \"transferTicket\": \"et…\",\n        \"errorMessage\": null,\n        \"documentUuids\": [\"…\"],\n        \"createdAt\": \"…\"\n      }\n    ]\n  }\n}\n```\n\n## Integration Architecture\n\nThere are two recommended ways to integrate depending on your application architecture:\n\n### Option A — Server Proxy\n\nYour backend acts as a proxy between your frontend and AntX. The partner secret and the user's JWT never leave your server. Your frontend only communicates with your own backend.\n\n**Best for:** Server-rendered apps (Next.js SSR, Rails, Django), mobile apps with a backend, or when you need full control over the data layer.\n\n```mermaid\nsequenceDiagram\n    participant Browser as User's Browser\n    participant PS as Partner Server\n    participant AntX as AntX Backend\n\n    Note over Browser,AntX: Registration / Login\n    Browser->>PS: POST /auth/register {email, name, surname}\n    PS->>AntX: POST /api/v1/partner/users/register<br/>{slug, clientSecret, email, name, surname}\n    AntX-->>PS: {accessToken, expiresIn, user}\n    PS->>PS: Store accessToken in session/DB\n    PS-->>Browser: Set session cookie + redirect\n\n    Note over Browser,AntX: Accessing AntX Data (via Partner Server)\n    Browser->>PS: GET /dashboard\n    PS->>AntX: GET /api/v1/scenarios<br/>Authorization: Bearer {token}\n    AntX-->>PS: {scenarios[]}\n    PS->>AntX: GET /api/v1/filing<br/>Authorization: Bearer {token}\n    AntX-->>PS: {filings[]}\n    PS-->>Browser: Render HTML / JSON with data\n\n    Note over Browser,AntX: Creating a Filing (via Partner Server)\n    Browser->>PS: POST /filing/create {scenarioUUID}\n    PS->>AntX: POST /api/v1/filing<br/>Authorization: Bearer {token}<br/>{scenarioUUID}\n    AntX-->>PS: {filing}\n    PS-->>Browser: Redirect / return filing data\n\n    Note over Browser,AntX: Token Refresh\n    PS->>AntX: POST /api/v1/auth/refresh<br/>Authorization: Bearer {token}\n    AntX-->>PS: {accessToken, user}\n    PS->>PS: Update stored token\n```\n\n**Key points:**\n\n- The `clientSecret` is only stored on your server.\n- The JWT is stored server-side (in a session, database, or encrypted cookie).\n- Your frontend never sees the JWT or the secret.\n- You handle session management (cookies, expiry) on your own terms.\n\n---\n\n### Option B — Client Direct (Browser to AntX BE)\n\nYour server only handles the initial authentication (to protect the partner secret). After that, the browser communicates directly with the AntX API using the JWT.\n\n**Best for:** Single-page applications (React, Vue, Angular), when you want to minimize server load, or when your frontend needs real-time access to AntX data.\n\n**CORS:** You must request AntX to whitelist your frontend domain for cross-origin requests.\n\n```mermaid\nsequenceDiagram\n    participant Browser as User's Browser\n    participant PS as Partner Server\n    participant AntX as AntX Backend\n\n    Note over Browser,AntX: Registration / Login (via Partner Server)\n    Browser->>PS: POST /auth/login {email}\n    PS->>AntX: POST /api/v1/partner/users/login<br/>{slug, clientSecret, email}\n    AntX-->>PS: {accessToken, expiresIn, user}\n    PS-->>Browser: Return accessToken<br/>(via cookie or response body)\n\n    Note over Browser,AntX: Direct API Calls (Browser → AntX)\n    Browser->>AntX: GET /api/v1/auth/me<br/>Authorization: Bearer {token}\n    AntX-->>Browser: {profile}\n\n    Browser->>AntX: GET /api/v1/scenarios<br/>Authorization: Bearer {token}\n    AntX-->>Browser: {scenarios[]}\n\n    Browser->>AntX: GET /api/v1/filing<br/>Authorization: Bearer {token}\n    AntX-->>Browser: {filings[]}\n\n    Browser->>AntX: POST /api/v1/filing<br/>Authorization: Bearer {token}<br/>{scenarioUUID}\n    AntX-->>Browser: {filing}\n\n    Note over Browser,AntX: Token Refresh (from Browser)\n    Browser->>AntX: POST /api/v1/auth/refresh<br/>Authorization: Bearer {token}\n    AntX-->>Browser: {accessToken, user}\n    Browser->>Browser: Store new token\n```\n\n**Key points:**\n\n- The `clientSecret` is still only used server-side during login/register.\n- After login, the JWT is passed to the browser (via cookie or response body).\n- The browser makes direct API calls to AntX with the `Authorization: Bearer` header.\n- You need CORS configured for your domain — contact AntX to add your domain.\n- Token refresh can be handled by the browser before the token expires.\n\n---\n\n## Sequence Diagrams\n\n### User Registration Flow\n\n```mermaid\nsequenceDiagram\n    participant P as Partner Server\n    participant API as AntX Backend\n\n    P->>API: POST /api/v1/partner/users/register<br/>{slug, clientSecret, email, name, surname}\n    API->>API: Verify partner credentials\n    alt Invalid credentials\n        API-->>P: 401 Unauthorized\n    end\n    alt User already exists for this partner\n        API-->>P: 409 Conflict\n    end\n    API->>API: Create the user with default settings\n    API->>API: Issue RS256 JWT (sub, email, partnerId, partnerSlug)\n    API-->>P: 201 {accessToken, expiresIn, user}\n```\n\n### User Login Flow\n\n```mermaid\nsequenceDiagram\n    participant P as Partner Server\n    participant API as AntX Backend\n\n    P->>API: POST /api/v1/partner/users/login<br/>{slug, clientSecret, email}\n    API->>API: Verify partner credentials\n    alt Invalid credentials\n        API-->>P: 401 Unauthorized\n    end\n    alt User not found for this partner\n        API-->>P: 404 Not Found\n    end\n    API->>API: Issue RS256 JWT (sub, email, partnerId, partnerSlug)\n    API-->>P: 200 {accessToken, expiresIn, user}\n    Note over P: Store token, pass to frontend<br/>or use server-side\n```\n\n### Accessing a Protected Endpoint\n\n```mermaid\nsequenceDiagram\n    participant C as Client (Browser or Server)\n    participant API as AntX Backend\n\n    C->>API: GET /api/v1/auth/me<br/>Authorization: Bearer {accessToken}\n    API->>API: Validate RS256 JWT signature via JWKS\n    API->>API: Extract sub, email, partnerId, partnerSlug\n    API->>API: Verify user status and tokenVersion\n    alt Token invalid or expired\n        API-->>C: 401 Unauthorized\n    end\n    API-->>C: 200 {user profile}\n```\n\n### Partner-Initiated SSO Flow\n\n```mermaid\nsequenceDiagram\n    participant U as User's Browser\n    participant P as Partner Backend\n    participant API as AntX Backend\n    participant UI as AntX White-Label (your-brand.anytax.io)\n\n    Note over P,API: Server-to-server (uses partner secret)\n    P->>API: POST /api/v1/partner/sso/token<br/>{slug, clientSecret, userId, returnPath}\n    API->>API: Validate partner creds; user active & owned<br/>Store SHA-256(code), expiresAt = now + 60s\n    API-->>P: 201 {ssoCode, expiresIn: 60}\n    P-->>U: 302 https://your-brand.anytax.io/auth/sso?code=...\n    U->>UI: GET /auth/sso?code=...\n    UI-->>U: 302 to API exchange\n    U->>API: GET /api/v1/partner/sso/exchange?code=...\n    API->>API: Atomically consume code (single-use)<br/>Re-check partner + user active; issue session JWT\n    alt Code invalid / expired / used\n        API-->>U: 302 back to /auth/sso?error=... (friendly message)\n    end\n    API-->>U: Set-Cookie session (.anytax.io) + 302 to returnPath\n    U->>UI: GET {returnPath} — authenticated\n```\n\n---\n\n## Complete Code Examples\n\n### TypeScript / Node.js\n\n#### Option A — Server Proxy (Express + fetch)\n\n```typescript\nconst ANTX_BASE_URL = process.env.ANTX_API_URL!;\nconst PARTNER_SLUG = process.env.PARTNER_SLUG!;\nconst PARTNER_SECRET = process.env.PARTNER_SECRET!;\n\n// ─── Types ───────────────────────────────────────────────────────────\n\ninterface AntxResponse<T> {\n  success: boolean;\n  data: T;\n  error?: { code: string; message: string };\n  meta?: { timestamp: string; responseTime: number };\n}\n\ninterface AuthResult {\n  accessToken: string;\n  expiresIn: number;\n  user: { id: number; email: string; name: string; surname: string };\n}\n\ninterface Filing {\n  uuid: string;\n  status: string;\n  year: number;\n  isJointFiling: boolean;\n  scenario: { uuid: string; name: { en: string; de: string } | null; year: number } | null;\n  createdAt: string;\n  updatedAt: string;\n}\n\ninterface Scenario {\n  uuid: string;\n  name: { en: string; de: string } | null;\n  year: number;\n  version: number;\n  status: string;\n  deadline: string | null;\n  filings: { uuid: string; status: string; progress: number }[];\n}\n\n// ─── API Helper ──────────────────────────────────────────────────────\n\nasync function antxRequest<T>(path: string, options: RequestInit = {}): Promise<T> {\n  const res = await fetch(`${ANTX_BASE_URL}${path}`, {\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  });\n\n  const body: AntxResponse<T> = await res.json();\n\n  if (!res.ok || !body.success) {\n    const msg = body.error?.message ?? `Request failed (${res.status})`;\n    throw new Error(msg);\n  }\n\n  return body.data;\n}\n\n// ─── Partner Auth (server-side only — uses the secret) ───────────────\n\nasync function registerUser(email: string, name: string, surname: string): Promise<AuthResult> {\n  return antxRequest<AuthResult>('/api/v1/partner/users/register', {\n    method: 'POST',\n    body: JSON.stringify({\n      slug: PARTNER_SLUG,\n      clientSecret: PARTNER_SECRET,\n      email,\n      name,\n      surname,\n    }),\n  });\n}\n\nasync function loginUser(email: string): Promise<AuthResult> {\n  return antxRequest<AuthResult>('/api/v1/partner/users/login', {\n    method: 'POST',\n    body: JSON.stringify({\n      slug: PARTNER_SLUG,\n      clientSecret: PARTNER_SECRET,\n      email,\n    }),\n  });\n}\n\n// ─── Protected API calls (use the JWT) ───────────────────────────────\n\nfunction authHeaders(token: string): HeadersInit {\n  return { Authorization: `Bearer ${token}` };\n}\n\nasync function getProfile(token: string) {\n  return antxRequest<{ login: string; email: string; name: string; surname: string }>(\n    '/api/v1/auth/me',\n    { headers: authHeaders(token) },\n  );\n}\n\nasync function getScenarios(token: string, year?: number) {\n  const query = year ? `?year=${year}` : '';\n  return antxRequest<Scenario[]>(`/api/v1/scenarios${query}`, {\n    headers: authHeaders(token),\n  });\n}\n\nasync function getFilings(token: string) {\n  return antxRequest<Filing[]>('/api/v1/filing', {\n    headers: authHeaders(token),\n  });\n}\n\nasync function createFiling(token: string, scenarioUUID: string) {\n  return antxRequest<Filing>('/api/v1/filing', {\n    method: 'POST',\n    headers: authHeaders(token),\n    body: JSON.stringify({ scenarioUUID }),\n  });\n}\n\nasync function refreshToken(token: string) {\n  return antxRequest<{ accessToken: string }>('/api/v1/auth/refresh', {\n    method: 'POST',\n    headers: authHeaders(token),\n  });\n}\n\n// ─── Usage ───────────────────────────────────────────────────────────\n\nasync function main() {\n  // 1. Register a user\n  const auth = await registerUser('user@example.com', 'Max', 'Mustermann');\n  console.log('Token:', auth.accessToken);\n\n  // 2. Get profile\n  const profile = await getProfile(auth.accessToken);\n  console.log('Profile:', profile);\n\n  // 3. List scenarios\n  const scenarios = await getScenarios(auth.accessToken);\n  console.log('Scenarios:', scenarios.length);\n\n  // 4. Create a filing from the first active scenario\n  const active = scenarios.find((s) => s.status === 'active');\n  if (active) {\n    const filing = await createFiling(auth.accessToken, active.uuid);\n    console.log('Created filing:', filing.uuid);\n  }\n\n  // 5. List filings\n  const filings = await getFilings(auth.accessToken);\n  console.log('Filings:', filings.length);\n}\n```\n\n#### Option B — Client Direct (Browser JavaScript)\n\n```typescript\n// This runs in the browser. The token was obtained via your server's\n// login endpoint and stored in a cookie or localStorage.\n\nconst ANTX_API_URL = 'https://api.anytax.io';\n\nfunction getToken(): string {\n  // Read from cookie, localStorage, or your state management\n  const match = document.cookie.split('; ').find((c) => c.startsWith('antx_token='));\n  return match ? decodeURIComponent(match.split('=')[1]) : '';\n}\n\nasync function antxFetch<T>(path: string, options: RequestInit = {}): Promise<T> {\n  const token = getToken();\n  if (!token) throw new Error('Not authenticated');\n\n  const res = await fetch(`${ANTX_API_URL}${path}`, {\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      Authorization: `Bearer ${token}`,\n      ...options.headers,\n    },\n  });\n\n  const body = await res.json();\n  if (!res.ok || !body.success) {\n    throw new Error(body.error?.message ?? `Request failed (${res.status})`);\n  }\n  return body.data;\n}\n\n// Profile\nconst profile = await antxFetch('/api/v1/auth/me');\n\n// Scenarios\nconst scenarios = await antxFetch('/api/v1/scenarios');\n\n// Filings\nconst filings = await antxFetch('/api/v1/filing');\n\n// Create a filing\nconst newFiling = await antxFetch('/api/v1/filing', {\n  method: 'POST',\n  body: JSON.stringify({ scenarioUUID: 'a1b2c3d4-...' }),\n});\n```\n\n---\n\n### Java\n\n#### Option A — Server Proxy (Java 11+ HttpClient)\n\n```java\nimport java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\nimport com.google.gson.Gson;\nimport com.google.gson.JsonObject;\n\npublic class AntxPartnerClient {\n\n    private static final String BASE_URL = System.getenv(\"ANTX_API_URL\");\n    private static final String PARTNER_SLUG = System.getenv(\"PARTNER_SLUG\");\n    private static final String PARTNER_SECRET = System.getenv(\"PARTNER_SECRET\");\n\n    private final HttpClient http = HttpClient.newHttpClient();\n    private final Gson gson = new Gson();\n\n    // ── Partner Auth (server-side only) ──────────────────────────────\n\n    public JsonObject registerUser(String email, String name, String surname)\n            throws Exception {\n        var body = new JsonObject();\n        body.addProperty(\"slug\", PARTNER_SLUG);\n        body.addProperty(\"clientSecret\", PARTNER_SECRET);\n        body.addProperty(\"email\", email);\n        body.addProperty(\"name\", name);\n        body.addProperty(\"surname\", surname);\n\n        return post(\"/api/v1/partner/users/register\", body.toString(), null);\n    }\n\n    public JsonObject loginUser(String email) throws Exception {\n        var body = new JsonObject();\n        body.addProperty(\"slug\", PARTNER_SLUG);\n        body.addProperty(\"clientSecret\", PARTNER_SECRET);\n        body.addProperty(\"email\", email);\n\n        return post(\"/api/v1/partner/users/login\", body.toString(), null);\n    }\n\n    // ── Protected Endpoints ──────────────────────────────────────────\n\n    public JsonObject getProfile(String token) throws Exception {\n        return get(\"/api/v1/auth/me\", token);\n    }\n\n    public JsonObject getScenarios(String token) throws Exception {\n        return get(\"/api/v1/scenarios\", token);\n    }\n\n    public JsonObject getScenarios(String token, int year) throws Exception {\n        return get(\"/api/v1/scenarios?year=\" + year, token);\n    }\n\n    public JsonObject getFilings(String token) throws Exception {\n        return get(\"/api/v1/filing\", token);\n    }\n\n    public JsonObject createFiling(String token, String scenarioUUID)\n            throws Exception {\n        var body = new JsonObject();\n        body.addProperty(\"scenarioUUID\", scenarioUUID);\n        return post(\"/api/v1/filing\", body.toString(), token);\n    }\n\n    public JsonObject refreshToken(String token) throws Exception {\n        return post(\"/api/v1/auth/refresh\", \"{}\", token);\n    }\n\n    // ── HTTP Helpers ─────────────────────────────────────────────────\n\n    private JsonObject get(String path, String token) throws Exception {\n        var builder = HttpRequest.newBuilder()\n                .uri(URI.create(BASE_URL + path))\n                .header(\"Content-Type\", \"application/json\");\n\n        if (token != null) {\n            builder.header(\"Authorization\", \"Bearer \" + token);\n        }\n\n        var request = builder.GET().build();\n        var response = http.send(request, HttpResponse.BodyHandlers.ofString());\n        return parseResponse(response);\n    }\n\n    private JsonObject post(String path, String body, String token)\n            throws Exception {\n        var builder = HttpRequest.newBuilder()\n                .uri(URI.create(BASE_URL + path))\n                .header(\"Content-Type\", \"application/json\");\n\n        if (token != null) {\n            builder.header(\"Authorization\", \"Bearer \" + token);\n        }\n\n        var request = builder\n                .POST(HttpRequest.BodyPublishers.ofString(body))\n                .build();\n        var response = http.send(request, HttpResponse.BodyHandlers.ofString());\n        return parseResponse(response);\n    }\n\n    private JsonObject parseResponse(HttpResponse<String> response)\n            throws Exception {\n        var json = gson.fromJson(response.body(), JsonObject.class);\n        boolean success = json.has(\"success\") && json.get(\"success\").getAsBoolean();\n\n        if (response.statusCode() >= 400 || !success) {\n            String message = \"Request failed (\" + response.statusCode() + \")\";\n            if (json.has(\"error\") && json.getAsJsonObject(\"error\").has(\"message\")) {\n                message = json.getAsJsonObject(\"error\").get(\"message\").getAsString();\n            }\n            throw new RuntimeException(message);\n        }\n\n        return json.getAsJsonObject(\"data\");\n    }\n\n    // ── Usage ────────────────────────────────────────────────────────\n\n    public static void main(String[] args) throws Exception {\n        var client = new AntxPartnerClient();\n\n        // 1. Register\n        var auth = client.registerUser(\"user@example.com\", \"Max\", \"Mustermann\");\n        String token = auth.get(\"accessToken\").getAsString();\n        System.out.println(\"Token obtained: \" + token.substring(0, 20) + \"...\");\n\n        // 2. Profile\n        var profile = client.getProfile(token);\n        System.out.println(\"User: \" + profile.get(\"name\") + \" \" + profile.get(\"surname\"));\n\n        // 3. Scenarios\n        var scenarios = client.getScenarios(token);\n        System.out.println(\"Scenarios: \" + scenarios);\n\n        // 4. Create filing (using first scenario UUID)\n        // var filing = client.createFiling(token, \"scenario-uuid-here\");\n\n        // 5. Filings\n        var filings = client.getFilings(token);\n        System.out.println(\"Filings: \" + filings);\n    }\n}\n```\n\n#### Option B — Client Direct (Android / Browser)\n\n```java\n// Same client class as above, but used from the frontend layer.\n// The token is obtained from your auth endpoint and stored client-side.\n// Only the protected methods (getProfile, getScenarios, etc.) are called.\n// The registerUser/loginUser methods are NEVER called from the client.\n\n// Android example using the client:\nString token = sharedPrefs.getString(\"antx_token\", null);\nif (token == null) {\n    // redirect to login\n    return;\n}\n\nvar client = new AntxPartnerClient();\nvar profile = client.getProfile(token);\nvar scenarios = client.getScenarios(token);\nvar filings = client.getFilings(token);\n```\n\n---\n\n### Python\n\n#### Option A — Server Proxy (requests)\n\n```python\nimport os\nimport requests\n\nBASE_URL = os.environ[\"ANTX_API_URL\"]\nPARTNER_SLUG = os.environ[\"PARTNER_SLUG\"]\nPARTNER_SECRET = os.environ[\"PARTNER_SECRET\"]\n\n\nclass AntxClientError(Exception):\n    \"\"\"Raised when the AntX API returns an error.\"\"\"\n    def __init__(self, status_code: int, message: str):\n        self.status_code = status_code\n        super().__init__(f\"[{status_code}] {message}\")\n\n\ndef _handle_response(resp: requests.Response) -> dict:\n    \"\"\"Parse and validate the AntX response envelope.\"\"\"\n    body = resp.json()\n    if resp.status_code >= 400 or not body.get(\"success\"):\n        msg = (\n            body.get(\"error\", {}).get(\"message\")\n            or body.get(\"message\")\n            or f\"Request failed ({resp.status_code})\"\n        )\n        raise AntxClientError(resp.status_code, msg)\n    return body[\"data\"]\n\n\n# ── Partner Auth (server-side only — uses the secret) ──────────────\n\n\ndef register_user(email: str, name: str, surname: str) -> dict:\n    \"\"\"Register a new user and return {accessToken, expiresIn, user}.\"\"\"\n    resp = requests.post(\n        f\"{BASE_URL}/api/v1/partner/users/register\",\n        json={\n            \"slug\": PARTNER_SLUG,\n            \"clientSecret\": PARTNER_SECRET,\n            \"email\": email,\n            \"name\": name,\n            \"surname\": surname,\n        },\n    )\n    return _handle_response(resp)\n\n\ndef login_user(email: str) -> dict:\n    \"\"\"Login an existing user and return {accessToken, expiresIn, user}.\"\"\"\n    resp = requests.post(\n        f\"{BASE_URL}/api/v1/partner/users/login\",\n        json={\n            \"slug\": PARTNER_SLUG,\n            \"clientSecret\": PARTNER_SECRET,\n            \"email\": email,\n        },\n    )\n    return _handle_response(resp)\n\n\n# ── Protected Endpoints (use the JWT) ──────────────────────────────\n\n\ndef _auth_headers(token: str) -> dict:\n    return {\"Authorization\": f\"Bearer {token}\"}\n\n\ndef get_profile(token: str) -> dict:\n    resp = requests.get(\n        f\"{BASE_URL}/api/v1/auth/me\",\n        headers=_auth_headers(token),\n    )\n    return _handle_response(resp)\n\n\ndef get_scenarios(token: str, year: int | None = None) -> list[dict]:\n    params = {\"year\": year} if year else {}\n    resp = requests.get(\n        f\"{BASE_URL}/api/v1/scenarios\",\n        headers=_auth_headers(token),\n        params=params,\n    )\n    return _handle_response(resp)\n\n\ndef get_filings(token: str) -> list[dict]:\n    resp = requests.get(\n        f\"{BASE_URL}/api/v1/filing\",\n        headers=_auth_headers(token),\n    )\n    return _handle_response(resp)\n\n\ndef create_filing(token: str, scenario_uuid: str) -> dict:\n    resp = requests.post(\n        f\"{BASE_URL}/api/v1/filing\",\n        headers=_auth_headers(token),\n        json={\"scenarioUUID\": scenario_uuid},\n    )\n    return _handle_response(resp)\n\n\ndef refresh_token(token: str) -> dict:\n    resp = requests.post(\n        f\"{BASE_URL}/api/v1/auth/refresh\",\n        headers=_auth_headers(token),\n    )\n    return _handle_response(resp)\n\n\n# ── Usage ──────────────────────────────────────────────────────────\n\nif __name__ == \"__main__\":\n    # 1. Register a user\n    auth = register_user(\"user@example.com\", \"Max\", \"Mustermann\")\n    token = auth[\"accessToken\"]\n    print(f\"Token: {token[:30]}...\")\n\n    # 2. Profile\n    profile = get_profile(token)\n    print(f\"User: {profile['name']} {profile['surname']}\")\n\n    # 3. Scenarios\n    scenarios = get_scenarios(token)\n    print(f\"Scenarios: {len(scenarios)}\")\n\n    # 4. Create filing from first active scenario\n    active = next((s for s in scenarios if s[\"status\"] == \"active\"), None)\n    if active:\n        filing = create_filing(token, active[\"uuid\"])\n        print(f\"Created filing: {filing['uuid']}\")\n\n    # 5. Filings\n    filings = get_filings(token)\n    print(f\"Filings: {len(filings)}\")\n```\n\n#### Option B — Client Direct (Browser via Python Backend)\n\n```python\n# In Option B, your Python server only handles login/register.\n# After login, you return the token to the browser.\n\nfrom flask import Flask, request, jsonify, make_response\n\napp = Flask(__name__)\n\n\n@app.route(\"/auth/register\", methods=[\"POST\"])\ndef handle_register():\n    \"\"\"Proxy registration to AntX, return token to the browser.\"\"\"\n    data = request.json\n    auth = register_user(data[\"email\"], data[\"name\"], data[\"surname\"])\n\n    response = make_response(jsonify({\"token\": auth[\"accessToken\"]}))\n    # Option: set a cookie the browser can read\n    response.set_cookie(\n        \"antx_token\",\n        auth[\"accessToken\"],\n        max_age=auth[\"expiresIn\"],\n        httponly=False,  # browser JS needs access\n        samesite=\"Lax\",\n    )\n    return response\n\n\n@app.route(\"/auth/login\", methods=[\"POST\"])\ndef handle_login():\n    \"\"\"Proxy login to AntX, return token to the browser.\"\"\"\n    data = request.json\n    auth = login_user(data[\"email\"])\n\n    response = make_response(jsonify({\"token\": auth[\"accessToken\"]}))\n    response.set_cookie(\n        \"antx_token\",\n        auth[\"accessToken\"],\n        max_age=auth[\"expiresIn\"],\n        httponly=False,\n        samesite=\"Lax\",\n    )\n    return response\n\n\n# After this, the browser calls AntX directly:\n#   fetch(\"https://api.anytax.io/api/v1/scenarios\", {\n#     headers: { Authorization: `Bearer ${token}` }\n#   })\n```\n\n---\n\n## Error Handling\n\nAll AntX API errors follow a consistent envelope format:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"Not Found\",\n    \"message\": \"User not found for this partner\"\n  },\n  \"meta\": {\n    \"timestamp\": \"2026-04-15T12:00:00.000Z\",\n    \"path\": \"/api/v1/partner/users/login\"\n  }\n}\n```\n\n### Common Error Codes\n\n| HTTP Status | Code                                         | When                                                                                                                    |\n| ----------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `400`       | `Bad Request`                                | Invalid request body, inactive scenario                                                                                 |\n| `400`       | `ELIGIBILITY_INVALID_ANSWER`                 | Unknown questionId/optionId, or multiple selections on a single-select question (eligibility `evaluate`)                |\n| `401`       | `Unauthorized`                               | Invalid/expired token, wrong partner credentials                                                                        |\n| `403`       | `Forbidden`                                  | User account is deactivated                                                                                             |\n| `404`       | `Not Found`                                  | Resource not found (user, filing, scenario)                                                                             |\n| `409`       | `Conflict`                                   | Duplicate resource (e.g., user already registered)                                                                      |\n| `409`       | `ELSTER_REQUEST_LIMIT`                       | Access for this tax ID was already requested today — ELSTER accepts one request per tax ID and day                      |\n| `422`       | `ELSTER_REQUEST_REJECTED`                    | ELSTER refused the request. Entering a code: `details` has `elsterCode` and `elsterText`; requesting access: no details |\n| `503`       | `ELSTER_UNAVAILABLE`                         | ELSTER import is off in this environment, or ELSTER can't be reached                                                    |\n| `422`       | `ELIGIBILITY_QUESTION_SET_VERSION_NOT_FOUND` | `questionSetVersion` was never published for that `taxYear` — refetch `GET .../questions`                               |\n| `429`       | `Too Many Requests`                          | Rate limit exceeded                                                                                                     |\n\n### Token Expiry\n\n- Tokens expire after **1 hour** (`expiresIn: 3600`).\n- Use the `POST /api/v1/auth/refresh` endpoint to get a new token before the current one expires.\n- If a token has expired, all protected endpoints return `401 Unauthorized`.\n\n**Recommended:** Set up a timer or interceptor to refresh the token at ~50 minutes (before the 60-minute expiry).\n\n---\n\n## Security Best Practices\n\n1. **Never expose the client secret.** The `clientSecret` must only be used in server-to-server calls. Never include it in frontend code, mobile apps, or client-side bundles.\n\n2. **Store tokens securely.**\n   - **Server proxy:** Store in an encrypted session or httpOnly cookie.\n   - **Client direct:** Store in a cookie with appropriate flags. Avoid `localStorage` in production — cookies with `SameSite=Lax` are preferred.\n\n3. **Use HTTPS in production.** All communication with the AntX API should be over HTTPS.\n\n4. **Implement token refresh.** Don't wait for 401 errors — proactively refresh tokens before they expire.\n\n5. **Handle errors gracefully.** Always check the `success` field in the response envelope. Implement retry logic for transient errors (5xx, network failures).\n\n6. **Request CORS whitelisting.** If using the client-direct approach, provide your frontend domain(s) to AntX during onboarding so we can configure CORS.\n\n7. **Rate limits.** Be aware of rate limits on authentication endpoints:\n   - Register: 10 requests/minute\n   - Login: 30 requests/minute\n   - Token refresh: 20 requests/minute\n\n---\n\n## JWT Token Structure\n\nThe JWT issued by AntX contains these claims:\n\n| Claim          | Description                      |\n| -------------- | -------------------------------- |\n| `sub`          | User ID (numeric string)         |\n| `email`        | User's email address             |\n| `aud`          | Audience — `partner:<your-slug>` |\n| `scope`        | `openid email profile`           |\n| `partnerId`    | Your partner UUID                |\n| `partnerSlug`  | Your partner slug                |\n| `tokenVersion` | Token version (for revocation)   |\n| `iss`          | Issuer URL                       |\n| `iat`          | Issued at (Unix timestamp)       |\n| `exp`          | Expiry (Unix timestamp)          |\n| `jti`          | Unique token ID                  |\n\nThe token is signed with **RS256** and can be verified using the JWKS endpoint at `{BASE_URL}/api/v1/auth/.well-known/jwks.json`.\n\n---\n\n## Quick Reference\n\n| Action                       | Method   | Endpoint                                                        | Auth                        |\n| ---------------------------- | -------- | --------------------------------------------------------------- | --------------------------- |\n| Register user                | `POST`   | `/api/v1/partner/users/register`                                | Partner credentials in body |\n| Login user                   | `POST`   | `/api/v1/partner/users/login`                                   | Partner credentials in body |\n| Get profile                  | `GET`    | `/api/v1/auth/me`                                               | Bearer token                |\n| List scenarios               | `GET`    | `/api/v1/scenarios`                                             | Bearer token                |\n| List filings                 | `GET`    | `/api/v1/filing`                                                | Bearer token                |\n| Create filing                | `POST`   | `/api/v1/filing`                                                | Bearer token                |\n| Prefill filing               | `POST`   | `/api/v1/answer/{filingUUID}/prefill`                           | Bearer token                |\n| Refresh token                | `POST`   | `/api/v1/auth/refresh`                                          | Bearer token                |\n| List supporting documents    | `GET`    | `/api/v1/filing/{filingUUID}/documents`                         | Bearer token                |\n| Upload supporting document   | `POST`   | `/api/v1/filing/{filingUUID}/documents`                         | Bearer token                |\n| Delete supporting document   | `DELETE` | `/api/v1/filing/{filingUUID}/documents/{documentUuid}`          | Bearer token                |\n| Download supporting document | `GET`    | `/api/v1/filing/{filingUUID}/documents/{documentUuid}/download` | Bearer token                |\n| Mint SSO code                | `POST`   | `/api/v1/partner/sso/token`                                     | Partner credentials in body |\n| SSO exchange                 | `GET`    | `/api/v1/partner/sso/exchange?code=`                            | Single-use code (browser)   |\n| Get partner bearer token     | `POST`   | `/api/v1/partner/token`                                         | Partner credentials in body |\n| Get eligibility questions    | `GET`    | `/api/v1/filing-eligibility-check/questions`                    | Partner bearer token        |\n| Evaluate eligibility         | `POST`   | `/api/v1/filing-eligibility-check/evaluate`                     | Partner bearer token        |\n| Eligibility notify signup    | `POST`   | `/api/v1/filing-eligibility-check/notify`                       | Partner bearer token        |\n| ELSTER access status         | `GET`    | `/api/v1/vast/{filingUUID}/authorizations`                      | Bearer token                |\n| Request ELSTER access        | `POST`   | `/api/v1/vast/{filingUUID}/authorizations`                      | Bearer token                |\n| Enter activation code        | `POST`   | `/api/v1/vast/authorizations/{id}/activate`                     | Bearer token                |\n| Import from ELSTER           | `POST`   | `/api/v1/vast/{filingUUID}/import`                              | Bearer token                |\n| Remove ELSTER access         | `DELETE` | `/api/v1/vast/authorizations/{id}`                              | Bearer token                |\n\n---\n\n_For onboarding, CORS configuration, or questions, contact the AntX team._\n\n## How to verify user's identity using AnyTax API\n\n1. Call POST `/api/v1/user/me/identity-verification/link` ([see docs](#tag/user-api/POST/api/v1/user/me/identity-verification/link)) to get an identity verification link.\n\n   Response body example:\n\n   ```json\n   {\n     \"link\": \"https://example.com/verify/123456\"\n   }\n   ```\n\n2. Redirect your user to the link.\n3. Wait for the user to complete steps and identity verification provider to check documens.\n4. Call GET `/api/v1/user/me/identity-verification/status` ([see docs](#tag/user-api/GET/api/v1/user/me/identity-verification/status)) to check the status of the verification.\n\n   Response body example:\n\n   ```json\n   {\n     \"status\": \"verified\"\n   }\n   ```\n\n5. When status is `verified`, all existing and future filings with status `prepared` will automatically proceed to `identityVerified` for this user.\n\n## Eligibility Check API (Pre-Signup, No Account Required)\n\nWe support a 4-question eligibility check — the same one shown inside the AnyTax player — that you can run in your own funnel **before a user ever registers with AnyTax**. It tells you up front whether we can file for a given case, so you never onboard someone we can't support.\n\nThis flow is **stateless and account-less**: no end-user JWT, no user record, no filing. You call it from your own backend using a **partner bearer token**, which is a different credential from the end-user JWT described earlier in this guide.\n\n### Getting a partner bearer token\n\n```\nPOST /api/v1/partner/token\nContent-Type: application/json\n\n{\n  \"slug\": \"my-partner\",\n  \"clientSecret\": \"your-partner-client-secret\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIs...\",\n    \"expiresAt\": \"2026-09-10T12:00:00.000Z\"\n  },\n  \"meta\": { \"timestamp\": \"2026-08-11T12:00:00.000Z\", \"responseTime\": 40 }\n}\n```\n\n- The token is valid for **30 days**. Use it as `Authorization: Bearer <accessToken>` on every call below.\n- This is the same credential exchange used elsewhere for partner-level (not end-user) API access — mint one token and reuse it until it expires.\n\n### 1. Get the question set\n\n```\nGET /api/v1/filing-eligibility-check/questions?taxYear=2025&locale=en\nAuthorization: Bearer <partner-access-token>\n```\n\n| Param     | Required | Description                     |\n| --------- | -------- | ------------------------------- |\n| `taxYear` | Yes      | Tax year the questions apply to |\n| `locale`  | Yes      | `en` or `de`                    |\n\nResponse (trimmed — all 4 questions follow the same shape):\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"taxYear\": 2025,\n    \"locale\": \"en\",\n    \"questionSetVersion\": \"2026-08-11\",\n    \"questions\": [\n      {\n        \"id\": \"foreignTies\",\n        \"heading\": \"Did you have foreign income or live outside Germany in 2025?\",\n        \"subtext\": \"Answer Yes if any of these applied to you:\",\n        \"bullets\": [\n          \"Salary, self-employment or business income from abroad\",\n          \"Rental income from a property abroad, or you sold one\",\n          \"A foreign pension, or a stake in a foreign company or partnership\",\n          \"ETFs or investment funds held at a broker outside Germany\",\n          \"You lived in another country for part of the year (holidays don't count)\"\n        ],\n        \"callout\": {\n          \"lead\": \"Foreign investments are fine.\",\n          \"body\": \"If your only foreign connection is dividends, interest or share sales through a bank or broker, answer No — we support those, including foreign withholding tax.\"\n        },\n        \"allowMultiple\": false,\n        \"options\": [\n          { \"id\": \"no\", \"label\": \"No\", \"isClearing\": true },\n          { \"id\": \"yes\", \"label\": \"Yes\", \"isClearing\": false }\n        ]\n      },\n      {\n        \"id\": \"incomeSources\",\n        \"heading\": \"What kinds of income did you have in 2025?\",\n        \"subtext\": \"Select all that apply. Standard salary, bank interest and dividends are already covered.\",\n        \"allowMultiple\": true,\n        \"options\": [\n          {\n            \"id\": \"selfEmployedNoReg\",\n            \"label\": \"Self-employed income without trade registration\",\n            \"helperText\": \"Freelancers and professionals (Freiberufler)\",\n            \"isClearing\": false\n          },\n          {\n            \"id\": \"abroad\",\n            \"label\": \"Foreign employment, rental or business income\",\n            \"helperText\": \"...\",\n            \"isClearing\": false\n          },\n          { \"id\": \"none\", \"label\": \"None of these\", \"isClearing\": true }\n        ]\n      }\n      // ... \"personalSituations\" and \"assetsInvestments\" follow, same shape ...\n    ]\n  },\n  \"meta\": { \"timestamp\": \"2026-08-11T12:00:00.000Z\", \"responseTime\": 12 }\n}\n```\n\n- **Stable ids**: `questions[].id` and `options[].id` never change once published — build your UI against them, not against the copy.\n- **`isClearing: true`** marks the option that means \"this doesn't apply to me\" (or \"No\" for the yes/no question). Selecting it alone clears any other selection on that question — that behavior rule ships with the content so you don't have to hardcode it.\n- **`allowMultiple`** tells you whether to render radios (`false`) or checkboxes (`true`).\n- **`questionSetVersion`** changes whenever wording or options change for a `taxYear`. Cache the response by `(taxYear, locale)` and only refetch when you want the latest version — pass whatever version you fetched into `evaluate`/`notify` below; we score against the exact version you were shown, not silently upgrade you to the newest one.\n\n### 2. Evaluate answers\n\n```\nPOST /api/v1/filing-eligibility-check/evaluate\nAuthorization: Bearer <partner-access-token>\nContent-Type: application/json\n\n{\n  \"taxYear\": 2025,\n  \"questionSetVersion\": \"2026-08-11\",\n  \"locale\": \"en\",\n  \"answers\": {\n    \"foreignTies\": [\"no\"]\n  }\n}\n```\n\n`answers` is `{ questionId: [optionId, ...] }`. **You can submit a partial set** — omit any question the user hasn't answered yet — and call `evaluate` again as the user progresses. There are three possible outcomes:\n\n| `outcome`     | Meaning                                                                                           |\n| ------------- | ------------------------------------------------------------------------------------------------- |\n| `pending`     | Everything submitted so far is clean, but not all 4 questions have been answered yet              |\n| `unsupported` | At least one submitted question is disqualifying — returned immediately, without needing the rest |\n| `supported`   | All 4 questions are present and every one resolved to its clearing option                         |\n\nPartial, still-clean submission → `pending`:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"outcome\": \"pending\",\n    \"taxYear\": 2025,\n    \"questionSetVersion\": \"2026-08-11\",\n    \"triggeredBy\": [],\n    \"message\": null,\n    \"notifyOffer\": false\n  },\n  \"meta\": { \"timestamp\": \"2026-08-11T12:01:00.000Z\", \"responseTime\": 8 }\n}\n```\n\nAdd a disqualifying answer (`{\"foreignTies\": [\"no\"], \"incomeSources\": [\"abroad\"]}`) → `unsupported`, returned without waiting for `personalSituations`/`assetsInvestments`:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"outcome\": \"unsupported\",\n    \"taxYear\": 2025,\n    \"questionSetVersion\": \"2026-08-11\",\n    \"triggeredBy\": [{ \"questionId\": \"incomeSources\", \"selectedOptionIds\": [\"abroad\"] }],\n    \"message\": \"Some parts of your return require a more complex filing than our current version supports. We're actively working on expanding coverage — your case may be supported in a future update. In the meantime, you can file directly via ELSTER or speak to a tax advisor.\",\n    \"notifyOffer\": true\n  },\n  \"meta\": { \"timestamp\": \"2026-08-11T12:01:05.000Z\", \"responseTime\": 9 }\n}\n```\n\nAll 4 answered clean (`{\"foreignTies\":[\"no\"],\"incomeSources\":[\"none\"],\"personalSituations\":[\"none\"],\"assetsInvestments\":[\"none\"]}`) → `supported`:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"outcome\": \"supported\",\n    \"taxYear\": 2025,\n    \"questionSetVersion\": \"2026-08-11\",\n    \"triggeredBy\": [],\n    \"message\": null,\n    \"notifyOffer\": false\n  },\n  \"meta\": { \"timestamp\": \"2026-08-11T12:01:10.000Z\", \"responseTime\": 10 }\n}\n```\n\n**Important — `triggeredBy` is for you, not your user.** It tells you (and us) which answer disqualified the case, purely for your own visibility into what kinds of cases you're turning away. Show the end user only the generic `message` plus a \"notify me\" offer when `notifyOffer` is `true` — never surface which specific answer triggered the result.\n\n### 3. Capture a \"notify me\" signup\n\nWhen `outcome` is `unsupported` and the user wants to be notified once we support their case:\n\n```\nPOST /api/v1/filing-eligibility-check/notify\nAuthorization: Bearer <partner-access-token>\nContent-Type: application/json\n\n{\n  \"email\": \"user@example.com\",\n  \"taxYear\": 2025,\n  \"questionSetVersion\": \"2026-08-11\",\n  \"triggeredBy\": [{ \"questionId\": \"incomeSources\", \"selectedOptionIds\": [\"abroad\"] }]\n}\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": { \"uuid\": \"b3f1e2a4-...\" },\n  \"meta\": { \"timestamp\": \"2026-08-11T12:01:20.000Z\", \"responseTime\": 15 }\n}\n```\n\n- Anonymous — no account is created. These signups land in the same store as the ones captured from the AnyTax player.\n- Idempotent per `(email, taxYear, your partner)`: submitting the same email for the same tax year again updates the existing signup rather than creating a duplicate — safe to call again if the user changes their mind and comes back.\n\n### Worked example: full flow\n\n```bash\nBASE_URL=\"https://api.anytax.io\"\n\n# 1. Mint a partner bearer token (cache this for up to 30 days)\nTOKEN=$(curl -s -X POST \"$BASE_URL/api/v1/partner/token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"slug\":\"my-partner\",\"clientSecret\":\"'\"$CLIENT_SECRET\"'\"}' \\\n  | jq -r '.data.accessToken')\n\n# 2. Fetch the question set once, cache by (taxYear, locale)\ncurl -s \"$BASE_URL/api/v1/filing-eligibility-check/questions?taxYear=2025&locale=en\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n\n# 3. As the user answers each question, call evaluate with everything answered so far\ncurl -s -X POST \"$BASE_URL/api/v1/filing-eligibility-check/evaluate\" \\\n  -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\n    \"taxYear\": 2025,\n    \"questionSetVersion\": \"2026-08-11\",\n    \"locale\": \"en\",\n    \"answers\": { \"foreignTies\": [\"no\"], \"incomeSources\": [\"abroad\"] }\n  }'\n# -> outcome: \"unsupported\" — show the generic message + notify-me offer, stop asking further questions\n\n# 4. If the user opts in to be notified\ncurl -s -X POST \"$BASE_URL/api/v1/filing-eligibility-check/notify\" \\\n  -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\n    \"email\": \"user@example.com\",\n    \"taxYear\": 2025,\n    \"questionSetVersion\": \"2026-08-11\",\n    \"triggeredBy\": [{ \"questionId\": \"incomeSources\", \"selectedOptionIds\": [\"abroad\"] }]\n  }'\n```\n\nIf instead every answer had resolved clean, step 3 would eventually return `outcome: \"supported\"` once all 4 questions are present — that's your signal to send the user into your normal AnyTax onboarding/registration flow.\n\n## Import from ELSTER\n\nThe tax office already holds a user's wage tax certificates (Lohnsteuerbescheinigungen). With the user's consent, AnyTax can retrieve them through ELSTER's pre-filled tax return (VaSt) and fill them into the filing, one certificate per employer.\n\nAll calls use the **end user's bearer token**, like [Prefill a Filing](#description/7-prefill-a-filing). Access belongs to the user, not to a filing: once granted it works for every filing and later tax years, for 10 years unless the user removes it.\n\n**Availability.** `GET .../authorizations` returns `enabled: false` where the feature isn't offered — hide it then. On staging it answers with test data, without contacting ELSTER.\n\n### Flow\n\n1. **Status** — `GET /api/v1/vast/{filingUUID}/authorizations` returns the known `taxId` and `dateOfBirth` (to pre-fill your form) and `authorization` (`null` until requested). `available: false` means ELSTER couldn't be reached for a status check.\n2. **Request access** — `POST /api/v1/vast/{filingUUID}/authorizations` with `{ \"consent\": true, \"taxId\": \"…\", \"dateOfBirth\": \"YYYY-MM-DD\" }`. Show the user a consent text before sending `consent: true`; the request is made in their name. The tax ID must have a valid check digit. Both values are saved to the user's account and the filing. If the user already has access, it's returned instead of a new request.\n3. **Approval by the user** — `status` stays `open` until the user approves, in one of two ways:\n   - **Mein ELSTER account:** approve under _Formulare und Leistungen → Bescheinigungen verwalten_. Re-read the status afterwards (it's checked with ELSTER at most once a minute).\n   - **No ELSTER account:** the tax office posts an activation code, usually within 2 weeks. Send it with `POST /api/v1/vast/authorizations/{id}/activate` `{ \"code\": \"XXXX-XXXX-XXXX\" }`. Five wrong codes cancel the request.\n4. **Import** — once `status` is `approved`, `POST /api/v1/vast/{filingUUID}/import` imports the wage tax certificates for the filing's year (2024 or 2025). Certificates appear at ELSTER at the earliest the day after approval. A filing in review or submitted can't be changed (`409 FILING_READ_ONLY`).\n5. **Remove access** — `DELETE /api/v1/vast/authorizations/{id}`. Values already imported stay in the filing.\n\n### Import behavior\n\n- **Defaults, not answers.** Like a partner prefill, imported values are unconfirmed (`answered: false`) until the user confirms each certificate. Question responses report them under `status.prefilledFromElster: true`, and the filing UI shows a \"Pre-filled from ELSTER\" label.\n- **Existing certificates are kept.** Certificates the user entered are never overwritten; `existingCertificates` in the response counts them so you can warn about duplicates. Importing again replaces the earlier, still unconfirmed import.\n- **Warnings** per certificate (`employer`, `code`): `taxClassMissing`, `multiplePensions` and `multiYearPensionNotImported` (2024) are imported with those lines left for the user; `unreadable`, `unsupportedVersion`, `otherTaxId` and `otherYear` are skipped; `alreadyImported` was imported before and confirmed by the user, so it stays as it is.\n\nResponse example:\n\n```json\n{\n  \"imported\": 2,\n  \"existingCertificates\": 0,\n  \"warnings\": [{ \"employer\": \"Muster GmbH\", \"code\": \"taxClassMissing\" }]\n}\n```\n\n### Limits\n\n- **One request per tax ID and day.** ELSTER refuses a second request on the same day, so a new request — \"request again\" with `replace: true`, or a request after removing access — returns `409 ELSTER_REQUEST_LIMIT` on that day; a pending request stays.\n- **5 ELSTER calls per user and minute.** Requesting access, entering a code, importing and removing access share this limit; more return `429`. All ELSTER calls queue on one connection, so don't retry in a loop — back off on `429` and `503`.\n- Only wage tax certificates are imported so far — no pensions, insurance or other ELSTER receipts.\n\n\n---\n\n# Anytax API\n\nThe Anytax API lets you create and submit German tax filings (Einkommensteuererklärung) programmatically. It's organized around REST — you send JSON, you get JSON back, and everything uses standard HTTP verbs and status codes. Authenticate with Bearer tokens.\n\n## Base URL\n\n```\nhttps://api.anytax.io/api/v1\n```\n\nAll endpoints in this documentation are relative to the base URL. For example, `POST /filing` means `POST https://api.anytax.io/api/v1/filing`.\n\n---\n\n## Core Concepts\n\nBefore calling any endpoints, here are the four things you'll work with:\n\n**Scenario** — A tax form template for a specific year. Think of it as \"which form you're filling out.\" Each scenario defines the sections, questions, and validation rules. Only `active` scenarios accept new filings.\n\n**Filing** — One user's tax return for a scenario. When you create a filing, the system generates all the questions the user needs to answer. A filing progresses through statuses until it's submitted to the tax office.\n\n**Section** — A chapter of the tax form. Sections contain subsections, and each has a progress percentage (0–100%). Use sections to build a navigation sidebar or progress tracker.\n\n**Question** — An individual field the user must answer. Each question has an input type (text, number, yes/no, date, choice, address, etc.) and may have validation rules. Questions can be conditional — answering \"No\" to one question may skip a whole section.\n\n---\n\n## Authentication\n\nAnytax uses **JWT Bearer tokens**. Most endpoints require a valid token in the `Authorization` header:\n\n```\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIs...\n```\n\n### Getting tokens\n\n**Email + OTP flow:**\n\n1. Register or login — the server sends a one-time password (OTP) to the user's email\n2. Verify the OTP — the server returns `accessToken` + `refreshToken`\n\n### Token lifecycle\n\n- **Access tokens** expire after **24 hours**\n- **Refresh tokens** expire after **7 days**\n- Use `POST /auth/refresh` with your refresh token to get a new pair (both access and refresh are rotated)\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/auth/refresh \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"refreshToken\": \"eyJhbGciOiJIUzI1NiIs...\"}'\n```\n\n---\n\n## Response Format\n\nEvery response is wrapped in a standard envelope:\n\n### Success\n\n```json\n{\n  \"success\": true,\n  \"data\": { ... },\n  \"meta\": {\n    \"timestamp\": \"2025-01-19T10:30:00.000Z\"\n  }\n}\n```\n\n`data` contains the actual response object (or array). Some endpoints return `204 No Content` with no body (e.g., delete).\n\n### Error\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"FILING_READ_ONLY\",\n    \"message\": \"Filing is read-only\",\n    \"details\": {\n      \"filingUUID\": \"550e8400-e29b-41d4-a716-446655440001\",\n      \"status\": \"submitted\",\n      \"messages\": {\n        \"en\": \"Filing submitted — editing is locked. Your tax filing has already been submitted. If you need to make a correction, please contact our support team at info@anytax.io.\",\n        \"de\": \"Steuererklärung eingereicht – Bearbeitung gesperrt. Deine Steuererklärung wurde bereits eingereicht. Wenn du eine Korrektur vornehmen möchtest, wende dich bitte an unser Support-Team unter info@anytax.io.\"\n      }\n    }\n  },\n  \"meta\": {\n    \"timestamp\": \"2025-01-19T10:30:00.000Z\",\n    \"path\": \"/api/v1/answer/550e.../abc...\"\n  }\n}\n```\n\n`error.code` is a machine-readable string you can switch on. `error.details` is optional and provides extra context for debugging. For `FILING_READ_ONLY`, `details.messages` always contains the same fixed `en` and `de` paragraphs (regardless of `details.status` being `inReview` or `submitted`).\n\n---\n\n## Complete Filing Flow\n\nThis is the happy path from registration to submission. Each step shows the HTTP request and a realistic response snippet.\n\n### Step 1: Register\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/auth/register \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"email\": \"max.mustermann@example.com\",\n    \"password\": \"SecurePass123!\",\n    \"name\": \"Max\",\n    \"surname\": \"Mustermann\",\n    \"login\": \"max.mustermann\"\n  }'\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"message\": \"Registration successful. Please verify your email with the OTP sent.\",\n    \"email\": \"max.mustermann@example.com\",\n    \"otpSent\": true\n  }\n}\n```\n\nAn OTP is sent to the email. No tokens yet.\n\n### Step 2: Verify OTP\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/auth/verify-otp \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"email\": \"max.mustermann@example.com\",\n    \"otp\": 123456\n  }'\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"user\": {\n      \"email\": \"max.mustermann@example.com\",\n      \"login\": \"max.mustermann\",\n      \"name\": \"Max\",\n      \"surname\": \"Mustermann\",\n      \"role\": \"user\",\n      \"verified\": true\n    },\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIs...\",\n    \"refreshToken\": \"eyJhbGciOiJIUzI1NiIs...\"\n  }\n}\n```\n\nSave both tokens. Use `accessToken` in the `Authorization` header for all following requests.\n\n### Step 3: List available scenarios\n\n```bash\ncurl https://api.anytax.io/api/v1/scenarios?year=2024 \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"uuid\": \"09176dbe-f87c-4b11-b94d-f909fa3366d9\",\n      \"name\": null,\n      \"description\": null,\n      \"year\": 2024,\n      \"status\": \"active\",\n      \"deadline\": \"2025-07-31T23:59:59.000Z\",\n      \"filings\": []\n    }\n  ]\n}\n```\n\nPick the scenario UUID for the tax year you want to file for. The `filings` array shows any existing filings the user has for that scenario.\n\n### Step 4: Create a filing\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/filing \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"scenarioUUID\": \"09176dbe-f87c-4b11-b94d-f909fa3366d9\"}'\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"uuid\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n    \"status\": { \"status\": \"inProgress\", \"changedAt\": \"2025-01-19T10:30:00.000Z\" },\n    \"completed\": false,\n    \"year\": 2024,\n    \"scenario\": {\n      \"uuid\": \"09176dbe-f87c-4b11-b94d-f909fa3366d9\",\n      \"name\": { \"en\": \"Income Tax 2024\", \"de\": \"Einkommensteuer 2024\" },\n      \"year\": 2024\n    },\n    \"createdAt\": \"2025-01-19T10:30:00.000Z\"\n  }\n}\n```\n\nThe filing starts in `inProgress` state. Now you need to answer questions.\n\n### Optional: Prefill answers\n\nIf you already hold data about the user (name, address, tax ID, IBAN, self-employment revenue and costs, …), you can seed the filing with one call instead of letting the user re-type it:\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/answer/a1b2c3d4-.../prefill \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"personal\": {\n      \"firstName\": \"Max\",\n      \"lastName\": \"Mustermann\",\n      \"iban\": \"DE89370400440532013000\"\n    },\n    \"selfEmployment\": {\n      \"isSelfEmployed\": true,\n      \"revenue\": 85000,\n      \"equipmentItems\": [{ \"cost\": 1200, \"depreciationYears\": 3 }]\n    }\n  }'\n```\n\nPrefilled values are stored as defaults (`answered: false`), so the user still confirms them during normal navigation and progress stays at `0%` until they do. The endpoint is best-effort — unknown or invalid fields come back as `prefill.warnings[]` and the rest are applied.\n\nFor the full list of supported fields (`personal`, `selfEmployment`, `crypto` and `eur` groups) and partner integration patterns, see the **[Prefill a Filing](#description/7-prefill-a-filing)** section in the Partner Integration Guide.\n\n### Step 5: Get the first question\n\n```bash\ncurl https://api.anytax.io/api/v1/question/a1b2c3d4-e5f6-7890-abcd-ef1234567890/current \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"uuid\": \"12a55b49-05c3-455a-b48c-705dc401bca3\",\n    \"display\": {\n      \"text\": { \"de\": \"Wie lautet Ihr Vorname?\", \"en\": \"What is your first name?\" },\n      \"subtitle\": null,\n      \"tooltip\": null\n    },\n    \"input\": {\n      \"type\": \"text\",\n      \"placeholder\": { \"de\": \"\", \"en\": \"\" }\n    },\n    \"answer\": { \"type\": \"text\", \"text\": null },\n    \"status\": { \"answered\": false, \"complete\": false },\n    \"navigation\": {\n      \"section\": { \"uuid\": \"b2ac8f1d-...\", \"name\": { \"en\": \"About You\" } },\n      \"subsection\": { \"uuid\": \"f51d56fd-...\", \"name\": { \"en\": \"Personal Details\" } }\n    }\n  }\n}\n```\n\nThe `input.type` tells you what kind of UI control to render. The `answer` shows the current value (null if unanswered).\n\n### Step 6: Answer the question\n\n```bash\ncurl -X PUT \"https://api.anytax.io/api/v1/answer/a1b2c3d4-.../12a55b49-...?includeNext=true\" \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"value\": {\"type\": \"text\", \"text\": \"Max\"}, \"answered\": true}'\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"question\": { \"uuid\": \"12a55b49-...\", \"status\": { \"answered\": true, \"complete\": true } },\n    \"nextQuestion\": {\n      \"uuid\": \"next-question-uuid-...\",\n      \"display\": { \"text\": { \"en\": \"What is your surname?\" } },\n      \"...\": \"...\"\n    }\n  }\n}\n```\n\nWith `includeNext=true`, the response includes the next question — saving you an extra API call.\n\n### Step 7: Continue answering\n\nKeep submitting answers. You can also navigate with:\n\n- `GET /question/{filingUUID}/next` — next unanswered question\n- `GET /question/{filingUUID}/back` — previous question\n- `GET /question/{filingUUID}/section/{sectionUUID}` — all questions in a section\n\nWhen there are no more questions, `GET /question/{filingUUID}/next` returns `204 No Content`.\n\n### Step 8: Check progress\n\n```bash\ncurl https://api.anytax.io/api/v1/navigation/sections/a1b2c3d4-... \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"uuid\": \"b2ac8f1d-...\",\n      \"name\": { \"de\": \"\", \"en\": \"About You\" },\n      \"ruleType\": \"section\",\n      \"enabled\": true,\n      \"progress\": 100,\n      \"completed\": true,\n      \"usedFor\": \"personA\",\n      \"subsections\": [\n        {\n          \"uuid\": \"f51d56fd-...\",\n          \"name\": { \"en\": \"Personal Details\" },\n          \"ruleType\": \"section\",\n          \"enabled\": true,\n          \"progress\": 100,\n          \"completed\": true,\n          \"usedFor\": \"personA\"\n        }\n      ]\n    },\n    {\n      \"uuid\": \"15163f39-...\",\n      \"name\": { \"en\": \"Job\" },\n      \"ruleType\": \"section\",\n      \"enabled\": true,\n      \"progress\": 45,\n      \"completed\": false,\n      \"usedFor\": \"personA\",\n      \"subsections\": [\n        {\n          \"uuid\": \"28f5f0ab-...\",\n          \"name\": { \"en\": \"Wage Tax Certificate\" },\n          \"ruleType\": \"section\",\n          \"enabled\": true,\n          \"progress\": 100,\n          \"completed\": true,\n          \"usedFor\": \"personA\"\n        },\n        {\n          \"uuid\": \"f87bc1f3-...\",\n          \"name\": { \"en\": \"Commute Costs\" },\n          \"ruleType\": \"section\",\n          \"enabled\": true,\n          \"progress\": 0,\n          \"completed\": false,\n          \"usedFor\": \"personA\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nEach navigation node includes `usedFor` (`personA` = self, `personB` = spouse). Before joint filing is confirmed, only `personA` subsections are returned. After the user confirms joint filing (`isJointFiling: true` on `GET /filing/{filingUUID}`), parallel `personB` subsections appear. Partners should ignore `usedFor` on top-level sections and use it on subsections to drive Self / Spouse tabs — see the **[Joint Filing Integration Guide](#description/joint-filing-integration-guide)**.\n\nWhen all sections reach 100%, the filing automatically transitions from `inProgress` to `prepared`.\n\n### Step 9: View tax calculation\n\n```bash\ncurl \"https://api.anytax.io/api/v1/filing/a1b2c3d4-.../calculation?breakdown=true\" \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n```\n\nReturns the estimated tax refund or payment based on current answers. Use `breakdown=true` to see a detailed breakdown by category.\n\nFor **joint filings** (Ehegattensplitting), Person A values use the primary field name and Person B values use the same name with a `Spouse` suffix (for example `salariedIncome` / `salariedIncomeSpouse`, `incomeTaxDeductionFromWages` / `incomeTaxDeductionFromWagesSpouse`). The summary response (`breakdown` omitted or `false`) still includes per-spouse income fields where applicable; the detailed response adds per-spouse line items across work-related expenses, progression income, withholdings, and other categories.\n\n### Step 10: Verify identity\n\nOnce the filing is in `prepared` state (all sections 100% complete) performe the [identity verification](#description/how-to-verify-users-identity-using-anytax-api), if not done before for the user.\n\nFiling moves to `identityVerified`.\n\n### Step 11: Confirm and send for review\n\n```bash\ncurl -X POST https://api.anytax.io/api/v1/filing/a1b2c3d4-.../confirm \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n```\n\nFiling moves to `inReview`. **Answers become read-only after this point.**\n\n### Step 12: Track filing status\n\nAfter confirmation, the filing goes through an internal review by AnyTax before being submitted to the Finanzamt. Poll the filing endpoint to track status changes:\n\n```bash\ncurl https://api.anytax.io/api/v1/filing/a1b2c3d4-... \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n```\n\nAfter an internal review by AnyTax, the tax return is submitted to the Finanzamt. The status will change from `inReview` to `submitted`.\n\n---\n\n## Filing Status Lifecycle\n\n```\ninProgress ↔ prepared → identityVerified → inReview → submitted\n```\n\n| Status             | Meaning                       | Can edit answers?                                        | Next step                                                                |\n| ------------------ | ----------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------ |\n| `inProgress`       | User is answering questions   | Yes                                                      | Keep answering. Auto-transitions to `prepared` at 100%                   |\n| `prepared`         | All sections complete         | Yes (transitions back to `inProgress` if answers change) | Auto-transitions to `identityVerified` after user identity verification. |\n| `identityVerified` | User confirmed their identity | Yes                                                      | Confirm filing                                                           |\n| `inReview`         | Sent for review               | **No — read-only**                                       | Internal review by AnyTax, then submitted to Finanzamt                   |\n| `submitted`        | Submitted to the Finanzamt    | **No — read-only**                                       | Done                                                                     |\n\nAfter an internal review by AnyTax, the tax returns are submitted to the Finanzamt. Poll `GET /filing/{filingUUID}` to track this change.\n\nA filing can be deleted from any state via `DELETE /filing/{filingUUID}`.\n\n---\n\n## Question Types\n\nEach question has an `input.type` that determines what UI to render. The `input.type` always matches the `answer.type` in the response, so there's no mapping to memorize.\n\n| Input Type      | Description                                                                                                                                                                                   | PUT `value` body                                                        |\n| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |\n| `text`          | Free text field (may have validation: IBAN, BIC, tax ID)                                                                                                                                      | `{ \"type\": \"text\", \"text\": \"Max Mustermann\" }`                          |\n| `number`        | Numeric input (non-monetary, non-negative whole number, if [another validation](#description/number-and-amount-input-validation) is not specified (`min`, `max` or `regexp`))                 | `{ \"type\": \"number\", \"number\": 5 }`                                     |\n| `amount`        | Monetary input (render with currency symbol, non-negative whole number, if [another validation](#description/number-and-amount-input-validation) is not specified (`min`, `max` or `regexp`)) | `{ \"type\": \"amount\", \"number\": 52000 }`                                 |\n| `binary`        | Yes/No — UUIDs in `input.validation.yes/.no` (not `.options`)                                                                                                                                 | `{ \"type\": \"binary\", \"selected\": \"<uuid>\" }`                            |\n| `choice`        | Single select — UUIDs in `input.options`                                                                                                                                                      | `{ \"type\": \"choice\", \"selected\": \"<uuid>\" }`                            |\n| `multiSelect`   | Multiple select — UUIDs in `input.options`                                                                                                                                                    | `{ \"type\": \"multiSelect\", \"selected\": [\"<uuid>\", \"<uuid>\"] }`           |\n| `date`          | Single date picker                                                                                                                                                                            | `{ \"type\": \"date\", \"date\": \"2024-01-15\" }`                              |\n| `dateRange`     | Date range picker (start + end)                                                                                                                                                               | `{ \"type\": \"dateRange\", \"start\": \"2024-01-01\", \"end\": \"2024-12-31\" }`   |\n| `address`       | German address (full structure below)                                                                                                                                                         | `{ \"type\": \"address\", \"address\": { ... }, \"geoPlaceAddress\": null }`    |\n| `distanceGeo`   | Two addresses + distance between them                                                                                                                                                         | `{ \"type\": \"distanceGeo\", \"distance\": 12, \"from\": {...}, \"to\": {...} }` |\n| `dropdown`      | Single-select from a large list (100+ options)                                                                                                                                                | `{ \"type\": \"dropdown\", \"selectedValue\": \"married\" }`                    |\n| `instances`     | Numeric input: \"How many?\" (e.g., employers)                                                                                                                                                  | `{ \"type\": \"instances\", \"value\": 2 }`                                   |\n| `addAnother`    | Yes/No prompt: \"Add another?\" (see below)                                                                                                                                                     | `{ \"type\": \"addAnother\", \"added\": true }`                               |\n| `info`          | Informational screen, just a Continue button                                                                                                                                                  | `{ \"type\": \"info\", \"acknowledged\": true }`                              |\n| `wageTax`       | Wage tax certificate form (full structure below)                                                                                                                                              | `{ \"type\": \"wageTax\", \"taxYear\": 2024, \"grossWages\": 52000, ... }`      |\n| `capitalIncome` | Capital income certificate form                                                                                                                                                               | `{ \"type\": \"capitalIncome\", ... }`                                      |\n\n**`binary` — where to find the UUIDs.** Unlike `choice`/`multiSelect`, binary questions have no `input.options`. The two UUIDs live in `input.validation`:\n\n```json\n\"validation\": { \"yes\": { \"uuid\": \"e0bc3de3-...\" }, \"no\": { \"uuid\": \"9f171ee5-...\" } }\n```\n\nThe GET `answer` for binary returns a boolean (`true` = Yes chosen, `false` = No chosen), but the PUT body always requires the UUID string.\n\nFor `multiSelect`, `input.validation.noneOption` may hold a UUID for \"none of the above\" — if selected, it must not be combined with other UUIDs.\n\n**`address` — all fields:**\n\n```json\n{\n  \"type\": \"address\",\n  \"address\": {\n    \"street\": \"Am Bahnhof\",\n    \"houseNumber\": \"4\",\n    \"houseNumberSuffix\": null,\n    \"zipCode\": \"23558\",\n    \"city\": \"Lübeck\",\n    \"state\": \"Schleswig-Holstein\",\n    \"country\": \"Deutschland\",\n    \"extraInfo\": null\n  },\n  \"geoPlaceAddress\": null\n}\n```\n\n**`distanceGeo` — all fields:**\n\n```json\n{\n  \"type\": \"distanceGeo\",\n  \"distance\": 12,\n  \"from\": {\n    \"lat\": 53.867,\n    \"lng\": 10.67,\n    \"address\": {\n      \"street\": \"Am Bahnhof\",\n      \"houseNumber\": \"4\",\n      \"houseNumberSuffix\": null,\n      \"zipCode\": \"23558\",\n      \"city\": \"Lübeck\",\n      \"state\": \"Schleswig-Holstein\",\n      \"country\": \"Deutschland\",\n      \"extraInfo\": null\n    },\n    \"geoPlaceAddress\": null\n  },\n  \"to\": {\n    \"lat\": 52.52,\n    \"lng\": 13.405,\n    \"address\": {\n      \"street\": \"Unter den Linden\",\n      \"houseNumber\": \"1\",\n      \"houseNumberSuffix\": null,\n      \"zipCode\": \"10117\",\n      \"city\": \"Berlin\",\n      \"state\": \"Berlin\",\n      \"country\": \"Deutschland\",\n      \"extraInfo\": null\n    },\n    \"geoPlaceAddress\": null\n  }\n}\n```\n\n> [!TIP]\n> `distance` is **required** and must be a **whole positive number** (kilometers).\n> `lat`, `lng`, and `geoPlaceAddress` are **passthrough fields** — the backend stores and returns them as-is but does not read them for any computation. If the client doesn't geocode the address, set them to `null`.\n\n**`wageTax` (LStB)** — `taxYear` must equal `input.taxYear` from the question response. Use `WageTaxAnswer2024Dto` for 2022–2024, `WageTaxAnswer2025Dto` for 2025+. All numeric fields default to `0` if omitted. See the OpenAPI schema for the full list (~30 fields).\n\n```json\n{\n  \"type\": \"wageTax\",\n  \"taxYear\": 2024,\n  \"taxClass\": \"I\",\n  \"certificationPeriodStart\": \"2024-01-01\",\n  \"certificationPeriodEnd\": \"2024-12-31\",\n  \"grossWages\": 52000,\n  \"incomeTaxWithheld\": 8600,\n  \"solidaritySurcharge\": 0,\n  \"churchTax\": 0\n}\n```\n\n### Number and Amount input validation\n\nFor `number` and `amount` questions, value must be non-negative whole number, unless `min`, `max` or `regexp` is specified. Example:\n\n```json\n{\n  \"input\": {\n    \"type\": \"number\",\n    \"validation\": {\n      \"min\": -100,\n      \"max\": 100,\n      \"regexp\": \"^-?[0-9]+(\\\\.[0-9]{1,2})?$\"\n    }\n  }\n}\n```\n\n**_All validation fields are optional._**\n\n### Repeatable sections (`instances` + `addAnother`)\n\nSome sections repeat (e.g., multiple employers). These use two question types that work together:\n\n1. **`instances`** - \"How many employers do you have?\" User enters a number. Often hidden and auto-answered.\n2. **`addAnother`** - \"Would you like to add another employer?\" Shown after the user completes all questions for an instance.\n\nIf the user picks **Yes** on `addAnother`: call `POST /api/v1/answer/{filingUUID}/{questionUUID}/one-more`. The response contains the first question of the new instance. Navigate there.\n\nIf the user picks **No**: submit `{ \"type\": \"addAnother\", \"added\": false }` via the normal answer endpoint.\n\n---\n\n## Errors\n\n### HTTP Status Codes\n\n| Status | Meaning                                                                                      |\n| ------ | -------------------------------------------------------------------------------------------- |\n| `200`  | Request succeeded                                                                            |\n| `201`  | Resource created                                                                             |\n| `204`  | Success, no content (e.g., delete, or no more questions)                                     |\n| `400`  | Bad request — check the error code for specifics                                             |\n| `401`  | Missing or invalid authentication token                                                      |\n| `403`  | Forbidden — you don't have permission for this endpoint                                      |\n| `404`  | Resource not found                                                                           |\n| `409`  | Conflict — resource state prevents the action (e.g., filing is read-only)                    |\n| `410`  | Gone — resource has been deleted                                                             |\n| `422`  | Unprocessable — data is syntactically valid but semantically wrong (e.g., ELSTER validation) |\n| `500`  | Server error — something went wrong on our end                                               |\n| `503`  | Service unavailable — external dependency is down (e.g., ELSTER API)                         |\n\n### Domain Error Codes\n\nThese appear in the `error.code` field and help you handle specific failure cases:\n\n| Code                       | HTTP Status | When it happens                                                                                                                                                               |\n| -------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `YEAR_NOT_SUPPORTED`       | 400         | The requested year is not supported (e.g., `?year=1999`)                                                                                                                      |\n| `SCENARIO_INACTIVE`        | 400         | Trying to create a filing for an inactive scenario                                                                                                                            |\n| `INVALID_STATE_TRANSITION` | 400         | Filing can't move to the requested status (e.g., confirming a filing that's still `inProgress`)                                                                               |\n| `ANSWER_VALIDATION_FAILED` | 400         | Answer doesn't pass validation (wrong format, out of range, etc.). Check `error.details` for the validation message                                                           |\n| `INVALID_SELECTED_UUIDS`   | 400         | The selected option UUIDs don't match the question's available options                                                                                                        |\n| `CHILD_FOR_NONE_EXCLUSIVE` | 400         | The \"none of the above\" option was selected together with other options                                                                                                       |\n| `FILING_READ_ONLY`         | 409         | Trying to modify answers on a filing that's in `inReview` or `submitted` state. `error.details.messages` has full `en` and `de` user-facing text (and `filingUUID`, `status`) |\n| `GONE`                     | 410         | The filing or resource has been deleted                                                                                                                                       |\n| `ELSTER_VALIDATION_FAILED` | 422         | The tax office rejected the filing data — check `error.details` for the specific field                                                                                        |\n| `ELSTER_UNAVAILABLE`       | 503         | The ELSTER API is currently disabled or unreachable                                                                                                                           |\n\n---\n\n## Localization\n\nAll text content (question labels, section names, tooltips, validation messages) is returned in both German (`de`) and English (`en`):\n\n```json\n{\n  \"text\": {\n    \"de\": \"Wie lautet Ihr Vorname?\",\n    \"en\": \"What is your first name?\"\n  }\n}\n```\n\n\n---\n\n# Joint Filing Integration Guide\n\nThis guide explains how partner applications should use the **`usedFor`** field in the [Navigation API](#tag/navigation-api) response and the **`isJointFiling`** flag in the [Filing API](#tag/filing-api) to render section labels correctly for **self (personA)** and **spouse (personB)** during a joint tax return (Ehegattensplitting).\n\nLive API reference: [GET /api/v1/navigation/sections/{filingUUID}](/v1#tag/navigation-api/GET/api/v1/navigation/sections/{filingUUID})\n\n---\n\n## Overview\n\nJoint filing is a two-phase experience:\n\n| Phase             | Trigger                                             | Navigation behavior                                       | UI behavior                                                  |\n| ----------------- | --------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------ |\n| **Single filing** | Filing created; user has not confirmed joint filing | Subsections tagged `usedFor: \"personA\"` only              | No person tabs; show all subsections as a flat list          |\n| **Joint filing**  | User answers the joint-filing question              | Subsections for both `personA` and `personB` are returned | Show Self / Spouse tabs; filter subsections by active person |\n\nThe backend drives which subsections exist and who they belong to. The client uses **`GET /api/v1/filing/{filingUUID}`** to know whether to show the joint-filing UI, and **`GET /api/v1/navigation/sections/{filingUUID}`** to know which subsections belong to each person.\n\n---\n\n## Relevant APIs\n\n### 1. Get Filing — `GET /api/v1/filing/{filingUUID}`\n\nUse this endpoint to determine whether joint filing is active and to resolve tab labels.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"uuid\": \"filing-uuid\",\n    \"isJointFiling\": false,\n    \"firstNamePersonA\": \"Anna\",\n    \"lastNamePersonA\": \"Müller\",\n    \"firstNamePersonB\": null,\n    \"lastNamePersonB\": null,\n    \"status\": \"inProgress\",\n    \"year\": 2024\n  }\n}\n```\n\n| Field              | Type             | Description                                                                                                                          |\n| ------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| `isJointFiling`    | `boolean`        | `false` until the user confirms joint filing via a questionnaire answer. After that, becomes `true` and stays `true` for the filing. |\n| `firstNamePersonA` | `string \\| null` | Primary taxpayer first name. Use for the **Self** tab label when available.                                                          |\n| `firstNamePersonB` | `string \\| null` | Spouse first name. Populated once joint filing is confirmed. Use for the **Spouse** tab label when available.                        |\n\n**When to refetch:** After submitting any answer that may change filing metadata (especially the joint-filing question). Refetch filing detail in the background after answer submit so `isJointFiling` and spouse names stay current without blocking navigation.\n\n---\n\n### 2. Navigation Sections — `GET /api/v1/navigation/sections/{filingUUID}`\n\nReturns the full filing navigation tree: top-level **sections** (horizontal top nav) and nested **subsections** (left accordion nav).\n\nEach node is a `NavigationNodeDto`:\n\n| Field         | Type                     | Description                                    |\n| ------------- | ------------------------ | ---------------------------------------------- |\n| `uuid`        | `string`                 | Section or subsection identifier               |\n| `name`        | `{ en, de }`             | Localized display name                         |\n| `ruleType`    | `\"section\" \\| \"root\"`    | Node type                                      |\n| `enabled`     | `boolean`                | Whether the node is accessible                 |\n| `progress`    | `number`                 | Completion percentage (0–100)                  |\n| `completed`   | `boolean`                | Whether all questions in the node are complete |\n| `usedFor`     | `\"personA\" \\| \"personB\"` | Person association — see rules below           |\n| `icon`        | `string`                 | Optional; typically on top-level sections only |\n| `subsections` | `NavigationNodeDto[]`    | Child subsections                              |\n\n---\n\n## The `usedFor` Field — Rules\n\n### Parent sections (top-level)\n\n**Always render the default section label from `name`. Ignore `usedFor` on parent sections.**\n\nEven if the API includes `\"usedFor\": \"personA\"` on a parent section node, the top navigation must **not** split or relabel that section by person. Parent sections represent shared filing areas (e.g. _Income_, _Deductions_) and are shown once with their standard localized name.\n\n```\n✅ Show: section.name.en  →  \"Income\"\n❌ Do not show: \"Anna's Income\" or a person-specific variant based on usedFor\n```\n\n### Subsections (left navigation)\n\n**Use `usedFor` on subsections to associate them with a person.**\n\n| `usedFor` value | Meaning                                                                         |\n| --------------- | ------------------------------------------------------------------------------- |\n| `\"personA\"`     | Subsection belongs to the primary taxpayer (self)                               |\n| `\"personB\"`     | Subsection belongs to the spouse (only returned when `isJointFiling` is `true`) |\n\nWhen `isJointFiling` is `true`, filter the left nav to show subsections for the active person tab. Subsections with the same display name but different UUIDs represent parallel steps for each spouse (e.g. two wage certificate subsections).\n\n---\n\n## Lifecycle & Example Responses\n\n### Phase 1 — Before joint filing is confirmed\n\n- `GET /api/v1/filing/{uuid}` → `isJointFiling: false`\n- Navigation returns **personA subsections only** (`\"usedFor\": \"personA\"`)\n- No personB subsections are present yet\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"uuid\": \"section-income-uuid\",\n      \"name\": { \"en\": \"Income\", \"de\": \"Einkommen\" },\n      \"ruleType\": \"section\",\n      \"enabled\": true,\n      \"progress\": 25,\n      \"completed\": false,\n      \"usedFor\": \"personA\",\n      \"subsections\": [\n        {\n          \"uuid\": \"sub-wages-a-uuid\",\n          \"name\": { \"en\": \"Wage Tax Certificate\", \"de\": \"Lohnsteuerbescheinigung\" },\n          \"ruleType\": \"section\",\n          \"enabled\": true,\n          \"progress\": 50,\n          \"completed\": false,\n          \"usedFor\": \"personA\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Partner UI (Phase 1):**\n\n- Do **not** show Self / Spouse tabs (`isJointFiling === false`).\n- Render all subsections in a single list (no filtering by `usedFor`).\n- Top nav: show parent section names normally (ignore parent `usedFor`).\n\n---\n\n### Phase 2 — After user confirms joint filing\n\n1. User answers the joint-filing question (e.g. \"Do you want to file jointly?\" → Yes).\n2. Backend sets `isJointFiling: true` on the filing.\n3. Navigation API starts returning **personB subsections** in addition to personA.\n4. Spouse name fields may be populated on the filing response.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"isJointFiling\": true,\n    \"firstNamePersonA\": \"Anna\",\n    \"firstNamePersonB\": \"Max\"\n  }\n}\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"uuid\": \"section-income-uuid\",\n      \"name\": { \"en\": \"Income\", \"de\": \"Einkommen\" },\n      \"ruleType\": \"section\",\n      \"enabled\": true,\n      \"progress\": 40,\n      \"completed\": false,\n      \"usedFor\": \"personA\",\n      \"subsections\": [\n        {\n          \"uuid\": \"sub-wages-a-uuid\",\n          \"name\": { \"en\": \"Wage Tax Certificate\", \"de\": \"Lohnsteuerbescheinigung\" },\n          \"ruleType\": \"section\",\n          \"enabled\": true,\n          \"progress\": 100,\n          \"completed\": true,\n          \"usedFor\": \"personA\"\n        },\n        {\n          \"uuid\": \"sub-wages-b-uuid\",\n          \"name\": { \"en\": \"Wage Tax Certificate\", \"de\": \"Lohnsteuerbescheinigung\" },\n          \"ruleType\": \"section\",\n          \"enabled\": true,\n          \"progress\": 0,\n          \"completed\": false,\n          \"usedFor\": \"personB\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nNote:\n\n- Parent section still uses default label **Income** (parent `usedFor` is ignored in UI).\n- `sub-wages-a-uuid` and `sub-wages-b-uuid` are parallel subsections for each person (same display name, different UUIDs).\n\n**Partner UI (Phase 2):**\n\n- Show **two tabs**: Self and Spouse.\n- Tab labels: `firstNamePersonA ?? \"Self\"` and `firstNamePersonB ?? \"Spouse\"`.\n- Filter visible subsections for the active tab:\n\n```typescript\nconst visibleSubsections = subsections.filter((s) => s.usedFor === activeTab);\n```\n\nWhere `activeTab` is `\"personA\"` or `\"personB\"`.\n\n---\n\n## Recommended Client Implementation\n\n### Step 1 — Fetch both APIs\n\n```\nGET /api/v1/filing/{filingUUID}          → isJointFiling, firstNamePersonA, firstNamePersonB\nGET /api/v1/navigation/sections/{uuid}   → sections[].subsections[] with usedFor\n```\n\nRefetch navigation after answer submissions that may change subsection availability.\n\n### Step 2 — Render top navigation (parent sections)\n\n```typescript\nfunction getSectionLabel(section: NavigationNodeDto, locale: 'en' | 'de'): string {\n  return section.name[locale]; // never branch on section.usedFor\n}\n```\n\n### Step 3 — Render left navigation (subsections)\n\n```typescript\ntype UsedFor = 'personA' | 'personB';\n\nfunction getVisibleSubsections(\n  subsections: NavigationNodeDto[],\n  isJointFiling: boolean,\n  activeTab: UsedFor,\n): NavigationNodeDto[] {\n  if (!isJointFiling) {\n    return subsections;\n  }\n  return subsections.filter((s) => s.usedFor === activeTab);\n}\n```\n\n### Step 4 — Person tabs (joint filing only)\n\nWhen `isJointFiling === true`, render a tab bar above the subsection list:\n\n| Tab    | `activeTab` value | Label priority                           |\n| ------ | ----------------- | ---------------------------------------- |\n| Self   | `\"personA\"`       | `firstNamePersonA` → fallback `\"Self\"`   |\n| Spouse | `\"personB\"`       | `firstNamePersonB` → fallback `\"Spouse\"` |\n\nOn tab switch, navigate to the first enabled subsection for that person.\n\n### Step 5 — Sync tab with URL / deep links\n\n```typescript\nconst currentSubsection = subsections.find((s) => s.uuid === subsectionUuidFromUrl);\n\nif (isJointFiling && currentSubsection?.usedFor) {\n  setActiveTab(currentSubsection.usedFor);\n}\n```\n\n---\n\n## Section Completion (Joint Filing)\n\nWhen a section has `usedFor`-tagged subsections for both persons, treat the **parent section as incomplete** until **both** persons have completed their enabled subsections:\n\n1. Require at least one **enabled** subsection for `personA` **and** at least one **enabled** subsection for `personB`.\n2. All enabled subsections for each person must have `completed: true`.\n\nThis prevents marking a joint section complete while spouse subsections are still loading or disabled.\n\n---\n\n## Flow Diagram\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Client\n    participant FilingAPI as GET /filing/{uuid}\n    participant NavAPI as GET /navigation/sections/{uuid}\n\n    User->>Client: Start filing\n    Client->>FilingAPI: Fetch filing\n    FilingAPI-->>Client: isJointFiling: false\n    Client->>NavAPI: Fetch navigation\n    NavAPI-->>Client: Subsections with usedFor: personA only\n    Client->>User: Single subsection list (no tabs)\n\n    User->>Client: Answer joint filing = Yes\n    Client->>FilingAPI: Refetch filing\n    FilingAPI-->>Client: isJointFiling: true, firstNamePersonB\n    Client->>NavAPI: Refetch navigation\n    NavAPI-->>Client: personA + personB subsections\n    Client->>User: Self / Spouse tabs, filtered subsections\n```\n\n---\n\n## Tax Calculation — per-spouse fields\n\nOnce both partners' answers are in, **`GET /api/v1/filing/{filingUUID}/calculation`** returns\nthe computed result for **both** people. The per-person naming rule is the same one used\neverywhere else:\n\n> **Person A (primary taxpayer) → base field name. Person B (spouse) → same name + `Spouse`\n> suffix.** (e.g. `salariedIncome` → `salariedIncomeSpouse`.)\n\n`Spouse` fields are present **only** when `isJointFiling` is `true`; for single filings they\nare omitted and the base fields hold the single taxpayer's figures. A few values that German\ntax law treats jointly stay **combined** under a single base field — e.g. the\nwork-related-expenses `total`, the §10c special-expenses lump sum (doubled for couples), and\ncapital-income lump sums.\n\n### Response shape\n\n| `breakdown` query           | Response                           | Per-spouse detail                                                 |\n| --------------------------- | ---------------------------------- | ----------------------------------------------------------------- |\n| omitted / `false` (default) | totals (`TaxCalculationSummary`)   | still includes `salariedIncomeSpouse` and `ageReliefAmountSpouse` |\n| `true`                      | nested (`TaxCalculationBreakdown`) | full per-spouse line items in every category                      |\n\n### Where `Spouse` fields appear (breakdown)\n\nThe suffix rule applies throughout the breakdown — a representative (non-exhaustive) list:\n\n- **Income** — `salariedIncomeSpouse`, `ageReliefAmountSpouse`\n- **Work-related expenses** — `commuteCostsSpouse`, `workEquipmentSpouse`,\n  `homeOfficeCostsSpouse`, `trainingCostsSpouse`, `businessTripsSpouse`,\n  `additionalWorkRelatedCostsSpouse`, `professionalAssociationOrTradeUnionCostsSpouse`,\n  `lumpSumSpouse` (§9a Arbeitnehmer-Pauschbetrag)\n- **Progression income** — `wageReplacementBenefitsSpouse`,\n  `incomeReplacementBenefitsDESpouse`, `incomeReplacementBenefitsEUSpouse`\n- **Pension contributions** — `totalContributionsSpouse`, `maximumDeductibleAmountSpouse`\n- **Special expenses** — `churchTaxSpouse`, `donationsSpouse`, `jobEducationCostsSpouse`,\n  `permanentChargesSpouse`\n- **Extraordinary expenses** — `lumpSumForDisabilitySpouse`,\n  `lumpSumForSurvivingDependantsSpouse`\n- **Withholdings already paid** — `incomeTaxDeductionFromWagesSpouse`,\n  `incomeTaxDeductionOnCapitalIncomeSpouse`, `mobilityAllowanceSpouse`,\n  `solidaritySurchargeWithheldFromIncomeTaxSpouse`,\n  `solidaritySurchargeWithheldFromChurchTaxSpouse`,\n  `churchTaxWithheldFromIncomeTaxSpouse`, `churchTaxWithheldFromCapitalIncomeTaxSpouse`\n\n### Example (joint filing, summary)\n\n```jsonc\n// GET /api/v1/filing/{filingUUID}/calculation\n{\n  \"success\": true,\n  \"data\": {\n    \"totalIncome\": {\n      \"salariedIncome\": 52000, // Person A\n      \"salariedIncomeSpouse\": 38000, // Person B\n      \"ageReliefAmount\": 0,\n      \"ageReliefAmountSpouse\": 1140,\n      \"workRelatedExpenses\": 2300, // combined for both spouses\n      \"total\": 88840,\n    },\n    \"taxableIncome\": { \"...\": \"...\" },\n    \"incomeTaxPaymentOrRefund\": { \"...\": \"...\" },\n    \"deductibleTaxesPaid\": { \"...\": \"...\" },\n    \"total\": 1234.56, // positive = refund, negative = payment\n  },\n}\n```\n\nFor a **single filing** the same call returns no `Spouse` fields. Pass `breakdown=true` to get\nthe full nested per-spouse line items listed above.\n\n---\n\n## Checklist for Partners\n\n- [ ] **Parent sections:** Always show `name` — ignore `usedFor` on top-level section nodes.\n- [ ] **Phase 1 (`isJointFiling: false`):** Show all subsections without person tabs.\n- [ ] **Phase 2 (`isJointFiling: true`):** Show Self / Spouse tabs; filter subsections by `usedFor`.\n- [ ] **Tab labels:** Prefer `firstNamePersonA` / `firstNamePersonB` from filing API; fallback to \"Self\" / \"Spouse\".\n- [ ] **Refetch filing** after answers that may toggle joint filing or populate spouse names.\n- [ ] **Refetch navigation** after answers that unlock or add subsections.\n- [ ] **Deep links:** Auto-select the correct person tab from the active subsection's `usedFor`.\n- [ ] **Completion:** Require both persons' enabled subsections to be complete before treating a joint section as done.\n- [ ] **Tax calculation:** Read Person B values from the `Spouse`-suffixed fields; treat their absence as a single filing. Use `breakdown=true` for full per-spouse line items.\n\n---\n\n## FAQ\n\n**Q: Should I display different parent section titles for personA vs personB?**  \nA: No. Parent sections always use the default localized `name`, regardless of any `usedFor` value on the section node.\n\n**Q: Why do personA and personB subsections share the same display name?**  \nA: They represent the same logical step (e.g. wage certificate) for different people. They are distinct nodes with different UUIDs and different `usedFor` values. The person tab provides context.\n\n**Q: What if `isJointFiling` is true but personB subsections are not yet enabled?**  \nA: Show the Spouse tab, but personB subsections may appear disabled (`enabled: false`) until prior steps are completed.\n\n**Q: Can `usedFor` appear on questions or answers?**  \nA: This guide covers the **navigation** API only. Person association for questions is determined by the subsection's `usedFor` in navigation.\n\n**Q: How do I tell Person A and Person B apart in the tax calculation?**  \nA: Person A uses the base field name; Person B uses the same name with a `Spouse` suffix (e.g. `salariedIncome` / `salariedIncomeSpouse`). `Spouse` fields appear only when `isJointFiling` is `true`. See the **Tax Calculation — per-spouse fields** section above.\n\n\n---\n\n# Version Changelog\n\nRelease history for the AnyTax platform. Every released version gets an entry describing\nwhat end users get in that version — the features and fixes they can see in the product —\ntogether with the precise detail for anything observable to consumers of the public `/v1`\nAPI (new or changed endpoints, request and response fields, authentication, validation,\nand error behavior).\n\nInternal mechanics, back-office/administration changes and implementation details are\nintentionally excluded: this file is published as part of the public API documentation.\n\nEntries are ordered newest first. Change categories follow\n[Keep a Changelog](https://keepachangelog.com/): **Added**, **Changed**, **Fixed**,\n**Deprecated**, **Removed**, **Security**. Entries tagged **(API)** change the public `/v1`\nsurface and name the affected endpoints; untagged entries are product changes with no\npublic-API impact.\n\n---\n\n## 1.18.20 — 2026-11-25\n\n**Bug fixes and security updates.**\n\n**Changed**\n\n- Bug fixes and a few security updates.\n\n**Security**\n\n- **Captcha on sign-in and registration** — the registration, sign-in, password reset and\n  \"send me a new code\" forms now show a Cloudflare Turnstile check. **(API)**\n  `POST /api/v1/auth/register`, `POST /api/v1/auth/login`, `POST /api/v1/auth/send-otp` and\n  `POST /api/v1/auth/request-password-reset` now require the `X-Turnstile-Token` header with\n  the token from the Turnstile widget; a missing or rejected token answers 400 with the code\n  `TURNSTILE_FAILED`, and nothing is created or sent. Partner operations under\n  `/api/v1/partner/*` are unchanged and need no token.\n\n---\n\n## 1.18.19 — 2026-11-25\n\n**Bug fixes and security updates.**\n\n**Changed**\n\n- Bug fixes and a few security updates.\n\n---\n\n## 1.18.12 — 2026-11-09\n\n**Anlage EÜR asks for the type of income in two steps, requires the business details, offers yearly asset totals, adds Anlage SZ and Anlage S and can be filed for 2025; partners can prefill the EÜR and offer their product without the income-tax filing; tax assessments are matched to their filing reliably.**\n\n**Added**\n\n- **Yearly totals for assets** — instead of listing items one by one, users can enter the\n  yearly figures per group (software & licences, office & business equipment, other\n  equipment) and the net sale price of items sold. Vehicles stay one by one; items already\n  listed are kept but not counted while totals are used. A group whose year-end value would\n  fall below zero blocks completion. **(API)** New optional `eur` answer fields\n  `assetsMode` (`items` | `totals`), `assetTotals.{intangible|office|other}` with `cost`,\n  `bvStart`, `additions`, `special7g` (ignored for `intangible`), `afa`, `disposals`, and\n  `assetSaleProceeds`; `status: \"complete\"` is rejected with\n  `asset_totals_negative:<group>` when a group's year-end value is below zero.\n- **Anlage SZ with the EÜR** — when other loan interest is over €2,050, the EÜR return now\n  includes Anlage SZ: the non-deductible part of that interest is worked out from the year's\n  withdrawals, deposits and profit and added to the taxable profit.\n- **Anlage S on the income-tax return** — the taxable profit from the EÜR is carried to\n  Anlage S for freelance and other independent work owned by one person.\n- **Income tax and EÜR in one filing** — the EÜR can be part of the income-tax filing: users\n  answer both in one questionnaire, check them in one step and submit once. Two returns are\n  filed with ELSTER, each with its own PDF; without an EÜR only the income-tax return is\n  filed. The EÜR question starts at \"No\"; once the user answers \"Yes\", the filing can only be\n  submitted with a completed EÜR. **(API)** A prefill with an `eur` block sets the EÜR question\n  to \"Yes\" for the user to confirm. `POST /api/v1/elster` returns `pdfs` (`formType`\n  `ESt` | `EUER`, `pdfUrl`) and `GET /api/v1/filing/{filingUUID}/production-file` returns `pdfs`\n  (`formType`, `pdfUrl`, `submittedAt`, `transferTicket`), income tax first. On the\n  production-file endpoint the top-level fields keep describing the income-tax return; on\n  `POST /api/v1/elster`, `pdfs` lists the returns sent in that call and `pdfUrl` is the first.\n- **EÜR for 2025** — Anlage EÜR, AVEÜR and SZ can now be filed for 2025 as well as 2024. The\n  2025 income-tax return now also includes Anlage S, which from 2025 carries the business's\n  tax number.\n- **Partners without the income-tax filing** — a partner's product can be offered without\n  the income-tax filing. AnyTax sets this up for the partner account on request.\n- **EÜR prefill for partners** — partners with the year's bookkeeping can prefill the\n  Anlage EÜR; the user sees it as partner-prefilled and completes it in the EÜR element.\n  **(API)** `POST /api/v1/answer/{filingUUID}/prefill` accepts a new `eur` block with the\n  same fields as the `eur` answer, without `type` and `status`: business details,\n  `kleinunternehmer`, `amounts` keyed by EÜR category code, the allowance blocks, the\n  optional sections and assets. `GET /api/v1/answer/{filingUUID}/prefill` returns it in the\n  same shape while the user has not edited the EÜR. The block is best effort: an invalid\n  field or list item is dropped with a warning keyed by its path (e.g.\n  `eur.business.businessId`, `eur.assets.1`), and the rest is applied. New warning codes:\n  `CALCULATED_VALUE` (a calculated amount such as `commuter_allowance` was sent; AnyTax\n  computes it instead) and `ALREADY_EDITED` (the EÜR already holds values that did not come\n  from a partner prefill, so the block was not applied). `{ \"clear\": true }` removes an EÜR\n  prefill the user has not edited.\n- **Supporting documents** — once the return has been submitted, the white-label app offers\n  \"Submit additional documents\" on the filing overview (enabled by AnyTax on request for a\n  partner), where PDF documents are added to the return (up to 20 files, 10 MB and 100 pages per\n  file, 36.91 MB in total; password-protected PDFs and duplicates are rejected) and sent to the\n  tax office through ELSTER. **(API)** New endpoints under\n  `/api/v1/filing/{filingUUID}/documents` for listing, uploading, deleting, downloading and\n  sending documents; see the partner integration guide.\n- **Return to partner** — a partner can set a return URL in the partner dashboard under\n  Settings. The white-label app then shows a \"Back to {partner name}\" button that ends the\n  session and redirects to that URL with `userId`, `filingUUID` and `status` appended as\n  query parameters; the next visit needs a new SSO handoff. **(API)**\n  `GET /api/v1/partner/by-slug/{slug}` now returns `name` and `returnUrl` (both `null` when\n  not set).\n- **Self-employment in the tax estimate** — the income-tax estimate now includes the profit\n  from the EÜR in the filing (freelance and other independent work owned by one person), and\n  credits the income tax, solidarity surcharge and church tax prepaid during the year. Church\n  tax prepaid during the year also counts as a special expense and is included in the church\n  tax paid on Anlage SA of the income-tax return, and the profit counts towards\n  the age relief for taxpayers aged 65 and over. **(API)**\n  `GET /api/v1/filing/{filingUUID}/calculation` returns `totalIncome.selfEmployedIncome`\n  (and `selfEmployedIncomeSpouse` on joint filings) when the filing has an EÜR, and\n  `incomeTaxPrepayments`, `solidaritySurchargePrepayments` and `churchTaxPrepayments` under\n  `deductibleTaxesPaid` (with `breakdown=true`) when prepayments were made; the related totals\n  include them.\n\n**Changed**\n\n- **Anlage EÜR business details** — the type of income is asked first (trade business or\n  independent work); independent work is then split into freelance work or something else. Whose business it is and whether land or a building was sold or taken out of the\n  business must now be answered. **(API)** Every `eur` save now also requires\n  `business.owner` and `business.propertyWithdrawn` (400 `EUR_ANSWER_INVALID` with\n  `business_owner_required` / `business_property_withdrawn_required` in `details`).\n- **Business address or tax number is required** — the business needs either a full\n  address (street, postcode and town) or a tax number, and a tax number must be valid for\n  the selected tax office. **(API)** An `eur` save is rejected with 400 `EUR_ANSWER_INVALID`\n  and `business_address_or_tax_number_required`, `business_address_incomplete` (address\n  started but street, postcode or town missing) or `business_tax_number_invalid` in\n  `details`.\n- **Scenarios state which return they file** — **(API)** `GET /api/v1/scenarios` and\n  `GET /api/v1/scenarios/{scenarioUUID}` return `formType`: `ESt` (income tax) or `EUER`\n  (Anlage EÜR).\n- **Private money in or out is required when other loan interest is over €2,050** — that\n  amount triggers Anlage SZ, which needs the year's withdrawals, income tax paid from the\n  business and money paid in (0 is allowed). **(API)** While `amounts.exp_interest_other`\n  is over 2,050 and any of `exp_private_withdrawal`, `exp_income_tax_payment`,\n  `inc_capital_contribution` is missing, `status: \"complete\"` is rejected with\n  `private_money_required`.\n- **Pre-filled filings open directly in the question flow** — for partners with the new\n  option enabled, a prefilled filing skips the review screen and opens in the question\n  flow.\n- **Your profile includes your user id** — **(API)** `GET /api/v1/auth/me` now returns\n  `id`, the same numeric user id that Register and Login return and that the white-label\n  app passes as `userId` in a partner's return URL.\n- **Higher limit for other insurances without health subsidies** — users who pay their health\n  insurance without tax-free subsidies (for example freelancers) can now deduct other\n  insurances up to €2,800 instead of €1,900; the estimate uses the higher limit and the return\n  tells the tax office that no subsidies were received. On joint filings each spouse gets their\n  own limit.\n\n**Fixed**\n\n- **Loss carryforward with a negative total income** — when the total income is negative\n  (for example a loss from self-employment), the tax estimate no longer shows a negative\n  deduction of carried-forward losses that cancelled the loss; the deduction is now 0 and the\n  full carryforward remains for other years.\n- **A business sold or given up can be filed** — the EÜR now asks for the adjustments on\n  switching the profit method (Zeile 89) when the business was sold or given up; they count\n  towards the profit and are sent as 0 when left empty. **(API)** New optional signed\n  `eur` answer field `business.closureAdjustment`, used only with `business.closed: \"sold\"`.\n- **Business identification number** — the check digit is now validated, so an invalid\n  number is caught while entering it instead of when the return is sent. **(API)** An `eur`\n  save is rejected with `business_id_invalid` also for a wrong check digit.\n- **VAT collected is required with taxable sales** — once sales with German VAT are entered,\n  the VAT collected on them must be entered too (0 is allowed). **(API)** `status: \"complete\"`\n  is rejected with `vat_collected_required` while `amounts.se_revenue_vat_taxable` is set and\n  `amounts.se_vat_collected` is missing.\n- **Days can't exceed the year** — commuting days and working-from-home days above the\n  number of days in the tax year block completion. **(API)** New blocker\n  `commute_days_too_many`.\n- **Profit estimate matches the return** — the EÜR profit estimate now includes the Anlage SZ\n  add-back and the closure adjustment, so it equals the taxable profit sent to the tax\n  office. **(API)** `totals.profit` of the EÜR preview is now that taxable profit.\n- **Prefill with several entries of the same kind** — when a prefill carries more than one\n  entry of the same kind (for example two employers), the user now sees all of them in the\n  filing; before, the entries after the first could stay hidden behind the \"Add another?\"\n  question.\n- **Tax assessments that were not matched at first** — a tax assessment (Bescheid) that\n  could not be matched to its filing when it arrived is now matched on a later check instead\n  of staying unmatched.\n- **Matched tax assessments stay matched** — a tax assessment (Bescheid) that was already\n  matched to its filing no longer falls back to \"pending\" after a later check, assessments\n  for joint filings are matched to the right filing, and the tax office shown with an\n  assessment is now the correct one.\n- **EÜR prefill reports inputs it can't use** — vehicle costs, trips and VAT flags that the\n  EÜR would not count are no longer accepted silently. **(API)** In the `eur` block of\n  `POST /api/v1/answer/{filingUUID}/prefill`, these are now dropped with an\n  `INVALID_VALUE_TYPE` warning: a `vehicles` item whose `assetId` is not a vehicle in\n  `assets` (or repeats one), a `trips` item whose destination is not in\n  `GET /api/v1/eur/{filingUUID}/meal-destinations` for the tax year, and `vatCharged` when\n  `kleinunternehmer` is `true`. Trip destinations match regardless of case and are stored in\n  the table's spelling; `countryEn: \"Germany\"` is accepted for a domestic trip, and the\n  `cityEn` of a country with a single rate is not needed.\n\n## 1.18.11 — 2026-10-26\n\n**Maintenance release — no changes to the income-tax filing or the public API in this version.**\n\n## 1.18.9 — 2026-10-22\n\n**Partners can let their users import their wage tax certificates from ELSTER, and the refund\nestimate applies the €4,500 limit to the commute allowance.**\n\n**Added**\n\n- **Business income on Anlage EÜR and AVEÜR in the income-tax filing** — users with a\n  business or freelance work can enter their business details, income and running costs, and then their year-end allowances (commute,\n  private use of each business vehicle, working from home, goods taken privately) and\n  optional sections for assets, business trips with meal allowance, private-vehicle trips,\n  gifts, business meals and private money in or out. Allowances, depreciation, private use\n  and the deductible / non-deductible splits are always calculated, never typed in. A\n  Kleinunternehmer gets the Kleinunternehmer income fields and no VAT fields. **(API)** New\n  question input type `eur` (`EurInput`, with `taxYear`) and answer type `eur`\n  (`EurAnswerDto`) on `PUT /api/v1/answer/{filingUUID}/{questionUUID}`. Every save\n  requires `business.name` and rejects a postal code that is not 5 digits, a business ID\n  not shaped like `DE123456789-00001`, and `kleinunternehmer: true` while VAT amounts are\n  present; `status: \"complete\"` is rejected until every allowance is answered or declared\n  none. Rejections return 400 `EUR_ANSWER_INVALID` with the reasons in `details`. New\n  `POST /api/v1/eur/{filingUUID}/preview` returns all calculated values for an `eur` answer\n  without saving it, and `GET /api/v1/eur/{filingUUID}/meal-destinations` lists the\n  meal-allowance destinations with their rates for the filing's tax year.\n- **Import from ELSTER** **(API)** — with the user's consent, a partner can ask the tax office\n  for access to the data it holds about the user (valid for 10 years unless removed) and import\n  the wage tax certificates for the filing's year (2024 or 2025), one per employer. The user\n  approves the request in Mein ELSTER or with the activation code that arrives by post.\n  Imported values stay unconfirmed and are marked \"Pre-filled from ELSTER\" until the user\n  confirms them; certificates the user entered are kept, and importing again replaces the\n  earlier import. New endpoints, available only where ELSTER import is offered:\n  - `GET /api/v1/vast/{filingUUID}/authorizations` returns `enabled`, `available`, the known\n    `taxId` and `dateOfBirth`, and `authorization` (`id`, `status`, `requestedAt`,\n    `approvableUntil`, `validUntil`, or `null`). `status` is one of `open`, `approved`,\n    `rejected`, `expired`, `revoked`, `ignored`, `obsolete`.\n  - `POST /api/v1/vast/{filingUUID}/authorizations` with `consent: true`, `taxId` (11\n    digits, valid check digit) and `dateOfBirth`; `replace: true` cancels the pending\n    request and sends a new one. The user's own open or approved access that already exists\n    for the tax ID is returned instead of a new request. 409 `ELSTER_REQUEST_LIMIT` when\n    access for the tax ID was already requested that day (ELSTER accepts one request per day).\n    The tax ID and date of birth are saved to the user's account and the filing once ELSTER\n    accepts the request; a submitted filing keeps its values.\n  - `POST /api/v1/vast/authorizations/{id}/activate` with `code` (`XXXX-XXXX-XXXX`). Five\n    wrong codes cancel the request.\n  - `DELETE /api/v1/vast/authorizations/{id}` removes the access; imported values stay.\n  - `POST /api/v1/vast/{filingUUID}/import` imports the wage tax certificates and returns\n    `imported`, `existingCertificates` (certificates the user already had) and `warnings`\n    (`employer`, `code`: `unreadable`, `unsupportedVersion`, `otherTaxId`, `otherYear` — not\n    imported; `alreadyImported` — imported before and confirmed, left as it is;\n    `taxClassMissing`, `multiplePensions`, `multiYearPensionNotImported` — imported with those\n    lines left empty). Importing also answers \"employed\" with yes.\n    409 when access is not approved or the filing is in review or submitted.\n  - Question answers carry `status.prefilledFromElster: true` while they hold an unconfirmed\n    imported value.\n\n  ELSTER refusals return 422 `ELSTER_REQUEST_REJECTED`, with `elsterCode` and `elsterText` in\n  `details` for a refused activation code; 503 `ELSTER_UNAVAILABLE` when ELSTER cannot be\n  reached. Requesting access, entering a code, importing and removing access share a limit of\n  5 calls per user and minute (429).\n\n**Fixed**\n\n- **Refund estimate applies the €4,500 limit to the commute allowance** — the distance flat\n  rate for commuting by public transport, bicycle, on foot or as a carpool passenger is capped\n  at €4,500 per person and year, as required by law. Kilometres driven by own or company car\n  stay uncapped, and actual public transport costs above the limit are still deducted in full.\n  Previously, long public transport commutes overestimated the refund. Actual public transport\n  costs are now compared with the flat rate for the whole year rather than per commute period,\n  so estimates with several commute periods may be slightly lower.\n\n## 1.18.8 — 2026-09-29\n\n**The country of every address is picked from the list the tax authority recognises, and\nmaintenance fixes for the income-tax filing: questions that depend on an address answer are\nskipped correctly, the \"Add another entry?\" step is named properly, and support and\naccount-closure requests answer with a readable confirmation.**\n\n**Added**\n\n- **Country is picked from a list in every address** — the country field of an address\n  question is now a searchable list of the 221 countries the German tax authority\n  recognises, instead of free text. Picking a place on the map fills it in automatically,\n  and the name is stored in the spelling ELSTER expects, so a country can no longer be\n  misspelled, left in the wrong language, or rejected for being too long. **(API)** New\n  `GET /api/v1/countries` returning `code`, `labelDe` and `labelEn` for each country.\n  Address answers (`address`, `distanceGeo`) accept an optional `countryCode` from that\n  list; when it is sent, `country` is returned as the catalogue name for that code. An\n  address sent with only a `country` name keeps working and is matched to a code where\n  the name is recognised.\n\n**Fixed**\n\n- **Income-tax filing: questions that depend on an address answer are skipped correctly** — for\n  example, in the children section a question that should be hidden once an address in Germany\n  is entered is no longer asked.\n- **\"Add another entry?\" steps are named properly** — the step asking whether to add a further\n  entry (another employer, child, etc.) now shows \"Add another entry?\" / \"Weitere Angabe?\" in\n  navigation and summaries instead of an internal identifier.\n- **(API)** `POST /api/v1/user/me/support` and `POST /api/v1/user/me/account-closure-request`\n  now return a human-readable confirmation in `message` (\"Your message has been sent. We will\n  get back to you soon.\" / German equivalent) instead of the placeholder `support.success`.\n\n## 1.18.7 — 2026-09-17\n\n**Maintenance release — no changes to the income-tax filing or the public API in this version.**\n\n## 1.18.6 — 2026-09-15\n\n**ELSTER submissions no longer fail on long or foreign addresses or on children's data (Anlage\nKind).**\n\n**Fixed**\n\n- **ELSTER submissions no longer fail on long or foreign addresses** — the sender's town is\n  sent within ELSTER's 29-character limit, and the country is only included for addresses\n  outside Germany.\n- **Children's data (Anlage Kind) is submitted to ELSTER without validation errors** for\n  filings with one or more children, for tax years 2024 and 2025.\n\n## 1.18.5 — 2026-09-07\n\n**Cross-validation errors now link straight to the question that needs fixing, and rules that\nsum across repeated entries are checked as soon as an answer is saved.**\n\n**Added**\n\n- **Clickable links in cross-validation error messages** — when a validation error is caused by\n  a specific other question, the error message now includes a link that takes the user straight\n  there instead of leaving them to find it manually. When the cause spans a repeated section with\n  more than one entry (e.g. multiple children or employers) and the exact entry can't be\n  determined, the link lands on the relevant section/subsection instead of guessing the wrong one.\n\n**Fixed**\n\n- **Cross-validation rules using `sumInstance` now catch problems immediately** — previously,\n  a rule summing values across repeated entries (e.g. a running donation total) only got checked\n  when preparing to submit; it's now also checked as soon as a relevant answer is saved, so the\n  user sees the problem right away instead of only at the end. The submit-time check still runs\n  as a full safety net.\n\n## 1.18.4 — 2026-08-26\n\n**Children are now part of the submitted tax return, and partner administrators sign in to the\npartner dashboard with their own personal accounts.** Partners can also read back and remove\nthe data they pre-filled onto a filing.\n\n**Added**\n\n- **Children are submitted with the tax return (Anlage Kind)** — the answers about\n  children are now transmitted to the tax office as a full Anlage Kind, one per child,\n  for the 2024 and 2025 tax years. It covers the child's identification and periods of\n  entitlement, the parents and the child's relationship to them, education, training and\n  disability details, childcare costs, school fees, the transfer of the child allowance\n  and of the disability lump sum, the training allowance, and the single-parent relief\n  amount. Previously these answers were collected but not part of the submission.\n- **Read back a filing's prefill** (API) — new `GET /api/v1/answer/{filingUUID}/prefill`\n  returns the data a partner prefilled onto a filing that the user has not confirmed or\n  edited yet, in the same shape `POST /api/v1/answer/{filingUUID}/prefill` accepts:\n  `partnerSlug` plus the `personal`, `selfEmployment` and `crypto` blocks, each carrying\n  only the fields that hold a value. Blocks with nothing prefilled are omitted, and a\n  filing with no prefill answers with `partnerSlug: null` and no blocks.\n- **Remove a filing's prefill** (API) — `POST /api/v1/answer/{filingUUID}/prefill` accepts\n  `{ \"clear\": true }` to remove the prefill from the filing again: every value still\n  marked as prefilled is blanked, while values the user has already confirmed or edited\n  are kept. Idempotent; other keys in a `clear` request are ignored. The filing app uses\n  this when the user chooses to start without the pre-filled data.\n- **Partner dashboard filing progress** — the filings list in the partner dashboard now\n  shows how complete each started tax return is.\n- **Checks that span every entry of a repeated section** (API) — a validation rule can\n  now look across all entries at once (for example the total of all donations, or\n  \"at least one entry has private health insurance\"). Conditions of the \"at least one\"\n  kind are checked while answering; totals are checked when the return is prepared for\n  submission, so `POST /api/v1/filing/{filingUUID}/confirm` can answer with HTTP 400 and\n  the error code `CROSS_VALIDATION_AGGREGATE_FAILED`, carrying `messages` (German and\n  English), `validationReason` and `ruleId`.\n\n**Changed**\n\n- **Partner dashboard sign-in uses personal accounts** — partner administrators now\n  sign in to the partner dashboard with their own email and password plus a 6-digit\n  email one-time code, instead of the shared organization credentials. New\n  administrators register on the partner portal and are activated by the AnyTax team.\n  The partner API secret is no longer a login credential and remains valid only for the\n  partner API; rotating it no longer ends dashboard sessions. Dashboard headings and\n  filter texts were updated alongside.\n- **Empty sections and headings are hidden** (API) — sections, subsections and headings\n  whose questions are all suppressed are no longer returned by\n  `GET /api/v1/navigation/sections/{filingUUID}` or by the question endpoints, so they no\n  longer appear as empty tabs and empty groups, and Next/Previous no longer dead-ends on\n  a fully suppressed section. `GET /api/v1/navigation/sections/{filingUUID}` for an\n  unknown filing now answers `404` instead of `500`.\n- **Repeated entries are evaluated independently** — in a repeated section (several\n  employers, several children), answering in one entry no longer shows or hides questions\n  in another entry.\n- **Pre-filled data is reviewed in a dialog over the dashboard** — the partner pre-fill\n  review now opens on top of the tax-return dashboard instead of on its own page, and\n  shows only the fields the partner actually sent, with no placeholder examples. It can\n  be closed without deciding — the data stays until the user accepts it or chooses to\n  start without it, which now removes it for good. Pre-filled addresses can carry a\n  house-number suffix and an address line 2, and the crypto block accepts several\n  capital-income types.\n\n**Fixed**\n\n- **Multi-select prefill applies the valid options instead of rejecting the whole field**\n  (API) — when a multi-select prefill value (e.g. `crypto.capitalIncomeTypes`) contains\n  options the selected tax year does not offer, `POST /api/v1/answer/{filingUUID}/prefill`\n  now applies the valid options and reports the ignored ones in a warning, instead of\n  dropping the entire field. A selection with no valid option still fails with a warning\n  as before.\n- **Closed accounts no longer get stuck in the app** (API) — when an account is closed\n  while the user still has the app open, the next action signs the user out and returns\n  them to the login page, instead of showing a consent dialog that could never be\n  completed. Every authenticated endpoint now answers a closed or revoked account with\n  `401` and the error code `ACCOUNT_DEACTIVATED` or `ACCOUNT_REVOKED`; these cases\n  previously returned `403`.\n- **Rounded totals in the submission match the underlying figures** — totals that the tax\n  office expects in whole euros are now rounded once, after adding the individual\n  certificates together, instead of rounding every certificate first. Sums across several\n  wage-tax certificates or capital-income statements no longer drift by a euro or two.\n- **Zero amounts are no longer dropped from the submission** — a reimbursement entered as\n  0 for a disability, funeral or other extraordinary expense is now transmitted as 0, and\n  the corresponding total is submitted even when it comes out at 0, as the tax office\n  expects.\n\n---\n\n## 1.18.3 — 2026-08-14\n\n**The pre-filing eligibility check becomes a partner-ready API, and the question flow gets\ndramatically faster.** New users on the default portal also land on a redesigned welcome screen\nthat explains the product in plain language — in German and English.\n\n**Added**\n\n- **Eligibility check API** (API) — the pre-filing eligibility check is now fully\n  API-driven and available to partners for anonymous pre-signup checks (partner bearer\n  token) as well as to logged-in users:\n  - `GET /api/v1/filing-eligibility-check/questions` (query `taxYear`, `locale`) returns\n    the versioned question set: `questionSetVersion` plus questions with options,\n    `allowMultiple` and `isClearing` flags.\n  - `POST /api/v1/filing-eligibility-check/evaluate` evaluates a full or partial answer\n    set and returns `outcome` (`supported` | `unsupported` | `pending`), `triggeredBy`,\n    an explanatory `message` and a `notifyOffer` flag. Evaluation always runs against the\n    submitted `questionSetVersion`, even if a newer set exists.\n  - `POST /api/v1/filing-eligibility-check/notify` registers a notify-me request;\n    `email` is required with a partner token and ignored for logged-in users (the\n    account's address is used). Repeat signups update the existing record.\n  - New error codes: `ELIGIBILITY_QUESTION_SET_VERSION_NOT_FOUND` (HTTP 422) and\n    `ELIGIBILITY_INVALID_ANSWER` (HTTP 400).\n- **Redesigned welcome screen** — the default login, registration and password-reset\n  pages now introduce the product (key benefits, the average refund, trust badges) in\n  German and English; partner portals keep their own branding and colors.\n\n**Changed**\n\n- **Question flow is significantly faster** — answering a question completes in a single\n  round trip, answers that unlock or hide other questions save an order of magnitude\n  faster, and moving between questions no longer waits for navigation refreshes except\n  at section boundaries.\n\n**Fixed**\n\n- **Eligibility check back-navigation** — going back in the eligibility check and\n  choosing a different path no longer counts answers from questions that were backed\n  out of.\n\n**Removed**\n\n- **`POST /api/v1/filing-eligibility-check`** (API) — the endpoint that only recorded a\n  completed check result has been removed; use the new\n  `POST /api/v1/filing-eligibility-check/evaluate` flow instead.\n\n## 1.18.2 — 2026-08-06\n\n**Crypto data can now arrive pre-filled from a connected partner.** A partner that holds a\nuser's crypto tax report can hand those figures straight into the return, and every answer\nfilled in that way stays visibly marked as the partner's until the user confirms it.\nThe eligibility check also stops turning people away over foreign investments it can in\nfact handle.\n\n**Added**\n\n- **Crypto tax report prefill** (API) — `POST /api/v1/answer/{filingUUID}/prefill` accepts a new\n  `crypto` block for crypto tax report datapoints: `incomeTypes` (multi-select enum:\n  `income_from_sale_of_crypto_assets`, `capital_income_from_crypto`,\n  `recurring_income_from_crypto`), `saleDescription`, `saleRevenue`, `saleAcquisitionCosts`,\n  `capitalGainsDomestic`, `capitalGainsInternational`, `capitalGainsForwardProfit` (tax year 2024\n  only; derived as domestic + international when omitted), `capitalGainsForwardLoss` (tax year\n  2024 only), `recurringDescription`, `recurringRevenue`. All money amounts are whole-euro\n  integers; fractional values are rejected with an `INVALID_VALUE_TYPE` warning.\n- **Crypto capital income types** (API) — the `crypto` prefill block accepts a new\n  `capitalIncomeTypes` multi-select (enum: `domestic_crypto_capital_income`,\n  `foreign_crypto_capital_income`, `crypto_profit_from_forward_transactions`,\n  `crypto_loss_from_forward_transactions`). When omitted, the selection is derived\n  automatically from the capital-gains fields sent: domestic gains select \"domestic\",\n  international gains select \"foreign\", any of domestic/international/forward profit selects\n  \"profit from forward transactions\", and a forward loss selects \"loss from forward\n  transactions\".\n- **Partner-prefilled answers are labeled in the filing UI** (API) — answers populated through the\n  partner prefill endpoint now report `status.prefilledFromPartner` (the partner slug) in question\n  and answer responses until the user confirms or edits the answer. The filing UI shows a\n  \"Pre-filled from [partner]\" label beneath such answers, alongside the existing \"Pre-filled from\n  your [year] tax return\" label for answers carried over from a previous filing.\n\n**Changed**\n\n- **Prefill screen reflects the connected partner** — the prefill screen now names the connected\n  partner in its introduction and pre-fills crypto datapoints; the self-employment demo block was\n  removed.\n- **The eligibility check no longer rejects foreign investments it supports** — dividends, interest\n  and gains from shares or bonds held at a bank or broker outside Germany are supported, including\n  creditable foreign withholding tax, and no longer count as a foreign tie that blocks filing. The\n  questions now name what genuinely is not supported yet — ETFs and investment funds in a depot\n  that issues no German Steuerbescheinigung (Anlage KAP-INV) — and spell out the foreign salary,\n  rental, pension and business cases in plain language. Crypto gains were also dropped from the\n  list of unsupported income, since they are filed as of 1.18.1.\n\n**Fixed**\n\n- **Crypto capital income types are now pre-selected for tax year 2025** (API) — when\n  `crypto.capitalIncomeTypes` is omitted from `POST /api/v1/answer/{filingUUID}/prefill` and\n  derived from the capital-gains fields, the derived selection is limited to the options the\n  filing's tax year offers. Previously a 2025 filing received no selection at all, because the\n  derivation always included the forward-transaction options that only exist for tax year 2024.\n\n---\n\n## 1.18.1 — 2026-08-04\n\n**Crypto is now part of the return that gets filed.** Crypto income has been part of the\ntax calculation since 1.17.100; from this version it is also reported to the tax authority.\n\n**Added**\n\n- **Crypto income is reported in the filed return** — for tax years 2024 and 2025, a return that\n  contains crypto answers is now filed with the crypto income included:\n  - **Anlage SO** is filed for the first time, covering recurring income (mining, forging, staking,\n    lending, airdrops — § 22 Nr. 3 EStG) and disposals of virtual currencies inside the one-year\n    holding period (§ 23 EStG), where the gain or loss is derived from sale price, acquisition cost\n    and expenses.\n  - **Anlage KAP** now also reports crypto capital income under § 20 EStG that was entered directly\n    and carries no domestic withholding.\n  - In a joint filing each spouse is reported separately. A return without crypto answers is filed\n    exactly as before.\n- **Account closure** (API) — users can request the closure of their account from the account page,\n  confirming it in a dialog that explains what happens next.\n  `POST /api/v1/user/me/account-closure-request` — an authenticated user can request that their account be closed. The request is sent to the support team on behalf of the authenticated user (identity derived server-side). Optional body fields: `message`, `locale`, `meta`. Rate-limited to 3 requests per minute.\n- **Cross-year personal-data prefill** (API) — when starting a new filing, the user is offered the\n  personal answers from a previous year's submitted filing and can accept or dismiss the offer;\n  prefilled values stay visibly unconfirmed until the user confirms them in the question flow. On\n  the API side it pre-fills the personal sub-sections of a new filing from a prior submitted filing\n  of another tax year:\n  - `GET /v1/answer/prefill-sources` lists the filings usable as a source (newest year first), each\n    with `filingUUID`, `year`, `isJointFiling`, and `updatedAt`. A filing qualifies once the user\n    has finished it and can no longer edit it — status `inReview`, `submitted` or `processed`, so a\n    prior year stays available after the tax office has responded. Passing any other filing as\n    `sourceFilingUUID` returns `400`.\n  - `POST /v1/answer/{filingUUID}/prefill-from-filing` copies the selected sub-sections\n    (`basicIdentity`, `familyStatus`, `religiousStatus`, `employmentProfile`, `taxBankDetails`)\n    from `sourceFilingUUID` into the target filing. Copied values stay unconfirmed\n    (`answered: false`) and carry a `prefilledSourceYear` provenance marker until the user\n    confirms them in the question flow. Selection answers (choice/multi-select/yes-no) are\n    remapped to the target year's options and cascade branch visibility exactly as if the user\n    had answered them. Spouse data is copied only when `includeSpouse` is set AND the source\n    filing was a joint filing. Best-effort: unmappable keys are reported in\n    `prefill.warnings` with machine-readable codes (`KEY_NOT_IN_SOURCE`, `KEY_NOT_IN_TARGET`,\n    `UNMAPPABLE_OPTION`, `OPTION_NOT_IN_TARGET`, `RULE_TYPE_CHANGED`, `EMPTY_SOURCE`,\n    `SPOUSE_NOT_AVAILABLE`, `TARGET_ALREADY_ANSWERED`); already-confirmed target answers are\n    never overwritten. Returns `400` when the source filing is still editable and `409` when the\n    target filing is read-only.\n  - `POST /v1/answer/{filingUUID}/prefill-decline` marks the prefill prompt as dismissed for the\n    filing (returns `204`).\n  - Filing responses now include the `prefillPromptDismissed` boolean.\n- **Partner-initiated SSO (white-label silent login)** (API) — a partner can hand an already\n  provisioned end user straight into their white-label instance without a second login; the\n  white-label `/auth/sso` landing page resolves the handoff and renders localized cards for a\n  used or expired link and for the case where a different user is already signed in on that\n  browser. Two endpoints back it:\n  `POST /v1/partner/sso/token` (partner credentials plus the target `userId` in the body) mints a\n  single-use, 60-second `ssoCode` — `401` for invalid credentials or an inactive user, `404` when\n  the user does not belong to the partner; rate limit 30/min. The partner then redirects the user's\n  browser to the white-label `/auth/sso?code=<ssoCode>` page, which forwards to\n  `GET /v1/partner/sso/exchange?code=` to consume the code, set the session cookie, and redirect the\n  user into the app at `returnPath` (a rooted same-origin path, defaulting to `/filing`).\n\n**Changed**\n\n- **Safer partner SSO exchange** (API) — `GET /v1/partner/sso/exchange` no longer silently replaces an\n  existing signed-in session when the SSO code targets a _different_ user. It now verifies the\n  incoming session cookie and, if a valid session for another user is present, `302`-redirects the\n  browser to the white-label `/auth/sso?switch=1&code=<ssoCode>` confirmation page **without**\n  setting a cookie or consuming the code, so the current user cannot be swapped out without an\n  explicit confirmation. A new optional query parameter `force` (accepts `1` or `true`) confirms the\n  switch and completes the exchange. Same-user handoffs and handoffs with no current session are\n  unaffected. An unverifiable or expired session cookie is treated as \"no current session\" and the\n  exchange proceeds normally.\n- **Friendly redirect for used/expired SSO codes** (API) — instead of returning a raw `401` JSON body, a\n  used, expired, or already-consumed SSO code at `GET /v1/partner/sso/exchange` now `302`-redirects\n  the browser to the white-label `/auth/sso?error=used` or `/auth/sso?error=expired` page (no cookie\n  set). A truly-unknown or malformed code still returns `401`.\n\n**Fixed**\n\n- **Tax class 6 is now reported on Anlage N** — a wage-tax statement with tax class 6 was left out\n  of the filed return, so those returns went out with an incomplete Anlage N.\n- **Answers no longer shift when a question stops applying** — in some question trees, a previously\n  given answer could reappear after the user had moved past it, or a still-relevant one could be\n  hidden.\n\n---\n\n## 1.17.100 — 2026-07-29\n\n**Added**\n\n- **Crypto other income in the tax calculation** — the detailed response of\n  `GET /v1/filing/{filingUUID}/calculation?breakdown=true` now carries an `otherIncome` block\n  inside `totalIncome`, covering the two Anlage SO income types that are taxed at the ordinary\n  progressive rate: `recurring` (mining, forging, staking, lending, airdrops — § 22 Nr. 3 EStG,\n  with `revenue`, `expenses`, `net`, `taxableIncome`) and `privateSale` (disposals of virtual\n  currencies inside the one-year holding period — § 23 EStG, with `salePrice`, `acquisitionCost`,\n  `expenses`, `gain`, `taxableIncome`), plus the block `total` that feeds the ordinary income base.\n  Each block applies its own exemption limit (Freigrenze) per person — 256 € for recurring income,\n  1,000 € for private sales — so income below the limit is fully tax-free and income at or above it\n  is fully taxable; losses are clamped to `0`. In joint assessment each spouse is assessed against\n  their own limit and the two taxable amounts are summed. Prior-year loss carry-forward and\n  cross-spouse offsetting are not modelled yet.\n\n**Changed**\n\n- **Crypto capital income now included in the capital-income figures** — directly entered crypto\n  investment income (§ 20 EStG, no domestic withholding) is now part of the capital-income\n  calculation: domestic and foreign crypto income join the \"not subject to domestic tax deduction\"\n  bucket, and crypto forward-transaction (Termingeschäfte, § 20 Abs. 2 Nr. 3) gains and losses join\n  the existing forward-transaction gains/losses. The § 20 Abs. 6 forward-loss ring-fencing is not\n  modelled — a net forward loss simply reduces total capital income (floored at `0`).\n- **Calculation totals shift for filings that hold crypto answers** — as a consequence of the two\n  entries above, `totalIncome.total`, `taxableIncome.total` and the resulting tax and\n  payment/refund figures returned by `GET /v1/filing/{filingUUID}/calculation` change for filings\n  that contain crypto answers. Filings without crypto answers return the same numbers as before.\n\n---\n\n## 1.17.99 — 2026-07-27\n\n**Added**\n\n- **Server-to-server end-user provisioning and login for partners** — two new endpoints let a\n  partner backend manage its own end users with the partner slug and client secret passed in the\n  request body (server-side only; never expose the secret to a browser or mobile client).\n  `POST /v1/partner/users/register` creates an end user scoped to the partner tenant and returns\n  `201` with an access token plus basic profile fields — `401` for invalid partner credentials or an\n  inactive partner, `409` when that email already exists under the same partner, `422` on validation\n  failure. `POST /v1/partner/users/login` signs in an existing end user of that tenant by email and\n  returns `200` with an access token plus basic profile fields — `401` for invalid partner\n  credentials or an inactive account, `404` when no user with that email exists under the partner.\n  End users are unique per partner by email, so the same address may exist under different partners.\n- **Partner attribution in user settings** — `GET /v1/user/me/settings` now also returns `partnerId`\n  and a nested `partner` object (`id`, `slug`, and nullable `name`) describing the partner the user\n  is attributed to. Both fields are `null` for users without a partner.\n\n---\n\n## 1.17.98 — 2026-07-22\n\n**Fixed**\n\n- **Repeatable answers no longer collapse in the tax calculation** — answers to repeatable questions\n  kept their instance identity while being read for the calculation. Previously the per-answer\n  instance index was dropped, so every instance of the same question defaulted to instance `0` and\n  all of them collapsed onto whichever one was processed last. This understated multi-instance\n  deductions (commute costs, work equipment, special and extraordinary expenses) in\n  `GET /v1/filing/{filingUUID}/calculation`. Filings with at most one instance per question are\n  unaffected.\n\n---\n\n## 1.17.97 — 2026-07-21\n\n**Fixed**\n\n- **`noneOption` is populated for multi-select questions** — the multi-select validation block in\n  question payloads returned by the navigation endpoints read the none-option from the wrong rule\n  property, so `noneOption` was always `null`. It now reports the configured none-option, letting\n  clients render and enforce the mutually exclusive \"none of the above\" choice.\n\n---\n\n## 1.17.96 — 2026-07-14\n\n**Fixed**\n\n- **Precise nested-field errors for address-bearing answers** — when a `distanceGeo` or `address`\n  answer fails validation on a field inside a nested address (for example `zipCode` sent as a number\n  instead of a string, or a missing `state`/`country`), the `details` array of the\n  `ANSWER_VALUE_VALIDATION_FAILED` error now names the specific offending field (e.g.\n  `zipCode must be a string`) instead of the opaque parent-level `Invalid value for from`. Which\n  inputs are accepted or rejected is unchanged.\n- **Deterministic account resolution for passwordless login** — when the same email exists for\n  multiple partners and a login request carries no partner context (no subdomain and no\n  `X-Partner-Slug` header), OTP send and verification now consistently resolve to the same account\n  (the oldest one) instead of picking an arbitrary row, which could previously make a correctly\n  entered one-time code be rejected.\n\n---\n\n## 1.17.93 — 2026-07-02\n\n**Added**\n\n- **Reset all answers in a sub-section** — `DELETE /v1/answer/{filingUUID}/section/{sectionUUID}/reset`\n  clears every answer in the given sub-section (and any nested sub-sections) back to its unanswered\n  state and returns `204`. A filing in `prepared` status drops back to `inProgress`; a locked filing\n  (`inReview` or submitted) returns `403`, and an unknown filing or section returns `404`.\n- **Question-view tracking** — `POST /v1/answer/{filingUUID}/questions/{questionUUID}/viewed` records\n  that a question was rendered to the user (analytics only — no answer is stored) and returns `204`.\n  Fire-and-forget; enables accurate drop-off attribution and per-question timing. Optional for\n  partners. Returns `404` when the filing is not found.\n- **Partner Dashboard endpoints** — three endpoints authenticated with the partner access token from\n  `POST /v1/partner/token`: `GET /v1/partner/me` returns the partner organisation profile;\n  `GET /v1/partner/api-key` returns the client id (slug) and whether an API secret is configured; and\n  `POST /v1/partner/api-key/rotate` generates a new API secret (returned once in plaintext),\n  invalidates the previous one, and returns a fresh partner access token so the dashboard session\n  survives the rotation. All three return `401` for a missing, invalid, or expired token.\n- **User consent and tax-ID settings** — `GET /v1/user/me/settings` now also returns `privacyConsent`\n  (GDPR sensitive-data consent), `partnerDataConsent`, and `taxId` (Steuer-ID); `PUT /v1/user/me/settings`\n  now accepts `partnerDataConsent` and `taxId`; and `POST /v1/user/me/onboarding-consent` now also\n  records the marketing and partner-data choices reflected in these settings.\n\n**Changed**\n\n- **Partner-scoped authentication** — the auth endpoints (`POST /v1/auth/register`, `/login`,\n  `/verify-otp`, `/send-otp`) now resolve the partner from the request subdomain (e.g. `acme.anytax.io`)\n  or, for direct API consumers, from a new optional `X-Partner-Slug` request header. Accounts are\n  validated against the resolved partner: `login` and `verify-otp` return `401` when the portal is\n  inactive or the account belongs to a different portal, and `register` returns `401` when the portal\n  is inactive. On success, `verify-otp` issues an access token whose JWT now carries `partnerId` and\n  `partnerSlug` claims for partner users; first-time logins for legacy users without a partner are\n  automatically backfilled with the default partner.\n- **New `processed` filing status** — filings can now report a `processed` status (set once a response\n  is received from the tax office) in addition to the existing statuses. It appears anywhere a filing\n  status is returned on `/v1` (e.g. `GET /v1/filing/{filingUUID}`); it is set by the system and is\n  never a client-triggerable transition.\n- **Capital-income amount validation** — numeric fields on a `capitalIncome` answer submitted via\n  `POST /v1/answer` now follow the shared ELSTER amount contract: any finite number with an absolute\n  value up to `999,999,999,999.99` is accepted, and decimals are kept and rounded by the backend at\n  serialisation. Most fields must be non-negative; only the foreign-withholding-tax fields (lines 40\n  and 41) may be negative. Per-field ELSTER caps tighter than this bound are still enforced by ELSTER\n  and surface as `422`.\n- **Wage-tax amount validation simplified** — numeric fields on a `wageTax` answer submitted via\n  `POST /v1/answer` (tax years 2024 and 2025) now accept any finite number with an absolute value up to\n  `999,999,999,999.99`; the previous strict printable-form rules (fixed length, integer-only,\n  no-leading-zeros, decimal-count) have been removed. The backend rounds to whole euros for\n  `GeldBetragOhneCent` fields and keeps 2 decimals for `GeldBetragMitCent` fields at serialisation.\n\n---\n\n## 1.17.92 — 2026-06-25\n\n**Changed**\n\n- **Address fields are trimmed on submission** — when an `address`- or `route`-type answer is\n  submitted via `POST /v1/answer`, every free-text address field (`street`, `houseNumber`,\n  `houseNumberSuffix`, `zipCode`, `city`, `state`, `country`, `extraInfo`) now has leading and\n  trailing whitespace removed before the value is stored. This prevents ELSTER validation\n  failures (e.g. on `E0101104`) and value-length overflows caused by stray whitespace; empty\n  optional fields are left untouched.\n\n**Security**\n\n- **Filing access is strictly user-scoped on the public API** — every `/v1` endpoint that\n  references a filing resolves it only within the authenticated user's own filings, and a\n  filing that is not yours returns `404 Not Found` (never `403`, so the endpoint never\n  reveals whether the filing exists). This holds for every filing-bound endpoint, including\n  `GET /v1/filing/{filingUUID}/tax-assessment[/result]`,\n  `GET /v1/filing/{filingUUID}/calculation`, `DELETE /v1/filing/{filingUUID}`,\n  `POST /v1/filing/{filingUUID}/confirm`, and the `/v1/answer`, `/v1/navigation` and\n  `/v1/question` endpoints. Cross-user access is never available through the public API.\n\n**Fixed**\n\n- **Tax-office statement in the assessment (Bescheiddaten)** — the statement (Hinweise) is now\n  returned correctly: each paragraph is grouped by its Absatznummer instead of collapsing into a\n  single blob, the text no longer contains the inline 5-digit paragraph codes, and the submission\n  timestamp is resolved. This affects the tax-office statement returned by\n  `GET /v1/filing/{filingUUID}/tax-assessment/result` (`officialStatement` is now a clean list\n  of distinct paragraphs) and the experimental `GET /v1/filing/{filingUUID}/tax-assessment`\n  (`summary.notes.paragraphs` grouping plus `summary.headline.submittedAt`).\n\n## 1.17.90 — 2026-06-23\n\n**Added**\n\n- **Production-file download URL** — `GET /v1/filing/{filingUUID}/production-file` returns the\n  signed download URL of the latest already-submitted PDF for a filing:\n  `{ pdfUrl, submittedAt, transferTicket }`. It reads stored data only and does not regenerate\n  the PDF or call ELSTER. `pdfUrl` is a time-limited signed URL of the latest stored\n  production-file PDF, `submittedAt` is that file's submission timestamp (ISO 8601), and\n  `transferTicket` is its submission transfer ticket. All three are `null` when no production\n  file exists yet for the filing.\n- **Tax assessment result (Bescheid)** — `GET /v1/filing/{filingUUID}/tax-assessment/result`\n  returns a lean view of the assessment for displaying the result to the taxpayer:\n  `{ status, taxYear, assessmentDate, result, officialStatement }`. When `status` is `available`,\n  `result` holds the settlement (`amount` in signed euros — negative = refund — and `kind`),\n  `assessmentDate` is the Bescheiddatum (ISO `YYYY-MM-DD`), and `officialStatement` lists the\n  tax-office statement paragraphs. `result` and `officialStatement` are `null` for any\n  non-`available` status. While the assessment is not yet available this returns HTTP `200` with\n  `status: \"pending\"` (never `404`), so clients can poll.\n\n**Deprecated**\n\n- **Tax assessment (Bescheiddaten) rich endpoint marked experimental** —\n  `GET /v1/filing/{filingUUID}/tax-assessment` (the full `{ status, taxYear, taxType, summary }`\n  response with the four-section `summary`) is now experimental / internal use only and has been\n  removed from the API documentation. It remains functional under `/v1`, but partners should use\n  `GET /v1/filing/{filingUUID}/tax-assessment/result` instead.\n\n## 1.17.89 — 2026-06-17\n\n**Changed**\n\n- **Tax assessment (Bescheiddaten) response restructured** — `GET /v1/filing/{filingUUID}/tax-assessment`\n  now returns `{ status, taxYear, taxType, summary }`. When `status` is `available`, `summary`\n  holds the full assessment in four sections: `headline` (hero result amount — negative = refund,\n  IBAN, assessment date, submission date, assessment type, provisional flag), `taxBreakdown`\n  (per-tax-type table with conditional solidarity-surcharge / church-tax columns), `notes`\n  (tax-office explanations grouped by Textnummer) and `disclaimer` (legal text + tax-office\n  address). `summary` is `null` for any non-`available` status. Monetary values are euros; dates\n  are ISO 8601.\n- **`number` / `amount` answer fields documented** — the `number` value on `number`- and\n  `amount`-type answers is documented as a non-negative whole number unless the question defines\n  its own `min`, `max`, or `regexp` validation.\n\n---\n\n## 1.17.88 — 2026-06-15\n\n**Added**\n\n- **Filing eligibility check** — `POST /v1/filing-eligibility-check` records the outcome of\n  the pre-filing eligibility questionnaire (`outcome: \"supported\" | \"notSupported\"`, with the\n  submitted `answers` and an optional `notifyChoice`). For partners with the eligibility check\n  enabled (by AnyTax on request), `POST /v1/filing` now requires a recent `supported`\n  record before a filing can be created.\n- **Onboarding consent** — `GET /v1/user/me/onboarding-consent/status` reports whether the\n  required GDPR consent for the current version still needs to be accepted (drives the T&C\n  overlay; it does not block other API flows). `POST /v1/user/me/onboarding-consent` records\n  immutable consent audit entries for the accepted items and returns `400` when a required\n  consent is not accepted.\n- **Support request** — `POST /v1/user/me/support` sends a support request to the AnyTax\n  support team. Rate-limited to 10 requests per hour per user (`429` when exceeded).\n\n**Changed**\n\n- `POST /v1/filing` now associates the new filing with the caller's partner and, for partners\n  with the eligibility check enabled, gates creation on a prior `supported` eligibility\n  check (see above).\n\n**Fixed**\n\n- ELSTER submissions now emit pension-expense (Vorsorgeaufwand) form fields in the correct\n  schema element order, resolving schema-validation rejections for affected filings. Schema\n  validation errors are also captured with more detail for faster diagnosis.\n\n---\n\n## 1.17.87 — 2026-06-08\n\n**Changed**\n\n- Storage errors now return consistent, appropriate HTTP status codes with safe messages.\n- Small bugfixes and performance improvements.\n\n---\n\n## 1.17.86 — 2026-06-05\n\n**Added**\n\n- **Health check** — public, unauthenticated `GET /public/health` reporting the deployed\n  `version` and system state (`status`, `checks.database`, `uptimeSeconds`). Returns `200`\n  when healthy, `503` when a dependency is down.\n- **Tax Saving Tip API** — `GET /v1/tax-saving-tip/{filingUUID}` returns categorized,\n  localized tax-saving tips (`tips[]` with `categoryName`, `tipLabel`, `userFacingTip`).\n- **Tax assessment retrieval** — `GET /v1/filing/{filingUUID}/tax-assessment` returns\n  parsed tax-assessment (Bescheid) data for a filing.\n- **Joint-filing (Ehegattensplitting) fields in the tax calculation** — `GET\n/v1/filing/{filingUUID}/calculation` now returns Person B (spouse) values alongside\n  Person A across **all** categories — income, work-related expenses, pension, special &\n  extraordinary expenses, and withholdings — using a `Spouse` suffix (e.g. `salariedIncome`\n  / `salariedIncomeSpouse`). Present only when `isJointFiling: true`; use `breakdown=true`\n  for the full per-spouse line items. See the **Joint Filing (Ehegattensplitting)** guide for\n  the field catalog and the end-to-end flow.\n\n**Changed**\n\n- Tax-saving tips can now embed dynamic computed values, so the rendered `userFacingTip`\n  text may include figures derived from the filing's answers.\n- Address answer fields now enforce maximum lengths and an ELSTER-compatible\n  (ISO-8859-15) character set (e.g. street ≤ 25, city ≤ 25, postal code ≤ 10).\n  Payloads with longer values or unsupported characters are rejected with `400`.\n- Numeric answer values are coerced before validation, so string-encoded numbers\n  (e.g. `\"1234\"`) are accepted and normalized rather than rejected.\n- ELSTER submission and validation responses now carry richer fields describing the\n  outcome of the requested action.\n\n**Fixed**\n\n- Attempting to modify answers on a read-only or already-submitted filing now returns a\n  clearer, actionable error message instead of a generic failure.\n\n---\n\n## 1.17.85 — 2026-05-18\n\n**Added**\n\n- Answer submissions now validate the answer's `taxYear` against the filing's scenario\n  year. A mismatch is rejected with `400`.\n\n**Changed**\n\n- `CapitalIncomeAnswerDto`: most numeric fields are now optional. Only\n  `totalCapitalIncome` is required, so you may send just the fields you have.\n\n**Fixed**\n\n- ELSTER 2025 submission and field-mapping fixes affecting the generated submission\n  output.\n\n---\n\n## 1.17.84 — 2026-04-30\n\n**Added**\n\n- **Partner platform** — new `/v1/partner` module for server-side provisioning and\n  authentication of your end users: look up a partner by slug, exchange a\n  service-to-service token, and register/log in partner users. Issued partner JWTs carry\n  `partnerId` and `partnerSlug` claims. See the Partner Integration Guide for the full\n  flow.\n- **Identity verification API** — `GET /v1/user/me/identity-verification/status` and\n  `POST /v1/user/me/identity-verification/link` (the latter returns a hosted\n  verification `link`).\n- **Password reset** — `POST /v1/auth/reset-password-with-otp` verifies a one-time code\n  and resets the password. The OTP step no longer issues a login session.\n\n**Changed**\n\n- The ELSTER endpoint now distinguishes a `validate` action from a `submit` action.\n  Responses expose `action`, `transferHandle`, the parsed `serverResponse`, and\n  `ericValidationErrors[]` (per-rule, human-readable validation errors). Live\n  submissions are restricted to production.\n- Wage-tax answers are now resolved by the filing's tax year\n  (`WageTaxAnswer2024Dto` vs `WageTaxAnswer2025Dto`), and a required `taxYear` field was\n  added to wage-tax answers.\n- The standard response envelope `{ success, data, meta }` is now documented for all\n  endpoints (this has always been the runtime format).\n\n**Removed**\n\n- The superseded `POST /v1/filing/{filingUUID}/verify-identity` endpoint. Use the\n  Identity Verification API above instead.\n\n**Security**\n\n- Submitted string values containing XSS-risk or unsupported characters are now\n  rejected.\n","version":"1.18.21","contact":{}},"tags":[{"name":"Partner platform","description":"Server-side endpoints to provision and authenticate your end users against your AnyTax partner tenant. Use these to embed tax filing capabilities into your product; all other public APIs are called with the JWT returned here."},{"name":"Auth API","description":"User authentication endpoints: registration, login with OTP verification, password reset, token refresh, and session management."},{"name":"User API","description":"User profile and settings management: retrieve and update user information and preferences."},{"name":"Filing Eligibility Check","description":"Pre-filing eligibility questionnaire, computed server-side. Callable either from your own backend pre-signup (partner bearer token from POST /api/v1/partner/token) or by a logged-in end user (their own session token) — same questions, same evaluate() engine either way."},{"name":"Filing API","description":"Tax filing lifecycle management: create, retrieve, clone filings and manage filing sections with progress tracking."},{"name":"Scenario API","description":"Tax scenario discovery: list available tax scenarios with their section structure for a given tax year."},{"name":"Question API","description":"Question navigation and retrieval: fetch questions by section, get next unanswered question, and traverse the questionnaire flow."},{"name":"Answer API","description":"Answer persistence: submit, update, and retrieve user answers for tax filing questions."},{"name":"Navigation API","description":"Questionnaire structure: retrieve hierarchical section trees with completion status for filing navigation."},{"name":"Wage Tax API","description":"Wage tax certificate processing: parse and extract data from uploaded Lohnsteuerbescheinigung PDFs."},{"name":"Tax Saving Tip API","description":"Tax saving tips: retrieve filing-specific tips whose visibility is determined by JEXL expressions over answer values."},{"name":"Elster API","description":"ELSTER integration: generate ELSTER-compatible XML data from completed filing answers for tax submission."}],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"},"api-key":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key for programmatic authentication"}},"schemas":{"UserDto":{"type":"object","properties":{"login":{"type":"string","description":"Login name of the user, unique across all accounts.","example":"annaschmidt"},"name":{"type":"string","description":"Given name of the user.","example":"Anna"},"surname":{"type":"string","description":"Family name of the user.","example":"Schmidt"},"email":{"type":"string","description":"E-mail address of the user.","example":"anna.schmidt@example.com"}},"required":["login","name","surname","email"]},"PartnerSummaryDto":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the partner account (UUID v4).","example":"0b6f4c2a-9d1e-4a57-8c3b-5e7f9a1c3d52"},"name":{"type":"string","description":"Display name of the partner account; `null` when none is set.","nullable":true,"example":"Acme Bank"},"slug":{"type":"string","description":"Slug of the partner account.","example":"acme-bank"}},"required":["id","name","slug"]},"UserSettingsDto":{"type":"object","properties":{"user":{"description":"Name, login and e-mail address of the user. Changed with `PUT /api/v1/user/me/profile`.","allOf":[{"$ref":"#/components/schemas/UserDto"}]},"phoneNumber":{"type":"string","description":"Phone number as entered; `null` until one is set.","nullable":true,"example":"+49 30 12345678"},"emailNotifications":{"type":"boolean","description":"Whether the user wants notifications by e-mail. `true` by default.","example":true},"smsNotifications":{"type":"boolean","description":"Whether the user wants notifications by text message. `false` by default.","example":false},"emailConsent":{"type":"boolean","description":"Whether the user agreed to receive the newsletter. `false` by default.","example":false},"privacyConsent":{"type":"boolean","description":"Flag for the consent to the processing of sensitive personal data. `true` by default and after `POST /api/v1/user/me/onboarding-consent`; it cannot be changed through the settings. Whether the consent was actually given is reported by `GET /api/v1/user/me/onboarding-consent/status`.","example":true},"partnerDataConsent":{"type":"boolean","description":"Whether the user agreed that the partner may use their data. `false` by default.","example":false},"address":{"type":"string","description":"Street and house number; `null` until set.","nullable":true,"example":"Kastanienallee 12"},"city":{"type":"string","description":"City; `null` until set.","nullable":true,"example":"Berlin"},"country":{"type":"string","description":"Country as entered (free text); `null` until set.","nullable":true,"example":"Germany"},"postalCode":{"type":"string","description":"Postal code; `null` until set.","nullable":true,"example":"10435"},"dateOfBirth":{"type":"string","description":"Date of birth as an ISO 8601 UTC timestamp at midnight of that day; `null` until set.","format":"date-time","nullable":true,"example":"1990-04-12T00:00:00.000Z"},"taxId":{"type":"string","description":"German tax identification number (Steuer-ID) as entered; `null` until set.","nullable":true,"example":"12345678901"},"role":{"type":"string","description":"Role of the account: `user` for every account created through the registration or partner operations; `partnerAdmin` and `admin` are staff roles.","enum":["user","admin","partnerAdmin"],"example":"user"},"partnerId":{"type":"string","description":"Identifier of the partner account the user belongs to (UUID v4); `null` for an account without one.","nullable":true,"example":"0b6f4c2a-9d1e-4a57-8c3b-5e7f9a1c3d52"},"partner":{"description":"The partner account the user belongs to; `null` for an account without one.","nullable":true,"allOf":[{"$ref":"#/components/schemas/PartnerSummaryDto"}]}},"required":["user","phoneNumber","emailNotifications","smsNotifications","emailConsent","privacyConsent","partnerDataConsent","address","city","country","postalCode","dateOfBirth","taxId","role","partnerId","partner"]},"OnboardingConsentStatusDto":{"type":"object","properties":{"required":{"type":"boolean","description":"`true` while the user has not given the required consent (`gdpr_sensitive_data`) for `currentVersion`; `false` once it is recorded.","example":false},"currentVersion":{"type":"string","description":"Version of the consent texts currently in force. A new version asks every user for consent again.","example":"2025-06-01"},"acceptedVersion":{"type":"string","description":"Equal to `currentVersion` when the required consent is recorded for it; `null` otherwise.","nullable":true,"example":"2025-06-01"}},"required":["required","currentVersion","acceptedVersion"]},"ApiError":{"type":"object","properties":{"code":{"type":"string","description":"Error code. Most errors carry the HTTP reason phrase of their status (`Bad Request`, `Not Found`, `Conflict`); errors with a dedicated upper-case code name it on the operation that returns them. Three upper-case codes can appear on any operation without being named there, when the stored data refuses the request: `NOT_FOUND` (404, a record the request needs does not exist), `CONFLICT` (409, a record with the same unique value exists or a related record prevents the change) and `VALIDATION_ERROR` (400, a value passed validation but cannot be stored). A 500 carries `INTERNAL_ERROR`.","example":"Not Found"},"message":{"description":"Explanation of the error. One string, except when request validation fails: then an array with one string per violated rule.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"Document not found"},"details":{"type":"object","description":"Structured data some errors add; absent on all others.","additionalProperties":true,"example":{"field":"documentUuid"}}},"required":["code","message"]},"ApiErrorMeta":{"type":"object","properties":{"timestamp":{"type":"string","description":"Server time at which the error was produced (ISO 8601, UTC).","format":"date-time","example":"2026-01-15T10:30:00.000Z"},"path":{"type":"string","description":"Path of the request, including its query string.","example":"/api/v1/se/documents/3fa85f64-5717-4562-b3fc-2c963f66afa6"},"requestId":{"type":"string","description":"Identifier of the request, equal to the `X-Request-ID` response header. An `X-Request-ID` request header is echoed here; without one the server generates a UUID.","example":"7f1c2b9e-4d3a-4f6b-9a1e-5c8d2e7f0b34"}},"required":["timestamp","path","requestId"]},"ApiErrorEnvelope":{"type":"object","properties":{"success":{"type":"boolean","description":"Always `false` on an error.","example":false},"error":{"description":"What went wrong.","allOf":[{"$ref":"#/components/schemas/ApiError"}]},"meta":{"description":"Request context of the error.","allOf":[{"$ref":"#/components/schemas/ApiErrorMeta"}]}},"required":["success","error","meta"]},"ConsentItemDto":{"type":"object","properties":{"type":{"type":"string","enum":["gdpr_sensitive_data","partner_data_use","marketing_newsletter"],"example":"gdpr_sensitive_data","description":"Which consent this item is about: `gdpr_sensitive_data` — processing of sensitive personal data, required; `partner_data_use` — use of the data by the partner, optional; `marketing_newsletter` — newsletter, optional."},"accepted":{"type":"boolean","description":"Whether the user gave this consent.","example":true},"contentText":{"type":"string","description":"The consent text exactly as it was shown to the user, in the language of `locale`. Stored unchanged as the record of what was agreed to.","example":"I consent to the processing of my personal data, including special categories of data, for the preparation of my tax records."}},"required":["type","accepted","contentText"]},"SubmitOnboardingConsentDto":{"type":"object","properties":{"locale":{"type":"string","description":"Language the consent texts were shown in.","enum":["en","de"],"example":"en"},"consents":{"minItems":1,"description":"The consent items shown to the user, each with the decision of the user. At least one item; the item of type `gdpr_sensitive_data` must be present with `accepted: true`.","type":"array","items":{"$ref":"#/components/schemas/ConsentItemDto"}}},"required":["locale","consents"]},"UpdateUserSettingsDto":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"Phone number, free text.","example":"+49 30 12345678"},"emailNotifications":{"type":"boolean","description":"Whether the user wants notifications by e-mail.","example":true},"smsNotifications":{"type":"boolean","description":"Whether the user wants notifications by text message.","example":false},"emailConsent":{"type":"boolean","description":"Whether the user agrees to receive the newsletter.","example":false},"partnerDataConsent":{"type":"boolean","description":"Whether the user agrees that the partner may use their data.","example":false},"address":{"type":"string","description":"Street and house number.","example":"Kastanienallee 12"},"city":{"type":"string","description":"City.","example":"Berlin"},"country":{"type":"string","description":"Country, free text.","example":"Germany"},"postalCode":{"type":"string","description":"Postal code.","example":"10435"},"dateOfBirth":{"type":"string","description":"Date of birth as an ISO 8601 date (`YYYY-MM-DD`) or timestamp. Returned as a UTC timestamp.","example":"1990-04-12"},"taxId":{"type":"string","description":"German tax identification number (Steuer-ID). Stored as sent; not validated.","example":"12345678901"}}},"UserSettingsUpdateResponseDto":{"type":"object","properties":{"user":{"description":"Name, login and e-mail address of the user. Changed with `PUT /api/v1/user/me/profile`.","allOf":[{"$ref":"#/components/schemas/UserDto"}]},"phoneNumber":{"type":"string","description":"Phone number as entered; `null` until one is set.","nullable":true,"example":"+49 30 12345678"},"emailNotifications":{"type":"boolean","description":"Whether the user wants notifications by e-mail. `true` by default.","example":true},"smsNotifications":{"type":"boolean","description":"Whether the user wants notifications by text message. `false` by default.","example":false},"emailConsent":{"type":"boolean","description":"Whether the user agreed to receive the newsletter. `false` by default.","example":false},"privacyConsent":{"type":"boolean","description":"Flag for the consent to the processing of sensitive personal data. `true` by default and after `POST /api/v1/user/me/onboarding-consent`; it cannot be changed through the settings. Whether the consent was actually given is reported by `GET /api/v1/user/me/onboarding-consent/status`.","example":true},"partnerDataConsent":{"type":"boolean","description":"Whether the user agreed that the partner may use their data. `false` by default.","example":false},"address":{"type":"string","description":"Street and house number; `null` until set.","nullable":true,"example":"Kastanienallee 12"},"city":{"type":"string","description":"City; `null` until set.","nullable":true,"example":"Berlin"},"country":{"type":"string","description":"Country as entered (free text); `null` until set.","nullable":true,"example":"Germany"},"postalCode":{"type":"string","description":"Postal code; `null` until set.","nullable":true,"example":"10435"},"dateOfBirth":{"type":"string","description":"Date of birth as an ISO 8601 UTC timestamp at midnight of that day; `null` until set.","format":"date-time","nullable":true,"example":"1990-04-12T00:00:00.000Z"},"taxId":{"type":"string","description":"German tax identification number (Steuer-ID) as entered; `null` until set.","nullable":true,"example":"12345678901"}},"required":["user","phoneNumber","emailNotifications","smsNotifications","emailConsent","privacyConsent","partnerDataConsent","address","city","country","postalCode","dateOfBirth","taxId"]},"UpdateUserProfileDto":{"type":"object","properties":{"email":{"type":"string","description":"New e-mail address. It is stored exactly as sent and takes effect without a confirmation step; send it in lower case, because sign-in looks addresses up in lower case.","example":"anna.schmidt@example.com","format":"email"},"login":{"type":"string","description":"New login name, at least 6 characters, unique across all accounts.","example":"annaschmidt","minLength":6},"name":{"type":"string","description":"New given name, at least 2 characters.","example":"Anna","minLength":2},"surname":{"type":"string","description":"New family name, at least 2 characters.","example":"Schmidt","minLength":2}}},"IdentityVerificationStatusDto":{"type":"object","properties":{"status":{"type":"string","description":"Identity verification status: `unverified` — not started, `pending` — started and not yet decided, `verified` — identity confirmed, `rejected` — the check was completed and failed.","enum":["unverified","verified","pending","rejected"],"example":"verified"}},"required":["status"]},"IdentityVerificationLinkDto":{"type":"object","properties":{"link":{"type":"string","description":"URL of the hosted identity check. Open it in the browser of the user; it stops working 30 minutes after it was created.","example":"https://verify.example.com/session/8f3c1d2e7a9b"}},"required":["link"]},"SupportRequestDto":{"type":"object","properties":{"requestType":{"type":"string","description":"Kind of request: `Support` — a problem or question, `Suggestion` — an idea for improvement, `Feature Request` — a missing capability, `Others` — anything else.","enum":["Support","Suggestion","Feature Request","Others"],"example":"Support"},"name":{"type":"string","description":"Name of the sender, passed on to the support team. Not taken from the account.","example":"Anna Schmidt"},"email":{"type":"string","description":"Contact e-mail address passed on to the support team. Not taken from the account, so it can differ from the address of the user.","example":"anna.schmidt@example.com","format":"email"},"phone":{"type":"string","description":"Phone number for a call back, free text.","example":"+49 30 12345678"},"message":{"type":"string","description":"The request itself, at least 10 characters.","minLength":10,"example":"The VAT amount of my Adobe Creative Cloud expense from 14 March is shown as 0.00 EUR."},"locale":{"type":"string","description":"Language of the user, `en` or `de`. Selects the language of the confirmation text in the response and is passed on to the support team. English when omitted.","example":"de"},"meta":{"type":"object","description":"Free-form context for the support team, as key-value pairs. Every pair is shown as-is in the request the support team receives.","additionalProperties":true,"example":{"reference":"customer-4821","submittedAt":"2026-03-14T09:26:53.000Z"}}},"required":["requestType","name","email","message"]},"UserSupportRequestResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation text for the user, in the language of the `locale` sent with the request (English when none was sent).","example":"Your message has been sent. We will get back to you soon."}},"required":["message"]},"AccountClosureRequestDto":{"type":"object","properties":{"message":{"type":"string","description":"Note from the user, appended to the standard closure request text. At most 2000 characters.","maxLength":2000,"example":"I no longer work as a freelancer and do not need the account any more."},"locale":{"type":"string","description":"Language of the user, `en` or `de`. Selects the language of the confirmation text in the response and is passed on to the support team. English when omitted.","example":"de"},"meta":{"type":"object","description":"Free-form context for the support team, as key-value pairs. Every pair is shown as-is in the request the support team receives.","additionalProperties":true,"example":{"reference":"customer-4821","submittedAt":"2026-03-14T09:26:53.000Z"}}}},"RegisterDto":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the new account. Stored in lower case and unique within the partner account.","example":"anna.schmidt@example.com","format":"email"},"password":{"type":"string","description":"Password of the new account: at least 8 characters with at least one lower-case letter, one upper-case letter, one digit and one symbol.","example":"Berlin-Design#2026","format":"password","minLength":8},"login":{"type":"string","description":"Login name, at least 6 characters, unique across all accounts. Sign-in uses the e-mail address, not the login.","example":"annaschmidt","minLength":6},"name":{"type":"string","description":"Given name. Letters, spaces, hyphens, apostrophes and periods only; at least 2 characters.","example":"Anna","minLength":2},"surname":{"type":"string","description":"Family name. Letters, spaces, hyphens, apostrophes and periods only; at least 2 characters.","example":"Schmidt","minLength":2}},"required":["email","password","login","name","surname"]},"AuthOtpSentResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation, in English.","example":"Login credentials verified. Please verify your email with the OTP sent to complete the login process."},"email":{"type":"string","description":"E-mail address the one-time code was sent to, in lower case as stored.","example":"anna.schmidt@example.com"},"otpSent":{"type":"boolean","description":"Always `true`.","example":true},"registrationStatus":{"type":"string","description":"Returned by registration only. Normally `active`: the account can sign in. In some cases `pending`: the account cannot sign in yet.","enum":["active","pending"],"example":"active"}},"required":["message","email","otpSent"]},"LoginDto":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the account. Compared in lower case.","example":"anna.schmidt@example.com","format":"email"},"password":{"type":"string","description":"Password of the account.","example":"Berlin-Design#2026","format":"password","minLength":6}},"required":["email","password"]},"VerifyOtpDto":{"type":"object","properties":{"email":{"type":"string","example":"anna.schmidt@example.com","format":"email","description":"E-mail address the one-time code was sent to."},"otp":{"type":"integer","example":482915,"minimum":100000,"maximum":999999,"description":"The 6-digit one-time code from the e-mail, as a number between 100000 and 999999. A numeric string is accepted too."}},"required":["email","otp"]},"AuthVerifiedUserDto":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the user.","example":"anna.schmidt@example.com"},"login":{"type":"string","description":"Login name of the user, unique across all accounts.","example":"annaschmidt"},"name":{"type":"string","description":"Given name of the user.","example":"Anna"},"surname":{"type":"string","description":"Family name of the user.","example":"Schmidt"},"role":{"type":"string","description":"Role of the account: `user` for every account created through the registration or partner operations; `partnerAdmin` and `admin` are staff roles.","enum":["user","admin","partnerAdmin"],"example":"user"},"verified":{"type":"boolean","description":"Whether the e-mail address is confirmed. `true` after the first successful `POST /api/v1/auth/verify-otp` and for every user created with `POST /api/v1/partner/users/register`.","example":true},"id":{"type":"integer","description":"Identifier of the user.","example":4821}},"required":["email","login","name","surname","role","verified","id"]},"AuthVerifyOtpResponseDto":{"type":"object","properties":{"user":{"description":"The user who signed in.","allOf":[{"$ref":"#/components/schemas/AuthVerifiedUserDto"}]},"accessToken":{"type":"string","description":"Access token of the user: an RS256-signed JWT valid for one hour. Send it as `Authorization: Bearer <accessToken>`.","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."}},"required":["user","accessToken"]},"ResetPasswordWithOtpDto":{"type":"object","properties":{"email":{"type":"string","example":"anna.schmidt@example.com","format":"email","description":"E-mail address the one-time code was sent to."},"otp":{"type":"integer","example":482915,"minimum":100000,"maximum":999999,"description":"The 6-digit one-time code from the e-mail, as a number between 100000 and 999999. A numeric string is accepted too."},"password":{"type":"string","example":"Atelier-Spree#2027","format":"password","minLength":8,"description":"The new password: at least 8 characters with at least one lower-case letter, one upper-case letter, one digit and one symbol."}},"required":["email","otp","password"]},"RefreshBearerTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","description":"Not used. The operation reads no request body: the value is ignored and the field can be left out. Only a value that is not a string is rejected with 400.","example":"not-used","deprecated":true}}},"AuthSessionUserDto":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the user.","example":"anna.schmidt@example.com"},"login":{"type":"string","description":"Login name of the user, unique across all accounts.","example":"annaschmidt"},"name":{"type":"string","description":"Given name of the user.","example":"Anna"},"surname":{"type":"string","description":"Family name of the user.","example":"Schmidt"},"role":{"type":"string","description":"Role of the account: `user` for every account created through the registration or partner operations; `partnerAdmin` and `admin` are staff roles.","enum":["user","admin","partnerAdmin"],"example":"user"},"verified":{"type":"boolean","description":"Whether the e-mail address is confirmed. `true` after the first successful `POST /api/v1/auth/verify-otp` and for every user created with `POST /api/v1/partner/users/register`.","example":true}},"required":["email","login","name","surname","role","verified"]},"AuthRefreshResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"Access token of the user: an RS256-signed JWT valid for one hour. Send it as `Authorization: Bearer <accessToken>`. It replaces the token the request was made with, which stays valid until its own expiry.","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."},"user":{"description":"The user the token belongs to.","allOf":[{"$ref":"#/components/schemas/AuthSessionUserDto"}]}},"required":["accessToken","user"]},"RequestPasswordResetDto":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the account the reset link is requested for.","example":"anna.schmidt@example.com","format":"email"}},"required":["email"]},"AuthMessageResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation, in English.","example":"If an account with this email exists, a password reset link has been sent."}},"required":["message"]},"ResetPasswordDto":{"type":"object","properties":{"token":{"type":"string","description":"Reset token from the link in the e-mail sent by `POST /api/v1/auth/request-password-reset`. Valid for one hour.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"password":{"type":"string","description":"The new password: at least 8 characters with at least one lower-case letter, one upper-case letter, one digit and one symbol.","example":"Atelier-Spree#2027","format":"password","minLength":8}},"required":["token","password"]},"ResetPasswordAuthenticatedDto":{"type":"object","properties":{"password":{"type":"string","description":"The new password: at least 8 characters with at least one lower-case letter, one upper-case letter, one digit and one symbol.","example":"Atelier-Spree#2027","format":"password","minLength":8}},"required":["password"]},"AuthPasswordChangedResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation, in English.","example":"Password has been reset successfully. Please log in again."},"email":{"type":"string","description":"E-mail address of the user whose password was changed.","example":"anna.schmidt@example.com"},"success":{"type":"boolean","description":"Always `true`.","example":true},"logoutRequired":{"type":"boolean","description":"Always `true`: the access token used for this request no longer works and the user has to sign in again.","example":true}},"required":["message","email","success","logoutRequired"]},"SendOtpDto":{"type":"object","properties":{"email":{"type":"string","example":"anna.schmidt@example.com","format":"email","description":"E-mail address of the account the one-time code is sent to."}},"required":["email"]},"AuthOtpRequestedResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation, in English. The same text is returned whether or not a code was sent.","example":"OTP has been sent to your email"},"success":{"type":"boolean","description":"Always `true`.","example":true}},"required":["message","success"]},"AuthCurrentUserResponseDto":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the user.","example":"anna.schmidt@example.com"},"login":{"type":"string","description":"Login name of the user, unique across all accounts.","example":"annaschmidt"},"name":{"type":"string","description":"Given name of the user.","example":"Anna"},"surname":{"type":"string","description":"Family name of the user.","example":"Schmidt"},"role":{"type":"string","description":"Role of the account: `user` for every account created through the registration or partner operations; `partnerAdmin` and `admin` are staff roles.","enum":["user","admin","partnerAdmin"],"example":"user"},"verified":{"type":"boolean","description":"Whether the e-mail address is confirmed. `true` after the first successful `POST /api/v1/auth/verify-otp` and for every user created with `POST /api/v1/partner/users/register`.","example":true},"id":{"type":"integer","description":"Identifier of the user. Present only when `role` is `admin`; absent for every other account.","example":1},"appEnv":{"type":"string","description":"Name of the environment the answering deployment runs in, for example `production`. Informational.","example":"production"}},"required":["email","login","name","surname","role","verified","appEnv"]},"AuthLogoutResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Always `true`.","example":true},"message":{"type":"string","description":"Human-readable confirmation, in English.","example":"Logged out successfully"}},"required":["success","message"]},"CreateFilingRequestDto":{"type":"object","properties":{"scenarioUUID":{"type":"string","description":"UUID of the scenario to create the filing for. The scenario must be active.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid"}},"required":["scenarioUUID"]},"TranslationDto":{"type":"object","properties":{"de":{"type":"string","description":"German text","example":"Einkommensteuer"},"en":{"type":"string","description":"English text","example":"Income Tax"}},"required":["de","en"]},"FilingScenarioDto":{"type":"object","properties":{"uuid":{"type":"string","description":"Unique scenario identifier","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"description":"Scenario display name (translated)","example":{"en":"Income Tax 2024","de":"Einkommensteuer 2024"},"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"description":{"description":"Scenario description (translated)","example":{"en":"Main income tax form","de":"Hauptformular Einkommensteuer"},"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"year":{"type":"number","description":"Tax year for this scenario","example":2024}},"required":["uuid","year"]},"FilingResponseDto":{"type":"object","properties":{"uuid":{"type":"string","description":"Unique filing identifier","example":"550e8400-e29b-41d4-a716-446655440001"},"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"],"example":"prepared"},"statusChangedAt":{"format":"date-time","type":"string","description":"Timestamp when status last changed","example":"2024-01-15T14:45:00.000Z"},"completed":{"type":"boolean","description":"Whether the filing has been fully completed","example":false},"year":{"type":"number","description":"Tax year for this filing (derived from scenario)","example":2024},"isJointFiling":{"type":"boolean","description":"Whether the filing is a joint filing","example":false},"firstNamePersonA":{"type":"string","description":"First name of the first person","example":"John"},"lastNamePersonA":{"type":"string","description":"Last name of the first person","example":"Doe"},"firstNamePersonB":{"type":"string","description":"First name of the second person","example":"Jane"},"lastNamePersonB":{"type":"string","description":"Last name of the second person","example":"Doe"},"scenario":{"description":"Scenario this filing belongs to","allOf":[{"$ref":"#/components/schemas/FilingScenarioDto"}]},"createdAt":{"format":"date-time","type":"string","description":"Filing creation timestamp","example":"2024-01-15T10:30:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Filing last update timestamp","example":"2024-01-15T14:45:00.000Z"},"prefillPromptDismissed":{"type":"boolean","description":"Whether the cross-year prefill prompt has been dismissed for this filing (declined or applied).","example":false}},"required":["uuid","status","statusChangedAt","completed","year","isJointFiling","firstNamePersonA","lastNamePersonA","firstNamePersonB","lastNamePersonB","scenario","createdAt","updatedAt","prefillPromptDismissed"]},"FilingErrorResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"string","example":"SCENARIO_INACTIVE"},"message":{"type":"string","example":"Cannot create filing: scenario is not active"}}}},"required":["success","error"]},"TotalIncomeSummaryDto":{"type":"object","properties":{"salariedIncome":{"type":"number","description":"Gross salary income from employment. Joint filing: Person A only; single filing: combined employment income."},"salariedIncomeSpouse":{"type":"number","description":"Person B gross salary income. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"selfEmployedIncome":{"type":"number","description":"Profit from self-employment (Anlage S), taken from the EÜR in the filing. Only present when the filing has an EÜR. Joint filing: Person A only."},"selfEmployedIncomeSpouse":{"type":"number","description":"Person B profit from self-employment. Only present when the filing has an EÜR. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"workRelatedExpenses":{"type":"number","description":"Total work-related expense deductions (combined for both spouses in joint filing)."},"ageReliefAmount":{"type":"number","description":"Age relief amount (Altersentlastungsbetrag). Joint filing: Person A only; see `ageReliefAmountSpouse` for Person B."},"ageReliefAmountSpouse":{"type":"number","description":"Person B age relief amount. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"total":{"type":"number","description":"Total income after deductions"}},"required":["salariedIncome","workRelatedExpenses","ageReliefAmount","total"]},"TaxableIncomeSummaryDto":{"type":"object","properties":{"deductionOfCarriedForwardLosses":{"type":"number","description":"Loss carryforward deduction"},"specialExpenses":{"type":"number","description":"Special expenses deduction"},"pensionContributions":{"type":"number","description":"Pension contributions deduction"},"healthInsurances":{"type":"number","description":"Health insurance deduction"},"otherInsurances":{"type":"number","description":"Other insurance deduction"},"hardshipCompensation":{"type":"number","description":"Hardship compensation"},"extraordinaryExpenses":{"type":"number","description":"Extraordinary expenses deduction"},"refundOverhangs":{"type":"number","description":"Refund overhangs from church tax"},"total":{"type":"number","description":"Total taxable income"}},"required":["deductionOfCarriedForwardLosses","specialExpenses","pensionContributions","healthInsurances","otherInsurances","hardshipCompensation","extraordinaryExpenses","refundOverhangs","total"]},"IncomeTaxPaymentOrRefundDto":{"type":"object","properties":{"assessedIncomeTax":{"type":"number","description":"Assessed income tax"},"capitalIncomeTax":{"type":"number","description":"Capital income tax"},"solidaritySurchargeToBeAssessed":{"type":"number","description":"Solidarity surcharge to be assessed"},"assessedChurchTax":{"type":"number","description":"Assessed church tax (omitted when 0)"},"deductionsOnIncomeTax":{"type":"number","description":"Deductions on income tax"},"incomeTaxToBeAssessed":{"type":"number","description":"Income tax to be assessed (subtotal before withholdings)"},"total":{"type":"number","description":"Net income tax payment or refund (after withholdings)"}},"required":["assessedIncomeTax","capitalIncomeTax","solidaritySurchargeToBeAssessed","deductionsOnIncomeTax","incomeTaxToBeAssessed","total"]},"DeductibleTaxesPaidSummaryDto":{"type":"object","properties":{"deductibleIncomeTax":{"type":"number","description":"Deductible income tax (withheld by employer and on capital income, plus prepayments)"},"solidaritySurcharge":{"type":"number","description":"Solidarity surcharge withheld or prepaid"},"churchTax":{"type":"number","description":"Church tax withheld from wages and capital income, plus prepayments (omitted when 0)"},"total":{"type":"number","description":"Total deductible taxes paid"}},"required":["deductibleIncomeTax","solidaritySurcharge","total"]},"TaxCalculationSummaryResponseDto":{"type":"object","properties":{"totalIncome":{"description":"Income totals","allOf":[{"$ref":"#/components/schemas/TotalIncomeSummaryDto"}]},"taxableIncome":{"description":"Taxable income after deductions","allOf":[{"$ref":"#/components/schemas/TaxableIncomeSummaryDto"}]},"incomeTaxPaymentOrRefund":{"description":"Tax payment or refund breakdown","allOf":[{"$ref":"#/components/schemas/IncomeTaxPaymentOrRefundDto"}]},"deductibleTaxesPaid":{"description":"Deductible taxes already paid (withholdings and surcharges)","allOf":[{"$ref":"#/components/schemas/DeductibleTaxesPaidSummaryDto"}]},"total":{"type":"number","description":"Final amount (positive = refund, negative = payment)"}},"required":["totalIncome","taxableIncome","incomeTaxPaymentOrRefund","deductibleTaxesPaid","total"]},"WorkRelatedExpenseLineDto":{"type":"object","properties":{"total":{"type":"number","description":"Line total in EUR"}},"required":["total"]},"WorkRelatedExpensesBreakdownDto":{"type":"object","properties":{"commuteCosts":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"commuteCostsSpouse":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"professionalAssociationOrTradeUnionCosts":{"type":"number"},"professionalAssociationOrTradeUnionCostsSpouse":{"type":"number"},"workEquipment":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"workEquipmentSpouse":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"homeOfficeCosts":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"homeOfficeCostsSpouse":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"trainingCosts":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"trainingCostsSpouse":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"additionalWorkRelatedCosts":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"additionalWorkRelatedCostsSpouse":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"businessTrips":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"businessTripsSpouse":{"$ref":"#/components/schemas/WorkRelatedExpenseLineDto"},"lumpSum":{"type":"number","description":"§ 9a EStG Arbeitnehmer-Pauschbetrag for Person A when active (itemized costs below lump sum)"},"lumpSumSpouse":{"type":"number","description":"Person B § 9a lump sum when active. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"total":{"type":"number","description":"Combined work-related expenses for both spouses"}},"required":["total"]},"TotalIncomeBreakdownDto":{"type":"object","properties":{"salariedIncome":{"type":"number","description":"Gross salary income from employment. Joint filing: Person A only; single filing: combined employment income."},"salariedIncomeSpouse":{"type":"number","description":"Person B gross salary income. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"selfEmployedIncome":{"type":"number","description":"Profit from self-employment (Anlage S), taken from the EÜR in the filing. Only present when the filing has an EÜR. Joint filing: Person A only."},"selfEmployedIncomeSpouse":{"type":"number","description":"Person B profit from self-employment. Only present when the filing has an EÜR. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"workRelatedExpenses":{"description":"Work-related expenses (Werbungskosten). Joint filing merges Person B sub-fields with a `Spouse` suffix alongside Person A fields.","allOf":[{"$ref":"#/components/schemas/WorkRelatedExpensesBreakdownDto"}]},"ageReliefAmount":{"type":"number","description":"Age relief amount (Altersentlastungsbetrag). Joint filing: Person A only; see `ageReliefAmountSpouse` for Person B."},"ageReliefAmountSpouse":{"type":"number","description":"Person B age relief amount. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"total":{"type":"number","description":"Total income after deductions"}},"required":["salariedIncome","workRelatedExpenses","ageReliefAmount","total"]},"ProgressionIncomeBreakdownDto":{"type":"object","properties":{"wageReplacementBenefits":{"type":"number","description":"Wage replacement benefits subject to progression clause"},"wageReplacementBenefitsSpouse":{"type":"number","description":"Person B wage replacement benefits. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"incomeReplacementBenefitsDE":{"type":"number","description":"Domestic income replacement benefits (progression clause)"},"incomeReplacementBenefitsDESpouse":{"type":"number","description":"Person B domestic income replacement benefits. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"incomeReplacementBenefitsEU":{"type":"number","description":"EU/EEA income replacement benefits (progression clause)"},"incomeReplacementBenefitsEUSpouse":{"type":"number","description":"Person B EU/EEA income replacement benefits. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"total":{"type":"number","description":"Combined progression income (affects tax rate only)"}},"required":["wageReplacementBenefits","incomeReplacementBenefitsDE","incomeReplacementBenefitsEU","total"]},"SpecialExpensesBreakdownDto":{"type":"object","properties":{"churchTax":{"type":"object","description":"Person A church tax special expenses"},"churchTaxSpouse":{"type":"object","description":"Person B church tax special expenses (same structure as `churchTax`). Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"donations":{"type":"object","description":"Person A donations breakdown"},"donationsSpouse":{"type":"object","description":"Person B donations breakdown. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"jobEducationCosts":{"type":"object","description":"Person A job-related education costs"},"jobEducationCostsSpouse":{"type":"object","description":"Person B job-related education costs. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"permanentCharges":{"type":"object","description":"Person A permanent charges (Dauerlasten)"},"permanentChargesSpouse":{"type":"object","description":"Person B permanent charges. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"lumpSum":{"type":"number","description":"§ 10c EStG lump sum (doubled in joint filing)"},"total":{"type":"number","description":"Combined special expenses deduction"}},"required":["churchTax","donations","jobEducationCosts","permanentCharges","lumpSum","total"]},"PensionContributionsBreakdownDto":{"type":"object","properties":{"totalContributions":{"type":"number","description":"Person A total pension contributions"},"totalContributionsSpouse":{"type":"number","description":"Person B total pension contributions. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"maximumDeductibleAmount":{"type":"number","description":"Person A statutory maximum deductible amount"},"maximumDeductibleAmountSpouse":{"type":"number","description":"Person B statutory maximum. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"total":{"type":"number","description":"Combined deductible pension contributions"}},"required":["total"]},"HealthInsurancesBreakdownDto":{"type":"object","properties":{"total":{"type":"number","description":"Health insurance deduction breakdown. Joint filing may include per-spouse sub-totals with `Spouse` suffix on mirrored numeric fields."}},"required":["total"]},"ExtraordinaryExpensesBreakdownDto":{"type":"object","properties":{"lumpSumForDisability":{"type":"object","description":"Person A disability lump sum (§ 33b Abs. 3)"},"lumpSumForDisabilitySpouse":{"type":"object","description":"Person B disability lump sum. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"lumpSumForSurvivingDependants":{"type":"object","description":"Person A surviving dependants lump sum (§ 33b Abs. 4)"},"lumpSumForSurvivingDependantsSpouse":{"type":"object","description":"Person B surviving dependants lump sum. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"total":{"type":"number","description":"Combined extraordinary expenses deduction"}},"required":["lumpSumForDisability","lumpSumForSurvivingDependants","total"]},"TaxableIncomeBreakdownDto":{"type":"object","properties":{"deductionOfCarriedForwardLosses":{"type":"object","description":"Loss carryforward deduction total"},"specialExpenses":{"$ref":"#/components/schemas/SpecialExpensesBreakdownDto"},"pensionContributions":{"$ref":"#/components/schemas/PensionContributionsBreakdownDto"},"healthInsurances":{"$ref":"#/components/schemas/HealthInsurancesBreakdownDto"},"otherInsurances":{"type":"object","description":"Other insurance deduction total"},"hardshipCompensation":{"type":"number","description":"Hardship compensation"},"extraordinaryExpenses":{"$ref":"#/components/schemas/ExtraordinaryExpensesBreakdownDto"},"refundOverhangs":{"type":"number","description":"Refund overhangs from church tax"},"total":{"type":"number","description":"Total taxable income"}},"required":["deductionOfCarriedForwardLosses","specialExpenses","pensionContributions","healthInsurances","otherInsurances","hardshipCompensation","extraordinaryExpenses","refundOverhangs","total"]},"IncomeTaxPaymentOrRefundBreakdownDto":{"type":"object","properties":{"assessedIncomeTax":{"type":"object","description":"Assessed income tax total"},"capitalIncomeTax":{"type":"object","description":"Capital income tax total"},"solidaritySurchargeToBeAssessed":{"type":"number","description":"Solidarity surcharge to be assessed"},"assessedChurchTax":{"type":"object","description":"Assessed church tax total"},"deductionsOnIncomeTax":{"type":"object","description":"Deductions on income tax (detailed)"},"incomeTaxToBeAssessed":{"type":"number","description":"Income tax to be assessed (subtotal before withholdings)"},"total":{"type":"number","description":"Net income tax payment or refund (after withholdings)"}},"required":["assessedIncomeTax","capitalIncomeTax","solidaritySurchargeToBeAssessed","assessedChurchTax","deductionsOnIncomeTax","incomeTaxToBeAssessed","total"]},"DeductibleIncomeTaxBreakdownDto":{"type":"object","properties":{"incomeTaxDeductionFromWages":{"type":"number","description":"Income tax withheld from Person A wages (Lohnsteuer)"},"incomeTaxDeductionFromWagesSpouse":{"type":"number","description":"Income tax withheld from Person B wages. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"incomeTaxDeductionOnCapitalIncome":{"type":"object","description":"Capital income withholdings (combined)"},"incomeTaxDeductionOnCapitalIncomeSpouse":{"type":"object","description":"Person B capital income withholdings breakdown. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"mobilityAllowance":{"type":"object","description":"Mobility allowance (Mobilitätsprämie)"},"mobilityAllowanceSpouse":{"type":"object","description":"Person B mobility allowance. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"incomeTaxPrepayments":{"type":"number","description":"Income tax prepayments (Einkommensteuervorauszahlungen). Only present when prepayments were made."},"total":{"type":"number","description":"Total deductible income tax"}},"required":["incomeTaxDeductionFromWages","incomeTaxDeductionOnCapitalIncome","mobilityAllowance","total"]},"SolidaritySurchargeBreakdownDto":{"type":"object","properties":{"solidaritySurchargeWithheldFromIncomeTax":{"type":"number","description":"Solidarity surcharge withheld from Person A wages"},"solidaritySurchargeWithheldFromIncomeTaxSpouse":{"type":"number","description":"Person B wage solidarity surcharge. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"solidaritySurchargeWithheldFromChurchTax":{"type":"number","description":"Solidarity surcharge withheld from Person A church tax"},"solidaritySurchargeWithheldFromChurchTaxSpouse":{"type":"number","description":"Person B church-tax solidarity surcharge. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"solidaritySurchargePrepayments":{"type":"number","description":"Solidarity surcharge prepayments. Only present when prepayments were made."},"total":{"type":"number","description":"Total solidarity surcharge withheld or prepaid"}},"required":["solidaritySurchargeWithheldFromIncomeTax","solidaritySurchargeWithheldFromChurchTax","total"]},"ChurchTaxWithheldBreakdownDto":{"type":"object","properties":{"churchTaxWithheldFromIncomeTax":{"type":"number","description":"Church tax withheld from Person A wages"},"churchTaxWithheldFromIncomeTaxSpouse":{"type":"number","description":"Person B wage church tax. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"churchTaxWithheldFromCapitalIncomeTax":{"type":"number","description":"Church tax withheld from Person A capital income"},"churchTaxWithheldFromCapitalIncomeTaxSpouse":{"type":"number","description":"Person B capital church tax. Only present when the filing uses joint assessment (Ehegattensplitting, `isJointFiling: true`). Person A (primary taxpayer) values use the unsuffixed field name; Person B values use the same name with a `Spouse` suffix."},"churchTaxPrepayments":{"type":"number","description":"Church tax prepayments. Only present when prepayments were made."},"total":{"type":"number","description":"Total church tax withheld or prepaid"}},"required":["churchTaxWithheldFromIncomeTax","churchTaxWithheldFromCapitalIncomeTax","total"]},"DeductibleTaxesPaidBreakdownDto":{"type":"object","properties":{"deductibleIncomeTax":{"$ref":"#/components/schemas/DeductibleIncomeTaxBreakdownDto"},"solidaritySurcharge":{"$ref":"#/components/schemas/SolidaritySurchargeBreakdownDto"},"churchTax":{"$ref":"#/components/schemas/ChurchTaxWithheldBreakdownDto"},"total":{"type":"number","description":"Total deductible taxes paid"}},"required":["deductibleIncomeTax","solidaritySurcharge","churchTax","total"]},"TaxCalculationBreakdownResponseDto":{"type":"object","properties":{"totalIncome":{"description":"Income totals","allOf":[{"$ref":"#/components/schemas/TotalIncomeBreakdownDto"}]},"progressionIncome":{"description":"Progression income (affects tax rate only, not taxable income). Joint filing exposes per-spouse components with `Spouse` suffix.","allOf":[{"$ref":"#/components/schemas/ProgressionIncomeBreakdownDto"}]},"taxableIncome":{"description":"Taxable income after deductions","allOf":[{"$ref":"#/components/schemas/TaxableIncomeBreakdownDto"}]},"incomeTaxPaymentOrRefund":{"description":"Tax payment or refund breakdown","allOf":[{"$ref":"#/components/schemas/IncomeTaxPaymentOrRefundBreakdownDto"}]},"deductibleTaxesPaid":{"description":"Deductible taxes already paid. Joint filing adds per-spouse withheld amounts with `Spouse` suffix.","allOf":[{"$ref":"#/components/schemas/DeductibleTaxesPaidBreakdownDto"}]},"total":{"type":"number","description":"Final amount (positive = refund, negative = payment)"}},"required":["totalIncome","progressionIncome","taxableIncome","incomeTaxPaymentOrRefund","deductibleTaxesPaid","total"]},"TaxAssessmentResultSettlementDto":{"type":"object","properties":{"kind":{"type":"string","description":"Settlement direction derived from the result amount.","enum":["refund","payment_due","balanced"],"nullable":true,"example":"refund"},"amount":{"type":"number","description":"Result amount in euros. Negative = refund (Erstattung), positive = payment due.","nullable":true,"example":-1964}},"required":["kind","amount"]},"TaxAssessmentResultDto":{"type":"object","properties":{"status":{"type":"string","description":"Assessment availability. `pending` is returned (with HTTP 200) while the tax office has not yet confirmed the assessment, so clients can poll gracefully.","enum":["pending","available","failed"],"example":"available"},"taxYear":{"type":"number","description":"Tax year (Veranlagungsjahr) the assessment relates to.","nullable":true,"example":2024},"assessmentDate":{"type":"string","description":"Assessment date (Bescheiddatum), ISO 8601 (YYYY-MM-DD). Null when unavailable.","nullable":true,"example":"2026-05-20"},"result":{"description":"Settlement result. Null unless `status` is `available`. `amount` is signed euros (negative = refund), `kind` is the settlement direction.","nullable":true,"allOf":[{"$ref":"#/components/schemas/TaxAssessmentResultSettlementDto"}]},"officialStatement":{"description":"Tax-office statement paragraphs (Erläuterungen des Finanzamts), in document order. Null when `status` is not `available` or when no statement paragraphs are present.","nullable":true,"example":["Sie haben Kapitalerträge erzielt ..."],"type":"array","items":{"type":"string"}}},"required":["status","taxYear","assessmentDate","result","officialStatement"]},"FilingProductionFilePdfDto":{"type":"object","properties":{"formType":{"type":"string","enum":["ESt","EUER"],"description":"Which return the PDF belongs to: income tax (ESt) or Anlage EÜR (EUER)","example":"ESt"},"pdfUrl":{"type":"string","description":"Signed URL of the stored PDF (valid for a limited time)","example":"https://storage.googleapis.com/anytax-dev-backups/elster-pdf/123-1700000000000.pdf?..."},"submittedAt":{"type":"string","description":"Submission timestamp, ISO 8601","example":"2026-04-01T09:30:00.000Z"},"transferTicket":{"type":"string","description":"Transfer ticket of this submission","nullable":true,"example":"abc123def456abc123def456abc12345"}},"required":["formType","pdfUrl","submittedAt","transferTicket"]},"FilingProductionFileResponseDto":{"type":"object","properties":{"pdfUrl":{"type":"string","description":"Signed URL of the latest stored production-file PDF (valid for a limited time). Null when no production file exists yet.","nullable":true,"example":"https://storage.googleapis.com/anytax-dev-backups/elster-pdf/123-1700000000000.pdf?..."},"submittedAt":{"type":"string","description":"Submission timestamp of the latest production file (its `createdAt`), ISO 8601. Null when no production file exists yet.","nullable":true,"example":"2026-04-01T09:30:00.000Z"},"transferTicket":{"type":"string","description":"Transfer ticket of the latest production-file submission. Null when none exists.","nullable":true,"example":"abc123def456abc123def456abc12345"},"pdfs":{"description":"Latest stored PDF of each return, income tax first. A filing with an EÜR has two entries; the top-level fields describe the first one. Empty when no production file exists yet.","type":"array","items":{"$ref":"#/components/schemas/FilingProductionFilePdfDto"}}},"required":["pdfUrl","submittedAt","transferTicket","pdfs"]},"FilingDocumentDto":{"type":"object","properties":{"uuid":{"type":"string"},"title":{"type":"string"},"fileName":{"type":"string"},"source":{"type":"string","enum":["partner","user"]},"sizeBytes":{"type":"number"},"pageCount":{"type":"number"},"sha256":{"type":"string","description":"Hex-encoded SHA-256 of the file."},"status":{"type":"string","enum":["stored","submitted","rejected"],"description":"`stored` — saved with the return, not sent yet; `submitted` — sent to the tax office; `rejected` — the tax office reported a problem with the transmission this document was part of. Forward-compatible enum: clients must tolerate new values."},"submittedAt":{"format":"date-time","type":"string","nullable":true,"description":"When the document was sent to the tax office; null while `stored`."},"submissionUuid":{"type":"string","nullable":true,"description":"The transmission that carried this document; null while `stored`."},"createdAt":{"format":"date-time","type":"string"}},"required":["uuid","title","fileName","source","sizeBytes","pageCount","sha256","status","createdAt"]},"FilingDocumentListDataDto":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/FilingDocumentDto"}}},"required":["documents"]},"FilingDocumentListResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/FilingDocumentListDataDto"}},"required":["success","data"]},"FilingDocumentDataDto":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/FilingDocumentDto"}},"required":["document"]},"FilingDocumentResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/FilingDocumentDataDto"}},"required":["success","data"]},"SubmitFilingDocumentsDto":{"type":"object","properties":{"text":{"type":"string","maxLength":15000,"description":"Optional note to the tax office, sent with the documents."},"taxNumber":{"type":"string","maxLength":20,"description":"Steuernummer of the return, only needed when the request is rejected with `tax_number_required`. Any common format; the tax office part is taken from the return."}}},"FilingDocumentSubmissionDto":{"type":"object","properties":{"uuid":{"type":"string"},"status":{"type":"string","enum":["validated","submitted","failed","rejected"],"description":"`submitted` — accepted by the tax office, `transferTicket` is set; `failed` — the message was rejected before it reached the tax office, see `errorMessage`; `rejected` — the tax office later reported a problem with the attachments; `validated` — checked only, nothing was sent (non-production environments). Forward-compatible enum."},"transferTicket":{"type":"string","nullable":true,"description":"ELSTER transfer ticket of the transmission."},"errorMessage":{"type":"string","nullable":true,"description":"Why the transmission failed; null otherwise."},"documentUuids":{"description":"Documents carried by this transmission.","type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string"}},"required":["uuid","status","documentUuids","createdAt"]},"FilingDocumentSubmissionDataDto":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/FilingDocumentSubmissionDto"}},"required":["submission"]},"FilingDocumentSubmissionResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/FilingDocumentSubmissionDataDto"}},"required":["success","data"]},"FilingDocumentSubmissionListDataDto":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/components/schemas/FilingDocumentSubmissionDto"}}},"required":["submissions"]},"FilingDocumentSubmissionListResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/FilingDocumentSubmissionListDataDto"}},"required":["success","data"]},"FilingDocumentDownloadDto":{"type":"object","properties":{"url":{"type":"string","description":"Signed URL, valid for 15 minutes."},"expiresAt":{"type":"string","description":"ISO 8601 expiry of the URL."}},"required":["url","expiresAt"]},"FilingDocumentDownloadResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/FilingDocumentDownloadDto"}},"required":["success","data"]},"TextAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","example":"Max Mustermann"}},"required":["type","text"]},"NumberAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"number":{"type":"number","example":52000,"description":"Non-negative whole number, if another validation is not specified (min, max or regexp)"}},"required":["type","number"]},"AmountAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["amount"],"description":"Monetary value. Same shape as number but with currency semantics."},"number":{"type":"number","example":1250,"description":"Non-negative whole number, if another validation is not specified (min, max or regexp)"}},"required":["type","number"]},"BinaryAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["binary"]},"selected":{"type":"string","description":"UUID from the question's input.validation.yes or input.validation.no","format":"uuid","example":"cdbe9b28-4731-5556-a02d-0f10890514ac"}},"required":["type","selected"]},"ChoiceAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["choice"]},"selected":{"type":"string","description":"UUID of the chosen option from input.options","format":"uuid","example":"a364b9d1-86ed-52cf-9cff-8b74987a41a4"}},"required":["type","selected"]},"MultiSelectAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["multiSelect"]},"selected":{"description":"UUIDs of selected options from input.options","example":["a364b9d1-86ed-52cf-9cff-8b74987a41a4"],"type":"array","items":{"type":"string"}}},"required":["type","selected"]},"DateAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["date"]},"date":{"type":"string","example":"2024-01-15","format":"date"}},"required":["type","date"]},"DateRangeAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["dateRange"]},"start":{"type":"string","example":"2024-01-01","format":"date"},"end":{"type":"string","example":"2024-12-31","format":"date"}},"required":["type","start","end"]},"AddressValueDto":{"type":"object","properties":{"street":{"type":"string","example":"Am Bahnhof","maxLength":25,"description":"Street name. ISO-8859-15 / ELSTER characters only."},"houseNumber":{"type":"string","example":"4","maxLength":9},"houseNumberSuffix":{"type":"string","example":"","nullable":true,"maxLength":6,"description":"House number suffix (e.g. 'a'). ISO-8859-15 / ELSTER characters only."},"zipCode":{"type":"string","example":"23558","maxLength":10},"city":{"type":"string","example":"Lübeck","maxLength":25,"description":"City. ISO-8859-15 / ELSTER characters only."},"state":{"type":"string","example":"Schleswig-Holstein","maxLength":25,"description":"State / region. ISO-8859-15 / ELSTER characters only."},"country":{"type":"string","example":"Deutschland","maxLength":25,"description":"Country. ISO-8859-15 / ELSTER characters only."},"countryCode":{"type":"string","example":"DE","nullable":true,"description":"Country code from GET /api/v1/countries. Optional: an address sent with only `country` still works and is matched to a code where the name is recognised. Either way the stored `country` is replaced by the official German name for that code, which is what is filed."},"extraInfo":{"type":"string","example":"","nullable":true,"maxLength":30,"description":"Optional address line (c/o, apt, …). ISO-8859-15 / ELSTER characters only."}},"required":["street","houseNumber","houseNumberSuffix","zipCode","city","state","country","extraInfo"]},"AddressAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["address"]},"address":{"$ref":"#/components/schemas/AddressValueDto"},"geoPlaceAddress":{"type":"object","additionalProperties":true,"nullable":true,"description":"Raw geocoding result as originally stored"}},"required":["type","address","geoPlaceAddress"]},"GeoLocationDto":{"type":"object","properties":{"lat":{"type":"number","example":53.867,"nullable":true},"lng":{"type":"number","example":10.67,"nullable":true},"address":{"$ref":"#/components/schemas/AddressValueDto"},"geoPlaceAddress":{"type":"object","additionalProperties":true,"nullable":true,"description":"Raw geocoding result as originally stored"}},"required":["lat","lng","address","geoPlaceAddress"]},"DistanceGeoAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["distanceGeo"]},"distance":{"type":"number","example":12,"description":"Distance in km"},"from":{"$ref":"#/components/schemas/GeoLocationDto"},"to":{"$ref":"#/components/schemas/GeoLocationDto"}},"required":["type","distance","from","to"]},"InstancesAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["instances"]},"value":{"type":"number","example":2,"description":"Current number of instances"}},"required":["type","value"]},"AddAnotherAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["addAnother"],"description":"Result of the \"add another?\" prompt"},"added":{"type":"boolean","example":true,"description":"Whether the user chose to add another instance"}},"required":["type","added"]},"InfoAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["info"],"description":"Info screen the user has seen"},"acknowledged":{"type":"boolean","example":true}},"required":["type","acknowledged"]},"DropdownAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["dropdown"],"description":"Single selection from a dropdown list"},"selectedValue":{"type":"string","example":"married","description":"The value of the chosen option. Must match one of input.options[].value."}},"required":["type","selectedValue"]},"WageTaxAnswer2024Dto":{"type":"object","properties":{"type":{"type":"string","enum":["wageTax"],"description":"Answer discriminator: Lohnsteuerbescheinigung (wage tax certificate).","x-order":0},"taxYear":{"type":"number","description":"Scenario tax year for this filing (e.g. 2024). Must match `input.taxYear` on GET question and the filing record; persisted on the answer `value` JSON.","example":2024,"x-order":1},"taxClass":{"type":"string","enum":["I","II","III","IV","V","VI"],"description":"Line — Tax class (Steuerklasse I–VI).","x-order":2},"certificationPeriodStart":{"type":"string","format":"date","description":"Line 1 — Certification period start (ISO date string; must fall in tax year 2024 for validation).\n\nFormat: YYYY-MM-DD.","x-order":3},"certificationPeriodEnd":{"type":"string","format":"date","description":"Line 1 — Certification period end (ISO date string; on or after start, calendar year 2024).\n\nFormat: YYYY-MM-DD.","x-order":4},"periodsWithoutWage":{"type":"string","nullable":true,"description":"Line 2 — Periods without entitlement to wages (free text).\n\nScalar: string (all characters allowed) or JSON null; property may also be omitted.","x-order":5},"grossWages":{"type":"number","description":"Line 3 — Gross wages (brutto; certificate excludes lines 9 and 10 from this line). Optional negative sign.","x-order":6},"incomeTaxWithheld":{"type":"number","nullable":true,"description":"Line 4 — Income tax withheld (Lohnsteuer). Optional negative sign.","x-order":7},"solidaritySurcharge":{"type":"number","nullable":true,"description":"Line 5 — Solidarity surcharge (Solidaritätszuschlag). Optional negative sign.","x-order":8},"churchTax":{"type":"number","nullable":true,"description":"Line 6 — Church tax (Kirchensteuer). Optional negative sign.","x-order":9},"churchTaxSpouse":{"type":"number","nullable":true,"description":"Line 7 — Church tax (spouse) (Kirchensteuer Ehepartner). Optional negative sign.","x-order":10},"pensionIncluded":{"type":"number","nullable":true,"description":"Line 8 — Pension benefits included in line 3 (Versorgungsbezüge in 3.). Optional negative sign.","x-order":11},"pensionReducedTax":{"type":"number","nullable":true,"description":"Line 9 — Reduced-taxed pension benefits for several years (ermäßigt besteuerte Versorgungsbezüge). Optional negative sign.","x-order":12},"multiYearCompensation":{"type":"number","nullable":true,"description":"Line 10 — Reduced-taxed multi-year wages / compensation excluding line 9 (Mehrjahres-/Entschädigungen). Optional negative sign.","x-order":13},"taxOnReduced":{"type":"number","nullable":true,"description":"Line 11 — Income tax on amounts in lines 9 and 10 (Lohnsteuer für Nr. 9 und 10). Optional negative sign.","x-order":14},"solzOnReduced":{"type":"number","nullable":true,"description":"Line 12 — Solidarity surcharge on amounts in lines 9 and 10 (Solidaritätszuschlag für Nr. 9 und 10). Optional negative sign.","x-order":15},"churchTaxOnReduced":{"type":"number","nullable":true,"description":"Line 13 — Church tax on amounts in lines 9 and 10 (Kirchensteuer für Nr. 9 und 10). Optional negative sign.","x-order":16},"churchTaxSpouseReduced":{"type":"number","nullable":true,"description":"Line 14 — Spouse church tax on amounts in lines 9 and 10 (Kirchensteuer Ehepartner für Nr. 9 und 10). Optional negative sign.","x-order":17},"shortTimeAllowance":{"type":"number","nullable":true,"description":"Line 15 — Short-time allowance and similar (e.g. Kurzarbeitergeld, maternity subsidy). Optional negative sign.","x-order":18},"taxFreeWagesDTA":{"type":"number","nullable":true,"description":"Line 16a — Tax-free wages under a double taxation agreement (DBA). Optional negative sign.","x-order":19},"taxFreeWagesForeignRelief":{"type":"number","nullable":true,"description":"Line 16b — Tax-free wages under the Foreign Employment Relief (Auslandstätigkeitserlass). Optional negative sign.","x-order":20},"commuteAllowanceTaxFree":{"type":"number","nullable":true,"description":"Line 17 — Tax-free commuting allowance (Fahrtkosten steuerfrei). No negative sign.","x-order":21},"commuteAllowanceFlat":{"type":"number","nullable":true,"description":"Line 18 — Flat-rate taxed commuting allowance (Fahrtkosten pauschal besteuert). No negative sign.","x-order":22},"taxableCompensationMultiYear":{"type":"number","nullable":true,"description":"Line 19 — Taxable multi-year compensation and wages included in line 3 (steuerpflichtig in 3.). Optional negative sign.","x-order":23},"mealSubsidy":{"type":"number","nullable":true,"description":"Line 20 — Meal subsidies for work away from home (Verpflegung Auswärtstätigkeit). No negative sign.","x-order":24},"dualHouseholdSubsidy":{"type":"number","nullable":true,"description":"Line 21 — Dual household subsidies (zweiter Haushalt). No negative sign.","x-order":25},"employerPension":{"type":"number","nullable":true,"description":"Line 22a — Employer contribution to statutory pension insurance (gesetzliche RV). Optional negative sign.","x-order":26},"employerProfessionalPension":{"type":"number","nullable":true,"description":"Line 22b — Employer contribution to professional / occupational pension scheme (berufsständische Versorgung). Optional negative sign.","x-order":27},"employeePension":{"type":"number","nullable":true,"description":"Line 23a — Employee contribution to statutory pension insurance. Optional negative sign.","x-order":28},"employeeProfessionalPension":{"type":"number","nullable":true,"description":"Line 23b — Employee contribution to professional / occupational pension scheme. Optional negative sign.","x-order":29},"employerHealthInsurance":{"type":"number","nullable":true,"description":"Line 24a — Tax-free employer contributions to statutory health insurance (gesetzliche KV). Optional negative sign.","x-order":30},"employerPrivateHealthInsurance":{"type":"number","nullable":true,"description":"Line 24b — Tax-free employer contributions to private health insurance (private KV). Optional negative sign.","x-order":31},"employerLongTermCare":{"type":"number","nullable":true,"description":"Line 24c — Tax-free employer contributions to statutory long-term care insurance (Pflegeversicherung). Optional negative sign.","x-order":32},"employeeHealthInsurance":{"type":"number","nullable":true,"description":"Line 25 — Employee statutory health insurance contribution (AN-KV). Optional negative sign.","x-order":33},"employeeNursingCare":{"type":"number","nullable":true,"description":"Line 26 — Employee long-term care insurance contribution (AN-PV). Optional negative sign.","x-order":34},"employeeUnemployment":{"type":"number","nullable":true,"description":"Line 27 — Employee unemployment insurance contribution (AN-AV). Optional negative sign.","x-order":35},"privateHealthCareOrMinimum":{"type":"number","nullable":true,"description":"Line 28 — Private health / long-term care insurance or statutory minimum (PKV / Mindestwert). Optional negative sign.","x-order":36},"pensionAllowanceBase":{"type":"number","nullable":true,"description":"Line 29 — Assessment basis for pension allowance relating to line 8 (Versorgungsfreibetrag zu 8.). Optional negative sign.","x-order":37},"pensionStartYear":{"type":"number","nullable":true,"description":"Line 30 — Relevant calendar year for pension (maßgebendes Kalenderjahr Versorgung), four-digit year.\n\nYear format (YYYY).","x-order":38},"pensionMonths":{"type":"string","nullable":true,"description":"Line 31 — First and last month of pension payments (MM-MM, e.g. 01-12).\n\nMonth range format (MM-MM).","x-order":39},"deathBenefit":{"type":"number","nullable":true,"description":"Line 32 — Death benefits, severance / capital payments included in lines 3 and 8 (Sterbegeld, Abfindungen). Optional negative sign.","x-order":40},"DTAturkey":{"type":"number","nullable":true,"description":"Line 34 — Tax-free allowance under the Germany–Turkey DTA (Freibetrag DBA Türkei). Optional negative sign.","x-order":41}},"required":["type","taxYear","taxClass","certificationPeriodStart","certificationPeriodEnd","grossWages"]},"WageTaxAnswer2025Dto":{"type":"object","properties":{"type":{"type":"string","enum":["wageTax"],"description":"Answer discriminator: Lohnsteuerbescheinigung (wage tax certificate).","x-order":0},"taxYear":{"type":"number","description":"Scenario tax year for this filing (e.g. 2025). Must match `input.taxYear` on GET question and the filing record; persisted on the answer `value` JSON.","example":2025,"x-order":1},"taxClass":{"type":"string","enum":["I","II","III","IV","V","VI"],"description":"Line — Tax class (Steuerklasse I–VI).","x-order":2},"certificationPeriodStart":{"type":"string","format":"date","description":"Line 1 — Certification period start (ISO date string; must fall in tax year 2025 for validation).\n\nFormat: YYYY-MM-DD.","x-order":3},"certificationPeriodEnd":{"type":"string","format":"date","description":"Line 1 — Certification period end (ISO date string; on or after start, calendar year 2025).\n\nFormat: YYYY-MM-DD.","x-order":4},"periodsWithoutWage":{"type":"string","nullable":true,"description":"Line 2 — Periods without entitlement to wages (free text; may be null).\n\nString (all characters allowed).","x-order":5},"grossWages":{"type":"number","description":"Line 3 — Gross wages (brutto). Optional negative sign.","x-order":6},"incomeTaxWithheld":{"type":"number","nullable":true,"description":"Line 4 — Income tax withheld (Lohnsteuer). No negative sign.","x-order":7},"solidaritySurcharge":{"type":"number","nullable":true,"description":"Line 5 — Solidarity surcharge (Solidaritätszuschlag). No negative sign.","x-order":8},"churchTax":{"type":"number","nullable":true,"description":"Line 6 — Church tax (Kirchensteuer). No negative sign.","x-order":9},"churchTaxSpouse":{"type":"number","nullable":true,"description":"Line 7 — Church tax (spouse) (Kirchensteuer Ehepartner). No negative sign.","x-order":10},"pensionIncluded":{"type":"number","nullable":true,"description":"Line 8 — Pension benefits included in line 3 (Versorgungsbezüge in 3.). Optional negative sign.","x-order":11},"pensionReducedTax":{"type":"number","nullable":true,"description":"Line 9 — Multi-year pension benefits included in line 3 (Versorgungsbezüge für mehrere Jahre in 3.). Optional negative sign.","x-order":12},"taxableCompensationMultiYear":{"type":"number","nullable":true,"description":"Line 10 — Severance and multi-year wages included in line 3 (Entschädigungen / Mehrjähriger Arbeitslohn in 3.; former line 19 on older forms). Optional negative sign.","x-order":13},"shortTimeAllowance":{"type":"number","nullable":true,"description":"Line 15 — Wage replacement benefits subject to progression clause (Lohnersatzleistungen / Progressionsvorbehalt). Optional negative sign.","x-order":14},"subsetShortTimeAllowance":{"type":"number","nullable":true,"description":"Line 15a — Short-time allowance included in line 15 (Kurzarbeitergeld in 15. enthalten). Optional negative sign.","x-order":15},"taxFreeWagesDTA":{"type":"number","nullable":true,"description":"Line 16a — Tax-free wages under a double taxation agreement (DBA). Optional negative sign.","x-order":16},"taxFreeWagesForeignRelief":{"type":"number","nullable":true,"description":"Line 16b — Tax-free wages under the Foreign Employment Relief (Auslandstätigkeitserlass). Optional negative sign.","x-order":17},"commuteAllowanceTaxFree":{"type":"number","nullable":true,"description":"Line 17 — Tax-free commuting allowance (Fahrtkosten steuerfrei). No negative sign.","x-order":18},"commuteAllowanceFlat":{"type":"number","nullable":true,"description":"Line 18 — Flat-rate taxed commuting allowance (Fahrtkosten pauschal besteuert). No negative sign.","x-order":19},"mealSubsidy":{"type":"number","nullable":true,"description":"Line 20 — Meal subsidies for work away from home (Verpflegung Auswärtstätigkeit). No negative sign.","x-order":20},"dualHouseholdSubsidy":{"type":"number","nullable":true,"description":"Line 21 — Dual household subsidies (zweiter Haushalt). No negative sign.","x-order":21},"employerPension":{"type":"number","nullable":true,"description":"Line 22a — Employer contribution to statutory pension insurance (gesetzliche RV). Optional negative sign.","x-order":22},"employerProfessionalPension":{"type":"number","nullable":true,"description":"Line 22b — Employer contribution to professional / occupational pension scheme (berufsständische Versorgung). Optional negative sign.","x-order":23},"employeePension":{"type":"number","nullable":true,"description":"Line 23a — Employee contribution to statutory pension insurance. Optional negative sign.","x-order":24},"employeeProfessionalPension":{"type":"number","nullable":true,"description":"Line 23b — Employee contribution to professional / occupational pension scheme. Optional negative sign.","x-order":25},"employerHealthInsurance":{"type":"number","nullable":true,"description":"Line 24a — Tax-free employer contributions to statutory health insurance (gesetzliche KV). Optional negative sign.","x-order":26},"employerPrivateHealthInsurance":{"type":"number","nullable":true,"description":"Line 24b — Tax-free employer contributions to private health insurance (private KV). Optional negative sign.","x-order":27},"employerLongTermCare":{"type":"number","nullable":true,"description":"Line 24c — Tax-free employer contributions to statutory long-term care insurance (Pflegeversicherung). Optional negative sign.","x-order":28},"employeeHealthInsurance":{"type":"number","nullable":true,"description":"Line 25 — Employee statutory health insurance contribution (AN-KV). Optional negative sign.","x-order":29},"employeeNursingCare":{"type":"number","nullable":true,"description":"Line 26 — Employee long-term care insurance contribution (AN-PV). Optional negative sign.","x-order":30},"employeeUnemployment":{"type":"number","nullable":true,"description":"Line 27 — Employee unemployment insurance contribution (AN-AV). Optional negative sign.","x-order":31},"privateHealthCareOrMinimum":{"type":"number","nullable":true,"description":"Line 28 — Private health / long-term care insurance or statutory minimum (PKV / Mindestwert). Optional negative sign.","x-order":32},"pensionAllowanceBase":{"type":"number","nullable":true,"description":"Line 29 — Assessment basis for pension allowance relating to line 8 (Versorgungsfreibetrag zu 8.). Optional negative sign.","x-order":33},"pensionStartYear":{"type":"number","nullable":true,"description":"Line 30 — Relevant calendar year for pension (maßgebendes Kalenderjahr Versorgung), four-digit year.\n\nYear format (YYYY).","x-order":34},"pensionMonths":{"type":"string","nullable":true,"description":"Line 31 — First and last month of pension payments (MM-MM, e.g. 01-12).\n\nRange of months format (MM-MM).","x-order":35},"deathBenefit":{"type":"number","nullable":true,"description":"Line 32 — Death benefits, severance / capital payments included in lines 3 and 8 (Sterbegeld, Abfindungen). Optional negative sign.","x-order":36},"DTAturkey":{"type":"number","nullable":true,"description":"Line 34 — Tax-free allowance under the Germany–Turkey DTA (Freibetrag DBA Türkei). Optional negative sign.","x-order":37}},"required":["type","taxYear","taxClass","certificationPeriodStart","certificationPeriodEnd","grossWages"]},"CapitalIncomeAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["capitalIncome"]},"totalCapitalIncome":{"type":"number","description":"Line 7 — Capital gains (total)."},"gainsFromShareSales":{"type":"number","nullable":true,"description":"Line 8 — Gains from share sales."},"optionPremiumsAndForwardGains":{"type":"number","nullable":true,"description":"Line 9 — Option premiums and forward-transaction gains."},"protectedOldSharesGains":{"type":"number","nullable":true,"description":"Line 10 — Gains from grandfathered shares (§ 56 InvStG)."},"previousYearsAllowance":{"type":"number","nullable":true,"description":"Line 10a — Previous years' allowance (Vorabpauschale)."},"substituteAssessmentBasis":{"type":"number","nullable":true,"description":"Line 11 — Substitute assessment basis."},"nonCompensatedLoss":{"type":"number","nullable":true,"description":"Line 12 — Uncompensated losses (excl. share sales)."},"nonCompensatedLossShares":{"type":"number","nullable":true,"description":"Line 13 — Uncompensated losses from share sales."},"forwardTransactionLoss":{"type":"number","nullable":true,"description":"Line 14 — Losses from futures trading."},"specialLosses":{"type":"number","nullable":true,"description":"Line 15 — Special losses (irrecoverable capital claims etc.)."},"saversLumpSumUsed":{"type":"number","nullable":true,"description":"Line 16 — Savings allowance used (Sparer-Pauschbetrag); 0 is valid."},"capitalGainsTax":{"type":"number","nullable":true,"description":"Line 37 — Capital gains tax."},"solidaritySurcharge":{"type":"number","nullable":true,"description":"Line 38 — Solidarity surcharge."},"churchTaxOnCapitalGains":{"type":"number","nullable":true,"description":"Line 39 — Church tax on capital gains tax."},"foreignTaxesCredited":{"type":"number","nullable":true,"description":"Line 40 — Credited foreign withholding tax. Optional negative sign."},"foreignTaxCreditableNotCredited":{"type":"number","nullable":true,"description":"Line 41 — Creditable but not-yet-credited foreign tax. Optional negative sign."},"fictitiousForeignWithholding":{"type":"number","nullable":true,"description":"Line 42 — Fictitious foreign withholding tax."}},"required":["type","totalCapitalIncome"]},"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}}},"EurBusinessDto":{"type":"object","properties":{"taxNumber":{"type":"string","maxLength":20},"name":{"type":"string","maxLength":999},"address":{"$ref":"#/components/schemas/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"}}}},"EurVehicleYearDto":{"type":"object","properties":{"assetId":{"type":"string","maxLength":64,"description":"`id` of a vehicle in `assets` (`equipmentClass` `vehicle_car` or `vehicle_motorcycle`); one entry per vehicle."},"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"]},"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"}}},"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":"#/components/schemas/EurGoodsLineDto"}}}},"EurSectionsDto":{"type":"object","properties":{"assets":{"type":"boolean"},"trips":{"type":"boolean"},"privateTrips":{"type":"boolean"},"gifts":{"type":"boolean"},"meals":{"type":"boolean"},"privateMoney":{"type":"boolean"}}},"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}}},"EurAssetTotalsByGroupDto":{"type":"object","properties":{"intangible":{"$ref":"#/components/schemas/EurAssetTotalsDto"},"office":{"$ref":"#/components/schemas/EurAssetTotalsDto"},"other":{"$ref":"#/components/schemas/EurAssetTotalsDto"}}},"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"]},"EurTripDto":{"type":"object","properties":{"countryEn":{"type":"string","maxLength":120,"nullable":true,"description":"Destination country as listed by `GET /api/v1/eur/{filingUUID}/meal-destinations` for the tax year; `null` (or `\"Germany\"` in a prefill) = Germany."},"cityEn":{"type":"string","maxLength":120,"nullable":true,"description":"Needed for a country with several rates: one of its `cityEn` values from the destination list, e.g. `\"Other Areas\"`."},"fullDays":{"type":"integer","minimum":0,"maximum":100000},"partialDays":{"type":"integer","minimum":0,"maximum":100000}}},"EurPrivateTripDto":{"type":"object","properties":{"vehicleType":{"type":"string","enum":["car","other_motorised"]},"km":{"type":"number","minimum":0,"maximum":1000000}},"required":["vehicleType"]},"EurGiftDto":{"type":"object","properties":{"recipient":{"type":"string","maxLength":200},"amount":{"type":"number","minimum":0,"maximum":999999999999.99}}},"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":"#/components/schemas/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":"#/components/schemas/EurCommuteDto"},"vehicleMethod":{"type":"string","enum":["one_percent","logbook"]},"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/EurVehicleYearDto"}},"homeOffice":{"$ref":"#/components/schemas/EurHomeOfficeDto"},"goodsTaken":{"$ref":"#/components/schemas/EurGoodsTakenDto"},"sections":{"$ref":"#/components/schemas/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":"#/components/schemas/EurAssetTotalsByGroupDto"}]},"assetSaleProceeds":{"type":"number","minimum":0,"maximum":999999999999.99,"description":"Net sale price of items sold (totals mode)."},"assets":{"type":"array","items":{"$ref":"#/components/schemas/EurAssetDto"}},"trips":{"type":"array","items":{"$ref":"#/components/schemas/EurTripDto"}},"privateTrips":{"type":"array","items":{"$ref":"#/components/schemas/EurPrivateTripDto"}},"gifts":{"type":"array","items":{"$ref":"#/components/schemas/EurGiftDto"}},"entertainmentOtherReason":{"type":"string","maxLength":999}},"required":["type","status","business","kleinunternehmer","amounts"]},"EmptyAnswerDto":{"type":"object","properties":{"type":{"type":"string","enum":["empty"],"description":"No value. Appears for unanswered questions."}},"required":["type"]},"UpdateAnswerDto":{"type":"object","properties":{"value":{"description":"The answer value persisted as JSON on the answer row. Shape depends on the question input type (see discriminator). For `wageTax`, include `taxYear` on the value object (see `WageTaxAnswer2024Dto` / `WageTaxAnswer2025Dto`).","oneOf":[{"$ref":"#/components/schemas/TextAnswerDto"},{"$ref":"#/components/schemas/NumberAnswerDto"},{"$ref":"#/components/schemas/AmountAnswerDto"},{"$ref":"#/components/schemas/BinaryAnswerDto"},{"$ref":"#/components/schemas/ChoiceAnswerDto"},{"$ref":"#/components/schemas/MultiSelectAnswerDto"},{"$ref":"#/components/schemas/DateAnswerDto"},{"$ref":"#/components/schemas/DateRangeAnswerDto"},{"$ref":"#/components/schemas/AddressAnswerDto"},{"$ref":"#/components/schemas/DistanceGeoAnswerDto"},{"$ref":"#/components/schemas/InstancesAnswerDto"},{"$ref":"#/components/schemas/AddAnotherAnswerDto"},{"$ref":"#/components/schemas/InfoAnswerDto"},{"$ref":"#/components/schemas/DropdownAnswerDto"},{"$ref":"#/components/schemas/WageTaxAnswer2024Dto"},{"$ref":"#/components/schemas/WageTaxAnswer2025Dto"},{"$ref":"#/components/schemas/CapitalIncomeAnswerDto"},{"$ref":"#/components/schemas/EurAnswerDto"},{"$ref":"#/components/schemas/EmptyAnswerDto"}],"discriminator":{"propertyName":"type"}}},"required":["value"]},"BinaryOptionDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"}},"required":["uuid"]},"BinaryInputValidation":{"type":"object","properties":{"yes":{"description":"Submit this UUID when user selects Yes","allOf":[{"$ref":"#/components/schemas/BinaryOptionDto"}]},"no":{"description":"Submit this UUID when user selects No","allOf":[{"$ref":"#/components/schemas/BinaryOptionDto"}]}},"required":["yes","no"]},"BinaryInput":{"type":"object","properties":{"type":{"type":"string","enum":["binary"]},"validation":{"$ref":"#/components/schemas/BinaryInputValidation"}},"required":["type","validation"]},"OptionItem":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"label":{"$ref":"#/components/schemas/TranslationDto"}},"required":["uuid","label"]},"ChoiceInput":{"type":"object","properties":{"type":{"type":"string","enum":["choice"]},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}}},"required":["type","options"]},"MultiSelectValidation":{"type":"object","properties":{"noneOption":{"type":"string","format":"uuid","nullable":true,"description":"\"None of the above\" option UUID"}},"required":["noneOption"]},"MultiSelectInput":{"type":"object","properties":{"type":{"type":"string","enum":["multiSelect"]},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"validation":{"$ref":"#/components/schemas/MultiSelectValidation"}},"required":["type","options"]},"TextValidation":{"type":"object","properties":{"validationPreset":{"type":"string","enum":["iban","bic","taxId","taxNumber"],"description":"Validation preset eg: iban, bic, taxId, taxNumber"},"pattern":{"type":"string","description":"Regex pattern for custom validation"},"min":{"type":"number","description":"Minimum allowed value (inclusive)","example":10},"max":{"type":"number","description":"Maximum allowed value (inclusive)","example":20},"validationMode":{"type":"string","description":"Validation mode for incorrect values (e.g., \"error\", \"warning\")","example":"error"},"validationRegex":{"type":"string","description":"Validation regex pattern for allowed values eg: [0-9]","example":"[0-9]"},"isValidationEnabled":{"type":"boolean","description":"Whether validation is enabled","example":false}}},"TextInput":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"placeholder":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"validation":{"$ref":"#/components/schemas/TextValidation"}},"required":["type","placeholder"]},"NumberValidation":{"type":"object","properties":{"min":{"type":"number","description":"Minimum allowed value (inclusive)"},"max":{"type":"number","description":"Maximum allowed value (inclusive)"},"validationRegex":{"type":"string","description":"Validation regex pattern for allowed values eg: [0-9]","example":"[0-9]"},"isPercentage":{"type":"boolean","description":"Whether the number is a percentage"},"validationMode":{"type":"string","description":"Validation mode for incorrect values (e.g., \"error\", \"warning\")","example":"error"}}},"NumberInput":{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"placeholder":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"validation":{"$ref":"#/components/schemas/NumberValidation"}},"required":["type","placeholder"]},"AmountInput":{"type":"object","properties":{"type":{"type":"string","enum":["amount"],"description":"Monetary input. Render with currency symbol."},"placeholder":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"validation":{"$ref":"#/components/schemas/NumberValidation"}},"required":["type","placeholder"]},"DatePickerValidation":{"type":"object","properties":{"validationMode":{"type":"string","description":"Validation mode for incorrect values (e.g., \"error\", \"warning\")","example":"error"},"dateLimitMin":{"type":"string","format":"date","description":"Earliest selectable date."},"dateLimitMax":{"type":"string","format":"date","description":"Latest selectable date."}}},"DateInput":{"type":"object","properties":{"type":{"type":"string","enum":["date"],"description":"Single date picker. For date ranges, see DateRangeInput."},"validation":{"$ref":"#/components/schemas/DatePickerValidation"}},"required":["type","validation"]},"DateRangeInput":{"type":"object","properties":{"type":{"type":"string","enum":["dateRange"],"description":"Date range picker (start + end)."},"validation":{"$ref":"#/components/schemas/DatePickerValidation"}},"required":["type","validation"]},"AddressInput":{"type":"object","properties":{"type":{"type":"string","enum":["address"]}},"required":["type"]},"DistanceGeoInput":{"type":"object","properties":{"type":{"type":"string","enum":["distanceGeo"],"description":"Two addresses + distance between them."}},"required":["type"]},"InfoInputValidation":{"type":"object","properties":{"continuable":{"type":"boolean","example":true,"description":"When true, user can continue forward. When false, user can only go back."}},"required":["continuable"]},"InfoInput":{"type":"object","properties":{"type":{"type":"string","enum":["info"],"description":"Info screen. Render display.text. If continuable is true, show a Continue button and submit { type: \"info\", acknowledged: true }. If false, only show Back. The user cannot go forward."},"validation":{"$ref":"#/components/schemas/InfoInputValidation"}},"required":["type","validation"]},"DropdownOptionItem":{"type":"object","properties":{"id":{"type":"string","example":"opt-1","description":"Unique ID for this option"},"label":{"example":{"en":"Married","de":"Verheiratet"},"description":"Label shown to the user, in English and German","allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"value":{"type":"string","example":"married","description":"The value to send back when the user picks this option."}},"required":["id","label","value"]},"DropdownInput":{"type":"object","properties":{"type":{"type":"string","enum":["dropdown"],"description":"Single-select from a list of options. Render as a searchable dropdown/combobox. Can have 100+ options. Submit the selected option's value field as { type: \"dropdown\", selectedValue: \"...\" }."},"options":{"description":"The options, in display order.","type":"array","items":{"$ref":"#/components/schemas/DropdownOptionItem"}}},"required":["type","options"]},"WageTaxInput":{"type":"object","properties":{"type":{"type":"string","enum":["wageTax"],"description":"Structured form for a Lohnsteuerbescheinigung (wage tax certificate). Field set follows this filing’s scenario tax year — see `taxYear` and OpenAPI schemas `WageTaxAnswer2024Dto` vs `WageTaxAnswer2025Dto`."},"taxYear":{"type":"number","description":"Scenario tax year for this filing (same value used to validate PUT /answer wage tax payloads).","example":2025}},"required":["type","taxYear"]},"CapitalIncomeInput":{"type":"object","properties":{"type":{"type":"string","enum":["capitalIncome"],"description":"Structured form for a Kapitalertragsbescheinigung (capital income certificate)."}},"required":["type"]},"EurInput":{"type":"object","properties":{"type":{"type":"string","enum":["eur"],"description":"Structured two-screen form for Anlage EÜR + AVEÜR (one business). Submit `EurAnswerDto`; calculated values come from POST /api/v1/eur/{filingUUID}/preview."},"taxYear":{"type":"number","description":"Scenario tax year for this filing.","example":2025}},"required":["type","taxYear"]},"InstancesInput":{"type":"object","properties":{"type":{"type":"string","enum":["instances"],"description":"Numeric input for \"how many instances?\""}},"required":["type"]},"AddAnotherInput":{"type":"object","properties":{"type":{"type":"string","enum":["addAnother"],"description":"Yes/No prompt asking \"add another instance?\" Render two buttons. If user says yes, call POST /answer/{filing}/{question}/one-more."}},"required":["type"]},"BinaryAnswerResponseDto":{"type":"object","properties":{"type":{"type":"string","enum":["binary"]},"selected":{"type":"boolean","example":true}},"required":["type","selected"]},"SelectedOptionDto":{"type":"object","properties":{"uuid":{"type":"string","example":"a364b9d1-86ed-52cf-9cff-8b74987a41a4"},"label":{"example":{"de":"Angestellt","en":"Employed"},"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]}},"required":["uuid","label"]},"ChoiceAnswerResponseDto":{"type":"object","properties":{"type":{"type":"string","enum":["choice"]},"selected":{"$ref":"#/components/schemas/SelectedOptionDto"}},"required":["type","selected"]},"MultiSelectAnswerResponseDto":{"type":"object","properties":{"type":{"type":"string","enum":["multiSelect"]},"selected":{"type":"array","items":{"$ref":"#/components/schemas/SelectedOptionDto"}}},"required":["type","selected"]},"QuestionDisplay":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/TranslationDto"},"subtitle":{"$ref":"#/components/schemas/TranslationDto"},"tooltip":{"$ref":"#/components/schemas/TranslationDto"}},"required":["text","subtitle","tooltip"]},"QuestionStatus":{"type":"object","properties":{"answered":{"type":"boolean","example":true,"description":"User has submitted a value for this question"},"complete":{"type":"boolean","example":true,"description":"Question needs no further attention (answered or auto-resolved)"},"prefilledFromYear":{"type":"string","example":"y2025","description":"Tax year this answer was pre-filled from (e.g. `y2025`). Present only while the answer is pre-filled and not yet confirmed; cleared once the user confirms or edits."},"prefilledFromPartner":{"type":"string","example":"acme-partner","description":"Slug of the partner whose prefill populated this answer. Present only while pre-filled and not yet confirmed; cleared once the user confirms or edits. Mutually exclusive with `prefilledFromYear`."},"prefilledFromElster":{"type":"boolean","example":true,"description":"True while the answer holds a value imported from ELSTER that the user has not confirmed yet; drives the \"Pre-filled from ELSTER\" label. Mutually exclusive with `prefilledFromYear` and `prefilledFromPartner`."}},"required":["answered","complete"]},"ValidationMessages":{"type":"object","properties":{"errorMessage":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"warningMessage":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]}},"required":["errorMessage","warningMessage"]},"NavigationItem":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"$ref":"#/components/schemas/TranslationDto"}},"required":["uuid","name"]},"QuestionNavigation":{"type":"object","properties":{"section":{"$ref":"#/components/schemas/NavigationItem"},"subsection":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/NavigationItem"}]}},"required":["section","subsection"]},"CurrentQuestionDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Use this UUID when submitting answers"},"name":{"description":"Short label for the question (used in nav and summaries)","allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"display":{"description":"Full question text, subtitle, and tooltip for rendering","allOf":[{"$ref":"#/components/schemas/QuestionDisplay"}]},"input":{"oneOf":[{"$ref":"#/components/schemas/BinaryInput"},{"$ref":"#/components/schemas/ChoiceInput"},{"$ref":"#/components/schemas/MultiSelectInput"},{"$ref":"#/components/schemas/TextInput"},{"$ref":"#/components/schemas/NumberInput"},{"$ref":"#/components/schemas/AmountInput"},{"$ref":"#/components/schemas/DateInput"},{"$ref":"#/components/schemas/DateRangeInput"},{"$ref":"#/components/schemas/AddressInput"},{"$ref":"#/components/schemas/DistanceGeoInput"},{"$ref":"#/components/schemas/InfoInput"},{"$ref":"#/components/schemas/DropdownInput"},{"$ref":"#/components/schemas/WageTaxInput"},{"$ref":"#/components/schemas/CapitalIncomeInput"},{"$ref":"#/components/schemas/EurInput"},{"$ref":"#/components/schemas/InstancesInput"},{"$ref":"#/components/schemas/AddAnotherInput"}],"discriminator":{"propertyName":"type"}},"answer":{"oneOf":[{"$ref":"#/components/schemas/TextAnswerDto"},{"$ref":"#/components/schemas/BinaryAnswerResponseDto"},{"$ref":"#/components/schemas/DateAnswerDto"},{"$ref":"#/components/schemas/DateRangeAnswerDto"},{"$ref":"#/components/schemas/NumberAnswerDto"},{"$ref":"#/components/schemas/AmountAnswerDto"},{"$ref":"#/components/schemas/ChoiceAnswerResponseDto"},{"$ref":"#/components/schemas/MultiSelectAnswerResponseDto"},{"$ref":"#/components/schemas/AddressAnswerDto"},{"$ref":"#/components/schemas/DistanceGeoAnswerDto"},{"$ref":"#/components/schemas/WageTaxAnswer2024Dto"},{"$ref":"#/components/schemas/WageTaxAnswer2025Dto"},{"$ref":"#/components/schemas/CapitalIncomeAnswerDto"},{"$ref":"#/components/schemas/EurAnswerDto"},{"$ref":"#/components/schemas/InstancesAnswerDto"},{"$ref":"#/components/schemas/AddAnotherAnswerDto"},{"$ref":"#/components/schemas/InfoAnswerDto"},{"$ref":"#/components/schemas/DropdownAnswerDto"},{"$ref":"#/components/schemas/EmptyAnswerDto"}],"discriminator":{"propertyName":"type"}},"status":{"$ref":"#/components/schemas/QuestionStatus"},"validation":{"$ref":"#/components/schemas/ValidationMessages"},"isCategoryQuestion":{"type":"boolean","example":false,"description":"True for root-type rules that render as category headers, not answerable questions"},"navigation":{"description":"Section and subsection this question belongs to","allOf":[{"$ref":"#/components/schemas/QuestionNavigation"}]}},"required":["uuid","name","display","input","answer","status","isCategoryQuestion","navigation"]},"UpdateAnswerResponseDto":{"type":"object","properties":{"question":{"description":"Updated question state after saving answer","allOf":[{"$ref":"#/components/schemas/CurrentQuestionDto"}]},"nextQuestion":{"nullable":true,"description":"Next question in the flow (only when includeNext=true)","allOf":[{"$ref":"#/components/schemas/CurrentQuestionDto"}]}},"required":["question"]},"OneMoreResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether a new instance was created"},"question":{"nullable":true,"description":"First question of the new instance (navigate here)","allOf":[{"$ref":"#/components/schemas/CurrentQuestionDto"}]}},"required":["success","question"]},"PrefillAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street name","example":"Chausseestraße"},"houseNumber":{"type":"string","description":"House number","example":"37"},"houseNumberSuffix":{"type":"string","example":"","description":"Defaults to empty string if omitted"},"zipCode":{"type":"string","description":"Postal code","example":"10115"},"city":{"type":"string","description":"City name","example":"Berlin"},"state":{"type":"string","description":"Federal state (Bundesland)","example":"Berlin"},"country":{"type":"string","description":"Country name","example":"Germany"},"extraInfo":{"type":"string","example":"","description":"Defaults to empty string if omitted"}},"required":["street","houseNumber","zipCode","city","state","country"]},"PrefillPersonalDto":{"type":"object","properties":{"firstName":{"type":"string","description":"First name","example":"Max"},"lastName":{"type":"string","description":"Last name","example":"Mustermann"},"dateOfBirth":{"type":"string","description":"ISO 8601 date (YYYY-MM-DD)","example":"1990-05-15"},"taxId":{"type":"number","description":"Tax identification number","example":12345678901},"address":{"description":"Current residential address. Used to determine the responsible tax office","allOf":[{"$ref":"#/components/schemas/PrefillAddressDto"}]},"iban":{"type":"string","description":"German IBAN","example":"DE89370400440532013000"}}},"PrefillEquipmentItemDto":{"type":"object","properties":{"cost":{"type":"number","description":"Purchase cost of the equipment item","example":1200},"depreciationYears":{"type":"number","description":"Depreciation period in years. Only relevant if cost > 800.","example":3}},"required":["cost"]},"PrefillOtherCostDto":{"type":"object","properties":{"description":{"type":"string","description":"What the cost is for","example":"Cloud hosting"},"amount":{"type":"number","description":"Total amount","example":2400}},"required":["description","amount"]},"PrefillSelfEmploymentDto":{"type":"object","properties":{"isSelfEmployed":{"type":"boolean","description":"Whether to declare self-employment income for this tax year","example":true},"profession":{"type":"string","description":"Exact professional title used for freelance work","example":"Software Developer"},"businessName":{"type":"string","description":"Registered business name, if any","example":"Max Dev GmbH"},"businessTaxNumber":{"type":"string","description":"Separate tax number for self-employment (often different from personal Tax ID)","example":"27/123/45678"},"revenue":{"type":"number","description":"Total revenue","example":85000},"vatReceived":{"type":"number","description":"VAT collected from clients","example":16150},"vatRefund":{"type":"number","description":"VAT refund received","example":500},"costOfGoods":{"type":"number","description":"Cost of raw materials or goods bought for resale","example":3000},"externalServices":{"type":"number","description":"Payments to other freelancers or subcontractors","example":2000},"rentCosts":{"type":"number","description":"Annual cost of external office or co-working space","example":6000},"separateRoomCosts":{"type":"number","description":"Costs for a dedicated home office room","example":1200},"workFromHomeDays":{"type":"number","description":"Number of days worked from home","example":120},"equipmentItems":{"description":"Equipment purchases. Each item becomes an instance","type":"array","items":{"$ref":"#/components/schemas/PrefillEquipmentItemDto"}},"phoneAndInternet":{"type":"number","description":"Total business phone and internet costs","example":600},"trainingCosts":{"type":"number","description":"Costs for training, workshops, and courses","example":500},"accountingCosts":{"type":"number","description":"Costs for tax advisors, lawyers, and bookkeeping software","example":1200},"marketingCosts":{"type":"number","description":"Advertising and marketing costs (websites, business cards, etc.)","example":800},"booksAndSoftware":{"type":"number","description":"Costs for books, software, and office supplies","example":350},"businessInsurance":{"type":"number","description":"Business insurance costs","example":900},"travelCosts":{"type":"number","description":"Travel costs (flights, trains, public transport)","example":3000},"hotelCosts":{"type":"number","description":"Hotel and accommodation costs for business trips","example":1500},"mealCosts":{"type":"number","description":"Business meal costs","example":800},"carLeaseCosts":{"type":"number","description":"Annual car lease cost","example":4800},"otherCarCosts":{"type":"number","description":"Other car-related business costs","example":600},"otherCosts":{"description":"Miscellaneous costs. Each item becomes an instance","type":"array","items":{"$ref":"#/components/schemas/PrefillOtherCostDto"}}}},"PrefillCryptoDto":{"type":"object","properties":{"incomeTypes":{"type":"array","description":"Types of crypto income present in the report. Multi-select: each value selects the matching option of the crypto income question.","example":["income_from_sale_of_crypto_assets","recurring_income_from_crypto"],"items":{"type":"string","enum":["income_from_sale_of_crypto_assets","capital_income_from_crypto","recurring_income_from_crypto"]}},"saleDescription":{"type":"string","description":"Description of the private sale income (§ 23 EStG).","example":"Refer cointracking report"},"saleRevenue":{"type":"integer","description":"Total sale price of crypto assets sold within the 1-year holding period, in whole euros.","example":125192},"saleAcquisitionCosts":{"type":"integer","description":"Total acquisition costs of the sold crypto assets, in whole euros.","example":131629},"capitalGainsDomestic":{"type":"integer","description":"Crypto capital gains from domestic exchanges (Anlage KAP line 18), in whole euros.","example":8000},"capitalGainsInternational":{"type":"integer","description":"Crypto capital gains from international exchanges (Anlage KAP line 19), in whole euros.","example":4000},"capitalGainsForwardProfit":{"type":"integer","description":"Total gains from margin, derivatives and futures (Anlage KAP line 21), in whole euros. Tax year 2024 only; when omitted it is derived as domestic + international (if positive).","example":12000},"capitalGainsForwardLoss":{"type":"integer","description":"Total losses from margin, derivatives and futures (Anlage KAP line 24), in whole euros. Tax year 2024 only.","example":3000},"recurringDescription":{"type":"string","description":"Description of the recurring crypto income (§ 22 Nr. 3 EStG).","example":"Refer cointracking report"},"recurringRevenue":{"type":"integer","description":"Total recurring income from staking, lending, mining, airdrops and similar, in whole euros.","example":69},"capitalIncomeTypes":{"type":"array","description":"Types of crypto capital income present. Multi-select. When omitted, AnyTax derives the selection from the capital-gains fields you send: domestic gains select \"domestic\", international gains select \"foreign\", any of domestic/international/forward profit selects \"profit from forward transactions\", and a forward loss selects \"loss from forward transactions\".","example":["domestic_crypto_capital_income","crypto_profit_from_forward_transactions"],"items":{"type":"string","enum":["domestic_crypto_capital_income","foreign_crypto_capital_income","crypto_profit_from_forward_transactions","crypto_loss_from_forward_transactions"]}}}},"PrefillEurDto":{"type":"object","properties":{"business":{"$ref":"#/components/schemas/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":"#/components/schemas/EurCommuteDto"},"vehicleMethod":{"type":"string","enum":["one_percent","logbook"]},"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/EurVehicleYearDto"}},"homeOffice":{"$ref":"#/components/schemas/EurHomeOfficeDto"},"goodsTaken":{"$ref":"#/components/schemas/EurGoodsTakenDto"},"sections":{"$ref":"#/components/schemas/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":"#/components/schemas/EurAssetTotalsByGroupDto"}]},"assetSaleProceeds":{"type":"number","minimum":0,"maximum":999999999999.99,"description":"Net sale price of items sold (totals mode)."},"assets":{"type":"array","items":{"$ref":"#/components/schemas/EurAssetDto"}},"trips":{"type":"array","items":{"$ref":"#/components/schemas/EurTripDto"}},"privateTrips":{"type":"array","items":{"$ref":"#/components/schemas/EurPrivateTripDto"}},"gifts":{"type":"array","items":{"$ref":"#/components/schemas/EurGiftDto"}},"entertainmentOtherReason":{"type":"string","maxLength":999}},"required":["business","kleinunternehmer","amounts"]},"PrefillRequestDto":{"type":"object","properties":{"personal":{"description":"Personal information (name, address, tax ID, bank account)","allOf":[{"$ref":"#/components/schemas/PrefillPersonalDto"}]},"selfEmployment":{"description":"Self-employment income and deductible costs","allOf":[{"$ref":"#/components/schemas/PrefillSelfEmploymentDto"}]},"crypto":{"description":"Crypto income datapoints (e.g. from a crypto tax report partner)","allOf":[{"$ref":"#/components/schemas/PrefillCryptoDto"}]},"eur":{"description":"Anlage EÜR + AVEÜR inputs for the EÜR element. Calculated values (allowances, depreciation, private use) are always computed by AnyTax and ignored with a `CALCULATED_VALUE` warning. Not applied when the EÜR already holds values that did not come from a partner prefill (`ALREADY_EDITED`). The legal form is `business.kind` (`trade`, `freelancer`, `other_self_employed`); there is no `legalForm` field. Every asset needs an `id` unique within the block (any string up to 64 characters); an asset without one is dropped.","allOf":[{"$ref":"#/components/schemas/PrefillEurDto"}]}}},"PrefillWarningDto":{"type":"object","properties":{"key":{"type":"string","description":"The variable key that failed. Inside the `eur` block it is the dotted path, e.g. `eur.business.businessId`.","example":"selfemp_rev"},"code":{"type":"string","description":"Machine-readable warning code","enum":["UNKNOWN_KEY","INVALID_VALUE_TYPE","INVALID_DATE_FORMAT","INVALID_ADDRESS_FORMAT","INVALID_BOOLEAN","CALCULATED_VALUE","ALREADY_EDITED"],"example":"INVALID_VALUE_TYPE"},"message":{"type":"string","description":"Human-readable message explaining what went wrong and how to fix it","example":"Expected a number for 'selfemp_rev' (amount), got string."}},"required":["key","code","message"]},"PrefillSummaryDto":{"type":"object","properties":{"applied":{"type":"number","description":"Number of keys successfully applied","example":12},"warnings":{"description":"List of keys that could not be applied, with reasons. Empty when everything succeeded.","type":"array","items":{"$ref":"#/components/schemas/PrefillWarningDto"}}},"required":["applied","warnings"]},"PrefillResponseDto":{"type":"object","properties":{"filing":{"description":"The filing after prefill","allOf":[{"$ref":"#/components/schemas/FilingResponseDto"}]},"prefill":{"description":"Summary of prefill results","allOf":[{"$ref":"#/components/schemas/PrefillSummaryDto"}]}},"required":["filing","prefill"]},"PrefillDataResponseDto":{"type":"object","properties":{"partnerSlug":{"type":"string","description":"Slug of the partner whose prefill is still unconfirmed on this filing, or null when nothing is prefilled.","example":"cointracking","nullable":true},"personal":{"description":"Prefilled personal data","allOf":[{"$ref":"#/components/schemas/PrefillPersonalDto"}]},"selfEmployment":{"description":"Prefilled self-employment data","allOf":[{"$ref":"#/components/schemas/PrefillSelfEmploymentDto"}]},"crypto":{"description":"Prefilled crypto income data","allOf":[{"$ref":"#/components/schemas/PrefillCryptoDto"}]},"eur":{"description":"Prefilled EÜR, returned only while the user has not edited the EÜR element","allOf":[{"$ref":"#/components/schemas/PrefillEurDto"}]}},"required":["partnerSlug"]},"PrefillSourceDto":{"type":"object","properties":{"filingUUID":{"type":"string","description":"UUID of the source filing","format":"uuid"},"year":{"type":"string","description":"Tax year of the filing","example":"y2025"},"isJointFiling":{"type":"boolean","description":"Whether that filing was a joint filing (spouse data is available)"},"updatedAt":{"format":"date-time","type":"string","description":"When the filing was last updated"}},"required":["filingUUID","year","isJointFiling","updatedAt"]},"PrefillSourcesResponseDto":{"type":"object","properties":{"sources":{"description":"Source filings, newest year first","type":"array","items":{"$ref":"#/components/schemas/PrefillSourceDto"}}},"required":["sources"]},"CrossYearPrefillRequestDto":{"type":"object","properties":{"sourceFilingUUID":{"type":"string","description":"UUID of the source filing to copy from","format":"uuid"},"sections":{"type":"array","description":"Which personal sub-sections to pre-fill","example":["basicIdentity","taxBankDetails"],"items":{"type":"string","enum":["basicIdentity","familyStatus","religiousStatus","employmentProfile","taxBankDetails"]}},"includeSpouse":{"type":"boolean","description":"Also pre-fill spouse data (only applied when the source filing was a joint filing)","default":false}},"required":["sourceFilingUUID","sections"]},"CrossYearPrefillSummaryDto":{"type":"object","properties":{"applied":{"type":"number","description":"Number of answers pre-filled","example":9},"sourceYear":{"type":"string","description":"Tax year the data was copied from","example":"y2025"},"includedSpouse":{"type":"boolean","description":"Whether spouse keys were included"},"warnings":{"type":"array","description":"Keys that could not be applied (best-effort), with machine-readable codes","items":{"type":"object"}}},"required":["applied","sourceYear","includedSpouse","warnings"]},"CrossYearPrefillResponseDto":{"type":"object","properties":{"filing":{"description":"The target filing after prefill","allOf":[{"$ref":"#/components/schemas/FilingResponseDto"}]},"prefill":{"$ref":"#/components/schemas/CrossYearPrefillSummaryDto"}},"required":["filing","prefill"]},"QuestionDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Use this UUID when submitting answers"},"name":{"description":"Short label for the question (used in nav and summaries)","allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"display":{"description":"Full question text, subtitle, and tooltip for rendering","allOf":[{"$ref":"#/components/schemas/QuestionDisplay"}]},"input":{"oneOf":[{"$ref":"#/components/schemas/BinaryInput"},{"$ref":"#/components/schemas/ChoiceInput"},{"$ref":"#/components/schemas/MultiSelectInput"},{"$ref":"#/components/schemas/TextInput"},{"$ref":"#/components/schemas/NumberInput"},{"$ref":"#/components/schemas/AmountInput"},{"$ref":"#/components/schemas/DateInput"},{"$ref":"#/components/schemas/DateRangeInput"},{"$ref":"#/components/schemas/AddressInput"},{"$ref":"#/components/schemas/DistanceGeoInput"},{"$ref":"#/components/schemas/InfoInput"},{"$ref":"#/components/schemas/DropdownInput"},{"$ref":"#/components/schemas/WageTaxInput"},{"$ref":"#/components/schemas/CapitalIncomeInput"},{"$ref":"#/components/schemas/EurInput"},{"$ref":"#/components/schemas/InstancesInput"},{"$ref":"#/components/schemas/AddAnotherInput"}],"discriminator":{"propertyName":"type"}},"answer":{"oneOf":[{"$ref":"#/components/schemas/TextAnswerDto"},{"$ref":"#/components/schemas/BinaryAnswerResponseDto"},{"$ref":"#/components/schemas/DateAnswerDto"},{"$ref":"#/components/schemas/DateRangeAnswerDto"},{"$ref":"#/components/schemas/NumberAnswerDto"},{"$ref":"#/components/schemas/AmountAnswerDto"},{"$ref":"#/components/schemas/ChoiceAnswerResponseDto"},{"$ref":"#/components/schemas/MultiSelectAnswerResponseDto"},{"$ref":"#/components/schemas/AddressAnswerDto"},{"$ref":"#/components/schemas/DistanceGeoAnswerDto"},{"$ref":"#/components/schemas/WageTaxAnswer2024Dto"},{"$ref":"#/components/schemas/WageTaxAnswer2025Dto"},{"$ref":"#/components/schemas/CapitalIncomeAnswerDto"},{"$ref":"#/components/schemas/EurAnswerDto"},{"$ref":"#/components/schemas/InstancesAnswerDto"},{"$ref":"#/components/schemas/AddAnotherAnswerDto"},{"$ref":"#/components/schemas/InfoAnswerDto"},{"$ref":"#/components/schemas/DropdownAnswerDto"},{"$ref":"#/components/schemas/EmptyAnswerDto"}],"discriminator":{"propertyName":"type"}},"status":{"$ref":"#/components/schemas/QuestionStatus"},"validation":{"$ref":"#/components/schemas/ValidationMessages"},"isCategoryQuestion":{"type":"boolean","example":false,"description":"True for root-type rules that render as category headers, not answerable questions"}},"required":["uuid","name","display","input","answer","status","isCategoryQuestion"]},"ScenarioFilingDto":{"type":"object","properties":{"uuid":{"type":"string","description":"Unique filing identifier","example":"550e8400-e29b-41d4-a716-446655440001"},"status":{"type":"string","description":"Filing lifecycle status","enum":["inProgress","prepared","identityVerified","inReview","submitted","deleted"],"example":"inProgress"},"statusChangedAt":{"format":"date-time","type":"string","description":"Timestamp when status last changed","example":"2024-01-15T14:45:00.000Z"},"progress":{"type":"number","description":"Completion progress percentage (0-100)","minimum":0,"maximum":100,"example":27},"createdAt":{"format":"date-time","type":"string","description":"Filing creation timestamp","example":"2024-01-15T10:30:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Filing last update timestamp","example":"2024-01-15T14:45:00.000Z"}},"required":["uuid","status","statusChangedAt","progress","createdAt","updatedAt"]},"ScenarioWithFilingsDto":{"type":"object","properties":{"uuid":{"type":"string","description":"Unique scenario identifier","example":"550e8400-e29b-41d4-a716-446655440002"},"name":{"description":"Scenario display name (translated)","example":{"en":"Income Tax 2024","de":"Einkommensteuer 2024"},"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"description":{"description":"Scenario description (translated)","example":{"en":"German income tax declaration for tax year 2024","de":"Deutsche Einkommensteuererklarung fur das Steuerjahr 2024"},"nullable":true,"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"year":{"type":"number","description":"Tax year for this scenario","example":2024},"formType":{"type":"string","description":"Which return the scenario files: income tax (ESt) or Anlage EÜR (EUER)","enum":["ESt","EUER"],"example":"ESt"},"version":{"type":"number","description":"Version of this scenario","example":1},"status":{"type":"string","description":"Scenario lifecycle status","enum":["active","review","inactive"],"example":"active"},"deadline":{"format":"date-time","type":"string","description":"Deadline for submitting filings for this scenario","example":"2025-07-31T23:59:59.000Z","nullable":true},"filings":{"description":"User's filings for this scenario (empty array if none)","type":"array","items":{"$ref":"#/components/schemas/ScenarioFilingDto"}}},"required":["uuid","year","formType","version","status","filings"]},"WageTaxOcrFieldsDto":{"type":"object","properties":{"taxClass":{"type":"string","example":"I"},"certificationPeriodStart":{"type":"string","example":"2024-01-01"},"certificationPeriodEnd":{"type":"string","example":"2024-10-31"},"pensionMonths":{"type":"string","example":"01-12"},"periodsWithoutWage":{"type":"number","example":0},"grossWages":{"type":"number","example":61500},"incomeTaxWithheld":{"type":"number","example":12079.32},"solidaritySurcharge":{"type":"number","example":0},"churchTax":{"type":"number","example":0},"churchTaxSpouse":{"type":"number","example":0},"pensionIncluded":{"type":"number","example":0},"pensionReducedTax":{"type":"number","example":0},"multiYearCompensation":{"type":"number","example":0},"taxOnReduced":{"type":"number","example":0},"solzOnReduced":{"type":"number","example":0},"churchTaxOnReduced":{"type":"number","example":0},"churchTaxSpouseReduced":{"type":"number","example":0},"shortTimeAllowance":{"type":"number","example":0},"taxFreeWagesDTA":{"type":"number","example":0},"taxFreeWagesForeignRelief":{"type":"number","example":0},"commuteAllowanceTaxFree":{"type":"number","example":0},"commuteAllowanceFlat":{"type":"number","example":0},"taxableCompensationMultiYear":{"type":"number","example":0},"mealSubsidy":{"type":"number","example":0},"dualHouseholdSubsidy":{"type":"number","example":0},"employerPension":{"type":"number","example":5719.5},"employerProfessionalPension":{"type":"number","example":0},"employeePension":{"type":"number","example":5719.5},"employeeProfessionalPension":{"type":"number","example":0},"employerHealthInsurance":{"type":"number","example":0},"employerPrivateHealthInsurance":{"type":"number","example":0},"employerLongTermCare":{"type":"number","example":0},"employeeHealthInsurance":{"type":"number","example":4088.3},"employeeNursingCare":{"type":"number","example":1190.3},"employeeUnemployment":{"type":"number","example":799.5},"privateHealthCareOrMinimum":{"type":"number","example":0},"pensionAllowanceBase":{"type":"number","example":0},"pensionStartYear":{"type":"number","example":2024},"deathBenefit":{"type":"number","example":0},"DTAturkey":{"type":"number","example":0}}},"WageTaxOcrResponseDto":{"type":"object","properties":{"fields":{"$ref":"#/components/schemas/WageTaxOcrFieldsDto"}},"required":["fields"]},"NavigationNodeDto":{"type":"object","properties":{"uuid":{"type":"string","description":"Unique identifier for the section","example":"b2ac8f1d-9b2e-5fec-bf59-3031df49c83f"},"name":{"description":"Translated name of the section","example":{"de":"","en":"About You"},"allOf":[{"$ref":"#/components/schemas/TranslationDto"}]},"ruleType":{"type":"string","description":"Type of navigation node","enum":["section","root"],"example":"section"},"enabled":{"type":"boolean","description":"Whether the section is enabled/accessible","example":true},"progress":{"type":"number","description":"Completion progress percentage (0-100)","example":45},"completed":{"type":"boolean","description":"Whether all questions in this section are completed","example":false},"usedFor":{"type":"string","description":"Identifies which person this navigation node belongs to. `personA` = primary taxpayer (self), `personB` = spouse. On top-level sections, partners should ignore this field and always show the default section name. On subsections, use this field to filter the left navigation when `isJointFiling` is true on the filing. Before joint filing is confirmed, only `personA` subsections are returned; after confirmation, `personB` subsections are included too.","enum":["personA","personB"],"example":"personA"},"icon":{"type":"string","description":"Icon identifier for the section (only on top-level sections)","example":"user"},"subsections":{"description":"Child subsections","type":"array","items":{"$ref":"#/components/schemas/NavigationNodeDto"}}},"required":["uuid","name","ruleType","enabled","progress","completed","usedFor"]},"TaxSavingTipItemDto":{"type":"object","properties":{"categoryName":{"type":"string","example":"Deductions"},"tipLabel":{"$ref":"#/components/schemas/TranslationDto"},"userFacingTip":{"$ref":"#/components/schemas/TranslationDto"}},"required":["categoryName","tipLabel","userFacingTip"]},"TaxSavingTipsForFilingResponseDto":{"type":"object","properties":{"tips":{"type":"array","items":{"$ref":"#/components/schemas/TaxSavingTipItemDto"}}},"required":["tips"]},"EligibilityCalloutDto":{"type":"object","properties":{"lead":{"type":"string","description":"Bold lead-in sentence for the info callout. Q1 only. Render before `body`.","example":"Foreign investments are fine."},"body":{"type":"string","description":"Body copy for the info callout, continuing from `lead`. Render both together as a single highlighted info box under Q1's bullet list — this is the \"foreign investments are fine\" clarification the ticket calls out explicitly, so partners reproduce it faithfully.","example":"If your only foreign connection is dividends, interest or share sales through a bank or broker, answer No — we support those, including foreign withholding tax."}},"required":["lead","body"]},"EligibilityOptionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier for this option, scoped to its question. Never changes once published — use it (not the label) as the key you send back in evaluate()'s answers map, and to persist which option a user picked.","example":"none"},"label":{"type":"string","description":"Display copy for this option, in the locale you requested. Render this as the option's visible text — it can change on a wording-only questionSetVersion bump, so don't key any logic off it.","example":"None of these"},"helperText":{"type":"string","description":"Secondary/explanatory copy shown under the option label (e.g. examples or a plain-language gloss of a tax term). Render smaller/muted under `label` when present; many options have none.","example":"Freelancers and professionals (Freiberufler)"},"isClearing":{"type":"boolean","description":"True only for the single option on this question that means \"this doesn't apply to me\" (or \"No\" on the yes/no question). In your UI, selecting this option should deselect every other option on the same question, and selecting any other option should deselect this one — that mutual-exclusivity rule ships with the content so you don't have to hardcode it per question.","example":true}},"required":["id","label","isClearing"]},"EligibilityQuestionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier for this question. Never changes once published — use it as the key in evaluate()'s answers map ({ questionId: [optionId, ...] }), not the heading text.","example":"foreignTies"},"heading":{"type":"string","description":"Question title, in the locale you requested. Render as the question's main heading.","example":"Did you have foreign income or live outside Germany in 2025?"},"subtext":{"type":"string","description":"Short instruction line shown under the heading, above the options.","example":"Answer Yes if any of these applied to you:"},"bullets":{"description":"Bullet list of example situations, shown under `subtext` before the options. Present on Q1 only — omit this block entirely for questions where it's absent, don't render an empty list.","example":["Salary, self-employment or business income from abroad"],"type":"array","items":{"type":"string"}},"callout":{"description":"Highlighted info box to render after the bullet list. Present on Q1 only — omit this block entirely when absent.","allOf":[{"$ref":"#/components/schemas/EligibilityCalloutDto"}]},"allowMultiple":{"type":"boolean","description":"Tells you which input control to render: false = radio buttons (exactly one answer, e.g. the yes/no question), true = checkboxes (any number of options, including none yet). Purely a rendering hint — evaluate()'s clean/disqualifying logic is identical either way.","example":false},"options":{"description":"The selectable options for this question, in display order.","type":"array","items":{"$ref":"#/components/schemas/EligibilityOptionResponseDto"}}},"required":["id","heading","subtext","allowMultiple","options"]},"EligibilityQuestionsResponseDto":{"type":"object","properties":{"taxYear":{"type":"number","description":"Echoes back the taxYear you requested.","example":2025},"locale":{"type":"string","enum":["en","de"],"description":"Echoes back the locale you requested — every copy field above is in this language."},"questionSetVersion":{"type":"string","description":"Identifies exactly which version of the question content you were shown. Store it alongside the user's answers and pass it back unchanged into evaluate()/notify() below — that's how we score against the rules the user actually saw, even if the content changes later.","example":"2026-08-11"},"questions":{"description":"Always exactly 4 questions, in the fixed order to present them in. Render them one at a time or all at once — evaluate() accepts answers for any subset, in any order.","type":"array","items":{"$ref":"#/components/schemas/EligibilityQuestionResponseDto"}}},"required":["taxYear","locale","questionSetVersion","questions"]},"EvaluateEligibilityDto":{"type":"object","properties":{"taxYear":{"type":"number","description":"Tax year the answers apply to","example":2025},"questionSetVersion":{"type":"string","description":"The questionSetVersion returned by GET /filing-eligibility-check/questions for this taxYear","example":"2026-08-11"},"locale":{"type":"string","enum":["en","de"],"description":"Language for the generic unsupported message, if returned"},"answers":{"type":"object","description":"Answers so far, keyed by questionId. Partial answer sets are accepted — omit a question that has not been answered yet.","example":{"foreignTies":["no"],"incomeSources":["none"]}},"scenarioUUID":{"type":"string","description":"Only meaningful when called with your own logged-in session (not a partner bearer token): the scenario this check is for, so the result ties into the same filing-eligibility gate as the rest of the filing flow. Ignored on partner-bearer calls.","format":"uuid"}},"required":["taxYear","questionSetVersion","locale","answers"]},"TriggeredByEntryDto":{"type":"object","properties":{"questionId":{"type":"string","description":"Which question was disqualifying — matches a questionId from GET .../questions.","example":"incomeSources"},"selectedOptionIds":{"description":"Exactly what the user/partner submitted for that question — kept for your own records.","example":["abroad"],"type":"array","items":{"type":"string"}}},"required":["questionId","selectedOptionIds"]},"EvaluateEligibilityResponseDto":{"type":"object","properties":{"outcome":{"type":"string","enum":["supported","unsupported","pending"],"description":"\"supported\" only once all 4 questions were present and clean in this call. \"unsupported\" as soon as any submitted question was disqualifying. \"pending\" otherwise — keep asking questions and calling evaluate() again."},"taxYear":{"type":"number","description":"Echoes back the taxYear you sent.","example":2025},"questionSetVersion":{"type":"string","description":"Echoes back the questionSetVersion you sent — this is what was actually scored.","example":"2026-08-11"},"triggeredBy":{"description":"Empty unless outcome is \"unsupported\". Which question(s)/option(s) disqualified this result — for your own visibility into what kinds of cases you're turning away. Never show this to the end user; show only the generic `message` below.","type":"array","items":{"$ref":"#/components/schemas/TriggeredByEntryDto"}},"message":{"type":"string","description":"Null unless outcome is \"unsupported\". The same generic rejection copy shown in the AnyTax player — render this to the end user verbatim, in the locale you requested. Do not pair it with anything from `triggeredBy`.","example":"Some parts of your return require a more complex filing than our current version supports. We're actively working on expanding coverage — your case may be supported in a future update. In the meantime, you can file directly via ELSTER or speak to a tax advisor."},"notifyOffer":{"type":"boolean","description":"True only when outcome is \"unsupported\". Show the end user a \"notify me when supported\" option when this is true, and call POST .../notify below if they opt in.","example":true}},"required":["outcome","taxYear","questionSetVersion","triggeredBy","notifyOffer"]},"NotifyEligibilityDto":{"type":"object","properties":{"email":{"type":"string","description":"Where to send a message once this taxYear becomes supported. Required when calling with a partner bearer token. Ignored (and not required) when calling with your own logged-in session — we use your account's own email instead, so you can't register someone else's email under your session.","example":"user@example.com"},"taxYear":{"type":"number","description":"Which tax year this signup is about — usually the taxYear you just evaluated.","example":2025},"questionSetVersion":{"type":"string","description":"The questionSetVersion you evaluated against, if you have one. Purely a record-keeping field — omit it if this signup didn't follow an evaluate() call.","example":"2026-08-11"},"triggeredBy":{"description":"The `triggeredBy` you got back from the evaluate() call that led to this signup, if any — lets us see what kind of case this signup is for. Optional; omit if you don't have it.","type":"array","items":{"$ref":"#/components/schemas/TriggeredByEntryDto"}}},"required":["taxYear"]},"NotifyEligibilityResponseDto":{"type":"object","properties":{"uuid":{"type":"string","description":"Opaque reference for this signup. Not needed for anything — the signup is looked up by (email, taxYear, partner) if you ever need to reference it again.","example":"b3f1e2a4-1234-4a5b-8c9d-abcdef123456"}},"required":["uuid"]},"PartnerUserLoginDto":{"type":"object","properties":{"slug":{"type":"string","example":"acme-bank","description":"Slug of your partner account, issued together with the client secret.","minLength":1,"maxLength":64},"clientSecret":{"type":"string","example":"Zk3vR8sQ1mXc7Tn5Yb2Lw9Hd4Jf6Ga0PeUoIiKqWtSx","description":"Client secret of your partner account. Send it from your servers only; never ship it to a browser or a mobile client.","minLength":1,"maxLength":512},"email":{"type":"string","example":"anna.schmidt@example.com","format":"email","description":"E-mail address of a user created under your partner account. Compared in lower case."}},"required":["slug","clientSecret","email"]},"PartnerUserTokenUserDto":{"type":"object","properties":{"id":{"type":"integer","description":"Identifier of the user. Keep it: `POST /api/v1/partner/sso/token` takes it as `userId`.","example":4821},"email":{"type":"string","description":"E-mail address of the user, in lower case as stored.","example":"anna.schmidt@example.com"},"name":{"type":"string","description":"Given name of the user.","example":"Anna"},"surname":{"type":"string","description":"Family name of the user.","example":"Schmidt"}},"required":["id","email","name","surname"]},"PartnerUserTokenResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"Access token of the user: an RS256-signed JWT. Send it as `Authorization: Bearer <accessToken>` on every call made for this user.","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."},"expiresIn":{"type":"integer","description":"Lifetime of `accessToken` in seconds, counted from now. Always 3600 (one hour).","example":3600},"user":{"description":"The user the token was issued for.","allOf":[{"$ref":"#/components/schemas/PartnerUserTokenUserDto"}]}},"required":["accessToken","expiresIn","user"]},"PartnerUserRegisterDto":{"type":"object","properties":{"slug":{"type":"string","example":"acme-bank","description":"Slug of your partner account, issued together with the client secret.","minLength":1,"maxLength":64},"clientSecret":{"type":"string","example":"Zk3vR8sQ1mXc7Tn5Yb2Lw9Hd4Jf6Ga0PeUoIiKqWtSx","description":"Client secret of your partner account. Send it from your servers only; never ship it to a browser or a mobile client.","minLength":1,"maxLength":512},"email":{"type":"string","example":"anna.schmidt@example.com","format":"email","description":"E-mail address of the user. Stored in lower case and unique within your partner account; it is the key `POST /api/v1/partner/users/login` looks the user up by."},"name":{"type":"string","example":"Anna","description":"Given name of the user. Letters, spaces, hyphens, apostrophes and periods only; at least 2 characters.","minLength":2},"surname":{"type":"string","example":"Schmidt","description":"Family name of the user. Letters, spaces, hyphens, apostrophes and periods only; at least 2 characters.","minLength":2}},"required":["slug","clientSecret","email","name","surname"]},"PartnerSsoTokenDto":{"type":"object","properties":{"slug":{"type":"string","example":"acme-bank","description":"Slug of your partner account, issued together with the client secret.","minLength":1,"maxLength":64},"clientSecret":{"type":"string","example":"Zk3vR8sQ1mXc7Tn5Yb2Lw9Hd4Jf6Ga0PeUoIiKqWtSx","description":"Client secret of your partner account. Send it from your servers only; never ship it to a browser or a mobile client.","minLength":1,"maxLength":512},"userId":{"type":"integer","example":4821,"minimum":1,"description":"Identifier of the user to sign in: `user.id` from `POST /api/v1/partner/users/register` or `POST /api/v1/partner/users/login`. The user must belong to your partner account and be active."},"returnPath":{"type":"string","example":"/account","default":"/filing","description":"Path inside the hosted web application the user lands on after sign-in. It must start with a single `/` (not `//`) and must not contain `://`, a backslash, whitespace or control characters. When it is omitted or breaks one of these rules the user lands on `/filing` and no error is returned; only a value longer than 512 characters is rejected with 400.","maxLength":512}},"required":["slug","clientSecret","userId"]},"PartnerSsoCodeResponseDto":{"type":"object","properties":{"ssoCode":{"type":"string","description":"Single-use code, 43 URL-safe characters. Pass it as the `code` query parameter of `GET /api/v1/partner/sso/exchange` in the browser of the user.","example":"Qm7xT2vK9cLr4Wd8Zs1Np6Yb3Hf5Jg0AeUoIiRqXtSw"},"expiresIn":{"type":"integer","description":"Lifetime of `ssoCode` in seconds, counted from now. Always 60.","example":60}},"required":["ssoCode","expiresIn"]},"CountryResponseDto":{"type":"object","properties":{"code":{"type":"string","example":"DE","description":"ISO 3166-1 alpha-2 code, used as `countryCode`"},"labelDe":{"type":"string","example":"Deutschland"},"labelEn":{"type":"string","example":"Germany"}},"required":["code","labelDe","labelEn"]},"VastAuthorizationDto":{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string","enum":["open","approved","rejected","expired","revoked","ignored","obsolete"]},"requestedAt":{"format":"date-time","type":"string","description":"When the user requested access"},"approvableUntil":{"format":"date-time","type":"string","description":"Last day the request can be approved (status open)"},"validUntil":{"format":"date-time","type":"string","description":"Last day access is valid"}},"required":["id","status","requestedAt"]},"VastStatusDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False when ELSTER import is not offered in this environment"},"available":{"type":"boolean","description":"False when ELSTER could not be reached for a status check"},"taxId":{"type":"string","description":"Known tax ID (filing, else account settings), to pre-fill the request form"},"dateOfBirth":{"type":"string","description":"Known date of birth (YYYY-MM-DD, filing, else account settings), to pre-fill the request form"},"authorization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/VastAuthorizationDto"}]}},"required":["enabled","available"]},"RequestVastAuthorizationDto":{"type":"object","properties":{"consent":{"type":"boolean","description":"The user consents to AnyTax retrieving their ELSTER data. Must be true."},"taxId":{"type":"string","description":"The user’s tax ID (IdNr). Saved to the account settings and the filing where it differs.","example":"04452397687"},"dateOfBirth":{"type":"string","description":"The user’s date of birth. Saved to the account settings and the filing where it differs.","example":"1990-04-23"},"replace":{"type":"boolean","description":"Cancel the pending request first and send a new one (\"request again\")."}},"required":["consent","taxId","dateOfBirth"]},"VastImportWarningDto":{"type":"object","properties":{"employer":{"type":"string","description":"Employer named on the certificate, when known"},"code":{"type":"string","enum":["unreadable","unsupportedVersion","otherTaxId","otherYear","alreadyImported","taxClassMissing","multiplePensions","multiYearPensionNotImported"],"description":"unreadable / unsupportedVersion / otherTaxId / otherYear: not imported. alreadyImported: imported earlier and confirmed by the user, so left as it is. taxClassMissing: imported without a tax class. multiplePensions: imported without the pension lines (8, 29–32). multiYearPensionNotImported (2024): imported without the non-reduced multi-year pension payments."}},"required":["code"]},"VastImportResultDto":{"type":"object","properties":{"imported":{"type":"number","description":"Wage tax certificates written to the filing"},"existingCertificates":{"type":"number","description":"Certificates the user entered by hand (possible duplicates)"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/VastImportWarningDto"}}},"required":["imported","existingCertificates","warnings"]},"ActivateVastAuthorizationDto":{"type":"object","properties":{"code":{"type":"string","description":"Activation code from the tax office letter","example":"AB12-CD34-EF56"}},"required":["code"]},"ResponseEstimatorDto":{"type":"object","properties":{"estimatedTax":{"type":"number","description":"Estimated tax refund or liability","example":3000},"taxableIncome":{"type":"number","description":"Calculated taxable income","example":45000},"taxBeforeWithholding":{"type":"number","description":"Income tax before withholding","example":5000},"finalTaxDue":{"type":"number","description":"Final tax due","example":2000}},"required":["estimatedTax","taxableIncome","taxBeforeWithholding","finalTaxDue"]},"ApiMeta":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"string","format":"date-time","example":"2025-01-19T10:30:00.000Z"},"responseTime":{"type":"number","example":42}}}}},"x-tagGroups":[{"name":"Partner platform","tags":["Partner platform","Filing Eligibility Check"]},{"name":"User Management","tags":["Auth API","User API"]},{"name":"Tax Services","tags":["Filing API","Scenario API","Question API","Answer API","Navigation API","Wage Tax API","Tax Saving Tip API","ELSTER Import API"]}]}