{"openapi":"3.1.0","jsonSchemaDialect":"https://spec.openapis.org/oas/3.1/dialect/base","info":{"title":"KiteLedger API","version":"1.0.0","description":"OpenAPI description for every current Next.js route handler under /api. The documented session and workspace restrictions are enforced by the handlers. Template example routes are identified as examples."},"servers":[{"url":"https://kiteledger.de","description":"KiteLedger HTTPS origin"}],"tags":[{"name":"Administration"},{"name":"Authentication"},{"name":"Other"},{"name":"CSV tools"},{"name":"Account"},{"name":"Incoming invoices"},{"name":"Invoice archive"},{"name":"Outgoing invoices"},{"name":"Ledger"},{"name":"Billing"},{"name":"VAT"},{"name":"Files"},{"name":"Site review"},{"name":"Waitlist"}],"paths":{"/api/admin/account":{"get":{"operationId":"getApiAdminAccount","summary":"Read the current administrator account","description":"Access: Verified admin session.\n\nAccount settings JSON","tags":["Administration"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Account settings JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified admin session","x-route-path":"/api/admin/account"},"patch":{"operationId":"patchApiAdminAccount","summary":"Update administrator account settings","description":"Access: Verified admin session.\n\nUpdated account settings JSON\n\nRequest: JSON name string (1–100 characters).\n\nMutations require a same-origin request.","tags":["Administration"],"requestBody":{"required":true,"description":"JSON name string (1–100 characters).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountUpdate"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated account settings JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified admin session","x-route-path":"/api/admin/account"},"head":{"operationId":"headApiAdminAccount","summary":"Read response headers for read the current administrator account","description":"Access: Verified admin session.\n\nSame status and headers as GET; the response body is omitted.","tags":["Administration"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified admin session","x-route-path":"/api/admin/account","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiAdminAccount","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Administration"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, PATCH, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/admin/e-invoice-guide-preview":{"get":{"operationId":"getApiAdminEInvoiceGuidePreview","summary":"Read an unpublished guide preview","description":"Access: Verified admin session.\n\nGuide preview JSON","tags":["Administration"],"parameters":[{"name":"lang","in":"query","required":false,"description":"Preview language; the route selects the supported locale.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Guide preview JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EInvoiceGuidePreviewResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified admin session","x-route-path":"/api/admin/e-invoice-guide-preview"},"head":{"operationId":"headApiAdminEInvoiceGuidePreview","summary":"Read response headers for read an unpublished guide preview","description":"Access: Verified admin session.\n\nSame status and headers as GET; the response body is omitted.","tags":["Administration"],"parameters":[{"name":"lang","in":"query","required":false,"description":"Preview language; the route selects the supported locale.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified admin session","x-route-path":"/api/admin/e-invoice-guide-preview","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiAdminEInvoiceGuidePreview","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Administration"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/admin/site-review":{"post":{"operationId":"postApiAdminSiteReview","summary":"Create or refresh the owner-only site-review link","description":"Access: Verified owner admin session.\n\nA review URL in JSON\n\nMutations require a same-origin request.","tags":["Administration"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"A review URL in JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteReviewLinkResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified owner admin session","x-route-path":"/api/admin/site-review"},"options":{"operationId":"optionsApiAdminSiteReview","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Administration"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/auth/{authPath}":{"get":{"operationId":"getApiAuthAuthPath}","summary":"Better Auth read operations","description":"Access: Action-dependent Better Auth session.\n\nBetter Auth response; response shape depends on the action.\n\nThe handler is Better Auth’s catch-all. Email sign-in and sign-up are unauthenticated actions; session, account, and administrative actions apply Better Auth’s own per-action session rules.","tags":["Authentication"],"parameters":[{"name":"authPath","in":"path","required":true,"description":"Path identifier for authPath.","schema":{"type":"string"}}],"responses":{"200":{"description":"Better Auth response; response shape depends on the action."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Action-dependent Better Auth session","x-route-path":"/api/auth/{authPath}"},"post":{"operationId":"postApiAuthAuthPath}","summary":"Better Auth sign-in, sign-up, session and account actions","description":"Access: Action-dependent Better Auth session.\n\nBetter Auth response; request and response shapes depend on the action.\n\nRequest: The Better Auth action schema for the selected path; see the module-generated auth API. Sign-in and sign-up actions accept their documented email/password fields. Session-only actions require the Better Auth session cookie.\n\nThe handler is Better Auth’s catch-all. Email sign-in and sign-up are unauthenticated actions; session, account, and administrative actions apply Better Auth’s own per-action session rules.","tags":["Authentication"],"parameters":[{"name":"authPath","in":"path","required":true,"description":"Path identifier for authPath.","schema":{"type":"string"}}],"requestBody":{"required":false,"description":"The Better Auth action schema for the selected path; see the module-generated auth API. Sign-in and sign-up actions accept their documented email/password fields. Session-only actions require the Better Auth session cookie.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Better Auth response; request and response shapes depend on the action."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Action-dependent Better Auth session","x-route-path":"/api/auth/{authPath}"},"head":{"operationId":"headApiAuthAuthPath}","summary":"Read response headers for better auth read operations","description":"Access: Action-dependent Better Auth session.\n\nSame status and headers as GET; the response body is omitted.\n\nThe handler is Better Auth’s catch-all. Email sign-in and sign-up are unauthenticated actions; session, account, and administrative actions apply Better Auth’s own per-action session rules.","tags":["Authentication"],"parameters":[{"name":"authPath","in":"path","required":true,"description":"Path identifier for authPath.","schema":{"type":"string"}}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Action-dependent Better Auth session","x-route-path":"/api/auth/{authPath}","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiAuthAuthPath}","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Authentication"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/contact":{"post":{"operationId":"postApiContact","summary":"Record the signed-in customer invoice-format support request","description":"Access: Session.\n\n201 JSON { ok: true }\n\nRequest: JSON requestType must be 'invoice_export_configuration'.\n\nMutations require a same-origin request.","tags":["Other"],"requestBody":{"required":true,"description":"JSON requestType must be 'invoice_export_configuration'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"201":{"description":"201 JSON { ok: true }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/contact"},"options":{"operationId":"optionsApiContact","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/csv-export":{"get":{"operationId":"getApiCsvExport","summary":"Describe one workspace CSV export source and its columns","description":"Access: Verified customer session with paid workspace access.\n\nCSV source description JSON","tags":["CSV tools"],"parameters":[{"name":"source","in":"query","required":true,"description":"Registered export source identifier.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"CSV source description JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvExportDescriptionResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/csv-export"},"post":{"operationId":"postApiCsvExport","summary":"Create a bounded CSV export snapshot","description":"Access: Verified customer session with paid workspace access.\n\nCSV export response JSON containing CSV text, record count, and filename\n\nRequest: JSON sourceId, required source-specific filters, optional selected columns, and delimiter (comma or semicolon).\n\nMutations require a same-origin request.","tags":["CSV tools"],"requestBody":{"required":true,"description":"JSON sourceId, required source-specific filters, optional selected columns, and delimiter (comma or semicolon).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvExportRequest"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"CSV export response JSON containing CSV text, record count, and filename","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvExportResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Route-specific error response (408).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Route-specific error response (413).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"504":{"description":"Route-specific error response (504).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/csv-export"},"head":{"operationId":"headApiCsvExport","summary":"Read response headers for describe one workspace csv export source and its columns","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["CSV tools"],"parameters":[{"name":"source","in":"query","required":true,"description":"Registered export source identifier.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"401":{"description":"The caller is not authenticated."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/csv-export","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCsvExport","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["CSV tools"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/csv-import":{"get":{"operationId":"getApiCsvImport","summary":"Describe the available bank-import target","description":"Access: Verified customer session with paid workspace access.\n\nTarget description JSON","tags":["CSV tools"],"parameters":[{"name":"target","in":"query","required":true,"description":"The registered bank-transactions target; exactly one target parameter is required.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Target description JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportDescriptionResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/csv-import"},"post":{"operationId":"postApiCsvImport","summary":"Preview or commit an import using the declared import mode","description":"Access: Verified customer session with paid workspace access.\n\nPreview or commit counts JSON\n\nRequest: JSON action (preview or commit), targetId, CSV text, delimiter, and mapping of target field names to zero-based CSV column indexes. Optional mode and expectedVersions apply where supported.\n\nMutations require a same-origin request.","tags":["CSV tools"],"requestBody":{"required":true,"description":"JSON action (preview or commit), targetId, CSV text, delimiter, and mapping of target field names to zero-based CSV column indexes. Optional mode and expectedVersions apply where supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportRequest"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Preview or commit counts JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Route-specific error response (413).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/csv-import"},"head":{"operationId":"headApiCsvImport","summary":"Read response headers for describe the available bank-import target","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["CSV tools"],"parameters":[{"name":"target","in":"query","required":true,"description":"The registered bank-transactions target; exactly one target parameter is required.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"401":{"description":"The caller is not authenticated."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/csv-import","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCsvImport","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["CSV tools"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/account/deletion-preview":{"get":{"operationId":"getApiCustomerAccountDeletionPreview","summary":"Read the caller-scoped deletion preview","description":"Access: Session.\n\nDeletion preview JSON","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Deletion preview JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccountDeletionPreviewSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/customer/account/deletion-preview"},"head":{"operationId":"headApiCustomerAccountDeletionPreview","summary":"Read response headers for read the caller-scoped deletion preview","description":"Access: Session.\n\nSame status and headers as GET; the response body is omitted.","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Session","x-route-path":"/api/customer/account/deletion-preview","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerAccountDeletionPreview","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Account"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/account":{"get":{"operationId":"getApiCustomerAccount","summary":"Read the caller account summary","description":"Access: Session.\n\nAccount summary JSON","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Account summary JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccountResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/customer/account"},"delete":{"operationId":"deleteApiCustomerAccount","summary":"Request deletion of the caller account and associated data","description":"Access: Session.\n\nDeletion result JSON\n\nMutations require a same-origin request.","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Deletion result JSON"},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"423":{"description":"Route-specific error response (423).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/customer/account"},"head":{"operationId":"headApiCustomerAccount","summary":"Read response headers for read the caller account summary","description":"Access: Session.\n\nSame status and headers as GET; the response body is omitted.","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Session","x-route-path":"/api/customer/account","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerAccount","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Account"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, DELETE, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/accounting-setup":{"get":{"operationId":"getApiCustomerAccountingSetup","summary":"Read the paid workspace accounting setup","description":"Access: Verified customer session with paid workspace access.\n\nAccounting setup JSON","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Accounting setup JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingSetupResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/accounting-setup"},"patch":{"operationId":"patchApiCustomerAccountingSetup","summary":"Replace the workspace accounting setup","description":"Access: Verified customer session with paid workspace access.\n\nSaved accounting setup JSON\n\nRequest: JSON accounting chart, account mappings, and DATEV export settings as defined by AccountingSetupSchema.\n\nMutations require a same-origin request.","tags":["Account"],"requestBody":{"required":true,"description":"JSON accounting chart, account mappings, and DATEV export settings as defined by AccountingSetupSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingSetupSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Saved accounting setup JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingSetupResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/accounting-setup"},"head":{"operationId":"headApiCustomerAccountingSetup","summary":"Read response headers for read the paid workspace accounting setup","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Account"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/accounting-setup","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerAccountingSetup","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Account"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, PATCH, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/datev-export/example":{"get":{"operationId":"getApiCustomerDatevExportExample","summary":"Download the illustrative EXTF example for the signed-in paid workspace","description":"Access: Verified customer session with paid workspace access.\n\nWindows-1252 text/csv attachment","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Windows-1252 text/csv attachment","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/datev-export/example"},"head":{"operationId":"headApiCustomerDatevExportExample","summary":"Read response headers for download the illustrative extf example for the signed-in paid workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/datev-export/example","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerDatevExportExample","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/datev-export":{"post":{"operationId":"postApiCustomerDatevExport","summary":"Create a DATEV export for a date range","description":"Access: Verified customer session with paid workspace access.\n\nExport archive download\n\nRequest: JSON fields: from and to (YYYY-MM-DD); includeDocuments is an optional boolean defaulting to false.\n\nMutations require a same-origin request.","tags":["Other"],"requestBody":{"required":true,"description":"JSON fields: from and to (YYYY-MM-DD); includeDocuments is an optional boolean defaulting to false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatevExportRequest"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Export archive download","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Route-specific error response (413).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/datev-export"},"options":{"operationId":"optionsApiCustomerDatevExport","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/free-plan/activate":{"post":{"operationId":"postApiCustomerFreePlanActivate","summary":"Activate the free plan for the eligible signed-in workspace manager","description":"Access: Verified workspace manager session.\n\nFree-plan activation result JSON\n\nMutations require a same-origin request.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Free-plan activation result JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateFreePlanResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified workspace manager session","x-route-path":"/api/customer/free-plan/activate"},"options":{"operationId":"optionsApiCustomerFreePlanActivate","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/free-start":{"get":{"operationId":"getApiCustomerFreeStart","summary":"Continue to sign-up or the signed-in dashboard","description":"Access: Public.\n\nRedirect to sign-up or dashboard","tags":["Other"],"parameters":[{"name":"lang","in":"query","required":false,"description":"Requested locale, selected from the supported locales.","schema":{"type":"string"}}],"responses":{"307":{"description":"Redirect to sign-up or dashboard"},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/customer/free-start"},"head":{"operationId":"headApiCustomerFreeStart","summary":"Read response headers for continue to sign-up or the signed-in dashboard","description":"Access: Public.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"parameters":[{"name":"lang","in":"query","required":false,"description":"Requested locale, selected from the supported locales.","schema":{"type":"string"}}],"responses":{"307":{"description":"Same status and headers as GET; the response body is omitted."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Public","x-route-path":"/api/customer/free-start","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerFreeStart","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/incoming-invoices":{"get":{"operationId":"getApiCustomerIncomingInvoices","summary":"List incoming invoices for the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nIncoming invoice list JSON","tags":["Incoming invoices"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Incoming invoice list JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceListResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices"},"post":{"operationId":"postApiCustomerIncomingInvoices","summary":"Register an incoming invoice already stored in the workspace","description":"Access: Verified customer session with paid workspace access.\n\nCreated incoming invoice JSON\n\nRequest: JSON fileKey, filename, size (maximum 50 MiB), and lowercase SHA-256 digest.\n\nMutations require a same-origin request.","tags":["Incoming invoices"],"requestBody":{"required":true,"description":"JSON fileKey, filename, size (maximum 50 MiB), and lowercase SHA-256 digest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceUploadRequestSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Created incoming invoice JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceUploadResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Route-specific error response (413).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices"},"head":{"operationId":"headApiCustomerIncomingInvoices","summary":"Read response headers for list incoming invoices for the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Incoming invoices"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerIncomingInvoices","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Incoming invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/incoming-invoices/{invoiceId}":{"get":{"operationId":"getApiCustomerIncomingInvoicesInvoiceId}","summary":"Read an incoming invoice owned by the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nIncoming invoice detail JSON","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Incoming invoice detail JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceReadResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}"},"delete":{"operationId":"deleteApiCustomerIncomingInvoicesInvoiceId}","summary":"Delete an incoming invoice owned by the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nDeletion result JSON\n\nMutations require a same-origin request.","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Deletion result JSON"},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}"},"head":{"operationId":"headApiCustomerIncomingInvoicesInvoiceId}","summary":"Read response headers for read an incoming invoice owned by the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerIncomingInvoicesInvoiceId}","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Incoming invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, DELETE, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/incoming-invoices/{invoiceId}/download":{"get":{"operationId":"getApiCustomerIncomingInvoicesInvoiceIdDownload","summary":"Download a workspace-owned incoming invoice file","description":"Access: Verified customer session with paid workspace access.\n\nInvoice file attachment","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}},{"name":"verify","in":"query","required":false,"description":"Set to 1 to request the file-integrity verification response.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Invoice file attachment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceDownloadCheckSchema"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}/download"},"head":{"operationId":"headApiCustomerIncomingInvoicesInvoiceIdDownload","summary":"Read response headers for download a workspace-owned incoming invoice file","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}},{"name":"verify","in":"query","required":false,"description":"Set to 1 to request the file-integrity verification response.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}/download","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerIncomingInvoicesInvoiceIdDownload","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Incoming invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/incoming-invoices/{invoiceId}/retention":{"patch":{"operationId":"patchApiCustomerIncomingInvoicesInvoiceIdRetention","summary":"Update retention metadata on a workspace-owned incoming invoice","description":"Access: Verified customer session with paid workspace access.\n\nUpdated incoming invoice JSON\n\nRequest: JSON retention values defined by IncomingInvoiceRetentionUpdateSchema.\n\nMutations require a same-origin request.","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"JSON retention values defined by IncomingInvoiceRetentionUpdateSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceRetentionUpdateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated incoming invoice JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceReadResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}/retention"},"options":{"operationId":"optionsApiCustomerIncomingInvoicesInvoiceIdRetention","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Incoming invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"PATCH, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/incoming-invoices/{invoiceId}/validate":{"post":{"operationId":"postApiCustomerIncomingInvoicesInvoiceIdValidate","summary":"Run validation for a workspace-owned incoming invoice","description":"Access: Verified customer session with paid workspace access.\n\nUpdated invoice and validation result JSON\n\nMutations require a same-origin request.","tags":["Incoming invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated invoice and validation result JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingInvoiceReadResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/incoming-invoices/{invoiceId}/validate"},"options":{"operationId":"optionsApiCustomerIncomingInvoicesInvoiceIdValidate","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Incoming invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive":{"get":{"operationId":"getApiCustomerInvoiceArchive","summary":"List finalized invoices for the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nInvoice archive JSON","tags":["Invoice archive"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Invoice archive JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceArchiveResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive"},"head":{"operationId":"headApiCustomerInvoiceArchive","summary":"Read response headers for list finalized invoices for the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Invoice archive"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoiceArchive","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/{invoiceId}/files/{kind}":{"get":{"operationId":"getApiCustomerInvoiceArchiveInvoiceIdFilesKind}","summary":"Download or verify an archived invoice file","description":"Access: Verified customer session with paid workspace access.\n\nArchived file or integrity JSON","tags":["Invoice archive"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"Path identifier for kind.","schema":{"type":"string"}},{"name":"verify","in":"query","required":false,"description":"Set to 1 to return file-integrity metadata instead of the file.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Archived file or integrity JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceFileIntegrityResponseSchema"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/{invoiceId}/files/{kind}"},"head":{"operationId":"headApiCustomerInvoiceArchiveInvoiceIdFilesKind}","summary":"Read response headers for download or verify an archived invoice file","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Invoice archive"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"Path identifier for kind.","schema":{"type":"string"}},{"name":"verify","in":"query","required":false,"description":"Set to 1 to return file-integrity metadata instead of the file.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/{invoiceId}/files/{kind}","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoiceArchiveInvoiceIdFilesKind}","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/{invoiceId}/retention":{"patch":{"operationId":"patchApiCustomerInvoiceArchiveInvoiceIdRetention","summary":"Update a finalized invoice retention record","description":"Access: Verified customer session with paid workspace access.\n\nUpdated archive record JSON\n\nRequest: JSON category, tax-hold, regulated-entity, and date fields from RetentionUpdateSchema.\n\nMutations require a same-origin request.","tags":["Invoice archive"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"JSON category, tax-hold, regulated-entity, and date fields from RetentionUpdateSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionUpdateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated archive record JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizedInvoiceResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/{invoiceId}/retention"},"delete":{"operationId":"deleteApiCustomerInvoiceArchiveInvoiceIdRetention","summary":"Delete an archive record when retention policy permits","description":"Access: Verified customer session with paid workspace access.\n\nDeletion result JSON\n\nMutations require a same-origin request.","tags":["Invoice archive"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Deletion result JSON"},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/{invoiceId}/retention"},"options":{"operationId":"optionsApiCustomerInvoiceArchiveInvoiceIdRetention","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"PATCH, DELETE, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/audit":{"get":{"operationId":"getApiCustomerInvoiceArchiveAudit","summary":"Read bounded workspace audit events","description":"Access: Verified customer session with paid workspace access.\n\nAudit event list JSON","tags":["Invoice archive"],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive ISO date-time lower bound.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Inclusive ISO date-time upper bound.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Audit event list JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceAuditListResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/audit"},"head":{"operationId":"headApiCustomerInvoiceArchiveAudit","summary":"Read response headers for read bounded workspace audit events","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Invoice archive"],"parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive ISO date-time lower bound.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Inclusive ISO date-time upper bound.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/audit","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoiceArchiveAudit","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/finalize":{"post":{"operationId":"postApiCustomerInvoiceArchiveFinalize","summary":"Finalize the prepared invoice archive record","description":"Access: Verified customer session with paid workspace access.\n\nFinalized invoice JSON\n\nRequest: JSON draftId, candidateNumber, xmlFileKey, pdfFileKey, and retention fields.\n\nMutations require a same-origin request.","tags":["Invoice archive"],"requestBody":{"required":true,"description":"JSON draftId, candidateNumber, xmlFileKey, pdfFileKey, and retention fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeInvoiceRequestSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Finalized invoice JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizedInvoiceResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/finalize"},"options":{"operationId":"optionsApiCustomerInvoiceArchiveFinalize","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/next-number":{"get":{"operationId":"getApiCustomerInvoiceArchiveNextNumber","summary":"Read the next available workspace invoice number","description":"Access: Verified customer session with paid workspace access.\n\nNext-number JSON","tags":["Invoice archive"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Next-number JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextInvoiceNumberResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/next-number"},"head":{"operationId":"headApiCustomerInvoiceArchiveNextNumber","summary":"Read response headers for read the next available workspace invoice number","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Invoice archive"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/next-number","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoiceArchiveNextNumber","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/prepare":{"post":{"operationId":"postApiCustomerInvoiceArchivePrepare","summary":"Prepare XML and PDF archive files from a draft","description":"Access: Verified customer session with paid workspace access.\n\nPrepared invoice file payload JSON\n\nRequest: JSON draftId and candidateNumber.\n\nMutations require a same-origin request.","tags":["Invoice archive"],"requestBody":{"required":true,"description":"JSON draftId and candidateNumber.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceArchivePreparationRequestSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Prepared invoice file payload JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceArchivePreparationResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/prepare"},"options":{"operationId":"optionsApiCustomerInvoiceArchivePrepare","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-archive/procedure-template":{"get":{"operationId":"getApiCustomerInvoiceArchiveProcedureTemplate","summary":"Download the fillable archiving procedure template","description":"Access: Verified customer session with paid workspace access.\n\nPDF attachment","tags":["Invoice archive"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"PDF attachment","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/procedure-template"},"head":{"operationId":"headApiCustomerInvoiceArchiveProcedureTemplate","summary":"Read response headers for download the fillable archiving procedure template","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Invoice archive"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-archive/procedure-template","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoiceArchiveProcedureTemplate","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Invoice archive"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoice-usage":{"get":{"operationId":"getApiCustomerInvoiceUsage","summary":"Read invoice usage for the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nInvoice usage JSON","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Invoice usage JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUsageSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-usage"},"head":{"operationId":"headApiCustomerInvoiceUsage","summary":"Read response headers for read invoice usage for the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoice-usage","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoiceUsage","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoices":{"get":{"operationId":"getApiCustomerInvoices","summary":"List invoice drafts in the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nInvoice draft list JSON","tags":["Outgoing invoices"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Invoice draft list JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftListResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices"},"post":{"operationId":"postApiCustomerInvoices","summary":"Create an invoice draft","description":"Access: Verified customer session with paid workspace access.\n\nCreated invoice draft JSON\n\nRequest: JSON draft fields validated by InvoiceDraftWriteSchema.\n\nMutations require a same-origin request.","tags":["Outgoing invoices"],"requestBody":{"required":true,"description":"JSON draft fields validated by InvoiceDraftWriteSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftWriteSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Created invoice draft JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices"},"head":{"operationId":"headApiCustomerInvoices","summary":"Read response headers for list invoice drafts in the authenticated workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Outgoing invoices"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoices","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Outgoing invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoices/{invoiceId}":{"get":{"operationId":"getApiCustomerInvoicesInvoiceId}","summary":"Read a draft and its validation history","description":"Access: Verified customer session with paid workspace access.\n\nInvoice draft with validation and activity JSON","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Invoice draft with validation and activity JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenInvoiceResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}"},"patch":{"operationId":"patchApiCustomerInvoicesInvoiceId}","summary":"Update a workspace invoice draft","description":"Access: Verified customer session with paid workspace access.\n\nUpdated invoice draft JSON\n\nRequest: JSON object containing the updated draft.\n\nMutations require a same-origin request.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"JSON object containing the updated draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftUpdateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated invoice draft JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}"},"delete":{"operationId":"deleteApiCustomerInvoicesInvoiceId}","summary":"Delete a workspace invoice draft","description":"Access: Verified customer session with paid workspace access.\n\nDeletion result JSON\n\nMutations require a same-origin request.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Deletion result JSON"},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}"},"head":{"operationId":"headApiCustomerInvoicesInvoiceId}","summary":"Read response headers for read a draft and its validation history","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoicesInvoiceId}","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Outgoing invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, PATCH, DELETE, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoices/{invoiceId}/deliveries":{"post":{"operationId":"postApiCustomerInvoicesInvoiceIdDeliveries","summary":"Send or record an invoice delivery attempt","description":"Access: Verified customer session with paid workspace access.\n\nDelivery attempt result JSON\n\nMutations require a same-origin request.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Delivery attempt result JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDeliveryActionResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}/deliveries"},"options":{"operationId":"optionsApiCustomerInvoicesInvoiceIdDeliveries","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Outgoing invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoices/{invoiceId}/export":{"get":{"operationId":"getApiCustomerInvoicesInvoiceIdExport","summary":"Prepare the current structured invoice XML file","description":"Access: Verified customer session with paid workspace access.\n\nStructured invoice file details and XML content JSON","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Structured invoice file details and XML content JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredInvoiceFileResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}/export"},"post":{"operationId":"postApiCustomerInvoicesInvoiceIdExport","summary":"Record that the validated XML download milestone was reached","description":"Access: Verified customer session with paid workspace access.\n\nJSON { firstXmlDownload: boolean }\n\nMutations require a same-origin request.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"JSON { firstXmlDownload: boolean }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelMilestoneResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}/export"},"head":{"operationId":"headApiCustomerInvoicesInvoiceIdExport","summary":"Read response headers for prepare the current structured invoice xml file","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"404":{"description":"The requested resource or registered operation was not found."},"409":{"description":"Route-specific error response (409)."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}/export","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerInvoicesInvoiceIdExport","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Outgoing invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/invoices/{invoiceId}/validate":{"post":{"operationId":"postApiCustomerInvoicesInvoiceIdValidate","summary":"Validate a draft and store the result","description":"Access: Verified customer session with paid workspace access.\n\nValidation findings and status JSON\n\nRequest: JSON object containing the current invoice draft to validate.\n\nMutations require a same-origin request.","tags":["Outgoing invoices"],"parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Path identifier for invoiceId.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"JSON object containing the current invoice draft to validate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDraftUpdateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Validation findings and status JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceValidationActionResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/invoices/{invoiceId}/validate"},"options":{"operationId":"optionsApiCustomerInvoicesInvoiceIdValidate","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Outgoing invoices"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/ledger":{"get":{"operationId":"getApiCustomerLedger","summary":"Read the ledger for a calendar year","description":"Access: Verified customer session with paid workspace access.\n\nLedger JSON","tags":["Ledger"],"parameters":[{"name":"year","in":"query","required":true,"description":"Calendar year from 2000 through 2100.","schema":{"type":"integer"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Ledger JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/ledger"},"patch":{"operationId":"patchApiCustomerLedger","summary":"Record currency conversion for a ledger income","description":"Access: Verified customer session with paid workspace access.\n\nUpdated ledger income JSON\n\nRequest: JSON incomeId and positive exchangeRate.\n\nMutations require a same-origin request.","tags":["Ledger"],"requestBody":{"required":true,"description":"JSON incomeId and positive exchangeRate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerConversionSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated ledger income JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerConversionResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/ledger"},"head":{"operationId":"headApiCustomerLedger","summary":"Read response headers for read the ledger for a calendar year","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Ledger"],"parameters":[{"name":"year","in":"query","required":true,"description":"Calendar year from 2000 through 2100.","schema":{"type":"integer"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/ledger","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerLedger","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Ledger"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, PATCH, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/ledger/expenses":{"post":{"operationId":"postApiCustomerLedgerExpenses","summary":"Create a workspace expense","description":"Access: Verified customer session with paid workspace access.\n\nCreated expense JSON\n\nRequest: JSON category, description, amount, vatRate, expenseDate, and optional paired receiptKey and receiptFilename.\n\nMutations require a same-origin request.","tags":["Ledger"],"requestBody":{"required":true,"description":"JSON category, description, amount, vatRate, expenseDate, and optional paired receiptKey and receiptFilename.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerExpenseCreateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Created expense JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerExpenseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/ledger/expenses"},"options":{"operationId":"optionsApiCustomerLedgerExpenses","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Ledger"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/ledger/export":{"post":{"operationId":"postApiCustomerLedgerExport","summary":"Build a DATEV ledger export for a calendar year","description":"Access: Verified customer session with paid workspace access.\n\nZIP archive containing the DATEV export files\n\nRequest: JSON year (2000–2100).\n\nMutations require a same-origin request.","tags":["Ledger"],"requestBody":{"required":true,"description":"JSON year (2000–2100).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerExportRequestSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"ZIP archive containing the DATEV export files","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/ledger/export"},"options":{"operationId":"optionsApiCustomerLedgerExport","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Ledger"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/ledger/matches":{"post":{"operationId":"postApiCustomerLedgerMatches","summary":"Match workspace bank transaction and income records","description":"Access: Verified customer session with paid workspace access.\n\nMatched payment JSON\n\nRequest: JSON transactionId and incomeId.\n\nMutations require a same-origin request.","tags":["Ledger"],"requestBody":{"required":true,"description":"JSON transactionId and incomeId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerMatchSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Matched payment JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerMatchResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/ledger/matches"},"options":{"operationId":"optionsApiCustomerLedgerMatches","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Ledger"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/paid-access":{"get":{"operationId":"getApiCustomerPaidAccess","summary":"Read the signed-in user plan and workspace access","description":"Access: Session.\n\nPaid-access and workspace role JSON","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Paid-access and workspace role JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidInvoiceAccessResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/customer/paid-access"},"head":{"operationId":"headApiCustomerPaidAccess","summary":"Read response headers for read the signed-in user plan and workspace access","description":"Access: Session.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Session","x-route-path":"/api/customer/paid-access","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerPaidAccess","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/seller-profile":{"get":{"operationId":"getApiCustomerSellerProfile","summary":"Read the authenticated workspace seller profile","description":"Access: Verified customer session with paid workspace access.\n\nSeller profile JSON or null","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Seller profile JSON or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerBusinessProfileResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/seller-profile"},"patch":{"operationId":"patchApiCustomerSellerProfile","summary":"Replace the workspace seller profile","description":"Access: Verified customer session with paid workspace access.\n\nSaved seller profile JSON\n\nRequest: JSON seller identity, address, tax, and contact fields from SellerBusinessProfileSchema.\n\nMutations require a same-origin request.","tags":["Other"],"requestBody":{"required":true,"description":"JSON seller identity, address, tax, and contact fields from SellerBusinessProfileSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerBusinessProfileSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Saved seller profile JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerBusinessProfileResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/seller-profile"},"head":{"operationId":"headApiCustomerSellerProfile","summary":"Read response headers for read the authenticated workspace seller profile","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/seller-profile","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerSellerProfile","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, PATCH, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/subscription-checkout/verify":{"post":{"operationId":"postApiCustomerSubscriptionCheckoutVerify","summary":"Verify the checkout for the caller workspace","description":"Access: Verified workspace manager session.\n\nCheckout verification state JSON; 202 while pending\n\nRequest: JSON sessionId from the checkout return flow.\n\nMutations require a same-origin request.","tags":["Billing"],"requestBody":{"required":true,"description":"JSON sessionId from the checkout return flow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCheckoutVerifyRequestSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Checkout verification state JSON; 202 while pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCheckoutVerifyResponseSchema"}}}},"202":{"description":"Route-specific error response (202).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"Route-specific error response (502).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified workspace manager session","x-route-path":"/api/customer/subscription-checkout/verify"},"options":{"operationId":"optionsApiCustomerSubscriptionCheckoutVerify","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Billing"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/vat-report":{"get":{"operationId":"getApiCustomerVatReport","summary":"Calculate or read a monthly or quarterly VAT report","description":"Access: Verified customer session with paid workspace access.\n\nVAT report JSON","tags":["VAT"],"parameters":[{"name":"year","in":"query","required":true,"description":"Tax year from 2000 through 2100.","schema":{"type":"integer"}},{"name":"periodType","in":"query","required":true,"description":"month or quarter.","schema":{"type":"string"}},{"name":"period","in":"query","required":true,"description":"Month 1–12 or quarter 1–4.","schema":{"type":"integer"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"VAT report JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatReturnResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-report"},"head":{"operationId":"headApiCustomerVatReport","summary":"Read response headers for calculate or read a monthly or quarterly vat report","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["VAT"],"parameters":[{"name":"year","in":"query","required":true,"description":"Tax year from 2000 through 2100.","schema":{"type":"integer"}},{"name":"periodType","in":"query","required":true,"description":"month or quarter.","schema":{"type":"string"}},{"name":"period","in":"query","required":true,"description":"Month 1–12 or quarter 1–4.","schema":{"type":"integer"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"409":{"description":"Route-specific error response (409)."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-report","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerVatReport","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["VAT"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/vat-report/pdf":{"get":{"operationId":"getApiCustomerVatReportPdf","summary":"Download the VAT report for a selected tax period","description":"Access: Verified customer session with paid workspace access.\n\nPDF attachment","tags":["VAT"],"parameters":[{"name":"year","in":"query","required":true,"description":"Tax year from 2000 through 2100.","schema":{"type":"integer"}},{"name":"periodType","in":"query","required":true,"description":"month or quarter.","schema":{"type":"string"}},{"name":"period","in":"query","required":true,"description":"Month 1–12 or quarter 1–4.","schema":{"type":"integer"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"PDF attachment","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-report/pdf"},"head":{"operationId":"headApiCustomerVatReportPdf","summary":"Read response headers for download the vat report for a selected tax period","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["VAT"],"parameters":[{"name":"year","in":"query","required":true,"description":"Tax year from 2000 through 2100.","schema":{"type":"integer"}},{"name":"periodType","in":"query","required":true,"description":"month or quarter.","schema":{"type":"string"}},{"name":"period","in":"query","required":true,"description":"Month 1–12 or quarter 1–4.","schema":{"type":"integer"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"409":{"description":"Route-specific error response (409)."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-report/pdf","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerVatReportPdf","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["VAT"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/vat-report/review":{"patch":{"operationId":"patchApiCustomerVatReportReview","summary":"Set VAT deductibility for an incoming invoice","description":"Access: Verified customer session with paid workspace access.\n\nUpdated review status JSON\n\nRequest: JSON invoiceId and status (deductible, not_deductible, or null).\n\nMutations require a same-origin request.","tags":["VAT"],"requestBody":{"required":true,"description":"JSON invoiceId and status (deductible, not_deductible, or null).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatDeductibilityUpdateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated review status JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatDeductibilityResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-report/review"},"options":{"operationId":"optionsApiCustomerVatReportReview","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["VAT"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"PATCH, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/vat-settings":{"get":{"operationId":"getApiCustomerVatSettings","summary":"Read the workspace VAT setting","description":"Access: Verified customer session with paid workspace access.\n\nVAT settings JSON","tags":["VAT"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"VAT settings JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatSettingResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-settings"},"patch":{"operationId":"patchApiCustomerVatSettings","summary":"Update small-business VAT status","description":"Access: Verified customer session with paid workspace access.\n\nUpdated VAT settings JSON\n\nRequest: JSON boolean kleinunternehmer.\n\nMutations require a same-origin request.","tags":["VAT"],"requestBody":{"required":true,"description":"JSON boolean kleinunternehmer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatSettingUpdateSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Updated VAT settings JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatSettingResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-settings"},"head":{"operationId":"headApiCustomerVatSettings","summary":"Read response headers for read the workspace vat setting","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["VAT"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"402":{"description":"Route-specific error response (402)."},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/customer/vat-settings","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerVatSettings","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["VAT"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, PATCH, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/customer/workspace":{"get":{"operationId":"getApiCustomerWorkspace","summary":"Read or initialize the caller workspace","description":"Access: Session.\n\nWorkspace id and createdAt JSON","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Workspace id and createdAt JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerWorkspaceResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/customer/workspace"},"head":{"operationId":"headApiCustomerWorkspace","summary":"Read response headers for read or initialize the caller workspace","description":"Access: Session.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Session","x-route-path":"/api/customer/workspace","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiCustomerWorkspace","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/example":{"get":{"operationId":"getApiExample","summary":"List the example items","description":"Access: Public.\n\nExample items JSON\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"responses":{"200":{"description":"Example items JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleList"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/example"},"post":{"operationId":"postApiExample","summary":"Create an example item","description":"Access: Public.\n\nCreated example item JSON\n\nRequest: JSON name and description fields from ExampleCreate.\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"requestBody":{"required":true,"description":"JSON name and description fields from ExampleCreate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleCreate"}}}},"responses":{"201":{"description":"Created example item JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleItem"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/example"},"head":{"operationId":"headApiExample","summary":"Read response headers for list the example items","description":"Access: Public.\n\nSame status and headers as GET; the response body is omitted.\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Public","x-route-path":"/api/example","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiExample","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/example-secure":{"get":{"operationId":"getApiExampleSecure","summary":"Read the signed-in user example record","description":"Access: Session.\n\nCaller-scoped user JSON or null\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Caller-scoped user JSON or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSecureReadResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/example-secure"},"post":{"operationId":"postApiExampleSecure","summary":"Create a caller-scoped example record","description":"Access: Session.\n\nCreated caller-scoped record JSON\n\nRequest: JSON name string; stored and queried only for the authenticated user.\n\nMutations require a same-origin request.\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"requestBody":{"required":true,"description":"JSON name string; stored and queried only for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSecureWrite"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"201":{"description":"Created caller-scoped record JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSecureWriteResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/example-secure"},"patch":{"operationId":"patchApiExampleSecure","summary":"Update a caller-scoped example record","description":"Access: Session.\n\nUpdate result JSON\n\nRequest: JSON name string; the record is scoped to the authenticated user.\n\nMutations require a same-origin request.\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"requestBody":{"required":true,"description":"JSON name string; the record is scoped to the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSecureWrite"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Update result JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSecurePatchResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Session","x-route-path":"/api/example-secure"},"head":{"operationId":"headApiExampleSecure","summary":"Read response headers for read the signed-in user example record","description":"Access: Session.\n\nSame status and headers as GET; the response body is omitted.\n\nThis is the template’s example endpoint, not an invoice or bookkeeping API.","tags":["Other"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The caller is not authenticated."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Session","x-route-path":"/api/example-secure","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiExampleSecure","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, POST, PATCH, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/files/{key}":{"get":{"operationId":"getApiFilesKey}","summary":"Download a file only when it belongs to the paid workspace","description":"Access: Verified customer session with paid workspace access.\n\nPrivate file bytes; unauthorized and unknown keys return not found","tags":["Files"],"parameters":[{"name":"key","in":"path","required":true,"description":"Path identifier for key.","schema":{"type":"string"}},{"name":"download","in":"query","required":false,"description":"Set to true to request an attachment response.","schema":{"type":"string"}},{"name":"filename","in":"query","required":false,"description":"Optional download filename.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Private file bytes; unauthorized and unknown keys return not found","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The Better Auth session is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"The requested resource or registered operation was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/files/{key}"},"head":{"operationId":"headApiFilesKey}","summary":"Read response headers for download a file only when it belongs to the paid workspace","description":"Access: Verified customer session with paid workspace access.\n\nSame status and headers as GET; the response body is omitted.","tags":["Files"],"parameters":[{"name":"key","in":"path","required":true,"description":"Path identifier for key.","schema":{"type":"string"}},{"name":"download","in":"query","required":false,"description":"Set to true to request an attachment response.","schema":{"type":"string"}},{"name":"filename","in":"query","required":false,"description":"Optional download filename.","schema":{"type":"string"}}],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"401":{"description":"The Better Auth session is missing or invalid."},"404":{"description":"The requested resource or registered operation was not found."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/files/{key}","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiFilesKey}","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Files"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/locale":{"post":{"operationId":"postApiLocale","summary":"Set the locale cookie","description":"Access: Public.\n\nSelected locale JSON\n\nRequest: JSON locale: de or en.\n\nMutations require a same-origin request.","tags":["Other"],"requestBody":{"required":true,"description":"JSON locale: de or en.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocaleRequest"}}}},"responses":{"200":{"description":"Selected locale JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocaleResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/locale"},"options":{"operationId":"optionsApiLocale","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/pdf/document":{"post":{"operationId":"postApiPdfDocument","summary":"Render a validated document specification as PDF","description":"Access: Public.\n\nPDF attachment\n\nRequest: JSON document spec using the supported invoice or document-block model. Maximum request body size is 25 MiB.\n\nThis route currently has no session or role check; callers can submit any valid document spec within the body-size limit.","tags":["Other"],"requestBody":{"required":true,"description":"JSON document spec using the supported invoice or document-block model. Maximum request body size is 25 MiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentSpecSchema"}}}},"responses":{"200":{"description":"PDF attachment","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Route-specific error response (413).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Route-specific error response (422).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/pdf/document"},"options":{"operationId":"optionsApiPdfDocument","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/signup/google-status":{"get":{"operationId":"getApiSignupGoogleStatus","summary":"Read whether Google sign-in is enabled","description":"Access: Public.\n\nGoogle sign-in status JSON","tags":["Other"],"responses":{"200":{"description":"Google sign-in status JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSignupStatus"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/signup/google-status"},"head":{"operationId":"headApiSignupGoogleStatus","summary":"Read response headers for read whether google sign-in is enabled","description":"Access: Public.\n\nSame status and headers as GET; the response body is omitted.","tags":["Other"],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Public","x-route-path":"/api/signup/google-status","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiSignupGoogleStatus","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Other"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/site-review/claim":{"post":{"operationId":"postApiSiteReviewClaim","summary":"Exchange the review token for a browser cookie","description":"Access: Possession of the review link token.\n\nClaim confirmation JSON and an HttpOnly review cookie\n\nRequest: JSON token copied from the private review link.\n\nMutations require a same-origin request.","tags":["Site review"],"requestBody":{"required":true,"description":"JSON token copied from the private review link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteReviewClaimRequest"}}}},"responses":{"200":{"description":"Claim confirmation JSON and an HttpOnly review cookie","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteReviewClaimResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Possession of the review link token","x-route-path":"/api/site-review/claim"},"options":{"operationId":"optionsApiSiteReviewClaim","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Site review"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/site-review/status":{"get":{"operationId":"getApiSiteReviewStatus","summary":"Report whether this browser has an active review cookie","description":"Access: Public.\n\nBoolean active status JSON; returns false when no review cookie is present","tags":["Site review"],"responses":{"200":{"description":"Boolean active status JSON; returns false when no review cookie is present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteReviewStatusResponse"}}}},"500":{"description":"Route-specific error response (500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/site-review/status"},"head":{"operationId":"headApiSiteReviewStatus","summary":"Read response headers for report whether this browser has an active review cookie","description":"Access: Public.\n\nSame status and headers as GET; the response body is omitted.","tags":["Site review"],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"500":{"description":"Route-specific error response (500)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Public","x-route-path":"/api/site-review/status","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiSiteReviewStatus","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Site review"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/stripe-billing/checkout":{"post":{"operationId":"postApiStripeBillingCheckout","summary":"Create hosted checkout for a workspace plan","description":"Access: Verified workspace manager session.\n\nHosted checkout URL JSON\n\nRequest: JSON planId (starter or pro), interval (month or year), optional locale, and optional returnTo.\n\nMutations require a same-origin request.","tags":["Billing"],"requestBody":{"required":true,"description":"JSON planId (starter or pro), interval (month or year), optional locale, and optional returnTo.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSubscriptionCheckoutRequestSchema"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Hosted checkout URL JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSubscriptionCheckoutResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified workspace manager session","x-route-path":"/api/stripe-billing/checkout"},"options":{"operationId":"optionsApiStripeBillingCheckout","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Billing"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/stripe-billing/portal":{"post":{"operationId":"postApiStripeBillingPortal","summary":"Create a billing portal session for the signed-in workspace manager","description":"Access: Verified workspace manager session.\n\nHosted billing portal URL JSON\n\nMutations require a same-origin request.","tags":["Billing"],"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Hosted billing portal URL JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPortalResponseSchema"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified workspace manager session","x-route-path":"/api/stripe-billing/portal"},"options":{"operationId":"optionsApiStripeBillingPortal","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Billing"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/stripe-billing/verify":{"get":{"operationId":"getApiStripeBillingVerify","summary":"Verify a checkout using its session identifier","description":"Access: Public.\n\nVerification status and public payment result JSON","tags":["Billing"],"parameters":[{"name":"session_id","in":"query","required":false,"description":"Checkout session identifier; checkout_session_id is also accepted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Verification status and public payment result JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutVerificationResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"Route-specific error response (502).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Route-specific error response (503).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/stripe-billing/verify"},"head":{"operationId":"headApiStripeBillingVerify","summary":"Read response headers for verify a checkout using its session identifier","description":"Access: Public.\n\nSame status and headers as GET; the response body is omitted.","tags":["Billing"],"parameters":[{"name":"session_id","in":"query","required":false,"description":"Checkout session identifier; checkout_session_id is also accepted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Same status and headers as GET; the response body is omitted."},"400":{"description":"The request did not satisfy the route validation rules."},"502":{"description":"Route-specific error response (502)."},"503":{"description":"Route-specific error response (503)."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Public","x-route-path":"/api/stripe-billing/verify","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiStripeBillingVerify","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Billing"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/upload":{"post":{"operationId":"postApiUpload","summary":"Request a signed upload URL or multipart fallback","description":"Access: Verified customer session with paid workspace access.\n\nUpload ticket JSON or uploaded file result\n\nRequest: JSON filename, mime_type, size, and optional visibility; the module also accepts its documented multipart fallback.\n\nMutations require a same-origin request.","tags":["Files"],"requestBody":{"required":true,"description":"JSON filename, mime_type, size, and optional visibility; the module also accepts its documented multipart fallback.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Upload ticket JSON or uploaded file result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicketOrFile"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Route-specific error response (413).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/upload"},"options":{"operationId":"optionsApiUpload","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Files"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/upload/confirm":{"post":{"operationId":"postApiUploadConfirm","summary":"Confirm an upload and register its file key","description":"Access: Verified customer session with paid workspace access.\n\nUploaded file metadata JSON\n\nRequest: JSON upload_id from the upload ticket.\n\nMutations require a same-origin request.","tags":["Files"],"requestBody":{"required":true,"description":"JSON upload_id from the upload ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadConfirmRequest"}}}},"security":[{"BetterAuthSession":[]}],"responses":{"200":{"description":"Uploaded file metadata JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadConfirmResponse"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Route-specific error response (402).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Verified customer session with paid workspace access","x-route-path":"/api/upload/confirm"},"options":{"operationId":"optionsApiUploadConfirm","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Files"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/waitlist":{"post":{"operationId":"postApiWaitlist","summary":"Submit a waitlist sign-up for email confirmation","description":"Access: Public.\n\nWaitlist status JSON; normally 202 pending confirmation and 200 when already confirmed\n\nRequest: JSON email, consent: true, optional locale (de or en), and optional companyWebsite honeypot field.\n\nMutations require a same-origin request.","tags":["Waitlist"],"requestBody":{"required":true,"description":"JSON email, consent: true, optional locale (de or en), and optional companyWebsite honeypot field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/waitlistSchema"}}}},"responses":{"200":{"description":"Waitlist status JSON; normally 202 pending confirmation and 200 when already confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/waitlistSignupResponseSchema"}}}},"202":{"description":"Waitlist status JSON; normally 202 pending confirmation and 200 when already confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/waitlistSignupResponseSchema"}}}},"400":{"description":"The request did not satisfy the route validation rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The caller does not satisfy the route authorization or request-origin requirements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Route-specific error response (409).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Public","x-route-path":"/api/waitlist"},"options":{"operationId":"optionsApiWaitlist","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Waitlist"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"POST, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}},"/api/waitlist/confirm":{"get":{"operationId":"getApiWaitlistConfirm","summary":"Consume a waitlist confirmation token and redirect to the confirmation page","description":"Access: Possession of the confirmation token.\n\nRedirect to the waitlist confirmation page","tags":["Waitlist"],"parameters":[{"name":"token","in":"query","required":true,"description":"Single-use confirmation token.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Optional locale; en selects English and other values select German.","schema":{"type":"string"}}],"responses":{"303":{"description":"Redirect to the waitlist confirmation page"},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-access-requirement":"Possession of the confirmation token","x-route-path":"/api/waitlist/confirm"},"head":{"operationId":"headApiWaitlistConfirm","summary":"Read response headers for consume a waitlist confirmation token and redirect to the confirmation page","description":"Access: Possession of the confirmation token.\n\nSame status and headers as GET; the response body is omitted.","tags":["Waitlist"],"parameters":[{"name":"token","in":"query","required":true,"description":"Single-use confirmation token.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Optional locale; en selects English and other values select German.","schema":{"type":"string"}}],"responses":{"303":{"description":"Same status and headers as GET; the response body is omitted."},"default":{"description":"Additional route-specific error responses; see the human-readable API documentation."}},"x-access-requirement":"Possession of the confirmation token","x-route-path":"/api/waitlist/confirm","x-automatically-generated":"Next.js HEAD fallback for GET"},"options":{"operationId":"optionsApiWaitlistConfirm","summary":"List the methods supported by this route","description":"Automatically generated by Next.js. This metadata response does not return route data or change application state.","tags":["Waitlist"],"responses":{"204":{"description":"No content. The Allow header lists this route’s supported methods.","headers":{"Allow":{"schema":{"type":"string","example":"GET, HEAD, OPTIONS"}}}}},"x-automatically-generated":"Next.js OPTIONS response"}}},"components":{"securitySchemes":{"BetterAuthSession":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Use the signed-in Better Auth session cookie. Secure deployments may apply the browser Secure cookie prefix."}},"schemas":{"AdminAccountResponse":{"type":"object","properties":{"account":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["name","email"],"additionalProperties":false}},"required":["account"],"additionalProperties":false},"AdminAccountUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"AccountingSetupResponse":{"type":"object","properties":{"setup":{"type":"object","properties":{"chartId":{"type":"string","enum":["skr03","skr04"]},"debtorNumberStart":{"type":"integer","minimum":10000,"maximum":699999999},"creditorNumberStart":{"type":"integer","minimum":70000,"maximum":999999999},"vatMappings":{"type":"array","items":{"type":"object","properties":{"rate":{"type":"string","enum":["19","7","0"]},"incomeAccount":{"type":"string","pattern":"^\\d{4,8}$"},"expenseAccount":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["rate","incomeAccount","expenseAccount"],"additionalProperties":false},"minItems":3,"maxItems":3},"standardAccounts":{"type":"object","properties":{"receivables":{"type":"string","pattern":"^\\d{4,8}$"},"revenue19":{"type":"string","pattern":"^\\d{4,8}$"},"revenue7":{"type":"string","pattern":"^\\d{4,8}$"},"revenue0":{"type":"string","pattern":"^\\d{4,8}$"},"outputVat19":{"type":"string","pattern":"^\\d{4,8}$"},"outputVat7":{"type":"string","pattern":"^\\d{4,8}$"},"inputVat19":{"type":"string","pattern":"^\\d{4,8}$"},"inputVat7":{"type":"string","pattern":"^\\d{4,8}$"},"bank":{"type":"string","pattern":"^\\d{4,8}$"},"cash":{"type":"string","pattern":"^\\d{4,8}$"},"reverseChargeRevenue":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["receivables","revenue19","revenue7","revenue0","outputVat19","outputVat7","inputVat19","inputVat7","bank","cash","reverseChargeRevenue"],"additionalProperties":false},"datevExport":{"type":"object","properties":{"beraterNumber":{"type":"string","pattern":"^(?:|\\d{1,7})$"},"mandantenNumber":{"type":"string","pattern":"^(?:|\\d{1,5})$"},"fiscalYearStart":{"type":"string","pattern":"^(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"accountLength":{"type":"integer","minimum":4,"maximum":8}},"required":["beraterNumber","mandantenNumber","fiscalYearStart","accountLength"],"additionalProperties":false}},"required":["chartId","debtorNumberStart","creditorNumberStart","vatMappings","standardAccounts","datevExport"],"additionalProperties":false,"nullable":true}},"required":["setup"],"additionalProperties":false},"AccountingSetupSchema":{"type":"object","properties":{"chartId":{"type":"string","enum":["skr03","skr04"]},"debtorNumberStart":{"type":"integer","minimum":10000,"maximum":699999999},"creditorNumberStart":{"type":"integer","minimum":70000,"maximum":999999999},"vatMappings":{"type":"array","items":{"type":"object","properties":{"rate":{"type":"string","enum":["19","7","0"]},"incomeAccount":{"type":"string","pattern":"^\\d{4,8}$"},"expenseAccount":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["rate","incomeAccount","expenseAccount"],"additionalProperties":false},"minItems":3,"maxItems":3},"standardAccounts":{"type":"object","properties":{"receivables":{"type":"string","pattern":"^\\d{4,8}$"},"revenue19":{"type":"string","pattern":"^\\d{4,8}$"},"revenue7":{"type":"string","pattern":"^\\d{4,8}$"},"revenue0":{"type":"string","pattern":"^\\d{4,8}$"},"outputVat19":{"type":"string","pattern":"^\\d{4,8}$"},"outputVat7":{"type":"string","pattern":"^\\d{4,8}$"},"inputVat19":{"type":"string","pattern":"^\\d{4,8}$"},"inputVat7":{"type":"string","pattern":"^\\d{4,8}$"},"bank":{"type":"string","pattern":"^\\d{4,8}$"},"cash":{"type":"string","pattern":"^\\d{4,8}$"},"reverseChargeRevenue":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["receivables","revenue19","revenue7","revenue0","outputVat19","outputVat7","inputVat19","inputVat7","bank","cash","reverseChargeRevenue"],"additionalProperties":false},"datevExport":{"type":"object","properties":{"beraterNumber":{"type":"string","pattern":"^(?:|\\d{1,7})$"},"mandantenNumber":{"type":"string","pattern":"^(?:|\\d{1,5})$"},"fiscalYearStart":{"type":"string","pattern":"^(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"accountLength":{"type":"integer","minimum":4,"maximum":8}},"required":["beraterNumber","mandantenNumber","fiscalYearStart","accountLength"],"additionalProperties":false}},"required":["chartId","debtorNumberStart","creditorNumberStart","vatMappings","standardAccounts","datevExport"],"additionalProperties":false},"CustomerAccountResponse":{"type":"object","properties":{"account":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["name","email"],"additionalProperties":false}},"required":["account"],"additionalProperties":false},"CustomerAccountDeletionPreviewSchema":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false},"deletionPending":{"type":"boolean"},"removals":{"type":"object","properties":{"accountIdentityAndSessions":{"type":"integer","minimum":0},"workspaceProfileAndSettings":{"type":"integer","minimum":0},"invoiceDrafts":{"type":"integer","minimum":0},"invoiceRelatedData":{"type":"integer","minimum":0},"eligibleIncomingFilesAndRecords":{"type":"integer","minimum":0},"eligibleArchiveInvoices":{"type":"integer","minimum":0},"eligibleBookkeepingRecords":{"type":"integer","minimum":0},"otherWorkspaceRecords":{"type":"integer","minimum":0},"storedObjects":{"type":"integer","minimum":0}},"required":["accountIdentityAndSessions","workspaceProfileAndSettings","invoiceDrafts","invoiceRelatedData","eligibleIncomingFilesAndRecords","eligibleArchiveInvoices","eligibleBookkeepingRecords","otherWorkspaceRecords","storedObjects"],"additionalProperties":false},"protectedRecords":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"legalBasis":{"type":"string"},"count":{"type":"integer","exclusiveMinimum":true,"minimum":0},"retentionEnd":{"type":"string","nullable":true},"deletionEligibleAt":{"type":"string","nullable":true},"taxHoldUntil":{"type":"string","nullable":true},"taxHoldOpen":{"type":"boolean"},"missingDate":{"type":"boolean"}},"required":["category","legalBasis","count","retentionEnd","deletionEligibleAt","taxHoldUntil","taxHoldOpen","missingDate"],"additionalProperties":false}},"auditRecordWillRemain":{"type":"boolean","enum":[true]},"backupsAndOtherSystemsVerified":{"type":"boolean","enum":[false]}},"required":["account","deletionPending","removals","protectedRecords","auditRecordWillRemain","backupsAndOtherSystemsVerified"],"additionalProperties":false},"CustomerWorkspaceResponse":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","createdAt"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false},"EInvoiceGuidePreviewResponseSchema":{"type":"object","properties":{"article":{"type":"object","properties":{"locale":{"type":"string","enum":["de","en"]},"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"statusLabel":{"type":"string","minLength":1},"intro":{"type":"string","minLength":1},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"heading":{"type":"string","minLength":1},"paragraphs":{"type":"array","items":{"type":"string","minLength":1}},"sources":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"href":{"type":"string","format":"uri"}},"required":["label","href"],"additionalProperties":false}}},"required":["id","heading","paragraphs","sources"],"additionalProperties":false},"minItems":1},"disclaimer":{"type":"string","minLength":1},"freePlanLabel":{"type":"string","minLength":1},"freePlanHref":{"type":"string","pattern":"^\\/pricing"}},"required":["locale","title","description","statusLabel","intro","sections","disclaimer","freePlanLabel","freePlanHref"],"additionalProperties":false}},"required":["article"],"additionalProperties":false},"contactSchema":{"type":"object","properties":{"requestType":{"type":"string","enum":["invoice_export_configuration"]}},"required":["requestType"],"additionalProperties":false},"contactResponseSchema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"CsvExportRequest":{"type":"object","properties":{"sourceId":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"filters":{},"columns":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"minItems":1,"maxItems":44},"delimiter":{"type":"string","enum":[",",";"],"default":","}},"required":["sourceId","filters"],"additionalProperties":false},"CsvExportDescriptionResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"schemaVersion":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","identifier","number","boolean","date","datetime"]},"access":{"type":"string","enum":["editable","readonly"]},"nullable":{"type":"boolean"}},"required":["key","label","kind","access","nullable"],"additionalProperties":false}},"limits":{"type":"object","properties":{"records":{"type":"number","enum":[10000]},"bytes":{"type":"number","enum":[10485760]},"columns":{"type":"number","enum":[50]},"cellCharacters":{"type":"number","enum":[16384]},"requestBytes":{"type":"number","enum":[65536]},"readMilliseconds":{"type":"number","enum":[30000]}},"required":["records","bytes","columns","cellCharacters","requestBytes","readMilliseconds"],"additionalProperties":false},"format":{"type":"string","enum":["polsia-csv-v2"]}},"required":["id","label","schemaVersion","columns","limits","format"],"additionalProperties":false}},"required":["ok","data"],"additionalProperties":false},"CsvExportResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"csv":{"type":"string"},"records":{"type":"integer","minimum":1,"maximum":10000},"filename":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}\\.csv$"}},"required":["csv","records","filename"],"additionalProperties":false}},"required":["ok","data"],"additionalProperties":false},"CsvImportRequest":{"type":"object","properties":{"action":{"type":"string","enum":["preview","commit"]},"mode":{"type":"string","enum":["create","update","upsert"]},"expectedVersions":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":16384,"nullable":true}},"targetId":{"type":"string","minLength":1,"maxLength":64},"csv":{"type":"string"},"delimiter":{"type":"string","enum":[",",";"]},"mapping":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":49}}},"required":["action","targetId","csv","delimiter","mapping"],"additionalProperties":false},"CsvImportDescriptionResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"aliases":{"type":"array","items":{"type":"string","minLength":1}},"example":{"type":"string"}},"required":["key","label","required"],"additionalProperties":false},"maxItems":50},"limits":{"type":"object","properties":{"bytes":{"type":"number","enum":[10485760]},"records":{"type":"number","enum":[10000]},"columns":{"type":"number","enum":[50]},"cellCharacters":{"type":"number","enum":[16384]}},"required":["bytes","records","columns","cellCharacters"],"additionalProperties":false},"modes":{"type":"array","items":{"type":"string","enum":["create","update","upsert"]},"minItems":1,"maxItems":3},"updateKeyFields":{"type":"array","items":{"$ref":"#/components/schemas/CsvImportDescriptionResponse/properties/data/properties/fields/items/properties/key"},"maxItems":50}},"required":["id","label","fields","limits"],"additionalProperties":false}},"required":["ok","data"],"additionalProperties":false},"CsvImportResponse":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"aliases":{"type":"array","items":{"type":"string","minLength":1}},"example":{"type":"string"}},"required":["key","label","required"],"additionalProperties":false},"maxItems":50},"limits":{"type":"object","properties":{"bytes":{"type":"number","enum":[10485760]},"records":{"type":"number","enum":[10000]},"columns":{"type":"number","enum":[50]},"cellCharacters":{"type":"number","enum":[16384]}},"required":["bytes","records","columns","cellCharacters"],"additionalProperties":false},"modes":{"type":"array","items":{"type":"string","enum":["create","update","upsert"]},"minItems":1,"maxItems":3},"updateKeyFields":{"type":"array","items":{"$ref":"#/components/schemas/CsvImportResponse/anyOf/0/properties/data/properties/fields/items/properties/key"},"maxItems":50}},"required":["id","label","fields","limits"],"additionalProperties":false}},"required":["ok","data"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"valid":{"type":"integer","minimum":0},"invalid":{"type":"integer","minimum":0},"existing":{"type":"integer","minimum":0},"toCreate":{"type":"integer","minimum":0},"toUpdate":{"type":"integer","minimum":0},"expectedVersions":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":16384,"nullable":true}},"rows":{"type":"array","items":{"type":"object","properties":{"record":{"type":"integer","exclusiveMinimum":true,"minimum":0},"values":{"type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string","enum":["create","update","skip","error"]},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/CsvImportResponse/anyOf/0/properties/data/properties/fields/items/properties/key"},"before":{"type":"string","nullable":true},"after":{"type":"string","nullable":true}},"required":["field","before","after"],"additionalProperties":false},"maxItems":50}},"required":["record","values","status"],"additionalProperties":false},"maxItems":20},"issues":{"type":"array","items":{"type":"object","properties":{"record":{"type":"integer","exclusiveMinimum":true,"minimum":0,"nullable":true},"field":{"type":"string","nullable":true},"message":{"type":"string","minLength":1}},"required":["record","field","message"],"additionalProperties":false},"maxItems":100},"issueCount":{"type":"integer","minimum":0}},"required":["total","valid","invalid","existing","toCreate","rows","issues","issueCount"],"additionalProperties":false}},"required":["ok","data"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["created","skipped"],"additionalProperties":false}},"required":["ok","data"],"additionalProperties":false}]},"DatevExportRequest":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"includeDocuments":{"type":"boolean","default":false}},"required":["from","to"],"additionalProperties":false},"IncomingInvoiceListResponseSchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originalFilename":{"type":"string"},"syntax":{"type":"string","enum":["CII","UBL"]},"fileKind":{"type":"string","enum":["pdf","xml"]},"fileSize":{"type":"integer","minimum":0},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"retentionCategory":{"type":"string"},"retentionRelevantDate":{"type":"string","format":"date-time","nullable":true},"retentionLegalBasis":{"type":"string"},"retentionStart":{"type":"string","format":"date-time","nullable":true},"retentionEnd":{"type":"string","format":"date-time","nullable":true},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"regulatedFinancialEntity":{"type":"boolean","default":false},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string"},"deletionPending":{"type":"boolean","default":false},"profile":{"type":"string","enum":["BASIC","EN 16931 (COMFORT)","EXTENDED","XRECHNUNG","MINIMUM","BASIC WL","unknown"]},"parsedDetails":{"type":"object","properties":{"seller":{"type":"object","properties":{"name":{"type":"string"},"vatId":{"type":"string"},"taxIdentifiers":{"type":"array","items":{"type":"string"}},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}},"additionalProperties":false},"buyer":{"$ref":"#/components/schemas/IncomingInvoiceListResponseSchema/properties/items/items/properties/parsedDetails/properties/seller"},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"paymentTerms":{"type":"string"},"purchaseOrderReference":{"type":"string"},"precedingInvoiceNumber":{"type":"string"},"buyerReference":{"type":"string"},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"string"},"unitCode":{"type":"string"},"unitPrice":{"type":"string"},"netAmount":{"type":"string"},"vatCategory":{"type":"string"},"vatRate":{"type":"string"}},"additionalProperties":false}},"vatBreakdown":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"rate":{"type":"string"},"taxableAmount":{"type":"string"},"taxAmount":{"type":"string"}},"additionalProperties":false}},"taxTotal":{"type":"string"},"invoiceTotal":{"type":"string"},"amountDue":{"type":"string"}},"required":["seller","lines","vatBreakdown"],"additionalProperties":false},"validationResult":{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","invalid","warning","valid"]},"profile":{"$ref":"#/components/schemas/IncomingInvoiceListResponseSchema/properties/items/items/properties/profile"},"profileIdentifier":{"type":"string"},"zugferdVersion":{"type":"string"},"xrechnungRulesVersion":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"location":{"type":"string"},"field":{"type":"string"},"label":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["label","message","nextStep","severity"],"additionalProperties":false}}},"required":["status","profile","checkedAt","findings"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","originalFilename","syntax","fileKind","fileSize","contentSha256","retentionCategory","retentionRelevantDate","retentionLegalBasis","retentionStart","retentionEnd","deletionEligibleAt","taxHoldUntil","taxHoldOpen","taxHoldReason","profile","parsedDetails","validationResult","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"IncomingInvoiceReadResponseSchema":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"originalFilename":{"type":"string"},"syntax":{"type":"string","enum":["CII","UBL"]},"fileKind":{"type":"string","enum":["pdf","xml"]},"fileSize":{"type":"integer","minimum":0},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"retentionCategory":{"type":"string"},"retentionRelevantDate":{"type":"string","format":"date-time","nullable":true},"retentionLegalBasis":{"type":"string"},"retentionStart":{"type":"string","format":"date-time","nullable":true},"retentionEnd":{"type":"string","format":"date-time","nullable":true},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"regulatedFinancialEntity":{"type":"boolean","default":false},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string"},"deletionPending":{"type":"boolean","default":false},"profile":{"type":"string","enum":["BASIC","EN 16931 (COMFORT)","EXTENDED","XRECHNUNG","MINIMUM","BASIC WL","unknown"]},"parsedDetails":{"type":"object","properties":{"seller":{"type":"object","properties":{"name":{"type":"string"},"vatId":{"type":"string"},"taxIdentifiers":{"type":"array","items":{"type":"string"}},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}},"additionalProperties":false},"buyer":{"$ref":"#/components/schemas/IncomingInvoiceReadResponseSchema/properties/invoice/properties/parsedDetails/properties/seller"},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"paymentTerms":{"type":"string"},"purchaseOrderReference":{"type":"string"},"precedingInvoiceNumber":{"type":"string"},"buyerReference":{"type":"string"},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"string"},"unitCode":{"type":"string"},"unitPrice":{"type":"string"},"netAmount":{"type":"string"},"vatCategory":{"type":"string"},"vatRate":{"type":"string"}},"additionalProperties":false}},"vatBreakdown":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"rate":{"type":"string"},"taxableAmount":{"type":"string"},"taxAmount":{"type":"string"}},"additionalProperties":false}},"taxTotal":{"type":"string"},"invoiceTotal":{"type":"string"},"amountDue":{"type":"string"}},"required":["seller","lines","vatBreakdown"],"additionalProperties":false},"validationResult":{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","invalid","warning","valid"]},"profile":{"$ref":"#/components/schemas/IncomingInvoiceReadResponseSchema/properties/invoice/properties/profile"},"profileIdentifier":{"type":"string"},"zugferdVersion":{"type":"string"},"xrechnungRulesVersion":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"location":{"type":"string"},"field":{"type":"string"},"label":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["label","message","nextStep","severity"],"additionalProperties":false}}},"required":["status","profile","checkedAt","findings"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","originalFilename","syntax","fileKind","fileSize","contentSha256","retentionCategory","retentionRelevantDate","retentionLegalBasis","retentionStart","retentionEnd","deletionEligibleAt","taxHoldUntil","taxHoldOpen","taxHoldReason","profile","parsedDetails","validationResult","createdAt"],"additionalProperties":false}},"required":["invoice"],"additionalProperties":false},"IncomingInvoiceDownloadCheckSchema":{"type":"object","properties":{"verified":{"type":"boolean","enum":[true]},"filename":{"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","minimum":0}},"required":["verified","filename","sha256","size"],"additionalProperties":false},"IncomingInvoiceUploadRequestSchema":{"type":"object","properties":{"fileKey":{"type":"string","minLength":1,"maxLength":600},"filename":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":true,"minimum":0,"maximum":52428800},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["fileKey","filename","size","sha256"],"additionalProperties":false},"IncomingInvoiceUploadResponseSchema":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"originalFilename":{"type":"string"},"syntax":{"type":"string","enum":["CII","UBL"]},"fileKind":{"type":"string","enum":["pdf","xml"]},"fileSize":{"type":"integer","minimum":0},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"retentionCategory":{"type":"string"},"retentionRelevantDate":{"type":"string","format":"date-time","nullable":true},"retentionLegalBasis":{"type":"string"},"retentionStart":{"type":"string","format":"date-time","nullable":true},"retentionEnd":{"type":"string","format":"date-time","nullable":true},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"regulatedFinancialEntity":{"type":"boolean","default":false},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string"},"deletionPending":{"type":"boolean","default":false},"profile":{"type":"string","enum":["BASIC","EN 16931 (COMFORT)","EXTENDED","XRECHNUNG","MINIMUM","BASIC WL","unknown"]},"parsedDetails":{"type":"object","properties":{"seller":{"type":"object","properties":{"name":{"type":"string"},"vatId":{"type":"string"},"taxIdentifiers":{"type":"array","items":{"type":"string"}},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}},"additionalProperties":false},"buyer":{"$ref":"#/components/schemas/IncomingInvoiceUploadResponseSchema/properties/invoice/properties/parsedDetails/properties/seller"},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"paymentTerms":{"type":"string"},"purchaseOrderReference":{"type":"string"},"precedingInvoiceNumber":{"type":"string"},"buyerReference":{"type":"string"},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"string"},"unitCode":{"type":"string"},"unitPrice":{"type":"string"},"netAmount":{"type":"string"},"vatCategory":{"type":"string"},"vatRate":{"type":"string"}},"additionalProperties":false}},"vatBreakdown":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"rate":{"type":"string"},"taxableAmount":{"type":"string"},"taxAmount":{"type":"string"}},"additionalProperties":false}},"taxTotal":{"type":"string"},"invoiceTotal":{"type":"string"},"amountDue":{"type":"string"}},"required":["seller","lines","vatBreakdown"],"additionalProperties":false},"validationResult":{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","invalid","warning","valid"]},"profile":{"$ref":"#/components/schemas/IncomingInvoiceUploadResponseSchema/properties/invoice/properties/profile"},"profileIdentifier":{"type":"string"},"zugferdVersion":{"type":"string"},"xrechnungRulesVersion":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"location":{"type":"string"},"field":{"type":"string"},"label":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["label","message","nextStep","severity"],"additionalProperties":false}}},"required":["status","profile","checkedAt","findings"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","originalFilename","syntax","fileKind","fileSize","contentSha256","retentionCategory","retentionRelevantDate","retentionLegalBasis","retentionStart","retentionEnd","deletionEligibleAt","taxHoldUntil","taxHoldOpen","taxHoldReason","profile","parsedDetails","validationResult","createdAt"],"additionalProperties":false}},"required":["invoice"],"additionalProperties":false},"IncomingInvoiceRetentionUpdateSchema":{"type":"object","properties":{"category":{"type":"string","enum":["issued_invoice","received_invoice","booking_voucher","books_or_records","customs_record","business_correspondence","other_tax_record","consumer_construction_invoice"]},"consumerConstructionConfirmed":{"type":"boolean"},"regulatedFinancialEntity":{"type":"boolean"},"relevantDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}]},"taxHoldUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}]},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string","maxLength":2000}},"required":["category","consumerConstructionConfirmed","regulatedFinancialEntity","relevantDate","taxHoldUntil","taxHoldOpen","taxHoldReason"],"additionalProperties":false},"RetentionUpdateSchema":{"type":"object","properties":{"category":{"type":"string","enum":["issued_invoice","received_invoice","booking_voucher","books_or_records","customs_record","business_correspondence","other_tax_record","consumer_construction_invoice"]},"consumerConstructionConfirmed":{"type":"boolean"},"regulatedFinancialEntity":{"type":"boolean"},"taxHoldUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}]},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string","maxLength":2000},"relevantDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}]}},"required":["category","consumerConstructionConfirmed","regulatedFinancialEntity","taxHoldUntil","taxHoldOpen","taxHoldReason","relevantDate"],"additionalProperties":false},"InvoiceArchivePreparationRequestSchema":{"type":"object","properties":{"draftId":{"type":"string","minLength":1},"candidateNumber":{"type":"string","pattern":"^[1-9]\\d{0,8}$"}},"required":["draftId","candidateNumber"],"additionalProperties":false},"InvoiceArchivePreparationResponseSchema":{"type":"object","properties":{"candidateNumber":{"type":"string"},"xmlFilename":{"type":"string"},"xmlBase64":{"type":"string","minLength":1},"pdfFilename":{"type":"string"},"pdfBase64":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["candidateNumber","xmlFilename","xmlBase64","pdfFilename","pdfBase64","revision"],"additionalProperties":false},"FinalizeInvoiceRequestSchema":{"type":"object","properties":{"draftId":{"type":"string","minLength":1},"candidateNumber":{"type":"string","pattern":"^[1-9]\\d{0,8}$"},"xmlFileKey":{"type":"string","minLength":1,"maxLength":600},"pdfFileKey":{"type":"string","minLength":1,"maxLength":600},"retention":{"type":"object","properties":{"category":{"type":"string","enum":["issued_invoice","received_invoice","booking_voucher","books_or_records","customs_record","business_correspondence","other_tax_record","consumer_construction_invoice"]},"consumerConstructionConfirmed":{"type":"boolean"},"regulatedFinancialEntity":{"type":"boolean"},"taxHoldUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}]},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string","maxLength":2000},"relevantDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}]}},"required":["category","consumerConstructionConfirmed","regulatedFinancialEntity","taxHoldUntil","taxHoldOpen","taxHoldReason","relevantDate"],"additionalProperties":false}},"required":["draftId","candidateNumber","xmlFileKey","pdfFileKey","retention"],"additionalProperties":false},"FinalizedInvoiceResponseSchema":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"draftId":{"type":"string"},"sequenceNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"invoiceSnapshot":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/FinalizedInvoiceResponseSchema/properties/invoice/properties/invoiceSnapshot/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"sellerSnapshot":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false},"finalizedAt":{"type":"string","format":"date-time"},"retentionRelevantDate":{"type":"string","format":"date-time"},"correctionOfArchiveId":{"type":"string","nullable":true},"replacementOfArchiveId":{"type":"string","nullable":true},"stornoArchiveId":{"type":"string","nullable":true},"xmlFilename":{"type":"string"},"xmlSize":{"type":"integer","minimum":0},"xmlSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pdfFilename":{"type":"string"},"pdfSize":{"type":"integer","minimum":0},"pdfSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"retentionCategory":{"type":"string","enum":["issued_invoice","received_invoice","booking_voucher","books_or_records","customs_record","business_correspondence","other_tax_record","consumer_construction_invoice"]},"retentionLegalBasis":{"type":"string"},"retentionStart":{"type":"string","format":"date-time"},"retentionEnd":{"type":"string","format":"date-time"},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"regulatedFinancialEntity":{"type":"boolean"},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string"}},"required":["id","draftId","sequenceNumber","invoiceNumber","documentType","invoiceSnapshot","sellerSnapshot","finalizedAt","retentionRelevantDate","correctionOfArchiveId","replacementOfArchiveId","stornoArchiveId","xmlFilename","xmlSize","xmlSha256","pdfFilename","pdfSize","pdfSha256","retentionCategory","retentionLegalBasis","retentionStart","retentionEnd","deletionEligibleAt","regulatedFinancialEntity","taxHoldUntil","taxHoldOpen","taxHoldReason"],"additionalProperties":false}},"required":["invoice"],"additionalProperties":false},"InvoiceArchiveResponseSchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"draftId":{"type":"string"},"sequenceNumber":{"type":"integer","exclusiveMinimum":true,"minimum":0},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"invoiceSnapshot":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceArchiveResponseSchema/properties/items/items/properties/invoiceSnapshot/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"sellerSnapshot":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false},"finalizedAt":{"type":"string","format":"date-time"},"retentionRelevantDate":{"type":"string","format":"date-time"},"correctionOfArchiveId":{"type":"string","nullable":true},"replacementOfArchiveId":{"type":"string","nullable":true},"stornoArchiveId":{"type":"string","nullable":true},"xmlFilename":{"type":"string"},"xmlSize":{"type":"integer","minimum":0},"xmlSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pdfFilename":{"type":"string"},"pdfSize":{"type":"integer","minimum":0},"pdfSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"retentionCategory":{"type":"string","enum":["issued_invoice","received_invoice","booking_voucher","books_or_records","customs_record","business_correspondence","other_tax_record","consumer_construction_invoice"]},"retentionLegalBasis":{"type":"string"},"retentionStart":{"type":"string","format":"date-time"},"retentionEnd":{"type":"string","format":"date-time"},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"regulatedFinancialEntity":{"type":"boolean"},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string"}},"required":["id","draftId","sequenceNumber","invoiceNumber","documentType","invoiceSnapshot","sellerSnapshot","finalizedAt","retentionRelevantDate","correctionOfArchiveId","replacementOfArchiveId","stornoArchiveId","xmlFilename","xmlSize","xmlSha256","pdfFilename","pdfSize","pdfSha256","retentionCategory","retentionLegalBasis","retentionStart","retentionEnd","deletionEligibleAt","regulatedFinancialEntity","taxHoldUntil","taxHoldOpen","taxHoldReason"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"InvoiceAuditListResponseSchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"actorId":{"type":"string"},"actorName":{"type":"string"},"actorEmail":{"type":"string"},"action":{"type":"string"},"invoiceId":{"type":"string","nullable":true},"invoiceNumber":{"type":"string","nullable":true},"fileName":{"type":"string","nullable":true},"referenceType":{"type":"string","nullable":true},"referenceId":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","actorId","actorName","actorEmail","action","invoiceId","invoiceNumber","fileName","referenceType","referenceId","occurredAt"],"additionalProperties":false}},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"truncated":{"type":"boolean"}},"required":["items","from","to","truncated"],"additionalProperties":false},"InvoiceFileIntegrityResponseSchema":{"type":"object","properties":{"verified":{"type":"boolean","enum":[true]},"fileName":{"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","minimum":0}},"required":["verified","fileName","sha256","size"],"additionalProperties":false},"NextInvoiceNumberResponseSchema":{"type":"object","properties":{"nextNumber":{"type":"string","nullable":true},"initialNumberRequired":{"type":"boolean"}},"required":["nextNumber","initialNumberRequired"],"additionalProperties":false},"InvoiceUsageSchema":{"type":"object","properties":{"used":{"type":"integer","minimum":0},"limit":{"type":"integer","exclusiveMinimum":true,"minimum":0},"remaining":{"type":"integer","minimum":0},"periodStart":{"type":"string","format":"date-time"},"periodEndExclusive":{"type":"string","format":"date-time"},"timeZone":{"type":"string","enum":["Europe/Berlin"]}},"required":["used","limit","remaining","periodStart","periodEndExclusive","timeZone"],"additionalProperties":false},"InvoiceDraftDataSchema":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDraftDataSchema/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"InvoiceDraftWriteSchema":{"type":"object","properties":{"clientKey":{"type":"string","format":"uuid"},"draft":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDraftWriteSchema/properties/draft/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false}},"required":["clientKey","draft"],"additionalProperties":false},"InvoiceDraftUpdateSchema":{"type":"object","properties":{"draft":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDraftUpdateSchema/properties/draft/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false}},"required":["draft"],"additionalProperties":false},"InvoiceDraftListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientKey":{"type":"string","format":"uuid"},"sellerWorkspaceId":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"archiveRecordId":{"type":"string","nullable":true,"default":null},"workflowStatus":{"type":"string","enum":["draft","validated","finalized"],"default":"draft"},"validationWarningCount":{"type":"integer","minimum":0,"default":0},"draft":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDraftListResponse/properties/items/items/properties/draft/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","clientKey","sellerWorkspaceId","revision","draft","updatedAt"],"additionalProperties":false}},"incomingInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originalFilename":{"type":"string"},"syntax":{"type":"string","enum":["CII","UBL"]},"fileKind":{"type":"string","enum":["pdf","xml"]},"fileSize":{"type":"integer","minimum":0},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"retentionCategory":{"type":"string"},"retentionRelevantDate":{"type":"string","format":"date-time","nullable":true},"retentionLegalBasis":{"type":"string"},"retentionStart":{"type":"string","format":"date-time","nullable":true},"retentionEnd":{"type":"string","format":"date-time","nullable":true},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"regulatedFinancialEntity":{"type":"boolean","default":false},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"},"taxHoldReason":{"type":"string"},"deletionPending":{"type":"boolean","default":false},"profile":{"type":"string","enum":["BASIC","EN 16931 (COMFORT)","EXTENDED","XRECHNUNG","MINIMUM","BASIC WL","unknown"]},"parsedDetails":{"type":"object","properties":{"seller":{"type":"object","properties":{"name":{"type":"string"},"vatId":{"type":"string"},"taxIdentifiers":{"type":"array","items":{"type":"string"}},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"}},"additionalProperties":false},"buyer":{"$ref":"#/components/schemas/InvoiceDraftListResponse/properties/incomingInvoices/items/properties/parsedDetails/properties/seller"},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"paymentTerms":{"type":"string"},"purchaseOrderReference":{"type":"string"},"precedingInvoiceNumber":{"type":"string"},"buyerReference":{"type":"string"},"currency":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"string"},"unitCode":{"type":"string"},"unitPrice":{"type":"string"},"netAmount":{"type":"string"},"vatCategory":{"type":"string"},"vatRate":{"type":"string"}},"additionalProperties":false}},"vatBreakdown":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"rate":{"type":"string"},"taxableAmount":{"type":"string"},"taxAmount":{"type":"string"}},"additionalProperties":false}},"taxTotal":{"type":"string"},"invoiceTotal":{"type":"string"},"amountDue":{"type":"string"}},"required":["seller","lines","vatBreakdown"],"additionalProperties":false},"validationResult":{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","invalid","warning","valid"]},"profile":{"$ref":"#/components/schemas/InvoiceDraftListResponse/properties/incomingInvoices/items/properties/profile"},"profileIdentifier":{"type":"string"},"zugferdVersion":{"type":"string"},"xrechnungRulesVersion":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"location":{"type":"string"},"field":{"type":"string"},"label":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["label","message","nextStep","severity"],"additionalProperties":false}}},"required":["status","profile","checkedAt","findings"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","originalFilename","syntax","fileKind","fileSize","contentSha256","retentionCategory","retentionRelevantDate","retentionLegalBasis","retentionStart","retentionEnd","deletionEligibleAt","taxHoldUntil","taxHoldOpen","taxHoldReason","profile","parsedDetails","validationResult","createdAt"],"additionalProperties":false},"default":[]},"sellerProfile":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false,"nullable":true}},"required":["items","sellerProfile"],"additionalProperties":false},"InvoiceDraftResponse":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"clientKey":{"type":"string","format":"uuid"},"sellerWorkspaceId":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"archiveRecordId":{"type":"string","nullable":true,"default":null},"workflowStatus":{"type":"string","enum":["draft","validated","finalized"],"default":"draft"},"validationWarningCount":{"type":"integer","minimum":0,"default":0},"draft":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDraftResponse/properties/invoice/properties/draft/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","clientKey","sellerWorkspaceId","revision","draft","updatedAt"],"additionalProperties":false},"sellerProfile":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false,"nullable":true},"firstDraftSaved":{"type":"boolean","default":false}},"required":["invoice","sellerProfile"],"additionalProperties":false},"OpenInvoiceResponse":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"clientKey":{"type":"string","format":"uuid"},"sellerWorkspaceId":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"archiveRecordId":{"type":"string","nullable":true,"default":null},"workflowStatus":{"type":"string","enum":["draft","validated","finalized"],"default":"draft"},"validationWarningCount":{"type":"integer","minimum":0,"default":0},"draft":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/OpenInvoiceResponse/properties/invoice/properties/draft/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","clientKey","sellerWorkspaceId","revision","draft","updatedAt"],"additionalProperties":false},"sellerProfile":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false,"nullable":true},"firstDraftSaved":{"type":"boolean","default":false},"activity":{"type":"object","properties":{"validations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"invoiceRevision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"assessment":{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","invalid","warning","valid"]},"settingsConfigured":{"type":"boolean"},"requiredValidationPassed":{"type":"boolean"},"sendEligible":{"type":"boolean"},"kleinunternehmer":{"type":"boolean","default":false},"blockers":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","nullable":true},"label":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string","default":"Review this finding and correct the saved invoice as needed."},"severity":{"type":"string","enum":["blocker","warning"],"default":"blocker"},"source":{"type":"string","enum":["app","xrechnung"],"default":"app"},"ruleId":{"type":"string","nullable":true,"default":null}},"required":["field","label","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/OpenInvoiceResponse/properties/activity/properties/validations/items/properties/assessment/properties/blockers/items"}},"formatSyntax":{"type":"string","nullable":true},"formatVersion":{"type":"string","nullable":true},"checkedAt":{"type":"string","format":"date-time"}},"required":["status","settingsConfigured","requiredValidationPassed","sendEligible","blockers","warnings","formatSyntax","formatVersion","checkedAt"],"additionalProperties":false},"sellerProfileSnapshot":{"allOf":[{"$ref":"#/components/schemas/OpenInvoiceResponse/properties/sellerProfile"}],"nullable":true},"structuredFileAvailable":{"type":"boolean","default":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceRevision","assessment","sellerProfileSnapshot","createdAt"],"additionalProperties":false}},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"invoiceRevision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"recipient":{"type":"string","nullable":true},"status":{"type":"string","enum":["blocked","unavailable","failed","sent"]},"reason":{"type":"string"},"formatSyntax":{"type":"string","nullable":true},"formatVersion":{"type":"string","nullable":true},"structuredFileContent":{"type":"string","nullable":true},"invoiceSnapshot":{"$ref":"#/components/schemas/OpenInvoiceResponse/properties/invoice/properties/draft"},"sellerProfileSnapshot":{"allOf":[{"$ref":"#/components/schemas/OpenInvoiceResponse/properties/sellerProfile"}],"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceRevision","recipient","status","reason","formatSyntax","formatVersion","structuredFileContent","invoiceSnapshot","sellerProfileSnapshot","createdAt"],"additionalProperties":false}}},"required":["validations","deliveries"],"additionalProperties":false},"kleinunternehmer":{"type":"boolean","default":false},"finalizedRecordId":{"type":"string","nullable":true,"default":null},"finalizedRetention":{"type":"object","properties":{"category":{"type":"string"},"legalBasis":{"type":"string"},"retentionEnd":{"type":"string","format":"date-time","nullable":true},"deletionEligibleAt":{"type":"string","format":"date-time","nullable":true},"taxHoldUntil":{"type":"string","format":"date-time","nullable":true},"taxHoldOpen":{"type":"boolean"}},"required":["category","legalBasis","retentionEnd","deletionEligibleAt","taxHoldUntil","taxHoldOpen"],"additionalProperties":false,"nullable":true,"default":null}},"required":["invoice","sellerProfile","activity"],"additionalProperties":false},"InvoiceValidationActionResponse":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"clientKey":{"type":"string","format":"uuid"},"sellerWorkspaceId":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"archiveRecordId":{"type":"string","nullable":true,"default":null},"workflowStatus":{"type":"string","enum":["draft","validated","finalized"],"default":"draft"},"validationWarningCount":{"type":"integer","minimum":0,"default":0},"draft":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceValidationActionResponse/properties/invoice/properties/draft/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","clientKey","sellerWorkspaceId","revision","draft","updatedAt"],"additionalProperties":false},"sellerProfile":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false,"nullable":true},"run":{"type":"object","properties":{"id":{"type":"string"},"invoiceRevision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"assessment":{"type":"object","properties":{"status":{"type":"string","enum":["unavailable","invalid","warning","valid"]},"settingsConfigured":{"type":"boolean"},"requiredValidationPassed":{"type":"boolean"},"sendEligible":{"type":"boolean"},"kleinunternehmer":{"type":"boolean","default":false},"blockers":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","nullable":true},"label":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string","default":"Review this finding and correct the saved invoice as needed."},"severity":{"type":"string","enum":["blocker","warning"],"default":"blocker"},"source":{"type":"string","enum":["app","xrechnung"],"default":"app"},"ruleId":{"type":"string","nullable":true,"default":null}},"required":["field","label","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceValidationActionResponse/properties/run/properties/assessment/properties/blockers/items"}},"formatSyntax":{"type":"string","nullable":true},"formatVersion":{"type":"string","nullable":true},"checkedAt":{"type":"string","format":"date-time"}},"required":["status","settingsConfigured","requiredValidationPassed","sendEligible","blockers","warnings","formatSyntax","formatVersion","checkedAt"],"additionalProperties":false},"sellerProfileSnapshot":{"allOf":[{"$ref":"#/components/schemas/InvoiceValidationActionResponse/properties/sellerProfile"}],"nullable":true},"structuredFileAvailable":{"type":"boolean","default":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceRevision","assessment","sellerProfileSnapshot","createdAt"],"additionalProperties":false},"activity":{"type":"object","properties":{"validations":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceValidationActionResponse/properties/run"}},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"invoiceRevision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"recipient":{"type":"string","nullable":true},"status":{"type":"string","enum":["blocked","unavailable","failed","sent"]},"reason":{"type":"string"},"formatSyntax":{"type":"string","nullable":true},"formatVersion":{"type":"string","nullable":true},"structuredFileContent":{"type":"string","nullable":true},"invoiceSnapshot":{"$ref":"#/components/schemas/InvoiceValidationActionResponse/properties/invoice/properties/draft"},"sellerProfileSnapshot":{"allOf":[{"$ref":"#/components/schemas/InvoiceValidationActionResponse/properties/sellerProfile"}],"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceRevision","recipient","status","reason","formatSyntax","formatVersion","structuredFileContent","invoiceSnapshot","sellerProfileSnapshot","createdAt"],"additionalProperties":false}}},"required":["validations","deliveries"],"additionalProperties":false}},"required":["invoice","sellerProfile","run","activity"],"additionalProperties":false},"InvoiceDeliveryActionResponse":{"type":"object","properties":{"attempt":{"type":"object","properties":{"id":{"type":"string"},"invoiceRevision":{"type":"integer","exclusiveMinimum":true,"minimum":0},"recipient":{"type":"string","nullable":true},"status":{"type":"string","enum":["blocked","unavailable","failed","sent"]},"reason":{"type":"string"},"formatSyntax":{"type":"string","nullable":true},"formatVersion":{"type":"string","nullable":true},"structuredFileContent":{"type":"string","nullable":true},"invoiceSnapshot":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"creditNoteFor":{"type":"string","maxLength":120,"default":""},"correctionOfArchiveId":{"type":"string","maxLength":120,"default":""},"replacementOfArchiveId":{"type":"string","maxLength":120,"default":""},"stornoArchiveId":{"type":"string","maxLength":120,"default":""},"invoiceNumber":{"type":"string","maxLength":120},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","enum":[""]}],"default":""},"serviceDate":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDeliveryActionResponse/properties/attempt/properties/invoiceSnapshot/properties/issueDate/anyOf/0"},{"type":"string","enum":[""]}],"default":""},"buyerReference":{"type":"string","maxLength":120,"default":""},"purchaseOrderReference":{"type":"string","maxLength":120,"default":""},"deliveryLocation":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode"],"additionalProperties":false,"default":{"name":"","addressLine1":"","addressLine2":"","postalCode":"","city":"","region":"","countryCode":""}},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"]},"buyer":{"type":"object","properties":{"name":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"email":{"type":"string","maxLength":254},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100,"default":""}},"required":["name","addressLine1","addressLine2","postalCode","city","region","countryCode","email","taxNumber"],"additionalProperties":false},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"quantity":{"type":"string","maxLength":50},"unit":{"type":"string","maxLength":50},"unitPrice":{"type":"string","maxLength":50},"taxRate":{"type":"string","maxLength":50},"taxCategory":{"anyOf":[{"type":"string","enum":["S","Z","E","AE","K","G","L","M"]},{"type":"string","enum":[""]}],"default":""},"revenueAccount":{"type":"string","maxLength":8,"default":""},"datevReverseChargeCase":{"anyOf":[{"type":"string","enum":["101","102"]},{"type":"string","enum":[""]}],"default":""}},"required":["id","description","quantity","unit","unitPrice","taxRate"],"additionalProperties":false},"minItems":1}},"required":["invoiceNumber","currency","buyer","lineItems"],"additionalProperties":false},"sellerProfileSnapshot":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","invoiceRevision","recipient","status","reason","formatSyntax","formatVersion","structuredFileContent","invoiceSnapshot","sellerProfileSnapshot","createdAt"],"additionalProperties":false}},"required":["attempt"],"additionalProperties":false},"FunnelMilestoneResponse":{"type":"object","properties":{"firstXmlDownload":{"type":"boolean"}},"required":["firstXmlDownload"],"additionalProperties":false},"StructuredInvoiceFileResponse":{"type":"object","properties":{"xml":{"type":"string"},"filename":{"type":"string"},"formatSyntax":{"type":"string"},"formatVersion":{"type":"string"},"invoiceRevision":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["xml","filename","formatSyntax","formatVersion","invoiceRevision"],"additionalProperties":false},"LedgerConversionSchema":{"type":"object","properties":{"incomeId":{"type":"string","minLength":1},"exchangeRate":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,5})(?:\\.\\d{1,8})?$"}},"required":["incomeId","exchangeRate"],"additionalProperties":false},"LedgerConversionResponseSchema":{"type":"object","properties":{"id":{"type":"string"},"eurAmount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d{1,2})?$"},"exchangeRate":{"type":"string","pattern":"^\\d+(?:\\.\\d{1,8})?$"}},"required":["id","eurAmount","exchangeRate"],"additionalProperties":false},"LedgerExpenseCreateSchema":{"type":"object","properties":{"category":{"type":"string","enum":["software","equipment","travel","office","services","insurance","other"]},"description":{"type":"string","minLength":1,"maxLength":160},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,9})(?:\\.\\d{1,2})?$"},"vatRate":{"type":"string","enum":["19","7","0"]},"expenseDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"receiptKey":{"type":"string","minLength":1,"maxLength":600},"receiptFilename":{"type":"string","minLength":1,"maxLength":255}},"required":["category","description","amount","vatRate","expenseDate"],"additionalProperties":false},"LedgerExpenseSchema":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string","enum":["software","equipment","travel","office","services","insurance","other"]},"description":{"type":"string"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d{1,2})?$"},"vatRate":{"type":"string","enum":["19","7","0"]},"expenseDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"receiptKey":{"type":"string","nullable":true},"receiptFilename":{"type":"string","nullable":true}},"required":["id","category","description","amount","vatRate","expenseDate","receiptKey","receiptFilename"],"additionalProperties":false},"LedgerExportRequestSchema":{"type":"object","properties":{"year":{"type":"integer","minimum":2000,"maximum":2100}},"required":["year"],"additionalProperties":false},"LedgerMatchSchema":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1},"incomeId":{"type":"string","minLength":1}},"required":["transactionId","incomeId"],"additionalProperties":false},"LedgerMatchResponseSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["matched"]},"incomeId":{"type":"string"},"transactionId":{"type":"string"},"paymentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","incomeId","transactionId","paymentDate"],"additionalProperties":false},"LedgerResponseSchema":{"type":"object","properties":{"year":{"type":"integer","minimum":2000,"maximum":2100},"summary":{"type":"object","properties":{"receivedIncome":{"type":"string","pattern":"^-?\\d+(?:\\.\\d{1,2})?$"},"expenses":{"type":"string","pattern":"^\\d+(?:\\.\\d{1,2})?$"},"difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d{1,2})?$"}},"required":["receivedIncome","expenses","difference"],"additionalProperties":false},"incomes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"archiveRecordId":{"type":"string"},"invoiceNumber":{"type":"string"},"documentType":{"type":"string","enum":["invoice","credit_note"]},"sourceAmount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"eurAmount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d{1,2})?$","nullable":true},"exchangeRate":{"type":"string","pattern":"^\\d+(?:\\.\\d{1,8})?$","nullable":true},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"paymentStatus":{"type":"string","enum":["unpaid","paid"]},"paymentDate":{"allOf":[{"$ref":"#/components/schemas/LedgerResponseSchema/properties/incomes/items/properties/issueDate"}],"nullable":true},"bankTransactionId":{"type":"string","nullable":true}},"required":["id","archiveRecordId","invoiceNumber","documentType","sourceAmount","currency","eurAmount","exchangeRate","issueDate","paymentStatus","paymentDate","bankTransactionId"],"additionalProperties":false}},"expenses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string","enum":["software","equipment","travel","office","services","insurance","other"]},"description":{"type":"string"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d{1,2})?$"},"vatRate":{"type":"string","enum":["19","7","0"]},"expenseDate":{"$ref":"#/components/schemas/LedgerResponseSchema/properties/incomes/items/properties/issueDate"},"receiptKey":{"type":"string","nullable":true},"receiptFilename":{"type":"string","nullable":true}},"required":["id","category","description","amount","vatRate","expenseDate","receiptKey","receiptFilename"],"additionalProperties":false}},"unpaidIncomes":{"type":"array","items":{"$ref":"#/components/schemas/LedgerResponseSchema/properties/incomes/items"}},"unresolvedIncomes":{"type":"array","items":{"$ref":"#/components/schemas/LedgerResponseSchema/properties/incomes/items"}},"unmatchedTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transactionDate":{"$ref":"#/components/schemas/LedgerResponseSchema/properties/incomes/items/properties/issueDate"},"amount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"counterparty":{"type":"string"},"description":{"type":"string"},"matchedIncomeId":{"type":"string","nullable":true}},"required":["id","transactionDate","amount","currency","counterparty","description","matchedIncomeId"],"additionalProperties":false}}},"required":["year","summary","incomes","expenses","unpaidIncomes","unresolvedIncomes","unmatchedTransactions"],"additionalProperties":false},"PaidInvoiceAccessResponseSchema":{"type":"object","properties":{"state":{"type":"string","enum":["entitled","admin","absent","inactive","pending","unlinked","unavailable","verification_required","participant"]},"viewerRole":{"type":"string","enum":["manager","participant","none"]},"canManageWorkspace":{"type":"boolean"},"productAccess":{"type":"string","enum":["available","unavailable","checking","unknown"]},"planTier":{"type":"string","enum":["free","starter","pro"]},"billingInterval":{"type":"string","enum":["month","year"]},"subscriptionStatus":{"type":"string"},"allowance":{"type":"integer","exclusiveMinimum":true,"minimum":0},"allowanceResolution":{"type":"string","enum":["mapped","unresolved"]},"billing":{"type":"object","properties":{"state":{"type":"string","enum":["active","inactive","absent","pending","unavailable"]},"providerStatus":{"type":"string"},"plan":{"type":"string"},"monthlyAmountUsd":{"type":"number","minimum":0},"currentPeriodEnd":{"type":"string","nullable":true}},"required":["state"],"additionalProperties":false},"workspaceMemberCount":{"type":"integer","exclusiveMinimum":true,"minimum":0},"canOpenPortal":{"type":"boolean"}},"required":["state","viewerRole","canManageWorkspace","productAccess"],"additionalProperties":false},"ActivateFreePlanResponseSchema":{"type":"object","properties":{"status":{"type":"string","enum":["activated","already_active","paid_plan_active"]},"planTier":{"type":"string","enum":["free","starter","pro"]},"allowance":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["status","planTier","allowance"],"additionalProperties":false},"SellerBusinessProfileSchema":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false},"SellerBusinessProfileResponse":{"type":"object","properties":{"profile":{"type":"object","properties":{"registeredName":{"type":"string","maxLength":300},"tradingName":{"type":"string","maxLength":300},"addressLine1":{"type":"string","maxLength":300},"addressLine2":{"type":"string","maxLength":300},"postalCode":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"countryCode":{"type":"string","maxLength":2},"taxNumber":{"type":"string","maxLength":100},"vatId":{"type":"string","maxLength":100},"iban":{"type":"string","maxLength":64,"default":""},"bic":{"type":"string","maxLength":32,"default":""},"electronicAddress":{"type":"string","maxLength":300},"electronicAddressScheme":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":200},"contactEmail":{"type":"string","maxLength":254},"contactPhone":{"type":"string","maxLength":100}},"required":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"],"additionalProperties":false,"nullable":true},"formatRequirementsConfirmed":{"type":"boolean"},"blankFields":{"type":"array","items":{"type":"string","enum":["registeredName","tradingName","addressLine1","addressLine2","postalCode","city","region","countryCode","taxNumber","vatId","iban","bic","electronicAddress","electronicAddressScheme","contactName","contactEmail","contactPhone"]}}},"required":["profile","formatRequirementsConfirmed","blankFields"],"additionalProperties":false},"SubscriptionCheckoutVerifyRequestSchema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"maxLength":255}},"required":["sessionId"],"additionalProperties":false},"SubscriptionCheckoutVerifyResponseSchema":{"type":"object","properties":{"state":{"type":"string","enum":["pending","verified","inactive"]},"planTier":{"type":"string","enum":["starter","pro"]},"interval":{"type":"string","enum":["month","year"]},"allowance":{"type":"integer","exclusiveMinimum":true,"minimum":0},"subscriptionStatus":{"type":"string"}},"required":["state"],"additionalProperties":false},"VatReturnResponseSchema":{"type":"object","properties":{"period":{"type":"object","properties":{"year":{"type":"integer","minimum":2000,"maximum":2100},"periodType":{"type":"string","enum":["month","quarter"]},"period":{"type":"integer","minimum":1,"maximum":12},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["year","periodType","period","startDate","endDate"],"additionalProperties":false},"kleinunternehmer":{"type":"boolean","enum":[false]},"codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["81","86","66","83"]},"amountCents":{"type":"string","pattern":"^-?\\d+$","nullable":true},"status":{"type":"string","enum":["complete","partial","unavailable"]}},"required":["code","amountCents","status"],"additionalProperties":false},"minItems":4,"maxItems":4},"warnings":{"type":"array","items":{"type":"object","properties":{"sourceType":{"type":"string","enum":["outgoing","incoming"]},"sourceId":{"type":"string"},"label":{"type":"string"},"reasonCode":{"type":"string","enum":["date_missing","date_invalid","currency_missing","currency_unsupported","details_unavailable","correction_link_missing","correction_link_invalid","correction_link_inconsistent","line_base_missing","tax_category_unsupported","tax_rate_unsupported","vat_breakdown_missing","taxable_base_missing","tax_amount_missing","deductibility_unreviewed","source_limit_exceeded"]},"affectedCodes":{"type":"array","items":{"type":"string","enum":["81","86","66","83"]}}},"required":["sourceType","sourceId","label","reasonCode","affectedCodes"],"additionalProperties":false}},"incomingReviews":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string"},"filename":{"type":"string"},"invoiceNumber":{"type":"string","nullable":true},"issueDate":{"type":"string","nullable":true},"deductibilityStatus":{"type":"string","enum":["deductible","not_deductible"],"nullable":true},"detectedVatCents":{"type":"string","pattern":"^-?\\d+$","nullable":true},"hasSupportedVat":{"type":"boolean"}},"required":["invoiceId","filename","invoiceNumber","issueDate","deductibilityStatus","detectedVatCents","hasSupportedVat"],"additionalProperties":false}},"includedOutgoingCount":{"type":"integer","minimum":0},"includedIncomingCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["period","kleinunternehmer","codes","warnings","incomingReviews","includedOutgoingCount","includedIncomingCount","createdAt"],"additionalProperties":false},"VatSettingResponseSchema":{"type":"object","properties":{"kleinunternehmer":{"type":"boolean"}},"required":["kleinunternehmer"],"additionalProperties":false},"VatSettingUpdateSchema":{"type":"object","properties":{"kleinunternehmer":{"type":"boolean"}},"required":["kleinunternehmer"],"additionalProperties":false},"VatDeductibilityUpdateSchema":{"type":"object","properties":{"invoiceId":{"type":"string","minLength":1},"status":{"type":"string","enum":["deductible","not_deductible"],"nullable":true}},"required":["invoiceId","status"],"additionalProperties":false},"VatDeductibilityResponseSchema":{"type":"object","properties":{"status":{"type":"string","enum":["deductible","not_deductible"],"nullable":true}},"required":["status"],"additionalProperties":false},"ExampleCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false},"ExampleItem":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"id":{"type":"string"}},"required":["name","id"],"additionalProperties":false},"ExampleList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"id":{"type":"string"}},"required":["name","id"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"ExampleSecureWrite":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"ExampleSecureReadResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"}},"required":["id","name","email","role"],"additionalProperties":false,"nullable":true}},"required":["data"],"additionalProperties":false},"ExampleSecureWriteResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"ExampleSecurePatchResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},"LocaleRequest":{"type":"object","properties":{"locale":{"type":"string","enum":["de","en"]}},"required":["locale"],"additionalProperties":false},"LocaleResponse":{"type":"object","properties":{"locale":{"type":"string","enum":["de","en"]}},"required":["locale"],"additionalProperties":false},"documentSpecSchema":{"anyOf":[{"type":"object","properties":{"blocks":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"fontSize":{"type":"number","minimum":4,"maximum":144},"bold":{"type":"boolean"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"align":{"type":"string","enum":["left","center","right"]},"lineHeight":{"type":"number","minimum":1,"maximum":3},"spaceAfter":{"type":"number","minimum":0,"maximum":200},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"fontSize":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/fontSize"},"bold":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/bold"},"color":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"align":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/align"},"lineHeight":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/lineHeight"},"spaceAfter":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/spaceAfter"},"type":{"type":"string","enum":["heading"]},"level":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]}]},"text":{"type":"string","minLength":1}},"required":["type","level","text"],"additionalProperties":false},{"type":"object","properties":{"fontSize":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/fontSize"},"bold":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/bold"},"color":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"align":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/align"},"lineHeight":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/lineHeight"},"spaceAfter":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/spaceAfter"},"type":{"type":"string","enum":["list"]},"items":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":1000},"ordered":{"type":"boolean"}},"required":["type","items"],"additionalProperties":false},{"type":"object","properties":{"fontSize":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/fontSize"},"bold":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/bold"},"color":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"align":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/align"},"lineHeight":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/lineHeight"},"spaceAfter":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/spaceAfter"},"labelColor":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"type":{"type":"string","enum":["keyValue"]},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false},"minItems":1,"maxItems":1000}},"required":["type","rows"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["table"]},"columns":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string"},"width":{"type":"number","exclusiveMinimum":true,"minimum":0},"align":{"type":"string","enum":["left","center","right"]}},"additionalProperties":false},"minItems":1,"maxItems":50},"rows":{"type":"array","items":{"type":"array","items":{"type":"string"}},"minItems":1},"fontSize":{"type":"number","minimum":4,"maximum":144},"padding":{"type":"number","minimum":0,"maximum":40},"borderColor":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"borderWidth":{"type":"number","minimum":0,"maximum":10},"textColor":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"spaceAfter":{"type":"number","minimum":0,"maximum":200}},"required":["type","columns","rows"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"data":{"type":"string","maxLength":8000000,"pattern":"^data:image\\/(png|jpeg);base64,([A-Za-z0-9+/]+={0,2})$"},"width":{"type":"number","exclusiveMinimum":true,"minimum":0},"height":{"type":"number","exclusiveMinimum":true,"minimum":0},"align":{"type":"string","enum":["left","center","right"]},"spaceAfter":{"type":"number","minimum":0,"maximum":200}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"color":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"thickness":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":20},"spaceAfter":{"type":"number","minimum":0,"maximum":200}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["spacer"]},"height":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":2000}},"required":["type","height"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["pageBreak"]}},"required":["type"],"additionalProperties":false}]},"minItems":1,"maxItems":2000},"page":{"type":"object","properties":{"width":{"type":"number","minimum":144,"maximum":2000},"height":{"type":"number","minimum":144,"maximum":2000},"margins":{"anyOf":[{"type":"number","minimum":0,"maximum":400},{"type":"object","properties":{"top":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/page/properties/margins/anyOf/0"},"right":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/page/properties/margins/anyOf/0"},"bottom":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/page/properties/margins/anyOf/0"},"left":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/page/properties/margins/anyOf/0"}},"required":["top","right","bottom","left"],"additionalProperties":false}]}},"additionalProperties":false},"defaultTextStyle":{"type":"object","properties":{"fontSize":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/fontSize"},"bold":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/bold"},"color":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"align":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/align"},"lineHeight":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/lineHeight"},"spaceAfter":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/spaceAfter"}},"additionalProperties":false},"styles":{"type":"object","properties":{"h1":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/defaultTextStyle"},"h2":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/defaultTextStyle"},"h3":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/defaultTextStyle"},"list":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/defaultTextStyle"},"keyValue":{"type":"object","properties":{"fontSize":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/fontSize"},"bold":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/bold"},"color":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/color"},"align":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/align"},"lineHeight":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/lineHeight"},"spaceAfter":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/0/properties/spaceAfter"},"labelColor":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/3/properties/labelColor"}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","properties":{"title":{"type":"string"},"author":{"type":"string"},"subject":{"type":"string"}},"additionalProperties":false}},"required":["blocks"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"meta":{"type":"array","items":{"$ref":"#/components/schemas/documentSpecSchema/anyOf/0/properties/blocks/items/anyOf/3/properties/rows/items"}},"lineItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0},"unitAmountCents":{"type":"integer"}},"required":["description","quantity","unitAmountCents"],"additionalProperties":false}},"totalCents":{"type":"integer"},"notes":{"type":"string"},"footer":{"type":"string"},"blocks":{"not":{}}},"required":["title"],"additionalProperties":false}]},"GoogleSignupStatus":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"SiteReviewClaimRequest":{"type":"object","properties":{"token":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["token"],"additionalProperties":false},"SiteReviewClaimResponse":{"type":"object","properties":{"claimed":{"type":"boolean","enum":[true]}},"required":["claimed"],"additionalProperties":false},"SiteReviewLinkResponse":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false},"SiteReviewStatusResponse":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false},"StartSubscriptionCheckoutRequestSchema":{"type":"object","properties":{"planId":{"type":"string","enum":["starter","pro"]},"interval":{"type":"string","enum":["month","year"]},"locale":{"type":"string","enum":["de","en"],"default":"de"},"returnTo":{"type":"string","maxLength":2048}},"required":["planId","interval"],"additionalProperties":false},"StartSubscriptionCheckoutResponseSchema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false},"SubscriptionPortalResponseSchema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false},"CheckoutVerificationResponse":{"type":"object","properties":{"verified":{"type":"boolean"},"payment":{"type":"object","properties":{"amount_usd":{"type":"number"},"gross_amount_usd":{"type":"number","nullable":true},"customer_email":{"type":"string","format":"email","nullable":true},"product_name":{"type":"string","nullable":true},"paid_at":{"type":"string","nullable":true}},"required":["amount_usd"],"additionalProperties":false},"error":{"type":"string"}},"required":["verified"],"additionalProperties":false},"UploadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":true,"minimum":0},"visibility":{"type":"string","enum":["public","private"]}},"required":["filename","mime_type","size"],"additionalProperties":false},"UploadTicket":{"type":"object","properties":{"upload_id":{"type":"string","minLength":1},"upload_url":{"type":"string","format":"uri"},"expires_at":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["upload_id","upload_url","expires_at","headers"],"additionalProperties":false},"UploadConfirmRequest":{"type":"object","properties":{"upload_id":{"type":"string","minLength":1}},"required":["upload_id"],"additionalProperties":false},"UploadConfirmResponse":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"file":{"type":"object","properties":{"id":{"type":"number"},"key":{"type":"string"},"url":{"type":"string","format":"uri"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"number"},"created_at":{"type":"string"}},"required":["id","key","url","filename","mime_type","size","created_at"],"additionalProperties":false}},"required":["success","file"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"file":{"type":"object","properties":{"key":{"type":"string"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"number"},"created_at":{"type":"string"},"url":{"enum":["null"],"nullable":true},"visibility":{"type":"string","enum":["private"]}},"required":["key","filename","mime_type","size","created_at","url","visibility"],"additionalProperties":false}},"required":["success","file"],"additionalProperties":false}]},"UploadTicketOrFile":{"anyOf":[{"type":"object","properties":{"upload_id":{"type":"string","minLength":1},"upload_url":{"type":"string","format":"uri"},"expires_at":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["upload_id","upload_url","expires_at","headers"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"number"},"key":{"type":"string"},"url":{"type":"string","format":"uri"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"number"},"created_at":{"type":"string"}},"required":["id","key","url","filename","mime_type","size","created_at"],"additionalProperties":false}]},"waitlistSchema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"consent":{"type":"boolean","enum":[true]},"locale":{"type":"string","enum":["de","en"],"default":"de"},"companyWebsite":{"type":"string","maxLength":200,"default":""}},"required":["email","consent"],"additionalProperties":false},"waitlistSignupResponseSchema":{"type":"object","properties":{"status":{"type":"string","enum":["pending_confirmation","confirmation_delivery_failed","already_confirmed"]}},"required":["status"],"additionalProperties":false},"CsvExportLimits":{"type":"object","properties":{"records":{"type":"number"},"bytes":{"type":"number"},"columns":{"type":"number"},"cellCharacters":{"type":"number"},"requestBytes":{"type":"number"},"readMilliseconds":{"type":"number"}},"required":["records","bytes","columns","cellCharacters","requestBytes","readMilliseconds"],"additionalProperties":false},"ApiError":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}]},"errors":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"array","items":{"type":"string"}}]},"errorsEnglish":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}},"additionalProperties":false}}}}