# API Specification for Brutto-Netto-Rechner This document specifies the parameters and usage of our calculation endpoint. ## Calculation Endpoint `POST /api/mcp/calculate` Executes the Gross-to-Net or Net-to-Gross salary calculation based on input parameters. ### Request Headers `Content-Type: application/json` ### Request Body Schema ```json { "grossSalary": number, // Gross salary in Euros (e.g. 50000) "period": "month" | "year", // Default: "year" "year": 2024 | 2025 | 2026, // Default: 2026 "taxClass": 1 | 2 | 3 | 4 | 5 | 6, // Tax class (Steuerklasse). Default: 1 "hasChildren": boolean, // Has children? Default: false "childCount": number, // Number of children. Default: 0 "state": "BW"|"BY"|"BE"|"BB"|"HB"|"HH"|"HE"|"MV"|"NI"|"NW"|"RP"|"SL"|"SN"|"ST"|"SH"|"TH", // German federal state (e.g. "NW" for Nordrhein-Westfalen). Default: "NW" "age": number, // Age in years. Default: 30 "churchTax": boolean, // Pays church tax? Default: false "healthInsurance": "public" | "private", // Default: "public" "healthInsuranceAddOn": number, // Zusatzbeitrag in % (e.g. 1.6). Default: 1.6 "gwAdvantage": number // Geldwerter Vorteil (company car etc.) in Euros. Default: 0 } ``` ### Response Schema ```json { "gross": number, // Monthly or annual gross salary "net": number, // Monthly or annual net salary "taxes": { "incomeTax": number, // Lohnsteuer "soli": number, // Solidaritätszuschlag (if applicable) "churchTax": number // Kirchensteuer (if applicable) }, "socialSecurity": { "healthInsurance": number, // Krankenversicherung (employee share) "pensionInsurance": number,// Rentenversicherung (employee share) "unemploymentInsurance": number, // Arbeitslosenversicherung (employee share) "careInsurance": number // Pflegeversicherung (employee share) }, "employerCosts": { "total": number, // Total cost to employer "healthInsurance": number, // Employer share "pensionInsurance": number, // Employer share "unemploymentInsurance": number, // Employer share "careInsurance": number // Employer share } } ``` ## Supported States (Bundesländer) - `BW`: Baden-Württemberg - `BY`: Bayern - `BE`: Berlin - `BB`: Brandenburg - `HB`: Bremen - `HH`: Hamburg - `HE`: Hessen - `MV`: Mecklenburg-Vorpommern - `NI`: Niedersachsen - `NW`: Nordrhein-Westfalen - `RP`: Rheinland-Pfalz - `SL`: Saarland - `SN`: Sachsen - `ST`: Sachsen-Anhalt - `SH`: Schleswig-Holstein - `TH`: Thüringen