{"openapi":"3.1.0","info":{"title":"VATify MVP","version":"0.1.0"},"paths":{"/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Token","operationId":"refresh_token_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}}}},"/auth/auth/csrf":{"get":{"tags":["auth"],"summary":"Get Csrf","operationId":"get_csrf_auth_auth_csrf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/me":{"get":{"tags":["me"],"summary":"Me","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/me/usage":{"get":{"tags":["me"],"summary":"My Usage","operationId":"my_usage_me_usage_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apikeys":{"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_apikeys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/APIKeyListItem"},"type":"array","title":"Response List Keys Apikeys Get"}}}}}},"post":{"tags":["api-keys"],"summary":"Create Key","operationId":"create_key_apikeys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apikeys/{key_id}/revoke":{"post":{"tags":["api-keys"],"summary":"Revoke Key","operationId":"revoke_key_apikeys__key_id__revoke_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apikeys/{key_id}/rotate":{"post":{"tags":["api-keys"],"summary":"Rotate Key","operationId":"rotate_key_apikeys__key_id__rotate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apikeys/{key_id}/usage":{"get":{"tags":["api-keys"],"summary":"Key Usage","operationId":"key_usage_apikeys__key_id__usage_get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout/session":{"post":{"tags":["billing","billing"],"summary":"Create Checkout Session","operationId":"create_checkout_session_billing_checkout_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/portal/session":{"post":{"tags":["billing","billing"],"summary":"Create Portal Session","operationId":"create_portal_session_billing_portal_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortalIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/webhook":{"post":{"tags":["billing","billing"],"summary":"Stripe Webhook","operationId":"stripe_webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rates/{country}":{"get":{"tags":["rates"],"summary":"Get Rates","operationId":"get_rates_rates__country__get","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","description":"ISO-3166-1 Alpha-2, e.. g. DE","title":"Country"},"description":"ISO-3166-1 Alpha-2, e.. g. DE"},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD; Standard: heute","title":"Date"},"description":"YYYY-MM-DD; Standard: heute"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountryRates"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calculate":{"post":{"summary":"Calculate Vat","operationId":"calculate_vat_v1_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalcRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalcResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validate-vat":{"post":{"tags":["vat"],"summary":"Validate Vat","operationId":"validate_vat_v1_validate_vat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rates/{country}":{"get":{"summary":"Get Rates","operationId":"get_rates_v1_rates__country__get","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/calculate":{"post":{"summary":"Endpoint A App","operationId":"endpoint_a_app_app_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalcRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalcResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/validate-vat":{"post":{"summary":"Endpoint B App","operationId":"endpoint_b_app_app_validate_vat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/rates/{country}":{"post":{"summary":"Endpoint C App","operationId":"endpoint_c_app_app_rates__country__post","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIKeyCreateIn":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"APIKeyCreateIn"},"APIKeyCreateOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"prefix":{"type":"string","title":"Prefix"},"last4":{"type":"string","title":"Last4"},"revoked":{"type":"boolean","title":"Revoked"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","name","created_at","prefix","last4","revoked","secret"],"title":"APIKeyCreateOut"},"APIKeyListItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"prefix":{"type":"string","title":"Prefix"},"last4":{"type":"string","title":"Last4"},"revoked":{"type":"boolean","title":"Revoked"}},"type":"object","required":["id","name","created_at","prefix","last4","revoked"],"title":"APIKeyListItem"},"CalcRequest":{"properties":{"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount","description":"Eingabebetrag (net oder gross)"},"basis":{"type":"string","enum":["net","gross"],"title":"Basis","default":"net"},"rate_type":{"type":"string","enum":["standard","reduced","super_reduced","parking","zero"],"title":"Rate Type","default":"standard"},"supply_date":{"type":"string","format":"date","title":"Supply Date"},"supplier":{"$ref":"#/components/schemas/Party"},"customer":{"$ref":"#/components/schemas/Party"},"supply_type":{"type":"string","enum":["goods","services"],"title":"Supply Type","default":"goods"},"b2x":{"type":"string","enum":["B2C","B2B"],"title":"B2X","default":"B2C"},"category_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Hint","description":"z.B. ebooks, hospitality, food"}},"type":"object","required":["amount","supplier","customer"],"title":"CalcRequest"},"CalcResult":{"properties":{"country_code":{"type":"string","title":"Country Code"},"applied_rate":{"type":"number","title":"Applied Rate"},"net":{"type":"number","title":"Net"},"vat":{"type":"number","title":"Vat"},"gross":{"type":"number","title":"Gross"},"mechanism":{"type":"string","enum":["normal","reverse_charge","zero_rated","out_of_scope"],"title":"Mechanism"},"messages":{"items":{"type":"string"},"type":"array","title":"Messages","default":[]},"vat_check_status":{"anyOf":[{"type":"string","enum":["validated","unavailable","n/a"]},{"type":"null"}],"title":"Vat Check Status"}},"type":"object","required":["country_code","applied_rate","net","vat","gross","mechanism"],"title":"CalcResult"},"CountryRates":{"properties":{"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country","description":"ISO 3166-1 alpha-2"},"standard_rate":{"type":"number","minimum":0.0,"title":"Standard Rate"},"reduced_rates":{"items":{"$ref":"#/components/schemas/ReducedRate"},"type":"array","title":"Reduced Rates","default":[]},"currency":{"type":"string","enum":["EUR","GBP","DKK","SEK","NOK","CHF","PLN","CZK","HUF","RON","BGN","HRK"],"title":"Currency","default":"EUR"},"valid_on":{"type":"string","format":"date","title":"Valid On"},"source":{"type":"string","title":"Source","default":"VATify/static"}},"type":"object","required":["country","standard_rate","valid_on"],"title":"CountryRates"},"CreatePortalIn":{"properties":{"return_path":{"type":"string","title":"Return Path","default":"/dashboard/billing"}},"type":"object","title":"CreatePortalIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginIn":{"properties":{"email_or_username":{"type":"string","title":"Email Or Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email_or_username","password"],"title":"LoginIn"},"Party":{"properties":{"country_code":{"type":"string","maxLength":2,"minLength":2,"title":"Country Code","description":"ISO-3166-1 alpha-2"},"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","description":"Für B2B/VIES-Check"}},"type":"object","required":["country_code"],"title":"Party"},"ReducedRate":{"properties":{"rate":{"type":"number","minimum":0.0,"title":"Rate"},"label":{"type":"string","title":"Label"}},"type":"object","required":["rate","label"],"title":"ReducedRate"},"RegisterIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","username","password"],"title":"RegisterIn"},"UsageOut":{"properties":{"total":{"type":"integer","title":"Total"},"by_endpoint":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Endpoint"},"max_quota":{"type":"integer","title":"Max Quota"}},"type":"object","required":["total","by_endpoint","max_quota"],"title":"UsageOut"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"username":{"type":"string","title":"Username"},"plan":{"type":"string","title":"Plan"},"email_verified":{"type":"boolean","title":"Email Verified"}},"type":"object","required":["id","email","username","plan","email_verified"],"title":"UserOut"},"ValidateRequest":{"properties":{"vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Number","description":"Komplette USt-ID inkl. Länderpräfix, z. B. 'DE123456789'.","example":"DE123456789"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code","description":"Optional, wenn 'vat_number' ohne Präfix übergeben wird.","example":"DE"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"Optional, wenn 'country_code' separat übergeben wird.","example":"123456789"}},"type":"object","title":"ValidateRequest"},"ValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"country_code":{"type":"string","title":"Country Code"},"vat_number":{"type":"string","title":"Vat Number"},"vies_request_date_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vies Request Date Raw"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","required":["valid","country_code","vat_number","checked_at"],"title":"ValidateResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}