{"openapi":"3.1.0","info":{"title":"ReAI API","description":"REST API for getting and updating data programmatically.\n\n## Authentication\n\n* Send your API token in the `Authorization` header: `Authorization: Bearer <your-token>`\n* Tenant-scoped requests with user access tokens must send the tenant header: `X-Tenant-Id: <tenant-id>`\n* Use `GET /api/me` to discover the authenticated user and available tenants\n* Meta endpoints such as `GET /api/me` and `POST /api/tenants` can be used without a tenant header\n\n","contact":{"name":"ReAI Support","url":"https://reai.no/contact","email":"post@reai.no"},"version":"v1"},"servers":[{"url":"https://app.reai.no","description":"Generated server url"}],"security":[{"bearer-token":[]}],"tags":[{"name":"Currencies","description":"List supported currencies"},{"name":"General ledger","description":"General ledger report grouped by account"},{"name":"Customers","description":"Manage customers"},{"name":"Accountant clients","description":"Manage engagement details (oppdrag) for an accountant's clients: business description, oppdragsansvarlig, and oppdragskontroll notes. Records are retained even after access to a client is removed."},{"name":"Chart of accounts","description":"List chart of accounts for the current tenant"},{"name":"Supplier ledger invoice groups","description":"Add or remove open supplier ledger postings in the group shown for a supplier invoice. Use GET /api/supplier-invoices/{id} to inspect supplier invoice payment and settlement state; there is no GET /api/supplier-invoices/{id}/related-postings endpoint."},{"name":"Agreements","description":"Manage agreements and send them for signing"},{"name":"Bank transactions","description":"Query synced bank transactions"},{"name":"Documents","description":"Manage document center documents"},{"name":"Expenses","description":"Create and read employee expenses"},{"name":"Customer ledger","description":"Customer subsidiary ledger reports"},{"name":"Warehouses","description":"Manage warehouses"},{"name":"VAT codes","description":"List supported VAT codes"},{"name":"Creditors","description":"Manage creditors (counterparties we owe money to, used for loans)"},{"name":"Timesheets","description":"Manage timesheets"},{"name":"Debtors","description":"Manage debtors (counterparties who owe us money, used for loans)"},{"name":"Tax returns","description":"Read, validate and file the Norwegian tax return (skattemelding / næringsspesifikasjon)"},{"name":"Offers","description":"Create and manage customer offers"},{"name":"Invoices","description":"Manage customer invoice refunds"},{"name":"Subscriptions","description":"Create and generate customer subscriptions"},{"name":"Departments","description":"Manage departments"},{"name":"Admin: Tenants","description":"Admin-only tenant provisioning. Mirrors the admin create-tenant page. Requires an API token belonging to a ROLE_ADMIN user."},{"name":"Projects","description":"Manage projects"},{"name":"Attachments","description":"Inspect, parse, and download attachments exposed by the public API"},{"name":"Asset ledger","description":"Asset subsidiary ledger report"},{"name":"Supplier ledger","description":"Supplier subsidiary ledger with per-supplier running balance, currency totals and posting groups"},{"name":"Leads","description":"Manage CRM leads"},{"name":"Loans","description":"Manage loans"},{"name":"Bank reconciliations","description":"Inspect and manage reconciliations for synced bank accounts"},{"name":"Tenants","description":"Create tenants for the authenticated user. Use GET /api/me to list available tenants."},{"name":"Postings","description":"Query postings"},{"name":"Opening balances","description":"Create, read, update, and delete the tenant opening balance voucher."},{"name":"Countries","description":"List supported countries"},{"name":"Company banks","description":"List company banks available for payment selection"},{"name":"Supplier invoices","description":"Manage supplier invoices that have already been registered in accounting."},{"name":"Salary Payments","description":"Create and read salary payments"},{"name":"Invoices","description":"Create customer invoices from orders"},{"name":"Orders","description":"Create customer orders"},{"name":"Receipt reception documents","description":"Manage receipt reception documents before they are registered in accounting."},{"name":"VAT returns","description":"Re-open VAT return periods"},{"name":"Reconciliation rules","description":"Manage automatic reconciliation rules for account targets and optional subaccounts"},{"name":"Suppliers","description":"Manage suppliers"},{"name":"General sub-accounts","description":"Manage general subsidiary ledger sub-accounts used under chart-of-account entries that support general subsidiary ledgers."},{"name":"Invoice reception documents","description":"Inspect supplier invoice reception documents before they are registered in accounting."},{"name":"Manual bank reconciliations","description":"Inspect and manage ending balances and closing state for manual bank reconciliations"},{"name":"Employee ledger","description":"Per-employee subsidiary ledger with running balance and currency totals"},{"name":"Users","description":"Manage tenant users and invitations"},{"name":"Assets","description":"Manage fixed asset subsidiary ledgers"},{"name":"Authentication","description":"Discover the authenticated user and tenants"},{"name":"Products","description":"Manage products"},{"name":"Vouchers","description":"Manage and query vouchers. Upload voucher attachments with POST /api/vouchers/{id}/pdf using multipart/form-data and one file part named `file`."}],"paths":{"/project/{id}":{"put":{"tags":["project-ctrl"],"operationId":"updateProject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"responsibleEmployeeId","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"activityId","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/project/{id}/sub-project/{subProjectId}":{"put":{"tags":["project-ctrl"],"operationId":"renameSubProject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"subProjectId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/warehouses/{id}":{"get":{"tags":["Warehouses"],"operationId":"get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Warehouses"],"operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseCreateReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Warehouses"],"summary":"Delete or archive warehouse","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Warehouse deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/vouchers/{id}":{"get":{"tags":["Vouchers"],"operationId":"get_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoucherDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Vouchers"],"operationId":"update_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherCreateReq"}}},"required":true},"responses":{"400":{"description":"Voucher is not a manual voucher","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Vouchers"],"summary":"Delete or reverse voucher","description":"Deletes the resource when no accounting reversal is needed. If financial audit history must be retained, records a reversal instead. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"reversed\"}.","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Voucher deleted or reversed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/users/{id}":{"get":{"tags":["Users"],"operationId":"getUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserAccessRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Users"],"operationId":"updateUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserAccessRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Users"],"operationId":"deleteUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"User access removed"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/suppliers/{id}/address":{"put":{"tags":["Suppliers"],"operationId":"updateAddress","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupplierAddressReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions/{id}":{"get":{"tags":["Subscriptions"],"operationId":"get_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Subscriptions"],"operationId":"update_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionWriteReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Subscriptions"],"operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Subscription deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/salary-payments/{id}/wage-specs/{wageSpecId}":{"put":{"tags":["Salary Payments"],"summary":"Update wage specification line","description":"Updates a manual wage specification line in a salary payment that is still under process. Lines created from expense postings cannot be changed. Returns the updated salary payment with recalculated tax deductions and payable amounts.","operationId":"updateWageSpec","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"wageSpecId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSalaryWageSpecReq"}}},"required":true},"responses":{"200":{"description":"Wage specification line updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalaryPaymentDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Salary Payments"],"summary":"Delete wage specification line","description":"Deletes a manual wage specification line from a salary payment that is still under process. Lines created from expense postings cannot be deleted. Returns the updated salary payment with recalculated tax deductions and payable amounts.","operationId":"deleteWageSpec","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"wageSpecId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Wage specification line deleted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalaryPaymentDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/reconciliation-rules/{id}":{"get":{"tags":["Reconciliation rules"],"operationId":"get_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReconciliationRuleRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Reconciliation rules"],"operationId":"update_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationRuleMutationReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReconciliationRuleRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Reconciliation rules"],"operationId":"delete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Reconciliation rule deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/projects/{id}":{"get":{"tags":["Projects"],"operationId":"get_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProjectRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Projects"],"operationId":"update_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProjectRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete or archive project","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Project deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/projects/{id}/sub-projects/{subProjectId}/name":{"put":{"tags":["Projects"],"operationId":"updateSubProjectName","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"subProjectId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubProjectNameReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProjectRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/products/{id}":{"get":{"tags":["Products"],"operationId":"get_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Products"],"operationId":"update_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Products"],"summary":"Delete or archive product","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Product deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/orders/{id}":{"get":{"tags":["Orders"],"operationId":"get_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Orders"],"operationId":"update_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Orders"],"operationId":"delete_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Order deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/opening-balances":{"get":{"tags":["Opening balances"],"operationId":"get_7","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoucherDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Opening balances"],"operationId":"update_7","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningBalanceReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoucherDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Opening balances"],"operationId":"create","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningBalanceReq"}}},"required":true},"responses":{"201":{"description":"Opening balance created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoucherDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Opening balances"],"summary":"Delete or reverse opening balance","description":"Deletes the resource when no accounting reversal is needed. If financial audit history must be retained, records a reversal instead. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"reversed\"}.","operationId":"delete_4","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Opening balance deleted or reversed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/offers/{id}":{"get":{"tags":["Offers"],"operationId":"get_8","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OfferRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Offers"],"operationId":"update_8","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OfferRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Offers"],"operationId":"delete_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Offer deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/manual-reconciliations/{bankAccountId}/ending-balance":{"put":{"tags":["Manual bank reconciliations"],"summary":"Update bank statement ending balance","description":"Saves the bank statement ending balance for a manual bank account month and returns the updated reconciliation state.","operationId":"updateEndingBalance","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualReconciliationEndingBalanceReq"}}},"required":true},"responses":{"200":{"description":"Bank statement ending balance saved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManualReconciliationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/loans/{id}":{"get":{"tags":["Loans"],"operationId":"get_9","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoanRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Loans"],"operationId":"update_9","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoanRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Loans"],"operationId":"delete_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Loan deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}/status":{"put":{"tags":["Leads"],"operationId":"updateStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadStatusReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}/notes":{"put":{"tags":["Leads"],"operationId":"updateNotes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadNotesReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}/follow-up":{"put":{"tags":["Leads"],"operationId":"updateFollowUp","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadFollowUpReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}/contact":{"put":{"tags":["Leads"],"operationId":"updateContact","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadContactReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/org/{orgNumber}/status":{"put":{"tags":["Leads"],"operationId":"updateStatusByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadStatusReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/org/{orgNumber}/notes":{"put":{"tags":["Leads"],"operationId":"updateNotesByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadNotesReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/org/{orgNumber}/follow-up":{"put":{"tags":["Leads"],"operationId":"updateFollowUpByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadFollowUpReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/org/{orgNumber}/contact":{"put":{"tags":["Leads"],"operationId":"updateContactByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadContactReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/general-sub-accounts/{id}":{"get":{"tags":["General sub-accounts"],"summary":"Get general sub-account","description":"Returns one general subsidiary ledger sub-account.","operationId":"get_10","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"General sub-account returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GeneralSubAccountRes"}}}},"400":{"description":"Invalid id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"Missing ledger read permission","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"General sub-account not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["General sub-accounts"],"summary":"Update general sub-account","description":"Replaces the editable fields on a general subsidiary ledger sub-account. The parent account cannot be changed.","operationId":"update_10","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralSubAccountUpdateReq"}}},"required":true},"responses":{"200":{"description":"General sub-account updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GeneralSubAccountRes"}}}},"400":{"description":"Validation failed, invalid id, or the name is already used for the account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"Missing ledger write permission","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"General sub-account not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/departments/{id}":{"get":{"tags":["Departments"],"operationId":"get_11","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepartmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Departments"],"operationId":"update_11","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepartmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Departments"],"summary":"Delete or archive department","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Department deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/debtors/{id}":{"get":{"tags":["Debtors"],"operationId":"get_12","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DebtorRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Debtors"],"operationId":"update_12","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebtorReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DebtorRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Debtors"],"operationId":"delete_7","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Debtor deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/customers/{id}/delivery-address":{"put":{"tags":["Customers"],"operationId":"updateDeliveryAddress","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerDeliveryAddressReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/customers/{id}/address":{"put":{"tags":["Customers"],"operationId":"updateAddress_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerAddressReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/creditors/{id}":{"get":{"tags":["Creditors"],"operationId":"get_13","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreditorRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Creditors"],"operationId":"update_13","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditorReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreditorRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Creditors"],"operationId":"delete_8","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Creditor deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/company-banks/{id}":{"get":{"tags":["Company banks"],"operationId":"get_14","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyBankRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"put":{"tags":["Company banks"],"operationId":"update_14","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBankReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyBankRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Company banks"],"summary":"Delete or archive company bank account","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Company bank account deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/assets/{id}/depreciation":{"put":{"tags":["Assets"],"operationId":"updateDepreciation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetDepreciationReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/service-agreement/{id}":{"put":{"tags":["Agreements"],"operationId":"updateServiceAgreement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAgreementReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/rent-agreement/{id}":{"put":{"tags":["Agreements"],"operationId":"updateRentAgreement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentAgreementReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/purchase-agreement/{id}":{"put":{"tags":["Agreements"],"operationId":"updatePurchaseAgreement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseAgreementReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/employee-contract/{id}":{"put":{"tags":["Agreements"],"operationId":"updateEmployeeContract","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeContractAgreementReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/accounting-services/{id}":{"put":{"tags":["Agreements"],"operationId":"updateAccountingServices","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingServicesAgreementReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients/{clientTenantId}/oppdragskontroll-notes/{noteId}":{"put":{"tags":["Accountant clients"],"summary":"Update oppdragskontroll note","description":"Edits an existing note, recording who edited it and when.","operationId":"updateNote","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"noteId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReviewNoteReq"}}},"required":true},"responses":{"200":{"description":"Note updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReviewNoteRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Accountant clients"],"summary":"Delete oppdragskontroll note","operationId":"deleteNote","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"noteId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Note deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients/{clientTenantId}/oppdragsansvarlig":{"put":{"tags":["Accountant clients"],"summary":"Set oppdragsansvarlig","description":"Sets the engagement-responsible accountant. Send a null userId to clear it.","operationId":"setOppdragsansvarlig","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOppdragsansvarligReq"}}},"required":true},"responses":{"200":{"description":"Oppdragsansvarlig stored","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountantClientRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients/{clientTenantId}/business-description":{"put":{"tags":["Accountant clients"],"summary":"Set business description","description":"Creates or updates the client's business description (GRFS 5.3).","operationId":"setBusinessDescription","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBusinessDescriptionReq"}}},"required":true},"responses":{"200":{"description":"Business description stored","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountantClientRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/{id}/reconnect":{"post":{"tags":["ztl-ctrl"],"operationId":"reconnectConsent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/{id}/approval-reminders":{"post":{"tags":["ztl-ctrl"],"operationId":"toggleApprovalReminders","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"receiveApprovalReminders","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/{bankBic}/payment-user-consent":{"post":{"tags":["ztl-ctrl"],"operationId":"initiatePaymentUserConsentForBank","parameters":[{"name":"bankBic","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"query","required":true,"schema":{"type":"string"}},{"name":"returnUrl","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/{bankBic}/consent":{"post":{"tags":["ztl-ctrl"],"operationId":"initiateConsentForBank","parameters":[{"name":"bankBic","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"query","required":true,"schema":{"type":"string"}},{"name":"returnUrl","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/add-pis":{"post":{"tags":["ztl-ctrl"],"operationId":"addPisConsent","parameters":[{"name":"bankBic","in":"query","required":true,"schema":{"type":"string"}},{"name":"userId","in":"query","required":true,"schema":{"type":"string"}},{"name":"returnUrl","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/shopify/webhooks":{"post":{"tags":["shopify-webhook-ctrl"],"operationId":"handleWebhook","parameters":[{"name":"X-Shopify-Hmac-Sha256","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Shopify-Topic","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Shopify-Shop-Domain","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/salary/{id}/register-payment":{"post":{"tags":["salary-ctrl"],"operationId":"registerPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"companyBankSelection","in":"query","required":true,"schema":{"type":"string"}},{"name":"paymentDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/salary/{id}/payment-date":{"post":{"tags":["salary-ctrl"],"operationId":"updatePaymentDate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"paymentDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/salary/{id}/complete":{"post":{"tags":["salary-ctrl"],"operationId":"completeSalaryPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"companyBankSelection","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/payments/{id}/payment-date":{"post":{"tags":["payment-overview-ctrl"],"operationId":"updatePaymentDate_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"paymentDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/payments/{id}/company-bank":{"post":{"tags":["payment-overview-ctrl"],"operationId":"updateCompanyBank","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"companyBankId","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/{orgNumber}/person-phone-call":{"post":{"tags":["lead-ctrl"],"operationId":"logPersonPhoneCall","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"personName","in":"query","required":false,"schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/company/{orgNumber}/phone-call":{"post":{"tags":["lead-ctrl"],"operationId":"logCompanyPhoneCall","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/invoice/setting/receiver-bank":{"post":{"tags":["invoice-settings-ctrl"],"operationId":"saveDefault","parameters":[{"name":"request","in":"query","required":true,"schema":{"$ref":"#/components/schemas/NewInvoiceReceiverBankReq"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/invoice/setting/daysUntilDue":{"post":{"tags":["invoice-settings-ctrl"],"operationId":"saveDaysUntilDue","parameters":[{"name":"daysUntilDue","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/invoice/payment/{paymentId}/company-bank":{"post":{"tags":["invoice-payment-ctrl"],"operationId":"updateCompanyBank_1","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"companyBankId","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/frontend-error":{"post":{"tags":["error-rest-ctrl"],"operationId":"error","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrontendErrorReq"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/client-admin/{clientTenantId}/oppdragsansvarlig":{"post":{"tags":["client-admin-ctrl"],"operationId":"setOppdragsansvarlig_1","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"oppdragsansvarligUserId","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/client-admin/{clientTenantId}/assignee":{"post":{"tags":["client-admin-ctrl"],"operationId":"setAssignee","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"assignedUserId","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/supplier-invoice-reception":{"post":{"tags":["reception-document-rest-ctrl"],"operationId":"receiveSupplierInvoiceFromEmail","parameters":[{"name":"X-Tenant-Slug","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Sender-Email","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Subject","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/receipt-reception":{"post":{"tags":["reception-document-rest-ctrl"],"operationId":"receiveReceiptFromEmail","parameters":[{"name":"X-Tenant-Slug","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Sender-Email","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Subject","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/manual-voucher-reception":{"post":{"tags":["reception-document-rest-ctrl"],"operationId":"receiveManualVoucherFromEmail","parameters":[{"name":"X-Tenant-Slug","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Sender-Email","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Subject","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/income-reception":{"post":{"tags":["reception-document-rest-ctrl"],"operationId":"receiveIncomeFromEmail","parameters":[{"name":"X-Tenant-Slug","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Sender-Email","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Subject","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/expense-reception":{"post":{"tags":["expense-reception-rest-ctrl"],"operationId":"receiveDocumentFromEmail","parameters":[{"name":"X-Tenant-Slug","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Sender-Email","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Subject","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/email-warning":{"post":{"tags":["reception-document-rest-ctrl"],"operationId":"receiveEmailWarning","parameters":[{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailWarningDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmailWarningEmailDto"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/cf-worker/document-reception":{"post":{"tags":["document-reception-rest-ctrl"],"operationId":"receiveDocumentFromEmail_1","parameters":[{"name":"X-Tenant-Slug","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Email-Worker-Token","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Sender-Email","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Subject","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/auth/select-tenant":{"post":{"tags":["auth-ctrl"],"operationId":"selectTenant","parameters":[{"name":"tenantId","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/warehouses":{"get":{"tags":["Warehouses"],"operationId":"list","parameters":[{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Warehouses"],"operationId":"create_1","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseCreateReq"}}},"required":true},"responses":{"200":{"description":"Warehouse already existed and was returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseRes"}}}},"201":{"description":"Warehouse created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/warehouses/inventory/adjust":{"post":{"tags":["Warehouses"],"operationId":"adjustInventory","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseInventoryAdjustmentReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseInventoryAdjustmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/vouchers":{"get":{"tags":["Vouchers"],"operationId":"list_1","parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"voucherType","in":"query","required":false,"schema":{"type":"string","enum":["MANUAL","OPENING_BALANCE","SUPPLIER_INVOICE","CUSTOMER_INVOICE","INCOME","PAYMENT","EXPENSE","SALARY","CUSTOMS_DECLARATION","ASSET","ASSET_DEPRECIATION","SHAREHOLDER_REGISTER_DIVIDEND","VAT_RETURN","LOAN","CREDIT_NOTE_ASSIGNMENT","CUSTOMER_INVOICE_ADJUSTMENT"]}},{"name":"registeredBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeReversed","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoucherOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Vouchers"],"operationId":"create_2","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherCreateReq"}}},"required":true},"responses":{"201":{"description":"Voucher created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoucherDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/vouchers/{id}/pdf":{"post":{"tags":["Vouchers"],"summary":"Link an existing attachment to a voucher","description":"Attach an already-uploaded attachment to this voucher by id, without re-uploading bytes. Send `Content-Type: application/json` with body `{ \"attachmentId\": Int }`. Same URL as the multipart upload variant; Spring routes by Content-Type. If the attachment is already linked to the voucher, the existing link is returned (idempotent).","operationId":"uploadAttachment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}},"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentLinkReq"}}},"required":true},"responses":{"201":{"description":"Attachment linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/vat-returns/reopen":{"post":{"tags":["VAT returns"],"summary":"Re-open a VAT return period","description":"Reverses the VAT return voucher (or deletes the manual submission) and unlocks the period ","operationId":"reopen","parameters":[{"name":"year","in":"query","description":"Calendar year of the VAT return period (e.g. 2026).","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"period","in":"query","description":"Bi-monthly VAT return period index, 1–6 (1 = Jan–Feb, 2 = Mar–Apr, …, 6 = Nov–Dec).","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"VAT return period reopened"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/users":{"get":{"tags":["Users"],"operationId":"list_2","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserAccessRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Users"],"operationId":"create_3","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserReq"}}},"required":true},"responses":{"201":{"description":"User access or invitation created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserAccessRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/tenants":{"post":{"tags":["Tenants"],"summary":"Create tenant","description":"Creates a tenant for the authenticated user. To discover tenants available to a token, use GET /api/me. No Location header is returned because the API does not expose a tenant detail endpoint.","operationId":"create_4","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantReq"}}},"required":true},"responses":{"201":{"description":"Tenant created without a Location header","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TenantRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/tax-returns/{year}/validate":{"post":{"tags":["Tax returns"],"summary":"Validate the tax return for a fiscal year","description":"Validates the current tax-return draft against Skatteetaten and returns the errors (avvik) — without creating a submission, an Altinn instance, or filing anything. Re-fetches the Skatteetaten source and runs the exact validator the submit flow uses, so it predicts a real submit for ENK/AS/NUF. Participant-taxed companies (ANS/DA, SDF) may differ: submit applies a post-calculation correction that this endpoint does not. Requires an active ID-porten session (validation is authorized by the taxpayer's ID-porten token); check the read endpoint's sources.idPortenConnected first.","operationId":"validate","parameters":[{"name":"year","in":"path","description":"Fiscal year of the tax return (e.g. 2025).","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Validation result (may contain errors)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnValidationRes"}}}},"400":{"description":"Year outside the supported range","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnValidationRes"}}}},"409":{"description":"No active ID-porten session","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnValidationRes"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/tax-returns/{year}/submit":{"post":{"tags":["Tax returns"],"summary":"File the tax return for a fiscal year","description":"Files the tax return with Skatteetaten (via Altinn) — a legal submission. Validates first: if the return has errors it is NOT filed and the errors are returned (422). Files on every call (no idempotency guard), so a repeated call re-files, exactly like the web Submit button. Requires an active ID-porten session (the taxpayer's BankID). The Skatteetaten receipt is fetched asynchronously; read it later via GET /api/tax-returns/{year}. The validate-first / no-Altinn-instance guarantee for invalid returns applies to ENK/AS/NUF; participant-taxed companies (ANS/DA, SDF) may still fail inside the submit after the instance is created, because submit applies a post-calculation correction the pre-check does not.","operationId":"submit","parameters":[{"name":"year","in":"path","description":"Fiscal year of the tax return (e.g. 2025).","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Filed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnSubmitRes"}}}},"422":{"description":"Not filed — the return has validation errors","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnValidationRes"}}}},"409":{"description":"No active ID-porten session, or the ENK owner fnr is not set","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Year out of range, or the annual result is not yet disposed","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/suppliers":{"get":{"tags":["Suppliers"],"operationId":"list_3","parameters":[{"name":"name","in":"query","description":"Keyword filter matched against supplier name.","required":false,"schema":{"type":"string","description":"Keyword filter matched against supplier name.","example":"Nordic"},"example":"Nordic"},{"name":"archived","in":"query","description":"Filter suppliers by archived status. Use true for archived suppliers only and false for active suppliers only.","required":false,"schema":{"type":"boolean","default":false,"description":"Filter suppliers by archived status. Use true for archived suppliers only and false for active suppliers only.","example":false},"example":false},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SupplierOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Suppliers"],"operationId":"create_5","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupplierReq"}}},"required":true},"responses":{"201":{"description":"Supplier created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/suppliers/{id}/unarchive":{"post":{"tags":["Suppliers"],"summary":"Unarchive supplier","description":"Restores an archived supplier to active lists. Deleted suppliers cannot be unarchived.","operationId":"unarchive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Supplier unarchived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/suppliers/{id}/sync-brreg":{"post":{"tags":["Suppliers"],"operationId":"syncBrreg","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices":{"get":{"tags":["Supplier invoices"],"summary":"List registered supplier invoices","description":"Returns all non-reversed supplier invoices and supplier credit notes for the active tenant. Use documentType to distinguish ordinary supplier invoices from credit notes. Set documentType to invoice or credit_note to return only one document type. Invoice reception documents that are not yet registered are exposed through /api/invoice-reception-documents.","operationId":"fetchSupplierInvoices","parameters":[{"name":"documentType","in":"query","description":"Optional document type filter. Use credit_note to list only supplier credit notes.","required":false,"schema":{"type":"string","description":"Supplier invoice document type. credit_note means the document is a supplier credit note.","enum":["invoice","credit_note"]}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SupplierInvoiceListItemRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Supplier invoices"],"summary":"Create a supplier invoice directly","description":"Creates and registers a supplier invoice or supplier credit note directly through the API. This endpoint is shaped around the supplier invoice business object and does not require an invoice reception document. Upload source PDFs or attach existing files through the supplier invoice attachment endpoints.","operationId":"createSupplierInvoice","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoiceReq"}}},"required":true},"responses":{"201":{"description":"Supplier invoice created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/use-credit-note":{"post":{"tags":["Supplier invoices"],"summary":"Apply a credit note to a supplier invoice","description":"Links the selected credit note supplier ledger postings to the invoice. The credit notes must belong to the same supplier and have matching currency. Credit notes are applied fully and the selected total cannot exceed the invoice outstanding amount. Use GET /api/supplier-invoices/{id}/available-credit-notes to discover valid creditNoteIds.","operationId":"useCreditNote","parameters":[{"name":"id","in":"path","description":"The id of the ordinary supplier invoice that should receive the credit note.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCreditNoteReq"}}},"required":true},"responses":{"201":{"description":"Credit note applied to supplier invoice","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UseCreditNoteRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/related-postings":{"post":{"tags":["Supplier ledger invoice groups"],"summary":"Add postings to a supplier invoice ledger group","description":"Adds open supplier ledger postings, such as credit notes or manual vouchers, to the group displayed for this supplier invoice in the supplier ledger. The postings must belong to the same supplier and use the same currency as the target invoice because they reduce that invoice's outstanding amount. The invoice posting and its automatic payment postings are always part of the group and cannot be added or removed through this endpoint. Use GET /api/supplier-invoices/{id} to inspect the invoice payment and settlement state after changing the group.","operationId":"addPostingsToInvoiceLedgerGroup","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSupplierInvoiceLedgerGroupPostingsReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceLedgerGroupPostingsRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/payments":{"post":{"tags":["Supplier invoices"],"summary":"Create a supplier invoice payment","description":"Creates a payment for a non-reversed ordinary supplier invoice. The command is rejected when the invoice is a credit note, is fully paid, or already has a payment awaiting approval or processing. Payment details are resolved from the invoice first, then from the supplier. For a bank-integrated payment that requires customer approval, approvalUrl provides the authenticated ReAI handoff that starts the BankID approval flow. GET /api/supplier-invoices/{id} exposes the current payment creation state through paymentState.","operationId":"createPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoicePaymentReq"}}},"required":true},"responses":{"201":{"description":"Payment created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoicePaymentRes"}}}},"200":{"description":"Existing idempotent payment returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoicePaymentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/attachments":{"get":{"tags":["Supplier invoices"],"summary":"List supplier invoice attachments","description":"Returns source PDFs and other attachments linked to this registered supplier invoice, including URLs for inline viewing and download.","operationId":"fetchAttachments","parameters":[{"name":"id","in":"path","description":"The id of the supplier invoice or supplier credit note to fetch attachments for.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Supplier invoices"],"summary":"Upload supplier invoice attachment","description":"Upload a source PDF or other document to an existing supplier invoice using multipart/form-data with one file part named `file`.","operationId":"uploadAttachment_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Attachment uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/attachments/existing":{"post":{"tags":["Supplier invoices"],"summary":"Attach an existing file to a supplier invoice","description":"Attach an already-uploaded attachment to this supplier invoice by id, without re-uploading bytes. Send `Content-Type: application/json` with body `{ \"attachmentId\": Int }`. If the attachment is already linked to the supplier invoice, the existing link is reused.","operationId":"attachExistingAttachment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentLinkReq"}}},"required":true},"responses":{"201":{"description":"Attachment linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions":{"get":{"tags":["Subscriptions"],"operationId":"list_4","parameters":[{"name":"active","in":"query","description":"Filter by whether the subscription is active.","required":false,"schema":{"type":"boolean","description":"Filter by whether the subscription is active.","example":true},"example":true},{"name":"customerId","in":"query","description":"Filter by customer id.","required":false,"schema":{"type":"integer","format":"int32","description":"Filter by customer id.","example":123,"exclusiveMinimum":0},"example":123},{"name":"due","in":"query","description":"Filter by subscription due status.","required":false,"schema":{"type":"string","description":"Filter by subscription due status.","enum":["all","due","not_due"],"example":"all"},"example":"all"},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Subscriptions"],"operationId":"create_6","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionWriteReq"}}},"required":true},"responses":{"201":{"description":"Subscription created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions/{id}/generate":{"post":{"tags":["Subscriptions"],"summary":"Generate subscription billing","description":"Generates due billing for one subscription synchronously and returns the generation result.","operationId":"generate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Subscription billing generation completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionGenerationResultRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions/{id}/deactivate":{"post":{"tags":["Subscriptions"],"summary":"Deactivate subscription","description":"Marks the subscription inactive and returns the updated subscription.","operationId":"deactivate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Subscription deactivated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions/{id}/activate":{"post":{"tags":["Subscriptions"],"summary":"Activate subscription","description":"Marks the subscription active and returns the updated subscription.","operationId":"activate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Subscription activated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions/generate-due":{"post":{"tags":["Subscriptions"],"summary":"Generate due subscription billing","description":"Generates due billing synchronously for subscriptions matching optional filters and returns the result.","operationId":"generateDue","parameters":[{"name":"active","in":"query","description":"Filter by whether the subscription is active.","required":false,"schema":{"type":"boolean","description":"Filter by whether the subscription is active.","example":true},"example":true},{"name":"customerId","in":"query","description":"Filter by customer id.","required":false,"schema":{"type":"integer","format":"int32","description":"Filter by customer id.","example":123,"exclusiveMinimum":0},"example":123},{"name":"due","in":"query","description":"Filter by subscription due status.","required":false,"schema":{"type":"string","description":"Filter by subscription due status.","enum":["all","due","not_due"],"example":"all"},"example":"all"},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Due subscription billing generation completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriptionGenerationResultRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/salary-payments":{"get":{"tags":["Salary Payments"],"operationId":"list_5","parameters":[{"name":"startDate","in":"query","description":"Start of the period range (inclusive). Defaults to 12 months before endDate.","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"End of the period range (inclusive). Defaults to today.","required":false,"schema":{"type":"string","format":"date"}},{"name":"status","in":"query","description":"Filter by salary payment status.","required":false,"schema":{"type":"string","enum":["under_process","unpaid","complete","reversed"]}},{"name":"employeeId","in":"query","description":"Filter by employee id (only returns salary payments that include this employee).","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalaryPaymentSummaryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Salary Payments"],"operationId":"create_7","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSalaryPaymentReq"}}},"required":true},"responses":{"201":{"description":"Salary payment created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateSalaryPaymentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/salary-payments/{id}/wage-specs":{"post":{"tags":["Salary Payments"],"summary":"Add wage specification line","description":"Adds a manual wage specification line, for example a COMMISSION line, to an employee in a salary payment that is still under process. Returns the updated salary payment with recalculated tax deductions and payable amounts.","operationId":"addWageSpec","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSalaryWageSpecReq"}}},"required":true},"responses":{"200":{"description":"Wage specification line added","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalaryPaymentDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/reconciliation-rules":{"get":{"tags":["Reconciliation rules"],"operationId":"list_6","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationRuleRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Reconciliation rules"],"operationId":"create_8","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationRuleMutationReq"}}},"required":true},"responses":{"201":{"description":"Reconciliation rule created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReconciliationRuleRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/receipt-reception-documents/{id}/registration":{"post":{"tags":["Receipt reception documents"],"summary":"Register and confirm payment for a receipt reception document","description":"Registers the receipt reception document in accounting and confirms a manual payment in the same command.","operationId":"register","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptReceptionRegistrationReq"}}},"required":true},"responses":{"201":{"description":"Receipt registration created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReceiptReceptionRegistrationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/projects":{"get":{"tags":["Projects"],"operationId":"list_7","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Projects"],"operationId":"create_9","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectReq"}}},"required":true},"responses":{"201":{"description":"Project created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProjectRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/projects/{id}/sub-projects":{"get":{"tags":["Projects"],"operationId":"listSubProjects","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Projects"],"operationId":"createSubProject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubProjectReq"}}},"required":true},"responses":{"201":{"description":"Sub-project created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProjectRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/products":{"get":{"tags":["Products"],"operationId":"list_8","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Products"],"operationId":"create_10","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReq"}}},"required":true},"responses":{"201":{"description":"Product created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/supplier/open":{"post":{"tags":["Postings"],"summary":"Open supplier posting group","description":"Opens a supplier posting group and returns the affected posting ids.","operationId":"openSupplierPostings","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenPostingsReq"}}},"required":true},"responses":{"200":{"description":"Supplier posting group opened","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupMutationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/supplier/close":{"post":{"tags":["Postings"],"summary":"Close supplier postings","description":"Closes supplier ledger postings into a posting group and returns the affected posting ids.","operationId":"closeSupplierPostings","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClosePostingsReq"}}},"required":true},"responses":{"200":{"description":"Supplier postings closed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupMutationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/employee/open":{"post":{"tags":["Postings"],"summary":"Open employee posting group","description":"Opens an employee posting group and returns the affected posting ids.","operationId":"openEmployeePostings","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenPostingsReq"}}},"required":true},"responses":{"200":{"description":"Employee posting group opened","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupMutationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/employee/close":{"post":{"tags":["Postings"],"summary":"Close employee postings","description":"Closes employee ledger postings into a posting group and returns the affected posting ids.","operationId":"closeEmployeePostings","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClosePostingsReq"}}},"required":true},"responses":{"200":{"description":"Employee postings closed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupMutationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/customer/open":{"post":{"tags":["Postings"],"summary":"Open customer posting group","description":"Opens a customer posting group and returns the affected posting ids.","operationId":"openCustomerPostings","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenPostingsReq"}}},"required":true},"responses":{"200":{"description":"Customer posting group opened","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupMutationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/customer/close":{"post":{"tags":["Postings"],"summary":"Close customer postings","description":"Closes customer ledger postings into a posting group and returns the affected posting ids.","operationId":"closeCustomerPostings","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClosePostingsReq"}}},"required":true},"responses":{"200":{"description":"Customer postings closed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupMutationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/reports/do-peppol-tsr-reporting/{year}/{month}":{"post":{"tags":["peppol-reporting-ctrl"],"operationId":"createValidateStoreAndSendTSR","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/reports/do-peppol-reporting/{year}/{month}":{"post":{"tags":["peppol-reporting-ctrl"],"operationId":"createValidateStoreAndSend","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/reports/do-peppol-eusr-reporting/{year}/{month}":{"post":{"tags":["peppol-reporting-ctrl"],"operationId":"createValidateStoreAndSendEUSR","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/reports/create-tsr/{year}/{month}":{"post":{"tags":["peppol-reporting-ctrl"],"operationId":"createPeppolReportingTSR","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/reports/create-eusr/{year}/{month}":{"post":{"tags":["peppol-reporting-ctrl"],"operationId":"createPeppolReportingEUSR","parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/messages/sendsbdh":{"post":{"tags":["peppol-sender-ctrl"],"operationId":"sendPeppolSbdhMessage","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/messages/sendas4/{senderId}/{receiverId}/{docTypeId}/{processId}/{countryC1}":{"post":{"tags":["peppol-sender-ctrl"],"operationId":"sendPeppolMessage","parameters":[{"name":"senderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"receiverId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docTypeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"processId","in":"path","required":true,"schema":{"type":"string"}},{"name":"countryC1","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/messages/sendas4-facturx/{senderId}/{receiverId}/{countryC1}":{"post":{"tags":["peppol-sender-ctrl"],"operationId":"sendPeppolFacturX","parameters":[{"name":"senderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"receiverId","in":"path","required":true,"schema":{"type":"string"}},{"name":"countryC1","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","format":"byte"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/orders":{"get":{"tags":["Orders"],"operationId":"list_9","parameters":[{"name":"status","in":"query","description":"Filter by order status.","required":false,"schema":{"type":"string","description":"Filter by order status.","enum":["all","open","closed"],"example":"open"},"example":"open"},{"name":"startDate","in":"query","description":"Start of the order issue date range (inclusive). Defaults to one year before endDate.","required":false,"schema":{"type":"string","format":"date","description":"Start of the order issue date range (inclusive). Defaults to one year before endDate.","example":"2026-01-01"},"example":"2026-01-01"},{"name":"endDate","in":"query","description":"End of the order issue date range (inclusive). Defaults to today.","required":false,"schema":{"type":"string","format":"date","description":"End of the order issue date range (inclusive). Defaults to today.","example":"2026-12-31"},"example":"2026-12-31"},{"name":"orderNumber","in":"query","description":"Filter by order number.","required":false,"schema":{"type":"string","description":"Filter by order number.","example":"ORD-10042"},"example":"ORD-10042"},{"name":"customerId","in":"query","description":"Filter by customer id.","required":false,"schema":{"type":"integer","format":"int32","description":"Filter by customer id.","example":123,"exclusiveMinimum":0},"example":123},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Orders"],"operationId":"create_11","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderReq"}}},"required":true},"responses":{"201":{"description":"Order created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/offers":{"get":{"tags":["Offers"],"operationId":"list_10","parameters":[{"name":"startDate","in":"query","description":"Start of the offer issue date range (inclusive). Defaults to one year before endDate.","required":false,"schema":{"type":"string","format":"date","description":"Start of the offer issue date range (inclusive). Defaults to one year before endDate.","example":"2026-01-01"},"example":"2026-01-01"},{"name":"endDate","in":"query","description":"End of the offer issue date range (inclusive). Defaults to today.","required":false,"schema":{"type":"string","format":"date","description":"End of the offer issue date range (inclusive). Defaults to today.","example":"2026-12-31"},"example":"2026-12-31"},{"name":"offerNumber","in":"query","description":"Filter by offer number.","required":false,"schema":{"type":"string","description":"Filter by offer number.","example":"OFR-10042"},"example":"OFR-10042"},{"name":"customerId","in":"query","description":"Filter by customer id.","required":false,"schema":{"type":"integer","format":"int32","description":"Filter by customer id.","example":123,"exclusiveMinimum":0},"example":123},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OfferOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Offers"],"operationId":"create_12","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferReq"}}},"required":true},"responses":{"201":{"description":"Offer created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OfferRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/manual-reconciliations/{bankAccountId}/reopen":{"post":{"tags":["Manual bank reconciliations"],"summary":"Reopen manual bank reconciliation","description":"Reopens a closed manual bank reconciliation month by unlocking the bank subledger for that month.","operationId":"reopen_1","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualReconciliationMonthReq"}}},"required":true},"responses":{"200":{"description":"Manual bank reconciliation month reopened","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManualReconciliationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/manual-reconciliations/{bankAccountId}/close":{"post":{"tags":["Manual bank reconciliations"],"summary":"Close manual bank reconciliation","description":"Closes the manual bank reconciliation month by locking the bank subledger when the saved bank statement ending balance matches the ledger ending balance.","operationId":"close","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualReconciliationMonthReq"}}},"required":true},"responses":{"200":{"description":"Manual bank reconciliation month closed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManualReconciliationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/loans":{"get":{"tags":["Loans"],"operationId":"list_11","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoanRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Loans"],"operationId":"create_13","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanReq"}}},"required":true},"responses":{"201":{"description":"Loan created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoanRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads":{"get":{"tags":["Leads"],"operationId":"list_12","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200,"minLength":0}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1}},{"name":"pageSize","in":"query","description":"Number of leads per page. Capped at 200.","required":false,"schema":{"type":"integer","format":"int32","description":"Number of leads per page. Capped at 200.","example":50,"maximum":200,"minimum":1},"example":50},{"name":"leadFilter","in":"query","required":false,"schema":{"type":"string","enum":["all","saved","unsaved"]}},{"name":"statusFilter","in":"query","description":"Which lead status to include. all includes every status and unsaved companies.","required":false,"schema":{"type":"string","description":"Which lead status to include. all includes every status and unsaved companies.","enum":["all","no_status","active","disqualified","converted"],"example":"no_status"},"example":"no_status"},{"name":"legalFormCode","in":"query","description":"Comma-separated list of Brreg legal-form codes to include (e.g. AS,ENK,NUF,FLI).","required":false,"schema":{"type":"string","description":"Comma-separated list of Brreg legal-form codes to include (e.g. AS,ENK,NUF,FLI).","example":"AS,ENK","maxLength":500,"minLength":0},"example":"AS,ENK"},{"name":"industryCode","in":"query","description":"Comma-separated list of Brreg primary industry codes to include (exact match), e.g. 64.210,64.220.","required":false,"schema":{"type":"string","description":"Comma-separated list of Brreg primary industry codes to include (exact match), e.g. 64.210,64.220.","example":"64.210,64.220","maxLength":500,"minLength":0},"example":"64.210,64.220"},{"name":"industryCodePrefix","in":"query","description":"Comma-separated list of Brreg primary industry code prefixes to include (e.g. 41. matches all 41.xxx construction codes).","required":false,"schema":{"type":"string","description":"Comma-separated list of Brreg primary industry code prefixes to include (e.g. 41. matches all 41.xxx construction codes).","example":"41.,43.","maxLength":500,"minLength":0},"example":"41.,43."},{"name":"hasAccountant","in":"query","description":"Filter on whether the company has a registered accountant in Brreg. null=any, true=has, false=does not have.","required":false,"schema":{"type":"boolean","description":"Filter on whether the company has a registered accountant in Brreg. null=any, true=has, false=does not have.","example":false},"example":false},{"name":"registeredStartDate","in":"query","description":"Only include companies registered in Brreg on or after this date (inclusive).","required":false,"schema":{"type":"string","format":"date","description":"Only include companies registered in Brreg on or after this date (inclusive).","example":"2026-05-01"},"example":"2026-05-01"},{"name":"registeredEndDate","in":"query","description":"Only include companies registered in Brreg on or before this date (inclusive).","required":false,"schema":{"type":"string","format":"date","description":"Only include companies registered in Brreg on or before this date (inclusive).","example":"2026-05-31"},"example":"2026-05-31"},{"name":"vatRegistered","in":"query","description":"Filter by VAT-registration status. null=any.","required":false,"schema":{"type":"boolean","description":"Filter by VAT-registration status. null=any.","example":true},"example":true},{"name":"city","in":"query","description":"Comma-separated list of city names to include (case-insensitive exact match on Brreg city).","required":false,"schema":{"type":"string","description":"Comma-separated list of city names to include (case-insensitive exact match on Brreg city).","example":"OSLO,BERGEN","maxLength":1000,"minLength":0},"example":"OSLO,BERGEN"},{"name":"excludeOrgNumber","in":"query","description":"Comma-separated list of organization numbers to exclude from the result.","required":false,"schema":{"type":"string","description":"Comma-separated list of organization numbers to exclude from the result.","example":"937683154,937534663","maxLength":2000,"minLength":0},"example":"937683154,937534663"},{"name":"requireEmail","in":"query","description":"When true, only include leads where Brreg has an email registered.","required":false,"schema":{"type":"boolean","description":"When true, only include leads where Brreg has an email registered.","example":true},"example":true},{"name":"requirePhone","in":"query","description":"When true, only include leads where Brreg has a phone or mobile number registered.","required":false,"schema":{"type":"boolean","description":"When true, only include leads where Brreg has a phone or mobile number registered.","example":true},"example":true},{"name":"contactStatus","in":"query","description":"Filter by whether the lead has any contact events.","required":false,"schema":{"type":"string","description":"Filter by whether the lead has any contact events.","enum":["any","not_contacted","contacted"],"example":"not_contacted"},"example":"not_contacted"},{"name":"followUpDueStartDate","in":"query","description":"Only include leads with followUpAt on or after this date. Leads without a follow-up date are excluded.","required":false,"schema":{"type":"string","format":"date","description":"Only include leads with followUpAt on or after this date. Leads without a follow-up date are excluded.","example":"2026-05-15"},"example":"2026-05-15"},{"name":"followUpDueEndDate","in":"query","description":"Only include leads with followUpAt on or before this date. Leads without a follow-up date are excluded.","required":false,"schema":{"type":"string","format":"date","description":"Only include leads with followUpAt on or before this date. Leads without a follow-up date are excluded.","example":"2026-05-22"},"example":"2026-05-22"},{"name":"deduplicateByOwner","in":"query","description":"When true, collapses rows sharing the same email or phone, keeping the lead with the most recent registeredAt per owner. Useful for outreach to avoid contacting one person twice across their multiple AS.","required":false,"schema":{"type":"boolean","description":"When true, collapses rows sharing the same email or phone, keeping the lead with the most recent registeredAt per owner. Useful for outreach to avoid contacting one person twice across their multiple AS.","example":true},"example":true},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadPageRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Leads"],"operationId":"save","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveLeadReq"}}},"required":true},"responses":{"200":{"description":"Lead already existed and was returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"201":{"description":"Lead created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}/convert":{"post":{"tags":["Leads"],"operationId":"convert","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}/contact-events":{"post":{"tags":["Leads"],"operationId":"addContactEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadContactEventReq"}}},"required":true},"responses":{"201":{"description":"Lead contact event created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/org/{orgNumber}/contact-events":{"post":{"tags":["Leads"],"operationId":"addContactEventByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadContactEventReq"}}},"required":true},"responses":{"201":{"description":"Lead contact event created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices":{"get":{"tags":["Invoices"],"operationId":"list_13","parameters":[{"name":"invoiceNumber","in":"query","description":"Filter by invoice number.","required":false,"schema":{"type":"string","description":"Filter by invoice number.","example":"INV-10042"},"example":"INV-10042"},{"name":"paymentStatus","in":"query","description":"Filter by payment status.","required":false,"schema":{"type":"string","description":"Filter by payment status.","enum":["all","outstanding","closed"],"example":"outstanding"},"example":"outstanding"},{"name":"dueDateStatus","in":"query","description":"Filter by due-date status.","required":false,"schema":{"type":"string","description":"Filter by due-date status.","enum":["all","overdue","not_overdue"],"example":"overdue"},"example":"overdue"},{"name":"customerId","in":"query","description":"Filter by customer id.","required":false,"schema":{"type":"integer","format":"int32","description":"Filter by customer id.","example":123,"exclusiveMinimum":0},"example":123},{"name":"type","in":"query","description":"Filter by invoice type.","required":false,"schema":{"type":"string","description":"Filter by invoice type.","enum":["all","invoice","credit_note"],"example":"invoice"},"example":"invoice"},{"name":"startDate","in":"query","description":"Start of the invoice issue date range (inclusive). Defaults to one year before endDate.","required":false,"schema":{"type":"string","format":"date","description":"Start of the invoice issue date range (inclusive). Defaults to one year before endDate.","example":"2026-01-01"},"example":"2026-01-01"},{"name":"endDate","in":"query","description":"End of the invoice issue date range (inclusive). Defaults to today.","required":false,"schema":{"type":"string","format":"date","description":"End of the invoice issue date range (inclusive). Defaults to today.","example":"2026-12-31"},"example":"2026-12-31"},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Invoices"],"summary":"Create invoice from order","description":"Creates an invoice from an existing order and starts invoice delivery asynchronously. For eligible Norwegian private customers, ReAI first attempts eFaktura B2C when the tenant has enabled it. If eFaktura is not enabled, not available, or rejected, delivery falls back to the referenced order settings: EHF first when `sendEhf=true` and the customer can receive EHF, then invoice PDF by email when the order has `invoiceEmail` set. The create response includes `efakturaDelivery` when an eFaktura delivery row already exists; because delivery is asynchronous it can be null immediately after creation. Check `/api/invoices/{id}/efaktura-status`, `/api/invoices/{id}/ehf-history`, and `/api/invoices/{id}/email-history` for delivery status. The request does not contain separate delivery fields; update the order before creating the invoice to change delivery behavior.","operationId":"create_14","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceReq"}}},"required":true},"responses":{"201":{"description":"Invoice created and asynchronous delivery started","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/rounding-adjustment":{"post":{"tags":["Invoices"],"summary":"Settle insignificant invoice outstanding","description":"Settles a tiny remaining customer invoice outstanding amount by creating a rounding adjustment voucher. The adjustment amount is calculated from the current open receivable amount. The command is rejected when the invoice is a credit note, has foreign currency, has no registered payment, or the outstanding amount is not insignificant.","operationId":"settleInsignificantOutstanding","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleInvoiceRoundingAdjustmentReq"}}},"required":true},"responses":{"200":{"description":"Rounding adjustment created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SettleInvoiceRoundingAdjustmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/reminders":{"get":{"tags":["Invoices"],"operationId":"getReminders","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceReminderRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Invoices"],"operationId":"createReminder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceReminderReq"}}},"required":true},"responses":{"201":{"description":"Invoice reminder created and sent","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceReminderDeliveryRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/reminders/forgive":{"post":{"tags":["Invoices"],"summary":"Forgive unpaid invoice reminder charges","description":"Forgives all unpaid reminder fees and late-payment interest currently attached to the invoice reminders. This mirrors the invoice UI action and does not change the original invoice amount.","operationId":"forgiveReminderCharges","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgiveInvoiceReminderChargesReq"}}},"required":true},"responses":{"200":{"description":"Invoice reminder charges forgiven","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceReminderForgivenessRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/refunds":{"post":{"tags":["Invoices"],"summary":"Register a customer invoice refund","description":"Registers a refund for a credit note or other customer invoice with refundable balance. The refund is posted through the existing invoice payment accounting flow as a negative payment.","operationId":"registerRefund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterInvoiceRefundRequest"}}},"required":true},"responses":{"200":{"description":"Refund registered","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RegisterInvoiceRefundResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/payments":{"get":{"tags":["Invoices"],"summary":"List customer invoice payments","description":"Lists registered payments for the invoice. Use the returned payment `id` to delete or reverse a payment.","operationId":"getPayments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Invoices"],"summary":"Register customer invoice payment","description":"Registers an incoming customer invoice payment, creates the accounting voucher, and closes matching customer ledger postings when possible.","operationId":"registerPayment_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterInvoicePaymentRequest"}}},"required":true},"responses":{"201":{"description":"Payment registered","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RegisterInvoicePaymentResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/manual-credit-note-applications":{"post":{"tags":["Invoices"],"summary":"Apply a manual credit note to an invoice","description":"Applies one open manual customer credit note to this ordinary invoice. The credit note must belong to the same customer and currency, must not already be applied or refunded, and its remaining amount cannot exceed the invoice outstanding amount. Use GET /api/invoices/{id} after the command to inspect updated payment and credit-note state.","operationId":"applyManualCreditNote","parameters":[{"name":"id","in":"path","description":"The id of the ordinary invoice that should receive the credit note.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCreditNoteRequest"}}},"required":true},"responses":{"200":{"description":"Credit note applied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/email":{"post":{"tags":["Invoices"],"operationId":"sendEmail","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceEmailReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceEmailDeliveryRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/ehf":{"post":{"tags":["Invoices"],"operationId":"sendEhf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceEhfDeliveryRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/credit":{"post":{"tags":["Invoices"],"summary":"Create credit note from invoice","description":"Creates a credit note from an existing invoice and starts credit note delivery asynchronously. Delivery uses the original invoice order settings: when the order has `sendEhf=true` and the customer can receive EHF, ReAI sends EHF first. If EHF is not enabled, not available for the customer, or sending fails, ReAI sends the credit note PDF by email when the order has `invoiceEmail` set. The create response does not include the delivery result; check `/api/invoices/{id}/ehf-history` and `/api/invoices/{id}/email-history` for delivery status.","operationId":"credit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditInvoiceReq"}}},"required":true},"responses":{"201":{"description":"Credit note created and asynchronous delivery started","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/reminders/bulk":{"post":{"tags":["Invoices"],"summary":"Send plain reminders for multiple invoices","description":"Sends a plain reminder for each requested customer invoice using the invoice customer email. Each reminder uses the current reminder date and does not apply reminder fee or late-payment interest. At most 100 invoice ids are accepted and duplicate ids are rejected. If individual invoices fail, the operation still returns `200 OK` with sent and failed counts plus per-invoice failures. Failure reasons are `missing_email`, `invoice_not_found`, `invalid_invoice_state`, and `send_failed`.","operationId":"createBulkReminder","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBulkInvoiceReminderReq"}}},"required":true},"responses":{"200":{"description":"Bulk reminder operation completed with per-invoice results","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BulkInvoiceReminderRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoice-reception-documents":{"get":{"tags":["Invoice reception documents"],"summary":"List supplier invoice reception documents","description":"Returns unprocessed supplier invoice reception documents from the inbox. Use POST /api/invoice-reception-documents/{id}/supplier-invoice to register one as a supplier invoice.","operationId":"list_14","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceReceptionDocumentListItemRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Invoice reception documents"],"summary":"Upload supplier invoice reception documents","description":"Bulk creates supplier invoice reception documents from uploaded files. Files are converted to PDF when needed and analyzed like the web and email intake flows. The response body contains the created reception document ids and attachment metadata. Supplier invoice registration remains a separate step through POST /api/invoice-reception-documents/{id}/supplier-invoice.","operationId":"upload","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"}}},"required":["files"]}}}},"responses":{"201":{"description":"Supplier invoice reception documents uploaded without a Location header","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UploadedInvoiceReceptionDocumentRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoice-reception-documents/{id}/supplier-invoice":{"post":{"tags":["Invoice reception documents"],"summary":"Register a supplier invoice from a reception document","description":"Creates the supplier invoice and voucher from this reception document. Payment is not created by this endpoint; use POST /api/supplier-invoices/{id}/payments after registration.","operationId":"createSupplierInvoice_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoiceFromReceptionDocumentReq"}}},"required":true},"responses":{"201":{"description":"Supplier invoice created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoiceFromReceptionDocumentRes"}}}},"200":{"description":"Supplier invoice was already created for this reception document","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateSupplierInvoiceFromReceptionDocumentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/general-sub-accounts":{"get":{"tags":["General sub-accounts"],"summary":"List general sub-accounts","description":"Returns general subsidiary ledger sub-accounts. Use `accountNumber` to get the selectable sub-accounts for one chart-of-account entry.","operationId":"list_15","parameters":[{"name":"accountNumber","in":"query","description":"Optional parent account number. The account must support general sub-accounts.","required":false,"schema":{"$ref":"#/components/schemas/AccountNumber"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"General sub-accounts returned","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GeneralSubAccountRes"}}}}},"400":{"description":"Invalid account number filter, or the account does not support general sub-accounts","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"Missing ledger read permission","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["General sub-accounts"],"summary":"Create general sub-account","description":"Creates a general subsidiary ledger sub-account under an account that supports general sub-accounts.","operationId":"create_15","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralSubAccountCreateReq"}}},"required":true},"responses":{"201":{"description":"General sub-account created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GeneralSubAccountRes"}}}},"400":{"description":"Validation failed, the account does not support general sub-accounts, or the name is already used for the account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"Missing ledger write permission","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/expenses":{"get":{"tags":["Expenses"],"operationId":"list_16","parameters":[{"name":"keyword","in":"query","description":"Keyword filter matched against expense title/description.","required":false,"schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Start of the date range (inclusive). Defaults to first day of current year.","required":false,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"End of the date range (inclusive). Defaults to today.","required":false,"schema":{"type":"string","format":"date"}},{"name":"status","in":"query","description":"Filter by status: open, for_approval, approved.","required":false,"schema":{"type":"string","enum":["open","for_approval","approved"]}},{"name":"paidOut","in":"query","description":"Filter by whether the expense has been paid out via payroll.","required":false,"schema":{"type":"boolean"}},{"name":"employeeIds","in":"query","description":"Filter by one or more employee ids.","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32","exclusiveMinimum":0}}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Expenses"],"operationId":"create_16","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExpenseReq"}}},"required":true},"responses":{"201":{"description":"Expense created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExpenseDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/employees":{"get":{"tags":["Employees"],"operationId":"list_17","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeSummaryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Employees"],"operationId":"create_17","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeReq"}}},"required":true},"responses":{"201":{"description":"Employee created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/documents":{"get":{"tags":["Documents"],"operationId":"list_18","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Documents"],"summary":"Upload one or more documents","description":"Bulk creates documents from the uploaded files. The response body contains the created documents. No Location header is returned because one request can create multiple documents.","operationId":"create_18","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"}}},"required":["files"]}}}},"responses":{"201":{"description":"Documents uploaded without a Location header","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/departments":{"get":{"tags":["Departments"],"operationId":"list_19","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Departments"],"operationId":"create_19","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentReq"}}},"required":true},"responses":{"201":{"description":"Department created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DepartmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/debtors":{"get":{"tags":["Debtors"],"operationId":"list_20","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DebtorRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Debtors"],"operationId":"create_20","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebtorReq"}}},"required":true},"responses":{"201":{"description":"Debtor created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DebtorRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/customers":{"get":{"tags":["Customers"],"operationId":"list_21","parameters":[{"name":"name","in":"query","description":"Keyword filter matched against customer name.","required":false,"schema":{"type":"string","description":"Keyword filter matched against customer name.","example":"Acme"},"example":"Acme"},{"name":"organizationNumber","in":"query","description":"Exact match filter on organization number.","required":false,"schema":{"type":"string","description":"Exact match filter on organization number.","example":999999999,"maxLength":36,"minLength":0},"example":999999999},{"name":"archived","in":"query","description":"Include archived customers.","required":false,"schema":{"type":"boolean","default":false,"description":"Include archived customers.","example":false},"example":false},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Customers"],"summary":"Create customer","description":"Creates a private customer when privateContact is true. Otherwise creates a company customer. When countryCode is omitted it defaults to NO, and Norwegian company customers require a valid organizationNumber.","operationId":"create_21","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerReq"}}},"required":true},"responses":{"201":{"description":"Customer created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/customers/{id}/unarchive":{"post":{"tags":["Customers"],"summary":"Unarchive customer","description":"Restores an archived customer to active lists. Deleted customers cannot be unarchived.","operationId":"unarchive_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Customer unarchived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/customers/{id}/sync-brreg":{"post":{"tags":["Customers"],"operationId":"syncBrreg_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/creditors":{"get":{"tags":["Creditors"],"operationId":"list_22","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditorRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Creditors"],"operationId":"create_22","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditorReq"}}},"required":true},"responses":{"201":{"description":"Creditor created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreditorRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/company-banks":{"get":{"tags":["Company banks"],"operationId":"list_23","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBankRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Company banks"],"operationId":"create_23","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBankReq"}}},"required":true},"responses":{"201":{"description":"Company bank created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyBankRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-reconciliations/{bankAccountId}/reopen":{"post":{"tags":["Bank reconciliations"],"summary":"Reopen bank reconciliation month","description":"Reopens the bank reconciliation month and returns the updated overview.","operationId":"reopen_2","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankReconciliationMonthReq"}}},"required":true},"responses":{"200":{"description":"Bank reconciliation month reopened","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankReconciliationOverviewRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-reconciliations/{bankAccountId}/matches":{"post":{"tags":["Bank reconciliations"],"summary":"Match bank transactions and postings","description":"Manually reconciles the selected bank transactions and ledger postings.","operationId":"match","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankReconciliationMatchReq"}}},"required":true},"responses":{"200":{"description":"Bank transactions and postings matched","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankReconciliationMatchRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-reconciliations/{bankAccountId}/groups/{reconciliationGroupId}/unmatch":{"post":{"tags":["Bank reconciliations"],"summary":"Unmatch reconciliation group","description":"Unmatches the whole reconciliation group, including all transactions and postings in that group.","operationId":"unmatchGroup","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"reconciliationGroupId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Reconciliation group unmatched","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankReconciliationUnmatchGroupRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-reconciliations/{bankAccountId}/close":{"post":{"tags":["Bank reconciliations"],"summary":"Close bank reconciliation month","description":"Closes the bank reconciliation month and returns the updated overview.","operationId":"close_1","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankReconciliationMonthReq"}}},"required":true},"responses":{"200":{"description":"Bank reconciliation month closed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankReconciliationOverviewRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-reconciliations/{bankAccountId}/apply-rules":{"post":{"tags":["Bank reconciliations"],"operationId":"applyRules","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankReconciliationApplyRulesReq"}}},"required":true},"responses":{"202":{"description":"Rule application started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankReconciliationApplyRulesRes"}}}},"409":{"description":"Rule application is already running, or another conflict prevented scheduling","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankReconciliationApplyRulesRes"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/attachments":{"post":{"tags":["Attachments"],"summary":"Upload an attachment","description":"Upload a file as a standalone attachment. Returns the new attachment id so it can be linked to one or more owners (vouchers, etc.) without re-uploading the bytes. Bytes are stored as-is; no format conversion is applied.","operationId":"upload_1","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Attachment uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/assets":{"get":{"tags":["Assets"],"operationId":"list_24","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Assets"],"operationId":"create_24","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReq"}}},"required":true},"responses":{"201":{"description":"Asset created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/assets/{id}/write-off":{"post":{"tags":["Assets"],"operationId":"writeOff","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/{id}/sign-request":{"post":{"tags":["Agreements"],"summary":"Send agreement sign request","description":"Creates a signing request for the agreement document and sends the request email to the signer.","operationId":"sendSignRequest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementSignRequestReq"}}},"required":true},"responses":{"200":{"description":"Agreement sign request created and email sent","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementSignRequestRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/service-agreement":{"post":{"tags":["Agreements"],"operationId":"createServiceAgreement","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAgreementReq"}}},"required":true},"responses":{"201":{"description":"Agreement created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/rent-agreement":{"post":{"tags":["Agreements"],"operationId":"createRentAgreement","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentAgreementReq"}}},"required":true},"responses":{"201":{"description":"Agreement created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/purchase-agreement":{"post":{"tags":["Agreements"],"operationId":"createPurchaseAgreement","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseAgreementReq"}}},"required":true},"responses":{"201":{"description":"Agreement created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/employee-contract":{"post":{"tags":["Agreements"],"operationId":"createEmployeeContract","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeContractAgreementReq"}}},"required":true},"responses":{"201":{"description":"Agreement created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/accounting-services":{"post":{"tags":["Agreements"],"operationId":"createAccountingServices","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingServicesAgreementReq"}}},"required":true},"responses":{"201":{"description":"Agreement created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/admin/tenants":{"post":{"tags":["Admin: Tenants"],"summary":"Create tenants","description":"Creates one tenant per organization number for the given owner. Company details are fetched from Brreg. Partial success is reported per organization number in the results array, so a 200 response can still contain failed entries.","operationId":"create_25","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateTenantsReq"}}},"required":true},"responses":{"200":{"description":"Per-organization-number results","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdminCreateTenantsRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients/{clientTenantId}/oppdragskontroll-notes":{"get":{"tags":["Accountant clients"],"summary":"List oppdragskontroll notes","operationId":"listNotes","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewNoteRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"post":{"tags":["Accountant clients"],"summary":"Add oppdragskontroll note","description":"Appends a timestamped note recording who added it.","operationId":"addNote","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewNoteReq"}}},"required":true},"responses":{"201":{"description":"Note added","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReviewNoteRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/admin/reconciliation-auto-close":{"post":{"tags":["admin-reconciliation-auto-close-ctrl"],"operationId":"run","parameters":[{"name":"dryRun","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/suppliers/{id}":{"get":{"tags":["Suppliers"],"operationId":"get_15","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Suppliers"],"summary":"Delete or archive supplier","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Supplier deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Suppliers"],"operationId":"update_15","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupplierReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}":{"get":{"tags":["Supplier invoices"],"summary":"Get a registered supplier invoice","description":"Returns the supplier invoice or supplier credit note with cost lines, payments, settlements, ledger group members, payment state, and payment details when available. Inspect paymentState.paymentCreationAllowed to see whether payment creation is currently blocked.","operationId":"fetchSupplierInvoice","parameters":[{"name":"id","in":"path","description":"The id of the supplier invoice or supplier credit note to fetch.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Supplier invoices"],"summary":"Partially update a registered supplier invoice","description":"Updates supplied editable fields on an existing registered supplier invoice. Omitted fields preserve existing values. Amount changes are done through costLines and follow the same accounting rules as the web application.","operationId":"updateSupplierInvoice","parameters":[{"name":"id","in":"path","description":"The id of the registered supplier invoice to update.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupplierInvoiceReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/{id}":{"get":{"tags":["Leads"],"operationId":"get_16","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Leads"],"operationId":"delete_9","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Lead deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Leads"],"operationId":"patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchLeadReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/org/{orgNumber}":{"get":{"tags":["Leads"],"operationId":"getByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Leads"],"operationId":"deleteByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Lead deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Leads"],"operationId":"patchByOrgNumber","parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchLeadReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LeadRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/employees/{id}":{"get":{"tags":["Employees"],"operationId":"get_17","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Employees"],"operationId":"delete_10","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Employee deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Employees"],"operationId":"update_16","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchEmployeeReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/documents/{id}":{"get":{"tags":["Documents"],"operationId":"get_18","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Documents"],"summary":"Delete or archive document","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Document deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Documents"],"operationId":"update_17","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/customers/{id}":{"get":{"tags":["Customers"],"operationId":"get_19","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Customers"],"summary":"Delete or archive customer","description":"Deletes the resource when it has no retained references. If deletion would break retained references, archives the resource instead; archived resources are hidden from active lists and may be restored by an unarchive endpoint when available. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"archived\"}.","operationId":"deleteOrArchive_7","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Customer deleted or archived","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Customers"],"operationId":"update_18","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerReq"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/attachments/{id}":{"get":{"tags":["Attachments"],"operationId":"getMetadata","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AttachmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"patch":{"tags":["Attachments"],"summary":"Rename and/or replace attachment content","description":"Update an attachment's filename and/or replace its bytes. Send as multipart/form-data with optional `filename` text part and/or optional `file` part. At least one is required. Replacing content updates the bytes for every owner that references this attachment id.","operationId":"update_19","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"filename","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Attachment updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/search":{"get":{"tags":["ztl-bank-rest-ctrl"],"operationId":"searchBanks","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/vat/{category}/search":{"get":{"tags":["vat-rest-ctrl"],"operationId":"searchVatCodes","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VatCodeComboItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/vat/search":{"get":{"tags":["vat-rest-ctrl"],"operationId":"searchVatCodes_1","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VatCodeComboItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/vat-return/altinn-sync":{"get":{"tags":["vat-return-ctrl"],"operationId":"vatReturnAltinnSync","parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"period","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/user/search":{"get":{"tags":["user-ctrl"],"operationId":"searchUsers","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserTenantDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/timesheet/employee/search":{"get":{"tags":["timesheet-ctrl"],"operationId":"searchTimesheetEmployees","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/supplier/search":{"get":{"tags":["supplier-ctrl"],"operationId":"searchSuppliers","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SupplierDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/project/search":{"get":{"tags":["project-ctrl"],"operationId":"searchProjects","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/product/search":{"get":{"tags":["product-rest-ctrl"],"operationId":"searchProducts","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"orderId","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductSearchItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/payment/recipient/search":{"get":{"tags":["payment-rest-ctrl"],"operationId":"searchRecipients","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/onboarding/company-search":{"get":{"tags":["onboarding-ctrl"],"operationId":"searchCompanies","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"countryCode","in":"query","required":false,"schema":{"type":"string","default":"NO"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBasicInfo"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/municipality/search":{"get":{"tags":["municipality-rest-ctrl"],"operationId":"searchMunicipalities","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/saved-filter/search":{"get":{"tags":["lead-ctrl"],"operationId":"searchSavedLeadFilters","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrmSavedLeadFilterOptionDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/legal-form/search":{"get":{"tags":["lead-ctrl"],"operationId":"searchLegalForms","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/industry/search":{"get":{"tags":["lead-ctrl"],"operationId":"searchIndustries","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IndustryOptionDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/city/search":{"get":{"tags":["lead-ctrl"],"operationId":"searchCities","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CityOptionDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/lead/accountant-office/search":{"get":{"tags":["lead-ctrl"],"operationId":"searchAccountantOffices","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountantOfficeOptionDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/invoice/{creditNoteInvoiceId}/credit-note-assignment/invoices/search":{"get":{"tags":["invoice-ctrl"],"operationId":"searchCreditNoteAssignmentInvoices","parameters":[{"name":"creditNoteInvoiceId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditNoteAssignmentInvoiceSearchItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/general-ledger/recipient/search":{"get":{"tags":["ledger-ctrl"],"operationId":"searchRecipients_1","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/general-ledger/bank/search":{"get":{"tags":["ledger-ctrl"],"operationId":"searchBanks_1","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/expense/per-diem-country/search":{"get":{"tags":["travel-expense-country-rest-ctrl"],"operationId":"searchCountries","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/employee/search":{"get":{"tags":["employee-ctrl"],"operationId":"searchEmployees","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/employee/occupation-codes/search":{"get":{"tags":["employee-ctrl"],"operationId":"searchOccupationCodes","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/department/search":{"get":{"tags":["department-ctrl"],"operationId":"searchDepartments","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Department"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/debtor/search":{"get":{"tags":["debtor-ctrl"],"operationId":"search","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Debtor"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/customer/search":{"get":{"tags":["customer-ctrl"],"operationId":"searchCustomers","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/currency/search":{"get":{"tags":["currency-rest-ctrl"],"operationId":"searchVatCodes_2","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Currency"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/creditor/search":{"get":{"tags":["creditor-ctrl"],"operationId":"search_1","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Creditor"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/country/search":{"get":{"tags":["country-rest-ctrl"],"operationId":"searchCountries_1","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/company/search":{"get":{"tags":["company-ctrl"],"operationId":"searchCompanies_1","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"countryCode","in":"query","required":false,"schema":{"type":"string","default":"NO"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBasicInfo"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/company/managing-director":{"get":{"tags":["company-ctrl"],"operationId":"getManagingDirector","parameters":[{"name":"orgNr","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/company/contact-person":{"get":{"tags":["company-ctrl"],"operationId":"getContactPerson","parameters":[{"name":"orgNr","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/company-bank/search":{"get":{"tags":["company-bank-ctrl"],"operationId":"searchCompanyBanks","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBankSearchOption"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/client-admin/assignees/search":{"get":{"tags":["client-admin-ctrl"],"operationId":"searchAssignees","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignableUser"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/bank/search":{"get":{"tags":["bank-rest-ctrl"],"operationId":"search_2","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankSearchItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/bank-bic/search":{"get":{"tags":["bank-bic-rest-ctrl"],"operationId":"searchBankBic","parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/bank-bic/clearing-code-search":{"get":{"tags":["bank-bic-rest-ctrl"],"operationId":"searchClearingCodes","parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/attachments/{id}":{"get":{"tags":["attachment-rest-ctrl"],"operationId":"getAttachment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/attachments/{id}/view/{filename}":{"get":{"tags":["attachment-rest-ctrl"],"operationId":"getAttachmentWithFilename","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/asset/search":{"get":{"tags":["asset-ctrl"],"operationId":"searchAssets","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetSearchItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/warehouses/inventory":{"get":{"tags":["Warehouses"],"operationId":"inventory","parameters":[{"name":"warehouseId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WarehouseInventoryRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/vat-codes":{"get":{"tags":["VAT codes"],"summary":"List supported VAT codes","description":"Returns every VAT code supported by ReAI, including its code, rate, description, type, and category.","operationId":"list_25","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VatCodeRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/users/roles":{"get":{"tags":["Users"],"summary":"List tenant roles","description":"Returns the tenant role codes accepted by user APIs. Use the `code` value as `roleCode`, and only assign roles where `assignable` is true.","operationId":"listRoles","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserRoleDiscoveryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/users/permissions":{"get":{"tags":["Users"],"summary":"List tenant permissions","description":"Returns the tenant permission codes accepted by user APIs. Use the `code` values as `directPermissionCodes` when creating or updating user access.","operationId":"listPermissions","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPermissionDiscoveryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/users/invitations":{"get":{"tags":["Users"],"operationId":"listInvitations","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserAccessRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/users/invitations/{id}":{"get":{"tags":["Users"],"operationId":"getInvitation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserAccessRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/timesheets":{"get":{"tags":["Timesheets"],"operationId":"listByProjectAndDateRange","parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"employeeId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TimesheetEntryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/tax-returns/{year}":{"get":{"tags":["Tax returns"],"summary":"Get the tax return for a fiscal year","description":"Returns the fully computed tax return exactly as the /tax-return page shows it — taxable income, saldo/depreciation schedule, loss carryforward, capital and wealth summary, betalbar skatt, temporary/permanent differences, equity reconciliation and dividend — plus submission status, any validation error blocking submission, source-fetch readiness and submit gating. Everything is derived live from the ledger and stored inputs; reading needs no ID-porten/BankID.","operationId":"get_20","parameters":[{"name":"year","in":"path","description":"Fiscal year of the tax return (e.g. 2025).","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"The computed tax return","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnRes"}}}},"400":{"description":"Year outside the supported range","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxReturnRes"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/available-credit-notes":{"get":{"tags":["Supplier invoices"],"summary":"List credit notes available for a supplier invoice","description":"Returns supplier credit notes that can be used as creditNoteIds for this supplier invoice. Only open credit notes for the same supplier and currency are returned, and each returned credit note fits within the invoice outstanding amount. An empty list means there are no currently applicable credit notes, the target document is a credit note, the target invoice has no open balance, or it has an active payment awaiting approval or processing.","operationId":"availableCreditNotes","parameters":[{"name":"id","in":"path","description":"The id of the ordinary supplier invoice that should receive a credit note.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailableSupplierCreditNoteRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/attachments/{attachmentId}/content":{"get":{"tags":["Supplier invoices"],"summary":"Download a supplier invoice attachment","description":"Returns attachment content when the attachment belongs to this registered supplier invoice.","operationId":"fetchAttachmentContent","parameters":[{"name":"id","in":"path","description":"The id of the supplier invoice or supplier credit note.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"attachmentId","in":"path","description":"The id of the attachment to download.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/subscriptions/{id}/billing-history":{"get":{"tags":["Subscriptions"],"operationId":"getBillingHistory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionBillingHistoryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/salary-payments/{id}":{"get":{"tags":["Salary Payments"],"operationId":"get_21","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SalaryPaymentDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Salary Payments"],"summary":"Delete or reverse salary payment","description":"Deletes the resource when no accounting reversal is needed. If financial audit history must be retained, records a reversal instead. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"reversed\"}.","operationId":"delete_11","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Salary payment deleted or reversed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/receipt-reception-documents":{"get":{"tags":["Receipt reception documents"],"summary":"List receipt reception documents","description":"Returns unprocessed receipt reception documents from the inbox.","operationId":"list_26","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReceiptReceptionDocumentListItemRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/receipt-reception-documents/{id}":{"get":{"tags":["Receipt reception documents"],"summary":"Get a receipt reception document","description":"Returns extracted document, cost, payment-related values, and attachment metadata for one unprocessed receipt reception document.","operationId":"getDocument","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReceiptReceptionDocumentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Receipt reception documents"],"summary":"Delete a receipt reception document","description":"Drop the receipt reception document so it no longer appears in the inbox. The underlying attachment (file bytes) survives if any other owner still references it; otherwise the bytes are cleaned up automatically.","operationId":"deleteDocument","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Receipt reception document deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/projects/activities":{"get":{"tags":["Projects"],"operationId":"listActivities","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectActivityRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings":{"get":{"tags":["Postings"],"operationId":"list_27","parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"accountNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"voucherId","in":"query","required":false,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"projectId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"supplierId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"customerId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"employeeId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PostingRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/groups":{"get":{"tags":["Postings"],"operationId":"listPostingGroups","parameters":[{"name":"postingId","in":"query","required":false,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PostingGroupRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/postings/groups/{postingGroupId}":{"get":{"tags":["Postings"],"operationId":"getPostingGroup","parameters":[{"name":"postingGroupId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostingGroupRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/peppol/messages/phase4ping":{"get":{"tags":["peppol-sender-ctrl"],"operationId":"ping","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/orders/{id}/pdf":{"get":{"tags":["Orders"],"operationId":"getPdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/nyetableringer":{"get":{"tags":["market-ctrl"],"operationId":"nyetableringerApi","parameters":[{"name":"bransje","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"Host","in":"header","schema":{"type":"string","enum":["enak.no"]}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NewCompaniesApiPage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/network/people":{"get":{"tags":["network-ctrl"],"operationId":"networkPeopleApi","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":8}},{"name":"Host","in":"header","schema":{"type":"string","enum":["enak.no"]}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NetworkPersonView"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/network/path":{"get":{"tags":["network-ctrl"],"operationId":"networkPathApi","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}},{"name":"maxNodes","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":8}},{"name":"broad","in":"query","required":false,"schema":{"type":"string"}},{"name":"Host","in":"header","schema":{"type":"string","enum":["enak.no"]}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NetworkPathApiResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/me":{"get":{"tags":["Authentication"],"summary":"Get authenticated user and tenants","description":"Returns the authenticated user and the tenants available to the token. Use the returned tenant `id` as the `X-Tenant-Id` header for tenant-scoped requests.","operationId":"get_22","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/manual-reconciliations/{bankAccountId}":{"get":{"tags":["Manual bank reconciliations"],"summary":"Get manual bank reconciliation status","description":"Returns bank-currency balances, saved bank statement ending balance, and closing state for a manual bank account month.","operationId":"get_23","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Manual bank reconciliation month returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManualReconciliationRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/supplier":{"get":{"tags":["Supplier ledger"],"summary":"List supplier ledgers","description":"Returns the supplier subsidiary ledger for every supplier with activity in the period.","operationId":"list_28","parameters":[{"name":"startDate","in":"query","description":"Inclusive start date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"isOpenPosting","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"isUnpaid","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"showDisputed","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SupplierLedgerRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/supplier/{supplierId}":{"get":{"tags":["Supplier ledger"],"summary":"Get supplier ledger","description":"Returns the supplier subsidiary ledger for the given supplier. When the supplier exists but has no postings in the period, an empty ledger is returned.","operationId":"get_24","parameters":[{"name":"supplierId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"isOpenPosting","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"isUnpaid","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"showDisputed","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierLedgerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/general":{"get":{"tags":["General ledger"],"summary":"General ledger report","description":"Returns the general ledger report grouped by account, with opening balance, postings, and closing balance for each account that has activity in the requested period.","operationId":"get_25","parameters":[{"name":"startDate","in":"query","description":"Inclusive start date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"accountNumber","in":"query","description":"Restrict result to a single account number.","required":false,"schema":{"type":"string"}},{"name":"accountFrom","in":"query","description":"Inclusive lower bound of account numbers to include.","required":false,"schema":{"type":"string"}},{"name":"accountTo","in":"query","description":"Inclusive upper bound of account numbers to include.","required":false,"schema":{"type":"string"}},{"name":"projectId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"supplierId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"customerId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"employeeId","in":"query","required":false,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"voucherNumber","in":"query","description":"Voucher number filter (e.g. `12`, `12-2024`, `M12-2024`).","required":false,"schema":{"type":"string"}},{"name":"amountFrom","in":"query","required":false,"schema":{"type":"number"}},{"name":"amountTo","in":"query","required":false,"schema":{"type":"number"}},{"name":"vatCode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/VatCode"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GeneralLedgerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/employee":{"get":{"tags":["Employee ledger"],"summary":"List employee ledgers","description":"Returns the employee subsidiary ledger for every employee with activity in the period.","operationId":"list_29","parameters":[{"name":"startDate","in":"query","description":"Inclusive start date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"isOpenPosting","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeLedgerRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/employee/{employeeId}":{"get":{"tags":["Employee ledger"],"summary":"Get employee ledger","description":"Returns the employee subsidiary ledger for the given employee in the requested period.","operationId":"get_26","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"isOpenPosting","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmployeeLedgerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/customer":{"get":{"tags":["Customer ledger"],"summary":"List customer ledgers","description":"Returns the customer subsidiary ledger for every customer with activity in the period.","operationId":"list_30","parameters":[{"name":"startDate","in":"query","description":"Inclusive start date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"isOpenPosting","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerLedgerRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/customer/{customerId}":{"get":{"tags":["Customer ledger"],"summary":"Get customer ledger","description":"Returns the customer subsidiary ledger for the given customer in the requested period.","operationId":"get_27","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"isOpenPosting","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CustomerLedgerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/asset":{"get":{"tags":["Asset ledger"],"summary":"List asset ledgers","description":"Returns the asset subsidiary ledger for every asset that has postings, including acquisition cost and depreciation postings within the requested date range.","operationId":"list_31","parameters":[{"name":"startDate","in":"query","description":"Inclusive start date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting period (ISO yyyy-MM-dd).","required":true,"schema":{"type":"string","format":"date"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetLedgerRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/ledger/asset/{assetId}":{"get":{"tags":["Asset ledger"],"summary":"Get asset ledger","description":"Returns the asset subsidiary ledger for the given asset, including acquisition cost and depreciation postings within the requested date range.","operationId":"get_28","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetLedgerRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/person-role-matches":{"get":{"tags":["Leads"],"operationId":"listPersonRoleMatches","parameters":[{"name":"linkedinSlug","in":"query","description":"LinkedIn slug to look up in brreg_person. Accepts either the raw slug or a full LinkedIn profile URL.","required":true,"schema":{"type":"string","description":"LinkedIn slug to look up in brreg_person. Accepts either the raw slug or a full LinkedIn profile URL.","example":"hermanmuellerstormyr","maxLength":200,"minLength":0},"example":"hermanmuellerstormyr"},{"name":"limit","in":"query","description":"Maximum number of matches to return. Capped at 20.","required":false,"schema":{"type":"integer","format":"int32","description":"Maximum number of matches to return. Capped at 20.","example":10,"maximum":20,"minimum":1},"example":10},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PersonRoleMatchRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/leads/person-profiles":{"get":{"tags":["Leads"],"operationId":"listPersonProfiles","parameters":[{"name":"startOrgNo","in":"query","required":false,"schema":{"type":"string","maxLength":9,"minLength":0}},{"name":"limit","in":"query","description":"Number of profiles per page. Capped at 200.","required":false,"schema":{"type":"integer","format":"int32","description":"Number of profiles per page. Capped at 200.","example":100,"maximum":200,"minimum":1},"example":100},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200,"minLength":0}},{"name":"legalFormCode","in":"query","description":"Comma-separated list of Brreg legal-form codes to include (e.g. AS,ENK,NUF,FLI).","required":false,"schema":{"type":"string","description":"Comma-separated list of Brreg legal-form codes to include (e.g. AS,ENK,NUF,FLI).","example":"AS,ENK","maxLength":500,"minLength":0},"example":"AS,ENK"},{"name":"city","in":"query","description":"Comma-separated list of city names to include (case-insensitive).","required":false,"schema":{"type":"string","description":"Comma-separated list of city names to include (case-insensitive).","example":"OSLO,BERGEN","maxLength":1000,"minLength":0},"example":"OSLO,BERGEN"},{"name":"roleCode","in":"query","description":"Comma-separated list of role codes to include (e.g. DAGL,INNH,KONT).","required":false,"schema":{"type":"string","description":"Comma-separated list of role codes to include (e.g. DAGL,INNH,KONT).","example":"DAGL,INNH","maxLength":500,"minLength":0},"example":"DAGL,INNH"},{"name":"requireLinkedIn","in":"query","description":"When true, only profiles with LinkedIn slug are returned.","required":false,"schema":{"type":"boolean","description":"When true, only profiles with LinkedIn slug are returned."}},{"name":"excludeOrgNumber","in":"query","description":"Comma-separated list of organization numbers to exclude from the result.","required":false,"schema":{"type":"string","description":"Comma-separated list of organization numbers to exclude from the result.","example":"937683154,937534663","maxLength":2000,"minLength":0},"example":"937683154,937534663"},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PersonProfilePageRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}":{"get":{"tags":["Invoices"],"operationId":"get_29","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/reminders/{reminderId}/pdf":{"get":{"tags":["Invoices"],"operationId":"getReminderPdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"reminderId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/pdf":{"get":{"tags":["Invoices"],"operationId":"getPdf_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/email-history":{"get":{"tags":["Invoices"],"operationId":"getEmailHistory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceEmailHistoryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/ehf-history":{"get":{"tags":["Invoices"],"operationId":"getEhfHistory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceEhfHistoryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/efaktura-status":{"get":{"tags":["Invoices"],"summary":"Get eFaktura delivery status","description":"Returns the current eFaktura B2C delivery status for the invoice when eFaktura was attempted. Returns null when the invoice has no eFaktura delivery row.","operationId":"getEfakturaStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceEfakturaDeliveryRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoice-reception-documents/{id}":{"get":{"tags":["Invoice reception documents"],"summary":"Get a supplier invoice reception document","description":"Returns extracted invoice, cost, payment, and attachment metadata for one unprocessed reception document.","operationId":"getDocument_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceReceptionDocumentRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Invoice reception documents"],"summary":"Delete a reception document","description":"Drop the reception document so it no longer appears in the inbox. The underlying attachment (file bytes) survives if any other owner — e.g. a voucher the attachment is linked to — still references it; otherwise the bytes are cleaned up automatically.","operationId":"deleteDocument_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Reception document deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/general-sub-accounts/accounts/{accountNumber}":{"get":{"tags":["General sub-accounts"],"summary":"Select general sub-accounts for account","description":"Returns the selectable general sub-accounts for one parent account. Use `accountNumber` as the parent account and `id` as the general `subAccountId` in API request fields that model subsidiary ledger selection separately.","operationId":"selectForAccount","parameters":[{"name":"accountNumber","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AccountNumber"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Selectable general sub-accounts returned","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GeneralSubAccountSelectionRes"}}}}},"400":{"description":"Invalid account number, or the account does not support general sub-accounts","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"Missing ledger read permission","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/expenses/{id}":{"get":{"tags":["Expenses"],"operationId":"get_30","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExpenseDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Expenses"],"summary":"Reverse expense","description":"Marks the resource as reversed instead of physically deleting it. The response body is {\"outcome\":\"reversed\"}.","operationId":"delete_12","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Expense reversed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/documents/{id}/content":{"get":{"tags":["Documents"],"summary":"Download document content","operationId":"getContent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/currencies":{"get":{"tags":["Currencies"],"summary":"List supported currencies","description":"Returns ISO 4217 currency codes supported by ReAI, including the English display name for each currency.","operationId":"list_32","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/countries":{"get":{"tags":["Countries"],"summary":"List supported countries","description":"Returns the country codes supported by ReAI, including the English country name and the default currency code for each country.","operationId":"list_33","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CountryRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/chart-of-accounts":{"get":{"tags":["Chart of accounts"],"summary":"List chart of accounts","description":"Returns the chart of accounts for the current tenant. Use the `number` value as `accountNumber` in API request fields that refer to ledger accounts.","operationId":"list_34","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChartOfAccountsRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/chart-of-accounts/accounts":{"get":{"tags":["Chart of accounts"],"summary":"Search account options","description":"Returns a flat list of selectable accounts using the same account source and search behavior as the web account combobox. Subsidiary ledger entries such as customers, suppliers, bank accounts, employees, assets, and general subaccounts are always included and returned as a base `accountNumber` plus `subsidiaryLedger` metadata.","operationId":"searchAccounts","parameters":[{"name":"query","in":"query","description":"Optional case-insensitive search text matched against account numbers and display names.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of account options to return. Values above 100 are capped.","required":false,"schema":{"type":"integer","format":"int32","default":20,"exclusiveMinimum":0}},{"name":"accountNumberPrefix","in":"query","description":"Optional account number prefixes. When present, only accounts whose selectable number starts with at least one prefix are returned.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"filterRestricted","in":"query","description":"Whether accounts restricted to system usage should be excluded.","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Account options returned","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChartOfAccountsAccountRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-transactions/{id}":{"get":{"tags":["Bank transactions"],"operationId":"get_31","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankTransactionDetailRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/bank-reconciliations/{bankAccountId}":{"get":{"tags":["Bank reconciliations"],"operationId":"get_32","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"include","in":"query","description":"Response sections to include. Omit to include all sections.","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["summary","pending_transactions","pending_postings","matched_groups"]}}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BankReconciliationFilteredOverviewRes"},{"$ref":"#/components/schemas/BankReconciliationOverviewRes"}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/attachments/{id}/embedded-files":{"get":{"tags":["Attachments"],"summary":"Download embedded files from an EHF attachment","description":"Returns the embedded file directly when the EHF contains one file, or a ZIP archive when it contains multiple files.","operationId":"downloadEmbeddedFiles","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/attachments/{id}/ehf":{"get":{"tags":["Attachments"],"summary":"Parse attachment as EHF XML","operationId":"parseEhf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AttachmentEhfRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/attachments/{id}/content":{"get":{"tags":["Attachments"],"operationId":"getContent_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/assets/{id}":{"get":{"tags":["Assets"],"operationId":"get_33","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AssetRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Assets"],"summary":"Delete asset","description":"Deletes the asset. If it has a linked acquisition voucher, that voucher is deleted when possible or reversed when accounting history must be retained before asset deletion. The response body is {\"outcome\":\"deleted\"}.","operationId":"delete_13","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Asset deleted after deleting or reversing any linked acquisition voucher","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements":{"get":{"tags":["Agreements"],"operationId":"list_35","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgreementListRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/{id}":{"get":{"tags":["Agreements"],"operationId":"get_34","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AgreementRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}},"delete":{"tags":["Agreements"],"operationId":"delete_14","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Agreement deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/agreements/{id}/pdf":{"get":{"tags":["Agreements"],"summary":"Download agreement PDF","operationId":"downloadPdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients":{"get":{"tags":["Accountant clients"],"summary":"List clients","description":"Lists current clients and former clients with retained engagement records.","operationId":"list_36","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountantClientOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients/{clientTenantId}":{"get":{"tags":["Accountant clients"],"summary":"Get client engagement details","operationId":"get_35","parameters":[{"name":"clientTenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountantClientRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/accountant-clients/missing-annual-control":{"get":{"tags":["Accountant clients"],"summary":"List clients missing annual control","description":"Clients with no annual control (GRFS 5.2) registered in the last 12 months.","operationId":"listMissingAnnualControl","parameters":[{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountantClientOverviewRes"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/amelding/{id}/feedback-raw":{"get":{"tags":["a-melding-ctrl"],"operationId":"downloadRawFeedback","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/agreement/search":{"get":{"tags":["agreement-ctrl"],"operationId":"searchAgreements","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgreementComboboxItemDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/admin/ztl-bank-transaction-sync/bank-search":{"get":{"tags":["admin-ztl-bank-transaction-sync-ctrl"],"operationId":"searchBanks_2","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"syncEnabledOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZtlDiagnosticBankOptionDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/admin/consent-check/search":{"get":{"tags":["admin-consent-check-ctrl"],"operationId":"searchConsents","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConsentOptionDto"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/account/search":{"get":{"tags":["account-ctrl"],"operationId":"loadAccountOptions","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"accountNumberPrefix","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"includeSubsidiaryLedger","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeAssetParentAccounts","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeHref","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"filterRestricted","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountComboboxItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/account/search/manual-voucher":{"get":{"tags":["account-ctrl"],"operationId":"loadManualVoucherAccountOptions","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"accountNumberPrefix","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"includeSubsidiaryLedger","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeAssetParentAccounts","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeHref","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"filterRestricted","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManualVoucherAccountSearchResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/account/search-parent":{"get":{"tags":["account-ctrl"],"operationId":"loadParentAccountOptions","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"accountNumberPrefix","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"generalSubsidiaryLedgerEnabledOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"filterRestricted","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountComboboxItem"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/ztl/banks/{id}":{"delete":{"tags":["ztl-ctrl"],"operationId":"disconnectBank","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/subscription/{id}":{"delete":{"tags":["subscription-ctrl"],"operationId":"deleteSubscription","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/vouchers/{id}/attachments/{attachmentId}":{"delete":{"tags":["Vouchers"],"summary":"Delete voucher attachment","operationId":"deleteAttachment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Attachment deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{invoiceId}/payments/{paymentId}":{"delete":{"tags":["Supplier invoices"],"summary":"Cancel a supplier invoice payment","description":"Cancels a supplier invoice payment and normally deletes it when cancellation completes synchronously. A successful response body is {\"outcome\":\"deleted\"}. If the provider requires SCA, the command returns 409 ProblemDetail with scaRedirectUrl. After SCA is completed, call this endpoint again to finish cancellation from the provider-confirmed status. Cancellation is also rejected with 409 when it cannot be represented as a deleted payment.","operationId":"cancelPayment","parameters":[{"name":"invoiceId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"paymentId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Payment cancelled and removed from the supplier invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"409":{"description":"Payment cancellation could not complete synchronously","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/supplier-invoices/{id}/related-postings/{postingId}":{"delete":{"tags":["Supplier ledger invoice groups"],"summary":"Remove a posting from a supplier invoice ledger group","description":"Removes one posting that was explicitly added to the group displayed for this supplier invoice in the supplier ledger. The invoice posting and its automatic payment postings are always part of the group and cannot be removed through this endpoint. Use GET /api/supplier-invoices/{id} to inspect the invoice payment and settlement state after changing the group.","operationId":"removePostingFromInvoiceLedgerGroup","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"postingId","in":"path","required":true,"schema":{"type":"integer","format":"int64","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceLedgerGroupPostingsRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/projects/{id}/sub-projects/{subProjectId}":{"delete":{"tags":["Projects"],"operationId":"deleteSubProject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"subProjectId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"204":{"description":"Sub-project deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/payments/{paymentId}":{"delete":{"tags":["Invoices"],"summary":"Delete or reverse customer invoice payment","description":"Deletes the resource when no accounting reversal is needed. If financial audit history must be retained, records a reversal instead. The response body is {\"outcome\":\"deleted\"} or {\"outcome\":\"reversed\"}.","operationId":"deleteOrReversePayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"paymentId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Invoice payment deleted or reversed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/api/invoices/{id}/manual-credit-note-applications/{creditNoteInvoiceId}":{"delete":{"tags":["Invoices"],"summary":"Unapply a manual credit note from an invoice","description":"Removes one manual credit note application from a customer invoice. Use one of the creditNoteIds exposed by GET /api/invoices/{id} only when creditNoteAllocationType is manual_matches_original_invoice_amount or manual_partial_cover. ReAI reopens customer ledger postings for the removed application, removes any assignment currency adjustment tied to it, then re-closes remaining manual credit note applications when needed. Full invoice reversal credit notes cannot be unapplied manually.","operationId":"unapplyManualCreditNote","parameters":[{"name":"id","in":"path","description":"The id of the invoice currently receiving the manual credit note.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"creditNoteInvoiceId","in":"path","description":"The id of the credit note invoice to unapply. Use one of the creditNoteIds from GET /api/invoices/{id} only when creditNoteAllocationType is manual_matches_original_invoice_amount or manual_partial_cover.","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"Manual credit note application unapplied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiLifecycleOutcomeRes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/admin/users-without-tenant/{userId}":{"delete":{"tags":["admin-user-without-tenant-ctrl"],"operationId":"deleteUserWithoutTenant","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}},"/admin/tenants/{tenantId}":{"delete":{"tags":["admin-tenant-ctrl"],"operationId":"deleteTenant","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"X-Tenant-Id","in":"header","description":"Optional tenant id. Required for tenant-scoped requests when authenticating with a user access token.","required":false,"schema":{"type":"integer","format":"int32","minimum":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","$ref":"#/components/schemas/ProblemDetail"}}}}}}}},"components":{"schemas":{"WarehouseCreateReq":{"type":"object","properties":{"name":{"type":"string","maxLength":160,"minLength":1}},"required":["name"]},"WarehouseRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreatePostingRestReq":{"type":"object","properties":{"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber","minLength":1},"postingDate":{"type":"string","format":"date"},"description":{"type":["string","null"]},"amount":{"type":["number","null"],"description":"Tenant-currency amount. A positive value books the posting on the debit side, a negative value books it on the credit side. Optional when the posting currency equals the tenant currency, otherwise supply both amount and currencyAmount with the same sign."},"currencyAmount":{"type":["number","null"],"description":"Posting amount in the specified currency. A positive value books the posting on the debit side, a negative value books it on the credit side. Optional when the posting currency equals the tenant currency and amount is provided."},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode","maxLength":3,"minLength":3},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"rowNumber":{"type":"integer","format":"int32","description":"Groups postings into voucher rows. A balanced debit+credit entry for the same amount, currency and date MUST share a single rowNumber so it becomes ONE voucher row — never split the debit and credit of one entry across two rowNumbers. Book the debit side as a positive amount and the credit side as a negative amount; a rowNumber holds at most one debit and one credit side, both with the same date, description, currency and absolute amount. The same account may appear on both sides of one rowNumber with different vatCodes — for example a pre-registration input VAT correction that debits an expense account with a deductible vatCode (positive amount) and credits the same account with vatCode 0 (negative amount). Assign a new rowNumber only for a separate, unrelated entry within the same voucher.","minimum":0},"supplierId":{"type":["integer","null"],"format":"int32"},"projectId":{"type":["integer","null"],"format":"int32"},"companyBankId":{"type":["integer","null"],"format":"int32"},"employeeId":{"type":["integer","null"],"format":"int32"},"customerId":{"type":["integer","null"],"format":"int32"},"assetId":{"type":["integer","null"],"format":"int32"},"subAccountId":{"type":["integer","null"],"format":"int32","description":"Optional general subaccount id."}},"required":["accountNumber","currency","postingDate"]},"VoucherCreateReq":{"type":"object","properties":{"date":{"type":"string","format":"date"},"description":{"type":["string","null"]},"postings":{"type":"array","items":{"$ref":"#/components/schemas/CreatePostingRestReq"},"minItems":1}},"required":["date","postings"]},"UpdateUserReq":{"type":"object","properties":{"roleCode":{"type":"string","$ref":"#/components/schemas/AssignableTenantRoleCode","enum":["ROLE_TENANT_ADMIN","ROLE_ACCOUNTANT","ROLE_EMPLOYEE","ROLE_AUDITOR"]},"directPermissionCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/AssignableTenantPermissionCode"}}},"required":["roleCode"]},"UserAccessRes":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending_invitation"]},"userId":{"type":["integer","null"],"format":"int32"},"invitationId":{"type":["integer","null"],"format":"int32"},"email":{"type":"string"},"fullName":{"type":["string","null"]},"phone":{"type":["string","null"]},"roleCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/TenantRoleCode"}},"directPermissionCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/AssignableTenantPermissionCode"}},"effectivePermissionCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/EffectiveTenantPermissionCode"}},"owner":{"type":"boolean"},"expiresAt":{"type":["string","null"],"format":"date-time"}}},"UpdateSupplierAddressReq":{"type":"object","properties":{"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode","maxLength":2,"minLength":2},"city":{"type":"string","minLength":1},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":"string","minLength":1},"addressPart2":{"type":["string","null"]}},"required":["addressPart1","city","countryCode"]},"ContactAddressRes":{"type":"object","properties":{"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]}}},"SupplierRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"iban":{"type":["string","null"]},"bankAccountNumber":{"type":["string","null"]},"swiftCode":{"type":["string","null"]},"type":{"type":"string","enum":["company","person"]},"privateContact":{"type":"boolean"},"organizationNumber":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int32"},"personId":{"type":["integer","null"],"format":"int32"},"archived":{"type":"boolean"},"address":{"oneOf":[{"$ref":"#/components/schemas/ContactAddressRes"},{"type":"null"}]}}},"SubscriptionLineReq":{"type":"object","properties":{"rowNumber":{"type":["integer","null"],"format":"int32","maximum":32767},"itemName":{"type":["string","null"],"maxLength":255,"minLength":0},"comment":{"type":["string","null"]},"quantity":{"type":["number","null"],"maximum":100000.0,"minimum":1.0},"unitPrice":{"type":["number","null"],"maximum":10000000.0,"minimum":-10000000.0},"discount":{"type":["number","null"],"description":"Line discount percentage. Must be a whole-number value from 0 to 100. Values such as 50, 50.0, and 50.00 are accepted.","maximum":100.0,"minimum":0.0,"multipleOf":1.0},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"variantId":{"type":["integer","null"],"format":"int32"}}},"SubscriptionServiceRecipientWriteReq":{"type":"object","properties":{"organizationNumber":{"type":["string","null"],"minLength":1},"name":{"type":["string","null"],"maxLength":255,"minLength":0},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]}},"required":["organizationNumber"]},"SubscriptionWriteReq":{"type":"object","properties":{"customerId":{"type":["integer","null"],"format":"int32"},"startDate":{"type":["string","null"],"format":"date"},"intervalMonths":{"type":["integer","null"],"format":"int32","maximum":12,"minimum":1},"billingTiming":{"type":["string","null"],"enum":["in_advance","after_period"]},"outputMode":{"type":["string","null"],"enum":["create_order","create_invoice"]},"automaticBillingGeneration":{"type":"boolean","description":"Whether ReAI should automatically generate due subscription billing for this subscription.","example":false},"daysUntilDue":{"type":"integer","format":"int64","maximum":3000,"minimum":0},"currencyCode":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"subscriptionLines":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SubscriptionLineReq"},"minItems":1},"invoiceComment":{"type":["string","null"]},"internalComment":{"type":["string","null"]},"invoiceEmail":{"type":["string","null"],"format":"email","maxLength":100,"minLength":0},"sendEhf":{"type":"boolean"},"projectId":{"type":["integer","null"],"format":"int32"},"agreementId":{"type":["integer","null"],"format":"int32"},"serviceRecipients":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionServiceRecipientWriteReq"}}},"required":["automaticBillingGeneration","billingTiming","currencyCode","customerId","intervalMonths","outputMode","startDate","subscriptionLines"]},"SubscriptionAmountsRes":{"type":"object","properties":{"totalAmount":{"type":"number"},"discountedSubTotal":{"type":"number"},"totalVat":{"type":"number"},"totalDiscount":{"type":"number"}}},"SubscriptionLineAmountsRes":{"type":"object","properties":{"totalAmount":{"type":"number"},"vatRate":{"type":"number"},"displayVatRate":{"type":"number"},"vat":{"type":"number"},"discountAmount":{"type":"number"},"subTotal":{"type":"number"},"totalExclVatAmount":{"type":"number"}}},"SubscriptionLineRes":{"type":"object","properties":{"rowNumber":{"type":"integer","format":"int32"},"itemName":{"type":"string"},"comment":{"type":["string","null"]},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"},"vatTitle":{"type":"string"},"vatRate":{"type":"number"},"variantId":{"type":["integer","null"],"format":"int32"},"amounts":{"$ref":"#/components/schemas/SubscriptionLineAmountsRes"}}},"SubscriptionRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"customerId":{"type":"integer","format":"int32"},"customerName":{"type":"string"},"serviceRecipients":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionServiceRecipientRes"}},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"agreementId":{"type":["integer","null"],"format":"int32"},"startDate":{"type":"string","format":"date"},"intervalMonths":{"type":"integer","format":"int32"},"billingTiming":{"type":"string","enum":["in_advance","after_period"]},"outputMode":{"type":"string","enum":["create_order","create_invoice"]},"active":{"type":"boolean"},"automaticBillingGeneration":{"type":"boolean","description":"Whether ReAI automatically generates due subscription billing for this subscription."},"daysUntilDue":{"type":"integer","format":"int64"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"invoiceComment":{"type":["string","null"]},"internalComment":{"type":["string","null"]},"invoiceEmail":{"type":["string","null"]},"sendEhf":{"type":"boolean"},"nextBillingDate":{"type":"string","format":"date"},"nextBillingPeriodStart":{"type":"string","format":"date"},"nextBillingPeriodEnd":{"type":"string","format":"date"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionLineRes"}},"amounts":{"$ref":"#/components/schemas/SubscriptionAmountsRes"},"generatedBillingCount":{"type":"integer","format":"int64"},"due":{"type":"boolean"}}},"SubscriptionServiceRecipientRes":{"type":"object","properties":{"companyId":{"type":"integer","format":"int32"},"companyName":{"type":"string"},"organizationNumber":{"type":"string"},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode"}}},"UpdateSalaryWageSpecReq":{"type":"object","properties":{"specificationCode":{"type":"string","description":"Wage specification type. Use COMMISSION for commission earnings (reported as honorarAkkordProsentProvisjon in the a-melding).","enum":["FIXED_SALARY","HOURLY_SALARY","COMMISSION","VACATION_DEDUCTION","DEBT_TO_EMPLOYEES_EXPENSE","EMPLOYEES_TRAVEL_EXPENSE","HOLIDAY_ALLOWANCE"],"example":"COMMISSION"},"quantity":{"type":"number","description":"Quantity, for example number of hours for HOURLY_SALARY. Use 1 for amount-based lines such as COMMISSION.","example":1},"rate":{"type":"number","description":"Rate per quantity unit. The line amount is quantity * rate.","example":12500.0},"comment":{"type":["string","null"],"description":"Optional comment shown on the payslip."},"holidayAllowanceEarningYear":{"type":["integer","null"],"format":"int32","description":"Holiday allowance earning year, only allowed for HOLIDAY_ALLOWANCE lines."}},"required":["quantity","rate","specificationCode"]},"SalaryPaymentDetailRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"string"},"periodYear":{"type":"integer","format":"int32"},"periodMonth":{"type":"integer","format":"int32"},"voucherDate":{"type":["string","null"],"format":"date"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherNumber":{"type":["string","null"]},"paymentDate":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["under_process","unpaid","complete","reversed"]},"payableAmount":{"type":"number"},"totalTaxDeducted":{"type":"number"},"employees":{"type":"array","items":{"$ref":"#/components/schemas/SalaryPaymentEmployeeRes"}}}},"SalaryPaymentEmployeeRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"employeeId":{"type":["integer","null"],"format":"int32"},"employeeName":{"type":"string"},"payableAmount":{"type":"number"},"taxDeducted":{"type":"number"},"taxDeductionRate":{"type":"number"},"wageSpecs":{"type":"array","items":{"$ref":"#/components/schemas/SalaryWageSpecRes"}}}},"SalaryWageSpecRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"specificationCode":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"amount":{"type":"number"},"comment":{"type":["string","null"]},"holidayAllowanceEarningYear":{"type":["integer","null"],"format":"int32"}}},"ReconciliationRuleMutationReq":{"type":"object","properties":{"matchText":{"type":"string","minLength":1},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber","minLength":1},"subAccountId":{"type":["integer","null"],"format":"int32"},"description":{"type":"string","minLength":1},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"}},"required":["accountNumber","description","matchText"]},"ReconciliationRuleRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"matchText":{"type":"string"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"subAccountId":{"type":["integer","null"],"format":"int32"},"description":{"type":"string"},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"ProjectReq":{"type":"object","properties":{"name":{"type":"string","minLength":1},"responsibleEmployeeId":{"type":["integer","null"],"format":"int32"},"activityIds":{"type":["array","null"],"items":{"type":"integer","format":"int32"}}},"required":["name"]},"ProjectRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"responsibleEmployeeId":{"type":["integer","null"],"format":"int32"},"parentId":{"type":["integer","null"],"format":"int32"},"archived":{"type":"boolean"},"activityIds":{"type":"array","items":{"type":"integer","format":"int32"},"uniqueItems":true}}},"UpdateSubProjectNameReq":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]},"ProductReq":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":["string","null"]},"stockItem":{"type":"boolean"},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"variantOptionTypes":{"type":"array","items":{"type":"string"},"uniqueItems":true},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantReq"}},"stockProductVariantSelectionValid":{"type":"boolean"},"variantOptionSelectionComplete":{"type":"boolean"}},"required":["title"]},"ProductVariantInventoryLevelReq":{"type":"object","properties":{"warehouseName":{"type":"string","minLength":1},"quantity":{"type":"integer","format":"int32"}},"required":["quantity","warehouseName"]},"ProductVariantReq":{"type":"object","properties":{"variantId":{"type":["integer","null"],"format":"int32"},"sku":{"type":"string","minLength":1},"barcode":{"type":["string","null"]},"costPrice":{"type":["number","null"]},"sellingPrice":{"type":"number"},"options":{"type":"object","additionalProperties":{"type":"string"}},"inventory":{"type":["integer","null"],"format":"int32"},"warehouseName":{"type":["string","null"]},"inventoryLevels":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ProductVariantInventoryLevelReq"}}},"required":["sku"]},"ProductRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"title":{"type":"string"},"description":{"type":["string","null"]},"stockItem":{"type":"boolean"},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"variantOptionTypes":{"type":"array","items":{"type":"string"}},"archived":{"type":"boolean"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantRes"}}}},"ProductVariantRes":{"type":"object","properties":{"variantId":{"type":"integer","format":"int32"},"sku":{"type":"string"},"barcode":{"type":["string","null"]},"costPrice":{"type":"number"},"sellingPrice":{"type":"number"},"marginPercent":{"type":["number","null"]},"rowNumber":{"type":"integer","format":"int32"},"options":{"type":"object","additionalProperties":{"type":"string"}}}},"CreateOrderLineReq":{"type":"object","properties":{"itemName":{"type":["string","null"]},"comment":{"type":["string","null"]},"quantity":{"type":["number","null"],"description":"Line quantity. Must be zero or positive, at most 99999999.99, and have at most 2 decimal places.","maximum":99999999.99,"minimum":0,"multipleOf":0.01},"unitPrice":{"type":["number","null"],"maximum":10000000.0,"minimum":-10000000.0},"discount":{"type":["number","null"],"description":"Line discount percentage. Must be a whole-number value from 0 to 100. Values such as 50, 50.0, and 50.00 are accepted.","maximum":100.0,"minimum":0.0,"multipleOf":1.0},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"variantId":{"type":["integer","null"],"format":"int32"},"accrualEnabled":{"type":"boolean"},"accrualPeriod":{"type":["string","null"]},"accrualPeriodCount":{"type":["integer","null"],"format":"int32"}}},"UpdateOrderReq":{"type":"object","properties":{"daysUntilDue":{"type":"integer","format":"int64"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode","maxLength":3,"minLength":3},"customerId":{"type":"integer","format":"int32"},"projectId":{"type":["integer","null"],"format":"int32"},"orderLines":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrderLineReq"},"minItems":1},"issueDate":{"type":["string","null"],"format":"date"},"comment":{"type":["string","null"]},"internalComment":{"type":["string","null"]},"invoiceEmail":{"type":["string","null"],"format":"email"},"sendEhf":{"type":"boolean"}},"required":["currencyCode","customerId","daysUntilDue","issueDate","orderLines"]},"OrderAmountsRes":{"type":"object","properties":{"totalAmount":{"type":"number"},"discountedSubTotal":{"type":"number"},"totalVat":{"type":"number"},"totalDiscount":{"type":"number"}}},"OrderDeliveryAddressRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"province":{"type":["string","null"]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]}}},"OrderLineAmountsRes":{"type":"object","properties":{"totalAmount":{"type":"number"},"vatRate":{"type":"number"},"vat":{"type":"number"},"discountAmount":{"type":"number"},"subTotal":{"type":"number"},"totalExclVatAmount":{"type":"number"}}},"OrderLineRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"itemName":{"type":"string"},"comment":{"type":["string","null"]},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"},"vatTitle":{"type":"string"},"vatRate":{"type":"number"},"variantId":{"type":["integer","null"],"format":"int32"},"amounts":{"$ref":"#/components/schemas/OrderLineAmountsRes"},"accrualEnabled":{"type":"boolean"},"accrualPeriod":{"type":["string","null"]},"accrualPeriodCount":{"type":"integer","format":"int32"}}},"OrderRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"date":{"type":"string","format":"date"},"daysUntilDue":{"type":"integer","format":"int64"},"issueDate":{"type":"string","format":"date"},"comment":{"type":["string","null"]},"number":{"type":"string"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"sendEhf":{"type":"boolean"},"customerId":{"type":["integer","null"],"format":"int32"},"customerName":{"type":["string","null"]},"customerEmail":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineRes"}},"amounts":{"$ref":"#/components/schemas/OrderAmountsRes"},"status":{"type":"string","enum":["open","closed"]},"invoiceId":{"type":["integer","null"],"format":"int32"},"internalComment":{"type":["string","null"]},"deliveryAddress":{"oneOf":[{"$ref":"#/components/schemas/OrderDeliveryAddressRes"},{"type":"null"}]}}},"OpeningBalancePostingLineReq":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Description for this posting line."},"postingDate":{"type":["string","null"],"format":"date","description":"Posting date for this line. Defaults to voucherDate when omitted.","example":"2024-12-31"},"debitAccount":{"type":"string","description":"Debit account number, optionally followed by /{subsidiaryLedgerId}. For fixed asset accounts, the suffix must be an existing asset ID, for example 1200/123.","maxLength":64,"minLength":0},"creditAccount":{"type":"string","description":"Credit account number, optionally followed by /{subsidiaryLedgerId}. For fixed asset accounts, the suffix must be an existing asset ID, for example 1200/123.","maxLength":64,"minLength":0},"amount":{"type":"number","description":"Positive amount in the tenant currency. Negative amounts are accepted and swap debit/credit sides."},"currencyAmount":{"type":["number","null"],"description":"Positive amount in the foreign bank account currency when a bank side uses a non-tenant currency."},"rowNumber":{"type":"integer","format":"int32","description":"Stable row number used to keep client rows ordered.","minimum":0}},"required":["amount"]},"OpeningBalanceReq":{"type":"object","properties":{"voucherDate":{"type":"string","format":"date","description":"Voucher date for the opening balance.","example":"2024-12-31"},"voucherDescription":{"type":["string","null"],"description":"Description shown on the opening balance voucher."},"postingLines":{"type":"array","description":"Opening balance posting lines. Each line may set a debit account, a credit account, or both.","items":{"$ref":"#/components/schemas/OpeningBalancePostingLineReq"},"minItems":1}},"required":["postingLines","voucherDate"]},"AttachmentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"filename":{"type":"string"},"mimeType":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"size":{"type":"integer","format":"int64"},"contentUrl":{"type":"string"},"downloadUrl":{"type":"string"},"usedBy":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AttachmentUsageRes"}}}},"AttachmentUsageRes":{"type":"object","properties":{"ownerType":{"type":"string"},"ownerId":{"type":"integer","format":"int64"}}},"PostingRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherNumber":{"type":["string","null"]},"voucherDate":{"type":["string","null"],"format":"date"},"postingDate":{"type":"string","format":"date"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"description":{"type":["string","null"]},"amount":{"type":"number"},"currencyAmount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"},"rowNumber":{"type":"integer","format":"int32"},"supplierId":{"type":["integer","null"],"format":"int32"},"customerId":{"type":["integer","null"],"format":"int32"},"projectId":{"type":["integer","null"],"format":"int32"},"employeeId":{"type":["integer","null"],"format":"int32"},"companyBankId":{"type":["integer","null"],"format":"int32"},"departmentId":{"type":["integer","null"],"format":"int32"},"supplierInvoiceId":{"type":["integer","null"],"format":"int32"},"assetId":{"type":["integer","null"],"format":"int32"},"subAccountId":{"type":["integer","null"],"format":"int32"},"subsidiaryLedger":{"oneOf":[{"$ref":"#/components/schemas/PostingSubsidiaryLedgerRes"},{"type":"null"}]},"postingGroupId":{"type":["integer","null"],"format":"int32"},"reversesPostingId":{"type":["integer","null"],"format":"int64"},"reversedByPostingId":{"type":["integer","null"],"format":"int64"},"lockReasons":{"type":"array","items":{"type":"string"}},"canDelete":{"type":"boolean"}}},"PostingSubsidiaryLedgerRes":{"type":"object","properties":{"type":{"type":"string","enum":["asset","bank","supplier","customer","employee","general"]},"id":{"type":"integer","format":"int32"},"name":{"type":"string"}}},"VoucherDetailRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"number":{"type":"string"},"date":{"type":"string","format":"date"},"description":{"type":["string","null"]},"postings":{"type":"array","items":{"$ref":"#/components/schemas/PostingRes"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentRes"}}}},"OfferDeliveryAddressReq":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"province":{"type":["string","null"]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]}}},"OfferLineReq":{"type":"object","properties":{"itemName":{"type":"string","minLength":1},"comment":{"type":["string","null"]},"quantity":{"type":"number","description":"Line quantity. Must be zero or positive, at most 99999999.99, and have at most 2 decimal places.","maximum":99999999.99,"minimum":0,"multipleOf":0.01},"unitPrice":{"type":"number","maximum":10000000.0,"minimum":-10000000.0},"discount":{"type":["number","null"],"description":"Line discount percentage. Must be a whole-number value from 0 to 100. Values such as 50, 50.0, and 50.00 are accepted.","maximum":100.0,"minimum":0.0,"multipleOf":1.0},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode","minLength":1},"variantId":{"type":["integer","null"],"format":"int32"}},"required":["itemName","quantity","unitPrice","vatCode"]},"OfferReq":{"type":"object","properties":{"daysUntilDue":{"type":"integer","format":"int64"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode","maxLength":3,"minLength":3},"customerId":{"type":"integer","format":"int32"},"projectId":{"type":["integer","null"],"format":"int32"},"offerLines":{"type":"array","items":{"$ref":"#/components/schemas/OfferLineReq"},"minItems":1},"issueDate":{"type":["string","null"],"format":"date"},"comment":{"type":["string","null"]},"internalComment":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"deliveryAddress":{"oneOf":[{"$ref":"#/components/schemas/OfferDeliveryAddressReq"},{"type":"null"}]}},"required":["currencyCode","customerId","daysUntilDue","offerLines"]},"OfferDeliveryAddressRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"province":{"type":["string","null"]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]}}},"OfferLineRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"rowNumber":{"type":"integer","format":"int32"},"itemName":{"type":"string"},"comment":{"type":["string","null"]},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":["number","null"]},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"},"vatRate":{"type":"number"},"variantId":{"type":["integer","null"],"format":"int32"},"lineTotal":{"type":"number"},"lineTotalExclVat":{"type":"number"},"lineVat":{"type":"number"},"lineDiscount":{"type":"number"}}},"OfferRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"string"},"date":{"type":"string","format":"date"},"issueDate":{"type":"string","format":"date"},"daysUntilDue":{"type":"integer","format":"int64"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"customerId":{"type":["integer","null"],"format":"int32"},"customerName":{"type":["string","null"]},"email":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"comment":{"type":["string","null"]},"internalComment":{"type":["string","null"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OfferLineRes"}},"totalAmount":{"type":"number"},"totalExclVat":{"type":"number"},"totalVat":{"type":"number"},"totalDiscount":{"type":"number"},"deliveryAddress":{"oneOf":[{"$ref":"#/components/schemas/OfferDeliveryAddressRes"},{"type":"null"}]}}},"ManualReconciliationEndingBalanceReq":{"type":"object","properties":{"month":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}$"},"bankStatementEndingBalance":{"type":"number"}},"required":["bankStatementEndingBalance","month"]},"ManualReconciliationRes":{"type":"object","properties":{"bankAccountId":{"type":"integer","format":"int32"},"bankAccountName":{"type":"string"},"month":{"type":"string"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode","deprecated":true,"description":"Deprecated alias for bankCurrency. Use bankCurrency instead."},"bankCurrency":{"type":"string","$ref":"#/components/schemas/CurrencyCode","description":"Currency used by the manual bank account."},"tenantCurrency":{"type":"string","$ref":"#/components/schemas/CurrencyCode","description":"Tenant accounting currency."},"bankInTenantCurrency":{"type":"boolean"},"openingBalance":{"type":"number","description":"Bank ledger opening balance for the month, in bankCurrency."},"monthEndingBalance":{"type":"number","description":"Bank ledger ending balance for the month, in bankCurrency."},"bankStatementEndingBalance":{"type":["number","null"],"description":"Saved bank statement ending balance for the month, in bankCurrency."},"difference":{"type":["number","null"],"description":"bankStatementEndingBalance minus monthEndingBalance, in bankCurrency."},"reconciliationLocked":{"type":"boolean"},"canClose":{"type":"boolean"},"canReopen":{"type":"boolean"}}},"LoanReq":{"type":"object","properties":{"reference":{"type":"string","maxLength":30,"minLength":0},"description":{"type":["string","null"]},"loanType":{"type":"string","enum":["bank_loan","owner_loan_to_company","company_loan_to_owner","company_loan_to_employee","intercompany","other"]},"perspective":{"type":"string","enum":["borrower","lender"]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode","enum":["AFN","ALL","DZD","AOA","ARS","AMD","AUD","EUR","AZN","BSD","BHD","BDT","BYN","XOF","BTN","BOB","BAM","BWP","BRL","BND","BGN","BIF","KHR","XAF","CAD","CLP","CNY","COP","CDF","CRC","CUP","CZK","DKK","DJF","DOP","USD","EGP","ERN","SZL","ETB","FJD","GMD","GEL","GHS","GTQ","GNF","HTG","HNL","HKD","HUF","ISK","INR","IDR","IRR","IQD","ILS","JMD","JPY","JOD","KZT","KES","KWD","KGS","LAK","LBP","LSL","LRD","LYD","CHF","MGA","MWK","MYR","MVR","MXN","MDL","MNT","MAD","MZN","MMK","NAD","NPR","NZD","NIO","NGN","MKD","NOK","OMR","PKR","PAB","PGK","PYG","PEN","PHP","PLN","QAR","RON","RUB","RWF","SAR","RSD","SLL","SGD","SOS","ZAR","KRW","SSP","LKR","SDG","SRD","SEK","SYP","TWD","TJS","TZS","THB","TND","TRY","TMT","UGX","UAH","AED","GBP","UYU","UZS","VES","VND","YER","ZMW","ZWL"]},"principalAmount":{"type":"number","minimum":0.01},"interestRateAnnual":{"type":"number","minimum":0.0},"disbursementDate":{"type":"string","format":"date"},"maturityDate":{"type":["string","null"],"format":"date"},"repaymentType":{"type":"string","enum":["bullet","annuity","linear","interest_only","manual"]},"dayCountConvention":{"type":"string","enum":["actual_365","thirty_360","simple_monthly"]},"interestTreatment":{"type":"string","enum":["pay_separately","capitalize","accrue"]},"relatedParty":{"type":"boolean"},"counterpartyId":{"type":"integer","format":"int32"},"principalAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"interestExpenseAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"interestIncomeAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"accruedInterestAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"companyBankId":{"type":["integer","null"],"format":"int32"}},"required":["counterpartyId","currency","disbursementDate","interestRateAnnual","loanType","perspective","principalAmount","reference","repaymentType"]},"LoanRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"reference":{"type":"string"},"description":{"type":["string","null"]},"loanType":{"type":"string","enum":["bank_loan","owner_loan_to_company","company_loan_to_owner","company_loan_to_employee","intercompany","other"]},"perspective":{"type":"string","enum":["borrower","lender"]},"status":{"type":"string","enum":["open","closed"]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"principalAmount":{"type":"number"},"interestRateAnnual":{"type":"number"},"disbursementDate":{"type":"string","format":"date"},"maturityDate":{"type":["string","null"],"format":"date"},"repaymentType":{"type":"string","enum":["bullet","annuity","linear","interest_only","manual"]},"dayCountConvention":{"type":"string","enum":["actual_365","thirty_360","simple_monthly"]},"interestTreatment":{"type":"string","enum":["pay_separately","capitalize","accrue"]},"relatedParty":{"type":"boolean"},"counterpartyName":{"type":"string"},"counterpartyType":{"type":"string","enum":["bank","owner","company","other"]},"creditorId":{"type":["integer","null"],"format":"int32"},"debtorId":{"type":["integer","null"],"format":"int32"},"principalAccountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"interestExpenseAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"interestIncomeAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"accruedInterestAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"companyBankId":{"type":["integer","null"],"format":"int32"},"outstandingPrincipal":{"type":"number"},"accruedInterestBalance":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpdateLeadStatusReq":{"type":"object","properties":{"status":{"type":["string","null"],"description":"Lead status. Use `converted` is not allowed here - call POST /leads/{id}/convert instead.","enum":["active","disqualified"],"example":"disqualified"}},"required":["status"]},"LeadContactEventRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"contactedOn":{"type":"string","format":"date"},"source":{"type":"string","enum":["email","phone","message","other"]},"note":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"LeadRes":{"type":"object","properties":{"orgNumber":{"type":"string"},"companyName":{"type":"string"},"legalFormCode":{"type":["string","null"]},"legalFormDescription":{"type":["string","null"]},"streetAddress":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"city":{"type":["string","null"]},"postalStreetAddress":{"type":["string","null"]},"postalPostalCode":{"type":["string","null"]},"postalCity":{"type":["string","null"]},"registeredAt":{"type":["string","null"],"format":"date"},"foundedOn":{"type":["string","null"],"format":"date"},"shareCapital":{"type":["number","null"]},"employeeCount":{"type":["integer","null"],"format":"int32"},"industryCode":{"type":["string","null"]},"industryDescription":{"type":["string","null"]},"secondaryIndustryCode":{"type":["string","null"]},"secondaryIndustryDescription":{"type":["string","null"]},"tertiaryIndustryCode":{"type":["string","null"]},"tertiaryIndustryDescription":{"type":["string","null"]},"purposeDescription":{"type":["string","null"]},"activityDescription":{"type":["string","null"]},"website":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile":{"type":["string","null"]},"vatRegistered":{"type":["boolean","null"]},"vatRegisteredOn":{"type":["string","null"],"format":"date"},"foretakRegisterRegistered":{"type":["boolean","null"]},"foretakRegisterRegisteredOn":{"type":["string","null"],"format":"date"},"navEmployerRegisteredOn":{"type":["string","null"],"format":"date"},"dissolutionStartedOn":{"type":["string","null"],"format":"date"},"bankruptcyStartedOn":{"type":["string","null"],"format":"date"},"forcedLiquidationStartedOn":{"type":["string","null"],"format":"date"},"hasAccountant":{"type":"boolean"},"chiefExecutiveName":{"type":["string","null"]},"contactPersonName":{"type":["string","null"]},"chairmanName":{"type":["string","null"]},"lead":{"$ref":"#/components/schemas/LeadStateRes"},"contactEvents":{"type":"array","items":{"$ref":"#/components/schemas/LeadContactEventRes"}}}},"LeadStateRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"status":{"type":["string","null"],"enum":["active","disqualified","converted"]},"notes":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"followUpAt":{"type":["string","null"],"format":"date"},"convertedCustomerId":{"type":["integer","null"],"format":"int32"},"convertedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"UpdateLeadNotesReq":{"type":"object","properties":{"notes":{"type":["string","null"],"description":"Free-text notes. Null or empty clears the notes.","maxLength":20000,"minLength":0}}},"UpdateLeadFollowUpReq":{"type":"object","properties":{"followUpAt":{"type":["string","null"],"format":"date","description":"Follow-up date, or null to clear.","example":"2026-05-22"}}},"UpdateLeadContactReq":{"type":"object","properties":{"email":{"type":["string","null"],"maxLength":320,"minLength":0},"phone":{"type":["string","null"],"maxLength":64,"minLength":0}}},"GeneralSubAccountUpdateReq":{"type":"object","properties":{"name":{"type":"string","maxLength":150,"minLength":0}},"required":["name"]},"GeneralSubAccountRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"name":{"type":"string"}}},"DepartmentReq":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]},"DepartmentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"archived":{"type":"boolean"}}},"DebtorReq":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":1}},"required":["name"]},"DebtorRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpdateCustomerDeliveryAddressReq":{"type":"object","properties":{"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode","maxLength":2,"minLength":2},"city":{"type":"string","minLength":1},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":"string","minLength":1},"addressPart2":{"type":["string","null"]}},"required":["addressPart1","city","countryCode"]},"CustomerRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"invoiceEmail":{"type":["string","null"]},"phone":{"type":["string","null"]},"iban":{"type":["string","null"]},"bankAccountNumber":{"type":["string","null"]},"swiftCode":{"type":["string","null"]},"type":{"type":"string","enum":["company","person"]},"privateContact":{"type":"boolean"},"organizationNumber":{"type":["string","null"]},"companyId":{"type":["integer","null"],"format":"int32"},"personId":{"type":["integer","null"],"format":"int32"},"invoiceInEnglish":{"type":"boolean"},"daysUntilDue":{"type":["integer","null"],"format":"int32"},"archived":{"type":"boolean"},"address":{"oneOf":[{"$ref":"#/components/schemas/ContactAddressRes"},{"type":"null"}]},"deliveryAddress":{"oneOf":[{"$ref":"#/components/schemas/ContactAddressRes"},{"type":"null"}]}}},"UpdateCustomerAddressReq":{"type":"object","properties":{"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode","maxLength":2,"minLength":2},"city":{"type":"string","minLength":1},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":"string","minLength":1},"addressPart2":{"type":["string","null"]}},"required":["addressPart1","city","countryCode"]},"CreditorReq":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":1},"bankAccountNumber":{"type":["string","null"],"maxLength":50,"minLength":0}},"required":["name"]},"CreditorRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"bankAccountNumber":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CompanyBankReq":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode","maxLength":2,"minLength":2},"bban":{"type":"string"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode","maxLength":3,"minLength":3},"swiftCode":{"type":["string","null"],"maxLength":11,"minLength":0},"excludeFromReconciliationTodos":{"type":"boolean"}},"required":["countryCode","currency","name"]},"CompanyBankRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"displayName":{"type":"string"},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode"},"bban":{"type":"string"},"iban":{"type":"string"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"swiftCode":{"type":["string","null"]},"manual":{"type":"boolean"},"active":{"type":"boolean"},"archived":{"type":"boolean"},"providerType":{"type":"string","enum":["manual","ztl"]},"providerDisplayName":{"type":"string"},"syncEnabled":{"type":"boolean"},"defaultForOutgoingPayment":{"type":"boolean"},"excludeFromReconciliationTodos":{"type":"boolean"},"hasProviderConnection":{"type":"boolean"},"eligibleForPaymentCreation":{"type":"boolean"}}},"AssetDepreciationReq":{"type":"object","properties":{"usefulLifeInMonths":{"type":"integer","format":"int32"},"depreciationMethod":{"type":"string","enum":["manual","linear"]}},"required":["depreciationMethod","usefulLifeInMonths"]},"AssetRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"accountNumber":{"type":"string"},"description":{"type":["string","null"]},"currencyCode":{"type":"string"},"acquisitionDate":{"type":"string","format":"date"},"acquisitionCost":{"type":"number"},"currencyAcquisitionCost":{"type":["number","null"]},"usefulLifeInMonths":{"type":"integer","format":"int32"},"depreciationMethod":{"type":"string","enum":["manual","linear"]}}},"ServiceAgreementReq":{"type":"object","properties":{"issuerRole":{"type":"string","description":"Role of the tenant company issuing the agreement. The client fields identify the other party.","enum":["supplier","client"]},"clientEntityType":{"type":["string","null"],"enum":["legal_entity","sole_proprietorship"]},"clientCompanyName":{"type":["string","null"]},"clientOrgNumber":{"type":["string","null"]},"clientAddress":{"type":["string","null"]},"clientContactPerson":{"type":["string","null"]},"clientEmail":{"type":["string","null"]},"clientPhone":{"type":["string","null"]},"serviceDescription":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"fixedPrice":{"type":["number","null"]},"hourlyRate":{"type":["number","null"]},"billingFrequency":{"type":["string","null"],"enum":["monthly","quarterly","yearly","other"]},"billingFrequencyOther":{"type":["string","null"]},"paymentTermsDays":{"type":["integer","null"],"format":"int32"},"expensesPaidByClient":{"type":"boolean"},"noticePeriodMonths":{"type":["integer","null"],"format":"int32"},"otherTerms":{"type":["string","null"]},"inEnglish":{"type":"boolean"}}},"AccountingServicesAgreementRes":{"type":"object","properties":{"clientEntityType":{"type":["string","null"],"enum":["legal_entity","sole_proprietorship"]},"clientCompanyName":{"type":["string","null"]},"clientOrgNumber":{"type":["string","null"]},"clientAddress":{"type":["string","null"]},"clientContactPerson":{"type":["string","null"]},"clientEmail":{"type":["string","null"]},"clientPhone":{"type":["string","null"]},"serviceBookkeeping":{"type":"boolean"},"serviceReconciliation":{"type":"boolean"},"serviceVat":{"type":"boolean"},"servicePayroll":{"type":"boolean"},"servicePension":{"type":"boolean"},"serviceInvoicing":{"type":"boolean"},"serviceAnnualAccounts":{"type":"boolean"},"serviceConsulting":{"type":"boolean"},"serviceOther":{"type":["string","null"]},"otherAgreedTerms":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"pricingModel":{"type":["string","null"],"enum":["fixed","hourly","combination"]},"fixedPriceYearly":{"type":["number","null"]},"hourlyRate":{"type":["number","null"]},"combinationFixed":{"type":["number","null"]},"combinationHourly":{"type":["number","null"]},"billingFrequency":{"type":["string","null"],"enum":["monthly","quarterly","yearly","other"]},"billingFrequencyOther":{"type":["string","null"]},"paymentTermsDays":{"type":["integer","null"],"format":"int32"},"noticePeriodMonths":{"type":["integer","null"],"format":"int32"},"additionalHourlyRate":{"type":["number","null"]},"additionalHourlyRateCurrency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"prepayment":{"type":"boolean"},"inEnglish":{"type":"boolean"}}},"AgreementRes":{"type":"object","properties":{"agreementId":{"type":"integer","format":"int32"},"templateType":{"type":"string","enum":["accounting_services","employee_contract","rent_agreement","service_agreement","purchase_agreement"]},"signStatus":{"type":"string","enum":["draft","pending","signed"]},"signerEmail":{"type":["string","null"]},"signedAt":{"type":["string","null"],"format":"date-time"},"documentId":{"type":["integer","null"],"format":"int32"},"createdAt":{"type":["string","null"],"format":"date-time"},"editedAt":{"type":["string","null"],"format":"date-time"},"accountingServices":{"oneOf":[{"$ref":"#/components/schemas/AccountingServicesAgreementRes"},{"type":"null"}]},"employeeContract":{"oneOf":[{"$ref":"#/components/schemas/EmployeeContractAgreementRes"},{"type":"null"}]},"rentAgreement":{"oneOf":[{"$ref":"#/components/schemas/RentAgreementRes"},{"type":"null"}]},"serviceAgreement":{"oneOf":[{"$ref":"#/components/schemas/ServiceAgreementRes"},{"type":"null"}]},"purchaseAgreement":{"oneOf":[{"$ref":"#/components/schemas/PurchaseAgreementRes"},{"type":"null"}]}}},"EmployeeContractAgreementRes":{"type":"object","properties":{"employerCompanyName":{"type":["string","null"]},"employerOrgNumber":{"type":["string","null"]},"employerAddress":{"type":["string","null"]},"employerContactPerson":{"type":["string","null"]},"employerEmail":{"type":["string","null"]},"employerPhone":{"type":["string","null"]},"employeeName":{"type":["string","null"]},"employeeAddress":{"type":["string","null"]},"employeeEmail":{"type":["string","null"]},"employeePhone":{"type":["string","null"]},"jobTitle":{"type":["string","null"]},"workplace":{"type":["string","null"]},"employmentType":{"type":["string","null"],"enum":["permanent","temporary"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"workingHoursPercent":{"type":["integer","null"],"format":"int32"},"salaryType":{"type":["string","null"],"enum":["monthly","hourly"]},"salaryAmount":{"type":["number","null"]},"noticePeriodMonths":{"type":["integer","null"],"format":"int32"},"otherTerms":{"type":["string","null"]},"inEnglish":{"type":"boolean"},"otpEnabled":{"type":"boolean"},"otpPensionProvider":{"type":["string","null"]}}},"PurchaseAgreementRes":{"type":"object","properties":{"sellerName":{"type":["string","null"]},"sellerOrgOrBirthNumber":{"type":["string","null"]},"sellerAddress":{"type":["string","null"]},"sellerEmail":{"type":["string","null"]},"sellerPhone":{"type":["string","null"]},"buyerName":{"type":["string","null"]},"buyerOrgOrBirthNumber":{"type":["string","null"]},"buyerAddress":{"type":["string","null"]},"buyerEmail":{"type":["string","null"]},"buyerPhone":{"type":["string","null"]},"objectDescription":{"type":["string","null"]},"purchasePrice":{"type":["number","null"]},"priceIncludesVat":{"type":"boolean"},"paymentTerms":{"type":["string","null"]},"handoverDate":{"type":["string","null"],"format":"date"},"otherTerms":{"type":["string","null"]},"inEnglish":{"type":"boolean"}}},"RentAgreementRes":{"type":"object","properties":{"landlordName":{"type":["string","null"]},"landlordBirthDateOrOrgNumber":{"type":["string","null"]},"landlordAddress":{"type":["string","null"]},"landlordPostalCodeAndCity":{"type":["string","null"]},"landlordEmail":{"type":["string","null"]},"landlordPhone":{"type":["string","null"]},"tenantName":{"type":["string","null"]},"tenantBirthDate":{"type":["string","null"],"format":"date"},"tenantAddress":{"type":["string","null"]},"tenantPostalCodeAndCity":{"type":["string","null"]},"tenantEmail":{"type":["string","null"]},"tenantPhone":{"type":["string","null"]},"tenantRepresentativeName":{"type":["string","null"]},"tenantRepresentativeBirthDate":{"type":["string","null"],"format":"date"},"sharedAreaSharePercent":{"type":["integer","null"],"format":"int32"},"propertyAddress":{"type":["string","null"]},"propertyMunicipality":{"type":["string","null"]},"propertyGnr":{"type":["string","null"]},"propertyBnr":{"type":["string","null"]},"propertySectionNumber":{"type":["string","null"]},"propertyUnitNumber":{"type":["string","null"]},"rentObjectType":{"type":["string","null"],"enum":["house_or_apartment","secondary_unit","room_in_shared_home","temporary_absence_home","storage_or_other"]},"roomCount":{"type":["integer","null"],"format":"int32"},"storageCount":{"type":["integer","null"],"format":"int32"},"parkingSpaceCount":{"type":["integer","null"],"format":"int32"},"accessDetails":{"type":["string","null"]},"furnished":{"type":"boolean"},"specialConditions":{"type":["string","null"]},"inventoryListAttached":{"type":"boolean"},"electricityTerms":{"type":["string","null"],"enum":["included","monthly_advance","tenant_subscription","share_of_total"]},"electricityMonthlyAdvance":{"type":["number","null"]},"electricityOwnSubscriptionFromDate":{"type":["string","null"],"format":"date"},"electricitySharePercent":{"type":["integer","null"],"format":"int32"},"waterTerms":{"type":["string","null"],"enum":["included","monthly_advance","share_of_total"]},"waterMonthlyAdvance":{"type":["number","null"]},"waterSharePercent":{"type":["integer","null"],"format":"int32"},"cableTvIncluded":{"type":"boolean"},"internetIncluded":{"type":"boolean"},"monthlyRent":{"type":["number","null"]},"rentDueDayOfMonth":{"type":["integer","null"],"format":"int32"},"rentAccountNumber":{"type":["string","null"]},"radonMeasured":{"type":"boolean"},"radonMeasuredAt":{"type":["string","null"],"format":"date"},"radonLevelBecquerel":{"type":["integer","null"],"format":"int32"},"energyCertificateExists":{"type":"boolean"},"leaseDurationType":{"type":["string","null"],"enum":["indefinite","fixed_standard","fixed_special_reason"]},"leaseStartDate":{"type":["string","null"],"format":"date"},"leaseStartTime":{"type":["string","null"]},"leaseEndDate":{"type":["string","null"],"format":"date"},"leaseEndTime":{"type":["string","null"]},"shortFixedTermReasonType":{"type":["string","null"],"enum":["landlord_or_household_use","other_reason"]},"specialFixedTermReason":{"type":["string","null"]},"tenantNoticeMonths":{"type":["integer","null"],"format":"int32"},"landlordNoticeMonths":{"type":["integer","null"],"format":"int32"},"depositType":{"type":["string","null"],"enum":["deposit","guarantee"]},"depositAmount":{"type":["number","null"]},"depositAccountNumber":{"type":["string","null"]},"guaranteeAmount":{"type":["number","null"]},"guaranteeIssuer":{"type":["string","null"]},"quietHoursFrom":{"type":["string","null"]},"quietHoursTo":{"type":["string","null"]},"petsAllowed":{"type":"boolean"},"petsDetails":{"type":["string","null"]},"smokingAllowed":{"type":"boolean"},"houseRules":{"type":["string","null"]},"allowPaintWalls":{"type":"boolean"},"allowPaintCeilings":{"type":"boolean"},"allowReplaceFloors":{"type":"boolean"},"allowPaintKitchenFronts":{"type":"boolean"},"allowReplaceKitchenFronts":{"type":"boolean"},"allowHangShelves":{"type":"boolean"},"allowHangTv":{"type":"boolean"},"allowUniversalDesign":{"type":"boolean"},"allowedCustomizationsOther":{"type":["string","null"]},"otherTerms":{"type":["string","null"]},"attachmentCount":{"type":["integer","null"],"format":"int32"},"copyCount":{"type":["integer","null"],"format":"int32"},"inEnglish":{"type":"boolean"}}},"ServiceAgreementRes":{"type":"object","properties":{"issuerRole":{"type":"string","enum":["supplier","client"]},"clientEntityType":{"type":["string","null"],"enum":["legal_entity","sole_proprietorship"]},"clientCompanyName":{"type":["string","null"]},"clientOrgNumber":{"type":["string","null"]},"clientAddress":{"type":["string","null"]},"clientContactPerson":{"type":["string","null"]},"clientEmail":{"type":["string","null"]},"clientPhone":{"type":["string","null"]},"serviceDescription":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"fixedPrice":{"type":["number","null"]},"hourlyRate":{"type":["number","null"]},"billingFrequency":{"type":["string","null"],"enum":["monthly","quarterly","yearly","other"]},"billingFrequencyOther":{"type":["string","null"]},"paymentTermsDays":{"type":["integer","null"],"format":"int32"},"expensesPaidByClient":{"type":"boolean"},"noticePeriodMonths":{"type":["integer","null"],"format":"int32"},"otherTerms":{"type":["string","null"]},"inEnglish":{"type":"boolean"}}},"RentAgreementReq":{"type":"object","properties":{"landlordName":{"type":["string","null"]},"landlordBirthDateOrOrgNumber":{"type":["string","null"]},"landlordAddress":{"type":["string","null"]},"landlordPostalCodeAndCity":{"type":["string","null"]},"landlordEmail":{"type":["string","null"]},"landlordPhone":{"type":["string","null"]},"tenantName":{"type":["string","null"]},"tenantBirthDate":{"type":["string","null"],"format":"date"},"tenantAddress":{"type":["string","null"]},"tenantPostalCodeAndCity":{"type":["string","null"]},"tenantEmail":{"type":["string","null"]},"tenantPhone":{"type":["string","null"]},"tenantRepresentativeName":{"type":["string","null"]},"tenantRepresentativeBirthDate":{"type":["string","null"],"format":"date"},"sharedAreaSharePercent":{"type":["integer","null"],"format":"int32"},"propertyAddress":{"type":["string","null"]},"propertyMunicipality":{"type":["string","null"]},"propertyGnr":{"type":["string","null"]},"propertyBnr":{"type":["string","null"]},"propertySectionNumber":{"type":["string","null"]},"propertyUnitNumber":{"type":["string","null"]},"rentObjectType":{"type":["string","null"],"enum":["house_or_apartment","secondary_unit","room_in_shared_home","temporary_absence_home","storage_or_other"]},"roomCount":{"type":["integer","null"],"format":"int32"},"storageCount":{"type":["integer","null"],"format":"int32"},"parkingSpaceCount":{"type":["integer","null"],"format":"int32"},"accessDetails":{"type":["string","null"]},"furnished":{"type":"boolean"},"specialConditions":{"type":["string","null"]},"inventoryListAttached":{"type":"boolean"},"electricityTerms":{"type":["string","null"],"enum":["included","monthly_advance","tenant_subscription","share_of_total"]},"electricityMonthlyAdvance":{"type":["number","null"]},"electricityOwnSubscriptionFromDate":{"type":["string","null"],"format":"date"},"electricitySharePercent":{"type":["integer","null"],"format":"int32"},"waterTerms":{"type":["string","null"],"enum":["included","monthly_advance","share_of_total"]},"waterMonthlyAdvance":{"type":["number","null"]},"waterSharePercent":{"type":["integer","null"],"format":"int32"},"cableTvIncluded":{"type":"boolean"},"internetIncluded":{"type":"boolean"},"monthlyRent":{"type":["number","null"]},"rentDueDayOfMonth":{"type":["integer","null"],"format":"int32"},"rentAccountNumber":{"type":["string","null"]},"radonMeasured":{"type":"boolean"},"radonMeasuredAt":{"type":["string","null"],"format":"date"},"radonLevelBecquerel":{"type":["integer","null"],"format":"int32"},"energyCertificateExists":{"type":"boolean"},"leaseDurationType":{"type":["string","null"],"enum":["indefinite","fixed_standard","fixed_special_reason"]},"leaseStartDate":{"type":["string","null"],"format":"date"},"leaseStartTime":{"type":["string","null"]},"leaseEndDate":{"type":["string","null"],"format":"date"},"leaseEndTime":{"type":["string","null"]},"shortFixedTermReasonType":{"type":["string","null"],"enum":["landlord_or_household_use","other_reason"]},"specialFixedTermReason":{"type":["string","null"]},"tenantNoticeMonths":{"type":["integer","null"],"format":"int32"},"landlordNoticeMonths":{"type":["integer","null"],"format":"int32"},"depositType":{"type":["string","null"],"enum":["deposit","guarantee"]},"depositAmount":{"type":["number","null"]},"depositAccountNumber":{"type":["string","null"]},"guaranteeAmount":{"type":["number","null"]},"guaranteeIssuer":{"type":["string","null"]},"quietHoursFrom":{"type":["string","null"]},"quietHoursTo":{"type":["string","null"]},"petsAllowed":{"type":"boolean"},"petsDetails":{"type":["string","null"]},"smokingAllowed":{"type":"boolean"},"houseRules":{"type":["string","null"]},"allowPaintWalls":{"type":"boolean"},"allowPaintCeilings":{"type":"boolean"},"allowReplaceFloors":{"type":"boolean"},"allowPaintKitchenFronts":{"type":"boolean"},"allowReplaceKitchenFronts":{"type":"boolean"},"allowHangShelves":{"type":"boolean"},"allowHangTv":{"type":"boolean"},"allowUniversalDesign":{"type":"boolean"},"allowedCustomizationsOther":{"type":["string","null"]},"otherTerms":{"type":["string","null"]},"attachmentCount":{"type":["integer","null"],"format":"int32"},"copyCount":{"type":["integer","null"],"format":"int32"},"inEnglish":{"type":"boolean"}}},"PurchaseAgreementReq":{"type":"object","properties":{"sellerName":{"type":["string","null"]},"sellerOrgOrBirthNumber":{"type":["string","null"]},"sellerAddress":{"type":["string","null"]},"sellerEmail":{"type":["string","null"]},"sellerPhone":{"type":["string","null"]},"buyerName":{"type":["string","null"]},"buyerOrgOrBirthNumber":{"type":["string","null"]},"buyerAddress":{"type":["string","null"]},"buyerEmail":{"type":["string","null"]},"buyerPhone":{"type":["string","null"]},"objectDescription":{"type":["string","null"]},"purchasePrice":{"type":["number","null"]},"priceIncludesVat":{"type":"boolean"},"paymentTerms":{"type":["string","null"]},"handoverDate":{"type":["string","null"],"format":"date"},"otherTerms":{"type":["string","null"]},"inEnglish":{"type":"boolean"}}},"EmployeeContractAgreementReq":{"type":"object","properties":{"employerCompanyName":{"type":["string","null"]},"employerOrgNumber":{"type":["string","null"]},"employerAddress":{"type":["string","null"]},"employerContactPerson":{"type":["string","null"]},"employerEmail":{"type":["string","null"]},"employerPhone":{"type":["string","null"]},"employeeName":{"type":["string","null"]},"employeeAddress":{"type":["string","null"]},"employeeEmail":{"type":["string","null"]},"employeePhone":{"type":["string","null"]},"jobTitle":{"type":["string","null"]},"workplace":{"type":["string","null"]},"employmentType":{"type":["string","null"],"enum":["permanent","temporary"]},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"workingHoursPercent":{"type":["integer","null"],"format":"int32"},"salaryType":{"type":["string","null"],"enum":["monthly","hourly"]},"salaryAmount":{"type":["number","null"]},"noticePeriodMonths":{"type":["integer","null"],"format":"int32"},"otherTerms":{"type":["string","null"]},"inEnglish":{"type":"boolean"},"otpEnabled":{"type":"boolean"},"otpPensionProvider":{"type":["string","null"]}}},"AccountingServicesAgreementReq":{"type":"object","properties":{"clientEntityType":{"type":["string","null"],"enum":["legal_entity","sole_proprietorship"]},"clientCompanyName":{"type":["string","null"]},"clientOrgNumber":{"type":["string","null"]},"clientAddress":{"type":["string","null"]},"clientContactPerson":{"type":["string","null"]},"clientEmail":{"type":["string","null"]},"clientPhone":{"type":["string","null"]},"serviceBookkeeping":{"type":"boolean"},"serviceReconciliation":{"type":"boolean"},"serviceVat":{"type":"boolean"},"servicePayroll":{"type":"boolean"},"servicePension":{"type":"boolean"},"serviceInvoicing":{"type":"boolean"},"serviceAnnualAccounts":{"type":"boolean"},"serviceConsulting":{"type":"boolean"},"serviceOther":{"type":["string","null"]},"otherAgreedTerms":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date"},"pricingModel":{"type":["string","null"],"enum":["fixed","hourly","combination"]},"fixedPriceYearly":{"type":["number","null"]},"hourlyRate":{"type":["number","null"]},"combinationFixed":{"type":["number","null"]},"combinationHourly":{"type":["number","null"]},"billingFrequency":{"type":["string","null"],"enum":["monthly","quarterly","yearly","other"]},"billingFrequencyOther":{"type":["string","null"]},"paymentTermsDays":{"type":["integer","null"],"format":"int32"},"noticePeriodMonths":{"type":["integer","null"],"format":"int32"},"additionalHourlyRate":{"type":["number","null"]},"additionalHourlyRateCurrency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"prepayment":{"type":"boolean"},"inEnglish":{"type":"boolean"}}},"UpdateReviewNoteReq":{"type":"object","properties":{"note":{"type":"string","minLength":1},"category":{"type":"string","enum":["general","annual_control","deviation","follow_up"]}},"required":["note"]},"ReviewNoteRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"note":{"type":"string"},"category":{"type":"string","enum":["general","annual_control","deviation","follow_up"]},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":["string","null"]},"updatedBy":{"type":["string","null"]}}},"SetOppdragsansvarligReq":{"type":"object","properties":{"oppdragsansvarligUserId":{"type":["integer","null"],"format":"int32"}}},"AccountantClientRes":{"type":"object","properties":{"clientTenantId":{"type":"integer","format":"int32"},"companyName":{"type":"string"},"organizationNumber":{"type":"string"},"connected":{"type":"boolean"},"oppdragsansvarligUserId":{"type":["integer","null"],"format":"int32"},"oppdragsansvarlig":{"type":["string","null"]},"businessDescription":{"type":"string"},"businessDescriptionUpdatedAt":{"type":["string","null"]},"lastAnnualControl":{"type":["string","null"]},"missingAnnualControl":{"type":"boolean"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/ReviewNoteRes"}}}},"UpdateBusinessDescriptionReq":{"type":"object","properties":{"description":{"type":["string","null"]}}},"NewInvoiceReceiverBankReq":{"type":"object","properties":{"currencyCode":{"type":"string","maxLength":3,"minLength":3},"bankId":{"type":"integer","format":"int32"}}},"FrontendErrorReq":{"type":"object","properties":{"source":{"type":"string"},"message":{"type":"string"},"stack":{"type":["string","null"]},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"timestamp":{"type":["string","null"]}}},"EmailWarningDto":{"type":"object","properties":{"tenantSlug":{"type":"string"},"detail":{"type":"string"},"senderEmail":{"type":["string","null"]},"recipientEmail":{"type":["string","null"]},"subject":{"type":["string","null"]},"endpointPath":{"type":["string","null"]},"rejectedFilenames":{"type":"array","items":{"type":"string"}},"maxFileSizeMb":{"type":["integer","null"],"format":"int32"}}},"EmailWarningEmailDto":{"type":"object","properties":{"to":{"type":"string"},"subject":{"type":"string"},"text":{"type":"string"}}},"WarehouseInventoryAdjustmentReq":{"type":"object","properties":{"productId":{"type":"integer","format":"int32"},"variantId":{"type":["integer","null"],"format":"int32"},"warehouseId":{"type":"integer","format":"int32"},"quantityChange":{"type":"integer","format":"int32"},"unitCost":{"type":["number","null"]},"occurredAt":{"type":["string","null"],"format":"date-time"}},"required":["productId","quantityChange","warehouseId"]},"WarehouseInventoryAdjustmentRes":{"type":"object","properties":{"transactionId":{"type":"integer","format":"int32"},"productId":{"type":"integer","format":"int32"},"variantId":{"type":["integer","null"],"format":"int32"},"warehouseId":{"type":"integer","format":"int32"},"quantityChange":{"type":"integer","format":"int32"},"quantityOnHand":{"type":["integer","null"],"format":"int64"},"occurredAt":{"type":"string","format":"date-time"}}},"AttachmentLinkReq":{"type":"object","properties":{"attachmentId":{"type":"integer","format":"int32"}}},"CreateUserReq":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"roleCode":{"type":"string","$ref":"#/components/schemas/AssignableTenantRoleCode","enum":["ROLE_TENANT_ADMIN","ROLE_ACCOUNTANT","ROLE_EMPLOYEE","ROLE_AUDITOR"]},"directPermissionCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/AssignableTenantPermissionCode"}},"expiresInDays":{"type":"integer","format":"int32"}},"required":["email"]},"CreateTenantReq":{"type":"object","properties":{"organizationNumber":{"type":"string","maxLength":64,"minLength":0}},"required":["organizationNumber"]},"TenantRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"slug":{"type":"string"},"companyName":{"type":"string"},"organizationNumber":{"type":"string"}}},"TaxReturnValidationErrorRes":{"type":"object","properties":{"source":{"type":"string","description":"Where the error came from: LOCAL (reai pre-check) or SKATTEETATEN."},"type":{"type":["string","null"],"description":"Deviation type (avvikstype) for Skatteetaten errors."},"path":{"type":["string","null"],"description":"Element path in the tax return the error points at (sti)."},"occurrence":{"type":["string","null"]},"message":{"type":["string","null"],"description":"Human-readable message."},"receivedValue":{"type":["number","null"]},"calculatedValue":{"type":["number","null"]},"valueDiscrepancy":{"type":["number","null"]},"receivedText":{"type":["string","null"]},"calculatedText":{"type":["string","null"]}}},"TaxReturnValidationGuidanceRes":{"type":"object","properties":{"type":{"type":["string","null"]},"path":{"type":["string","null"]},"occurrence":{"type":["string","null"]},"helpText":{"type":["string","null"]}}},"TaxReturnValidationRes":{"type":"object","description":"Result of validating the current tax-return draft against Skatteetaten, without submitting. Mirrors Skatteetaten's validation response schema plus reai's local pre-checks.","properties":{"status":{"type":"string","description":"OK when the draft passes validation, ERRORS otherwise."},"valid":{"type":"boolean","description":"True when there are no validation errors (Skatteetaten or local)."},"validationErrors":{"type":"array","description":"Errors that block submission (Skatteetaten avvikVedValidering + reai local pre-checks).","items":{"$ref":"#/components/schemas/TaxReturnValidationErrorRes"}},"calculationDiscrepancies":{"type":"array","description":"Calculation/reconciliation discrepancies (avvikEtterBeregning): differences between the submitted value and Skatteetaten's recomputed value.","items":{"$ref":"#/components/schemas/TaxReturnValidationErrorRes"}},"guidance":{"type":"array","description":"Guidance messages returned after Skatteetaten's control (veiledningEtterKontroll).","items":{"$ref":"#/components/schemas/TaxReturnValidationGuidanceRes"}}}},"TaxReturnSubmitRes":{"type":"object","description":"Result of filing a tax return with Skatteetaten.","properties":{"status":{"type":"string","description":"Submission status, e.g. SUBMITTED.","enum":["INCOMPLETE","FAILED","COMPLETE","SUBMITTED","SUBMITTED_MANUALLY"]},"submittedAt":{"type":["string","null"],"format":"date-time"},"skattemeldingDocumentId":{"type":["string","null"],"description":"Skatteetaten document reference of the filed return."},"altinnInstanceId":{"type":["string","null"]}}},"CreateSupplierReq":{"type":"object","properties":{"name":{"type":"string","maxLength":75,"minLength":0},"organizationNumber":{"type":["string","null"],"maxLength":36,"minLength":0},"privateContact":{"type":"boolean"},"email":{"type":["string","null"],"format":"email"},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]},"skipRegistryLookup":{"type":"boolean"}},"required":["name"]},"CreateSupplierInvoiceAddressReq":{"type":"object","properties":{"streetAddress":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postcode":{"type":["string","null"]},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]}}},"CreateSupplierInvoiceCostLineReq":{"type":"object","properties":{"debitAccount":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"creditAccount":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"amount":{"type":["number","null"],"description":"The cost line amount.","minimum":0.01},"description":{"type":["string","null"],"description":"The cost line description."},"debitVatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"creditVatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"projectId":{"type":["integer","null"],"format":"int32"},"departmentId":{"type":["integer","null"],"format":"int32"},"rowNumber":{"type":["integer","null"],"format":"int32"},"accrualEnabled":{"type":"boolean"},"accrualPeriod":{"type":["string","null"],"description":"The accrual period in yyyy-MM format."},"accrualPeriodCount":{"type":["integer","null"],"format":"int32"},"accrualAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]}},"required":["amount"]},"CreateSupplierInvoicePaymentDetailsReq":{"type":"object","properties":{"beneficiaryName":{"type":["string","null"]},"accountNumber":{"type":["string","null"]},"iban":{"type":["string","null"]},"swiftBic":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankCountryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"routingNumber":{"type":["string","null"]},"routingType":{"type":["string","null"]},"bankAccountCategory":{"type":["string","null"]},"localClearingSystem":{"type":["string","null"]},"reference":{"type":["string","null"]},"reason":{"type":["string","null"]},"beneficiaryAddress":{"oneOf":[{"$ref":"#/components/schemas/CreateSupplierInvoiceAddressReq"},{"type":"null"}]},"bankAddress":{"oneOf":[{"$ref":"#/components/schemas/CreateSupplierInvoiceAddressReq"},{"type":"null"}]}}},"CreateSupplierInvoiceReq":{"type":"object","properties":{"supplierId":{"type":["integer","null"],"format":"int32","description":"The supplier id connected to this supplier invoice."},"number":{"type":["string","null"],"description":"The supplier invoice number. If omitted, the invoice date is used."},"date":{"type":["string","null"],"format":"date","description":"The supplier invoice date."},"dueDate":{"type":["string","null"],"format":"date","description":"The supplier invoice due date."},"currency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"documentType":{"type":"string","description":"Whether this document is an ordinary supplier invoice or a supplier credit note.","enum":["invoice","credit_note"]},"kidNumber":{"type":["string","null"],"description":"The KID number printed on the supplier invoice, when present."},"paymentReference":{"type":["string","null"],"description":"Payment reference to use when creating a supplier invoice payment."},"targetCountry":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"paymentDetails":{"oneOf":[{"$ref":"#/components/schemas/CreateSupplierInvoicePaymentDetailsReq"},{"type":"null"}]},"costLines":{"type":"array","items":{"$ref":"#/components/schemas/CreateSupplierInvoiceCostLineReq"},"minItems":1}},"required":["costLines","date","dueDate","supplierId"]},"SupplierCreditNoteApplicationRes":{"type":"object","properties":{"appliedToInvoiceId":{"type":"integer","format":"int32","description":"The supplier invoice id this credit note has been applied to."},"appliedToInvoiceNumber":{"type":["string","null"],"description":"The supplier invoice number this credit note has been applied to."}}},"SupplierInvoiceAddressRes":{"type":"object","properties":{"streetAddress":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postcode":{"type":["string","null"]},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]}}},"SupplierInvoiceCostLineRes":{"type":"object","properties":{"debitAccount":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"creditAccount":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"amount":{"type":["number","null"]},"description":{"type":["string","null"]},"debitVatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"creditVatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"projectId":{"type":["integer","null"],"format":"int32"},"departmentId":{"type":["integer","null"],"format":"int32"},"rowNumber":{"type":"integer","format":"int32"},"accrualEnabled":{"type":"boolean"},"accrualPeriod":{"type":["string","null"]},"accrualPeriodCount":{"type":"integer","format":"int32"},"accrualAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]}}},"SupplierInvoiceLedgerGroupMemberRes":{"type":"object","properties":{"postingId":{"type":"integer","format":"int64","description":"The supplier ledger posting id included in this invoice group."},"supplierInvoiceId":{"type":["integer","null"],"format":"int32","description":"The supplier invoice or credit note id connected to this posting, when available."},"supplierInvoiceNumber":{"type":["string","null"],"description":"The supplier invoice or credit note number connected to this posting, when available."},"voucherId":{"type":"integer","format":"int64"},"voucherNumber":{"type":"string"},"voucherDate":{"type":"string","format":"date"},"amount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"description":{"type":["string","null"]},"type":{"type":"string","description":"Type of posting included in a supplier invoice ledger group.","enum":["credit_note","manual_voucher"]},"canRemove":{"type":"boolean","description":"True when this posting can be removed from the invoice ledger group through the public API."}}},"SupplierInvoicePaymentDetailsRes":{"type":"object","properties":{"beneficiaryName":{"type":"string"},"accountNumber":{"type":["string","null"]},"iban":{"type":["string","null"]},"swiftBic":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankCountryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"routingNumber":{"type":["string","null"]},"routingType":{"type":["string","null"]},"bankAccountCategory":{"type":["string","null"]},"localClearingSystem":{"type":["string","null"]},"reference":{"type":["string","null"]},"reason":{"type":["string","null"]},"beneficiaryAddress":{"oneOf":[{"$ref":"#/components/schemas/SupplierInvoiceAddressRes"},{"type":"null"}]},"bankAddress":{"oneOf":[{"$ref":"#/components/schemas/SupplierInvoiceAddressRes"},{"type":"null"}]},"paymentSchedules":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SupplierInvoicePaymentScheduleRes"}}}},"SupplierInvoicePaymentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"companyBankId":{"type":"integer","format":"int32","description":"The company bank account used for the payment."},"status":{"type":"string","enum":["in_process","completed","failed","reversed","awaiting_approval","customer_action_required"]},"amount":{"type":"number"},"currencyAmount":{"type":["number","null"]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"transferDate":{"type":"string","format":"date"},"voucherId":{"type":["integer","null"],"format":"int64"},"refundedPaymentId":{"type":["integer","null"],"format":"int32"},"reference":{"type":"string"},"manual":{"type":"boolean"},"failureReason":{"type":["string","null"]},"approvalUrl":{"type":["string","null"],"description":"Authenticated ReAI URL where the customer can approve the payment. Only present while a bank-integrated payment is awaiting customer approval."}}},"SupplierInvoicePaymentScheduleRes":{"type":"object","properties":{"amount":{"type":"number"},"date":{"type":"string","format":"date"}}},"SupplierInvoicePaymentStateRes":{"type":"object","properties":{"paidAmount":{"type":["number","null"],"description":"Amount already paid or settled in the supplier invoice currency."},"remainingAmount":{"type":["number","null"],"description":"Amount still outstanding in the supplier invoice currency."},"fullyPaid":{"type":"boolean","description":"True when the invoice is fully covered by payments or ledger settlements."},"hasLedgerSettlement":{"type":"boolean","description":"True when ledger postings settle this supplier invoice outside normal payments."},"hasPaymentDetails":{"type":"boolean","description":"True when payment details are stored on this invoice."},"paymentCreationAllowed":{"type":"boolean","description":"True when payment creation is not blocked by invoice state and payment account details are available from the invoice or supplier."},"notPayableReason":{"type":["string","null"],"description":"Machine-readable reason why payment creation is currently blocked, or null when paymentCreationAllowed is true.","enum":["CREDIT_NOTE","FULLY_PAID","PAYMENT_IN_PROGRESS","PAYMENT_DETAILS_MISSING"]}}},"SupplierInvoiceRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The supplier invoice id. Use this as the path id for supplier invoice operations."},"number":{"type":["string","null"],"description":"The supplier invoice or credit note number from the supplier."},"supplierId":{"type":"integer","format":"int32","description":"The supplier id connected to this document."},"documentType":{"type":"string","description":"Whether this document is an ordinary invoice or a credit note.","enum":["invoice","credit_note"]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"totalAmount":{"type":["number","null"],"description":"The document total in the supplier invoice currency."},"date":{"type":"string","format":"date","description":"The supplier invoice or credit note date."},"dueDate":{"type":["string","null"],"format":"date","description":"The due date, when present on the supplier invoice."},"disputedAt":{"type":["string","null"],"format":"date-time","description":"When the supplier invoice was marked as disputed, or null when it is not disputed."},"voucherId":{"type":["integer","null"],"format":"int64","description":"The latest voucher id for this supplier invoice, when it has a voucher."},"paymentState":{"$ref":"#/components/schemas/SupplierInvoicePaymentStateRes","description":"Payment and settlement state for this document."},"paymentDetails":{"oneOf":[{"$ref":"#/components/schemas/SupplierInvoicePaymentDetailsRes"},{"type":"null"}]},"costLines":{"type":"array","description":"Accounting cost lines registered for this supplier invoice.","items":{"$ref":"#/components/schemas/SupplierInvoiceCostLineRes"}},"payments":{"type":"array","description":"Payments created for this supplier invoice.","items":{"$ref":"#/components/schemas/SupplierInvoicePaymentRes"}},"settlements":{"type":"array","description":"Ledger settlements linked to this supplier invoice.","items":{"$ref":"#/components/schemas/SupplierInvoiceSettlementRes"}},"ledgerGroupMembers":{"type":"array","description":"Related supplier ledger postings currently included in this invoice ledger group.","items":{"$ref":"#/components/schemas/SupplierInvoiceLedgerGroupMemberRes"}},"creditNoteApplication":{"oneOf":[{"$ref":"#/components/schemas/SupplierCreditNoteApplicationRes"},{"type":"null"}]}}},"SupplierInvoiceSettlementRes":{"type":"object","properties":{"voucherId":{"type":"integer","format":"int64"},"voucherNumber":{"type":"string"},"voucherDate":{"type":"string","format":"date"},"amount":{"type":"number"}}},"UseCreditNoteReq":{"type":"object","properties":{"creditNoteIds":{"type":"array","description":"The ids of the credit notes to apply. Values should come from GET /api/supplier-invoices/{id}/available-credit-notes.","items":{"type":"integer","format":"int32"},"minItems":1}},"required":["creditNoteIds"]},"UseCreditNoteRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The id of the supplier invoice that received the credit note."},"creditNoteIds":{"type":"array","description":"All credit note ids applied by this request.","items":{"type":"integer","format":"int32"}},"postingGroupId":{"type":["integer","null"],"format":"int32","description":"The ledger posting group created or updated when the credit note was applied."},"relatedPostingIds":{"type":"array","description":"The supplier ledger posting ids linked to the invoice by this operation.","items":{"type":"integer","format":"int64"}}}},"AddSupplierInvoiceLedgerGroupPostingsReq":{"type":"object","properties":{"postingIds":{"type":"array","items":{"type":"integer","format":"int64"},"minItems":1}},"required":["postingIds"]},"SupplierInvoiceLedgerGroupPostingsRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"postingIds":{"type":"array","items":{"type":"integer","format":"int64"}}}},"CreateSupplierInvoicePaymentReq":{"type":"object","properties":{"companyBankId":{"type":"integer","format":"int32","description":"The company bank account to use for the payment."},"paymentDate":{"type":"string","format":"date","description":"The payment date."},"invoiceAmount":{"type":"number","description":"The supplier invoice amount to settle.\n\nThis value determines how much of the supplier invoice is marked as paid.\nAlways provide this field.\n\nMust be positive, at most 9999999999999.99, and have at most 2 decimal places.","maximum":9999999999999.99,"minimum":0.01,"multipleOf":0.01},"bankDebitAmount":{"type":["number","null"],"description":"The actual amount debited from the selected company bank account.\n\nOnly used for manual payments.\nDo not send this field for bank-integrated payments.\nThis is mainly relevant when the debited bank amount differs from the supplier invoice amount, for example because of currency conversion.\n\nWhen provided, it must be positive, at most 9999999999999.99, and have at most 2 decimal places.","maximum":9999999999999.99,"minimum":0.01,"multipleOf":0.01},"manualPayment":{"type":"boolean","description":"Whether the payment should be processed as a manual payment.\n\nMust be true for manual payment flows.\nFor bank-integrated flows, set to false to use the integration flow, or true to handle the payment manually."}},"required":["companyBankId","invoiceAmount","paymentDate"]},"CreateSupplierInvoicePaymentRes":{"type":"object","properties":{"paymentId":{"type":"integer","format":"int32"},"companyBankId":{"type":"integer","format":"int32","description":"The company bank account used for the payment."},"voucherId":{"type":["integer","null"],"format":"int64"},"status":{"type":"string","enum":["in_process","completed","failed","reversed","awaiting_approval","customer_action_required"]},"approvalUrl":{"type":["string","null"],"description":"Authenticated ReAI URL where the customer can approve the payment. Only present while a bank-integrated payment is awaiting customer approval."}}},"SubscriptionGenerationResultRes":{"type":"object","properties":{"generatedBillings":{"type":"integer","format":"int32"},"generatedOrders":{"type":"integer","format":"int32"},"generatedInvoices":{"type":"integer","format":"int32"},"safetyCapHits":{"type":"integer","format":"int32"}}},"CreateSalaryPaymentReq":{"type":"object","properties":{"period":{"type":"string","description":"Salary period, must be formatted as `YYYY-MM`.","example":"2026-04"},"paymentDate":{"type":"string","format":"date","description":"The date the salary will be paid out to employees. Used for bank payment scheduling.","example":"2026-04-25"},"employeeIds":{"type":["array","null"],"description":"Employees to include in the salary payment.\n\nLeave empty or omit to include all employees eligible for the period.","items":{"type":"integer","format":"int32"}}},"required":["paymentDate","period"]},"CreateSalaryPaymentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"string"},"periodYear":{"type":"integer","format":"int32"},"periodMonth":{"type":"integer","format":"int32"},"voucherDate":{"type":["string","null"],"format":"date"},"paymentDate":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["under_process","unpaid","complete","reversed"]},"payableAmount":{"type":"number"},"employeeIds":{"type":"array","items":{"type":"integer","format":"int32"}}}},"CreateSalaryWageSpecReq":{"type":"object","properties":{"employeeId":{"type":["integer","null"],"format":"int32","description":"Employee to add the wage specification line for. Must be included in the salary payment."},"specificationCode":{"type":"string","description":"Wage specification type. Use COMMISSION for commission earnings (reported as honorarAkkordProsentProvisjon in the a-melding).","enum":["FIXED_SALARY","HOURLY_SALARY","COMMISSION","VACATION_DEDUCTION","DEBT_TO_EMPLOYEES_EXPENSE","EMPLOYEES_TRAVEL_EXPENSE","HOLIDAY_ALLOWANCE"],"example":"COMMISSION"},"quantity":{"type":"number","description":"Quantity, for example number of hours for HOURLY_SALARY. Use 1 for amount-based lines such as COMMISSION.","example":1},"rate":{"type":"number","description":"Rate per quantity unit. The line amount is quantity * rate.","example":12500.0},"comment":{"type":["string","null"],"description":"Optional comment shown on the payslip."},"holidayAllowanceEarningYear":{"type":["integer","null"],"format":"int32","description":"Holiday allowance earning year, only allowed for HOLIDAY_ALLOWANCE lines."}},"required":["employeeId","quantity","rate","specificationCode"]},"ReceiptReceptionRegistrationCostLineReq":{"type":"object","properties":{"account":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"projectId":{"type":["integer","null"],"format":"int32"},"amountInclVat":{"type":["number","null"]},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"description":{"type":["string","null"]}},"required":["account","amountInclVat"]},"ReceiptReceptionRegistrationDocumentReq":{"type":"object","properties":{"counterpartyId":{"type":["integer","null"],"format":"int32"},"documentNumber":{"type":["string","null"]},"documentDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"currency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]}}},"ReceiptReceptionRegistrationPaymentReq":{"type":"object","properties":{"paymentDate":{"type":["string","null"],"format":"date"},"paymentAmount":{"type":["number","null"],"minimum":0.00},"documentCurrency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]}},"required":["paymentAmount"]},"ReceiptReceptionRegistrationReq":{"type":"object","properties":{"document":{"oneOf":[{"$ref":"#/components/schemas/ReceiptReceptionRegistrationDocumentReq"},{"type":"null"}]},"costLines":{"type":"array","items":{"$ref":"#/components/schemas/ReceiptReceptionRegistrationCostLineReq"},"minItems":1},"payment":{"oneOf":[{"$ref":"#/components/schemas/ReceiptReceptionRegistrationPaymentReq"},{"type":"null"}]},"companyBankId":{"type":"integer","format":"int32"},"bankAmount":{"type":["number","null"],"minimum":0.00},"paymentReference":{"type":["string","null"]},"manualPayment":{"type":"boolean"}},"required":["costLines","document","payment"]},"ReceiptReceptionRegistrationRes":{"type":"object","properties":{"documentId":{"type":"integer","format":"int32"},"voucherId":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["created"]}}},"CreateSubProjectReq":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]},"OpenPostingsReq":{"type":"object","properties":{"postingGroupId":{"type":"integer","format":"int32"}}},"PostingGroupMutationRes":{"type":"object","properties":{"postingGroupId":{"type":"integer","format":"int32"},"postingIds":{"type":"array","items":{"type":"integer","format":"int64"}}}},"ClosePostingsReq":{"type":"object","properties":{"postingIds":{"type":"array","items":{"type":"integer","format":"int64"},"minItems":1}},"required":["postingIds"]},"CreateOrderReq":{"type":"object","properties":{"daysUntilDue":{"type":"integer","format":"int64"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode","maxLength":3,"minLength":3},"customerId":{"type":"integer","format":"int32"},"projectId":{"type":["integer","null"],"format":"int32"},"orderLines":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrderLineReq"},"minItems":1},"issueDate":{"type":["string","null"],"format":"date"},"comment":{"type":["string","null"]},"internalComment":{"type":["string","null"]},"invoiceEmail":{"type":["string","null"],"format":"email"},"sendEhf":{"type":"boolean"}},"required":["currencyCode","customerId","daysUntilDue","issueDate","orderLines"]},"ManualReconciliationMonthReq":{"type":"object","properties":{"month":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}$"}},"required":["month"]},"SaveLeadReq":{"type":"object","properties":{"orgNumber":{"type":"string","minLength":1}},"required":["orgNumber"]},"CreateLeadContactEventReq":{"type":"object","properties":{"contactedOn":{"type":["string","null"],"format":"date"},"source":{"type":["string","null"],"enum":["email","phone","message","other"]},"note":{"type":["string","null"],"maxLength":180,"minLength":0}},"required":["contactedOn","source"]},"CreateInvoiceReq":{"type":"object","properties":{"orderId":{"type":"integer","format":"int32","description":"Order id to invoice. Invoice delivery is derived from this order: `sendEhf=true` sends EHF first when the customer can receive EHF; otherwise ReAI sends the invoice PDF to the order `invoiceEmail` when present.","example":123},"issueDate":{"type":["string","null"],"format":"date","description":"Invoice issue date. Defaults to the order invoice date, or today when the order has no invoice date.","example":"2026-05-08"},"comment":{"type":["string","null"],"description":"External invoice comment. Defaults to the order invoice comment when omitted."}},"required":["orderId"]},"InvoiceBankRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"accountNumber":{"type":"string"},"bankCode":{"type":"string"},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode"},"iban":{"type":["string","null"]}}},"InvoiceEfakturaDeliveryRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"invoiceId":{"type":["integer","null"],"format":"int32"},"status":{"type":"string","enum":["submitted","in_progress","processed","rejected","stopped","duplicate","not_found","cancelled","unknown"]},"rejectReason":{"type":["string","null"]},"submittedAt":{"type":"string","format":"date-time"},"lastStatusCheckAt":{"type":["string","null"],"format":"date-time"}}},"InvoiceRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"number":{"type":"string"},"voucherId":{"type":["integer","null"],"format":"int64"},"order":{"$ref":"#/components/schemas/OrderRes"},"creditedInvoiceId":{"type":["integer","null"],"format":"int32"},"creditedInvoiceIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditNoteId":{"type":["integer","null"],"format":"int32"},"creditNoteIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditNotesTotalAmount":{"type":"number"},"appliedInvoiceId":{"type":["integer","null"],"format":"int32"},"appliedInvoiceIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditNoteAllocationType":{"type":["string","null"],"enum":["invoice_full_reversal","manual_matches_original_invoice_amount","manual_partial_cover"]},"createdFromInvoiceId":{"type":["integer","null"],"format":"int32"},"creditedInvoiceNumber":{"type":["string","null"]},"creditedInvoiceNumbers":{"type":"array","items":{"type":"string"}},"comment":{"type":["string","null"]},"dueDate":{"type":["string","null"],"format":"date"},"issueDate":{"type":"string","format":"date"},"bank":{"oneOf":[{"$ref":"#/components/schemas/InvoiceBankRes"},{"type":"null"}]},"creditNote":{"type":"boolean"},"efakturaDelivery":{"oneOf":[{"$ref":"#/components/schemas/InvoiceEfakturaDeliveryRes"},{"type":"null"}]}}},"SettleInvoiceRoundingAdjustmentReq":{"type":"object","properties":{"settlementDate":{"type":"string","format":"date","description":"Accounting date for the rounding adjustment voucher. The date cannot be in the future.","example":"2026-05-08"}},"required":["settlementDate"]},"SettleInvoiceRoundingAdjustmentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"voucherId":{"type":"integer","format":"int64"},"adjustmentDate":{"type":"string","format":"date"},"amount":{"type":"number"}}},"CreateInvoiceReminderReq":{"type":"object","properties":{"type":{"type":"string","enum":["reminder","notice_of_debt_collection"]},"reminderDate":{"type":"string","format":"date"},"applyReminderFee":{"type":"boolean"},"applyLatePaymentInterest":{"type":"boolean"},"email":{"type":"string","format":"email","minLength":1}},"required":["email","reminderDate","type"]},"InvoiceEmailDeliveryRes":{"type":"object","properties":{"historyId":{"type":["integer","null"],"format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"email":{"type":"string"},"detail":{"type":"string"},"createdAt":{"type":"string","format":"date"}}},"InvoiceReminderDeliveryRes":{"type":"object","properties":{"reminder":{"$ref":"#/components/schemas/InvoiceReminderRes"},"emailDelivery":{"$ref":"#/components/schemas/InvoiceEmailDeliveryRes"}}},"InvoiceReminderRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["reminder","notice_of_debt_collection"]},"reminderDate":{"type":"string","format":"date"},"email":{"type":"string"},"reminderFeeAmount":{"type":["number","null"]},"lateInterestAmount":{"type":["number","null"]},"forgiven":{"type":"boolean"},"forgivenAt":{"type":["string","null"],"format":"date-time"},"collectibleReminderFeeAmount":{"type":"number"},"collectibleLateInterestAmount":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}},"ForgiveInvoiceReminderChargesReq":{"type":"object","properties":{"forgiveUnpaidReminderCharges":{"type":["boolean","null"],"description":"Must be true to confirm that ReAI should forgive all unpaid reminder fees and late-payment interest on the invoice.","example":true}},"required":["forgiveUnpaidReminderCharges"]},"InvoiceReminderForgivenessRes":{"type":"object","properties":{"invoiceId":{"type":"integer","format":"int32"},"forgivenReminderCount":{"type":"integer","format":"int32"},"reminders":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceReminderRes"}}}},"RegisterInvoiceRefundRequest":{"type":"object","properties":{"companyBankId":{"type":"integer","format":"int32","description":"The company bank account to refund from."},"refundDate":{"type":"string","format":"date","description":"The refund date."},"invoiceCurrencyAmount":{"type":"number","description":"The positive refund amount in the invoice currency."},"companyCurrencyAmount":{"type":["number","null"],"description":"The positive refund amount in the company currency. Required when the invoice currency differs from the company currency, and omitted otherwise."}},"required":["companyBankId","invoiceCurrencyAmount","refundDate"]},"RegisterInvoiceRefundResponse":{"type":"object","properties":{"refundId":{"type":"integer","format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"voucherId":{"type":["integer","null"],"format":"int64"},"refundDate":{"type":"string","format":"date"},"invoiceCurrencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"invoiceCurrencyAmount":{"type":"number"},"companyCurrencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"companyCurrencyAmount":{"type":"number"},"companyBankId":{"type":"integer","format":"int32"}}},"RegisterInvoicePaymentRequest":{"type":"object","properties":{"companyBankId":{"type":"integer","format":"int32","description":"The company bank account that received the payment."},"paymentDate":{"type":"string","format":"date","description":"The payment date."},"receivedAmount":{"type":"number","description":"The amount received in the company's currency.\n\nThis is the actual amount deposited to the company bank account. For foreign-currency invoices, this is the amount received after currency conversion. When registerRestAsBankFee is true, send the net amount received after the bank fee.\n\nMust be positive, at most 99999999.99, and have at most 2 decimal places.","maximum":99999999.99,"minimum":0.01,"multipleOf":0.01},"paidInvoiceCurrencyAmount":{"type":["number","null"],"description":"The amount paid by the customer in the invoice currency.\n\nRequired when the invoice currency differs from the company's currency. For invoices already in the company's currency it may be omitted; if supplied it must equal receivedAmount.\n\nMust be positive, at most 99999999.99, and have at most 2 decimal places.","maximum":99999999.99,"minimum":0.01,"multipleOf":0.01},"registerRestAsBankFee":{"type":"boolean","description":"Whether the remaining unpaid invoice amount should be registered as a bank fee."}},"required":["companyBankId","paymentDate","receivedAmount"]},"RegisterInvoicePaymentResponse":{"type":"object","properties":{"paymentId":{"type":"integer","format":"int32"},"voucherId":{"type":["integer","null"],"format":"int64"}}},"ApplyCreditNoteRequest":{"type":"object","properties":{"creditNoteId":{"type":"integer","format":"int32","description":"The id of the manual credit note to apply to this invoice.","example":456}},"required":["creditNoteId"]},"SendInvoiceEmailReq":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1}},"required":["email"]},"InvoiceEhfDeliveryRes":{"type":"object","properties":{"historyId":{"type":["integer","null"],"format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"createdAt":{"type":["string","null"],"format":"date"},"overallSuccess":{"type":"boolean"},"sendingSuccess":{"type":"boolean"},"sendingResult":{"type":["string","null"]},"error":{"type":["string","null"]},"senderId":{"type":"string"},"receiverId":{"type":"string"},"as4MessageId":{"type":["string","null"]}}},"CreateCreditInvoiceReq":{"type":"object","properties":{"issueDate":{"type":"string","format":"date"},"comment":{"type":["string","null"]}},"required":["issueDate"]},"CreateBulkInvoiceReminderReq":{"type":"object","properties":{"invoiceIds":{"type":"array","description":"Customer invoice ids to send plain reminders for. At most 100 ids are accepted and duplicate ids are rejected. Each reminder uses the invoice customer email, the current reminder date, and no reminder fee or late-payment interest.","example":[123,124],"items":{"type":"integer","format":"int32"},"maxItems":100,"minItems":0}},"required":["invoiceIds"]},"BulkInvoiceReminderFailureRes":{"type":"object","properties":{"invoiceId":{"type":"integer","format":"int32"},"invoiceNumber":{"type":["string","null"]},"customerName":{"type":["string","null"]},"reason":{"type":"string","enum":["missing_email","invoice_not_found","invalid_invoice_state","send_failed"]}}},"BulkInvoiceReminderRes":{"type":"object","properties":{"sentCount":{"type":"integer","format":"int32"},"failedCount":{"type":"integer","format":"int32"},"failures":{"type":"array","items":{"$ref":"#/components/schemas/BulkInvoiceReminderFailureRes"}}}},"UploadedInvoiceReceptionDocumentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"receivedAt":{"type":["string","null"],"format":"date-time"},"attachmentId":{"type":"integer","format":"int32"},"attachmentFilename":{"type":"string"},"attachmentMimeType":{"type":"string"}}},"CreateSupplierInvoiceFromReceptionDocumentCostLineReq":{"type":"object","properties":{"account":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"projectId":{"type":["integer","null"],"format":"int32"},"amountInclVat":{"type":["number","null"]},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"description":{"type":["string","null"]}},"required":["account","amountInclVat"]},"CreateSupplierInvoiceFromReceptionDocumentReq":{"type":"object","properties":{"supplierId":{"type":["integer","null"],"format":"int32"},"invoiceNumber":{"type":["string","null"]},"invoiceDate":{"type":["string","null"],"format":"date"},"invoiceDueDate":{"type":["string","null"],"format":"date"},"invoiceCurrency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"paymentReference":{"type":["string","null"]},"targetCountry":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"swiftBic":{"type":["string","null"]},"costLines":{"type":"array","items":{"$ref":"#/components/schemas/CreateSupplierInvoiceFromReceptionDocumentCostLineReq"},"minItems":1}},"required":["costLines"]},"CreateSupplierInvoiceFromReceptionDocumentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"voucherId":{"type":["integer","null"],"format":"int64"},"documentId":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["created","already_created"]}}},"GeneralSubAccountCreateReq":{"type":"object","properties":{"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber","maxLength":10,"minLength":0},"name":{"type":"string","maxLength":150,"minLength":0}},"required":["accountNumber","name"]},"CreateExpenseAccommodationAllowanceReq":{"type":"object","properties":{"count":{"type":"integer","format":"int32","description":"Number of undocumented overnight stays in Norway."},"rateOverride":{"type":["number","null"],"description":"Optional tenant-currency rate that replaces the default accommodation rate."}}},"CreateExpenseCostReq":{"type":"object","properties":{"description":{"type":"string","description":"Description of the cost line.","maxLength":255,"minLength":0},"date":{"type":"string","format":"date","description":"Date the cost occurred.","example":"2026-04-15"},"amount":{"type":["number","null"],"description":"Amount in the tenant currency. Optional when currencyAmount is provided; foreign-currency amounts are converted by the server."},"currencyAmount":{"type":["number","null"],"description":"Original amount in the currency identified by currency."},"currency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"category":{"type":["string","null"],"description":"Expense category used for account mapping.","enum":["advertising","broadband","exchange_fee","flight","food_non_taxable","food_taxable","fuel_company_vehicles","fuel_rental_car","hotel","it_expense","meeting_course_training","newspapers_magazines_books","office_supplies","other_office_expense","parking","postage","public_transport","rental_car","representation_deductible","representation_non_deductible","road_toll","social","taxi","telephone","travel_non_taxable","vehicle_maintenance","work_clothes"]},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode","maxLength":10,"minLength":0}},"required":["date"]},"CreateExpenseMileageAllowanceReq":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Date of the journey.","example":"2026-04-15"},"purpose":{"type":"string","description":"Business purpose of the journey.","maxLength":255,"minLength":0},"companyCar":{"type":"boolean","description":"Whether the journey used a company car. Company-car rows have no payable allowance."},"kilometers":{"type":"number","description":"Distance driven in kilometres."},"kilometerRateOverride":{"type":["number","null"],"description":"Optional tenant-currency rate that replaces the default kilometre rate."}},"required":["date"]},"CreateExpensePerDiemReq":{"type":"object","properties":{"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode","maxLength":2,"minLength":2},"address":{"type":"string","description":"Free-form description of the location."},"dateFrom":{"type":"string","format":"date"},"dateTo":{"type":"string","format":"date"},"breakfastDeducted":{"type":"boolean","description":"Breakfast was provided and should be deducted from the per-diem amount."},"lunchDeducted":{"type":"boolean","description":"Lunch was provided and should be deducted from the per-diem amount."},"dinnerDeducted":{"type":"boolean","description":"Dinner was provided and should be deducted from the per-diem amount."},"amount":{"type":["number","null"],"description":"Optional amount in tenant currency. If omitted, the amount is calculated from the country rate, travel dates and meal deductions."}},"required":["countryCode","dateFrom","dateTo"]},"CreateExpenseReq":{"type":"object","properties":{"title":{"type":"string","description":"Expense title shown on the expense row.","minLength":1},"purpose":{"type":["string","null"],"description":"Free-form purpose / business reason for the expense."},"travel":{"type":"boolean","description":"Whether this is a travel expense."},"employeeId":{"type":["integer","null"],"format":"int32","description":"Employee the expense is attached to. Optional until the expense is delivered."},"projectId":{"type":["integer","null"],"format":"int32","description":"Project id the expense is booked against."},"costs":{"type":"array","description":"Receipted cost lines for a regular or travel expense.","items":{"$ref":"#/components/schemas/CreateExpenseCostReq"}},"perDiems":{"type":"array","description":"Per-diem compensation rows. Must be empty when travel is false.","items":{"$ref":"#/components/schemas/CreateExpensePerDiemReq"}},"accommodationAllowance":{"oneOf":[{"$ref":"#/components/schemas/CreateExpenseAccommodationAllowanceReq"},{"type":"null"}]},"mileageAllowances":{"type":"array","description":"Mileage allowance rows. Must be empty when travel is false.","items":{"$ref":"#/components/schemas/CreateExpenseMileageAllowanceReq"}}},"required":["title","travel"]},"ExpenseAccommodationAllowanceRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"count":{"type":"integer","format":"int32"},"rate":{"type":"number"},"amount":{"type":"number"}}},"ExpenseCostRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"rowNumber":{"type":"integer","format":"int32"},"description":{"type":["string","null"]},"date":{"type":"string","format":"date"},"amount":{"type":"number","description":"Amount in the tenant currency."},"currencyAmount":{"type":["number","null"],"description":"Original amount in currency."},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"category":{"type":["string","null"],"enum":["advertising","broadband","exchange_fee","flight","food_non_taxable","food_taxable","fuel_company_vehicles","fuel_rental_car","hotel","it_expense","meeting_course_training","newspapers_magazines_books","office_supplies","other_office_expense","parking","postage","public_transport","rental_car","representation_deductible","representation_non_deductible","road_toll","social","taxi","telephone","travel_non_taxable","vehicle_maintenance","work_clothes"]},"vatCode":{"type":"string","$ref":"#/components/schemas/VatCode"},"paymentType":{"type":"string","enum":["privat_utlegg"]}}},"ExpenseDetailRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"integer","format":"int32"},"title":{"type":"string"},"purpose":{"type":["string","null"]},"employeeId":{"type":["integer","null"],"format":"int32"},"employeeName":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"status":{"type":"string","enum":["open","for_approval","approved"]},"travel":{"type":"boolean"},"includedInPayslip":{"type":"boolean"},"totalAmount":{"type":"number"},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherNumber":{"type":["string","null"]},"voucherDate":{"type":["string","null"],"format":"date"},"costs":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseCostRes"}},"perDiems":{"type":"array","items":{"$ref":"#/components/schemas/ExpensePerDiemRes"}},"accommodationAllowance":{"oneOf":[{"$ref":"#/components/schemas/ExpenseAccommodationAllowanceRes"},{"type":"null"}]},"mileageAllowances":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseMileageAllowanceRes"}}}},"ExpenseMileageAllowanceRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"date":{"type":"string","format":"date"},"purpose":{"type":"string"},"companyCar":{"type":"boolean"},"kilometers":{"type":"number"},"kilometerRate":{"type":"number"},"amount":{"type":"number"}}},"ExpensePerDiemRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode"},"address":{"type":"string"},"dateFrom":{"type":"string","format":"date"},"dateTo":{"type":"string","format":"date"},"breakfastDeducted":{"type":"boolean"},"lunchDeducted":{"type":"boolean"},"dinnerDeducted":{"type":"boolean"},"amount":{"type":"number"}}},"CreateEmployeeReq":{"type":"object","properties":{"name":{"type":"string","maxLength":75,"minLength":0},"phone":{"type":["string","null"],"maxLength":30,"minLength":0},"email":{"type":"string","format":"email","minLength":1},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]},"dateOfEmployment":{"type":"string","format":"date"},"nationalIdentityNumber":{"type":["string","null"]},"accountNumber":{"type":["string","null"]},"bankCountryCode":{"type":"string","$ref":"#/components/schemas/CountryCode","maxLength":2,"minLength":2},"enterpriseOrganizationNumber":{"type":["string","null"]},"departmentId":{"type":["integer","null"],"format":"int32"},"employmentLines":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEmploymentLineReq"}}},"required":["email","name"]},"EmployeeEmploymentLineReq":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"fromDate":{"type":"string","format":"date"},"municipality":{"type":["string","null"]},"remunerationType":{"type":["string","null"],"enum":["FIXED_SALARY","HOURLY_WAGE","COMMISSION","BONUS","OTHER"]},"occupationCode":{"type":["string","null"]},"percentage":{"type":["number","null"]},"annualSalary":{"type":["number","null"]},"hourlyWage":{"type":["number","null"]}},"required":["fromDate"]},"EmployeeAddressRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode"},"province":{"type":["string","null"]},"city":{"type":"string"},"postalCode":{"type":["string","null"]},"addressPart1":{"type":"string"},"addressPart2":{"type":["string","null"]}}},"EmployeeBankAccountRes":{"type":"object","properties":{"employeeBankAccountId":{"type":["integer","null"],"format":"int32"},"countryCode":{"type":"string","$ref":"#/components/schemas/CountryCode"},"bankCode":{"type":"string"},"accountNumber":{"type":"string"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"iban":{"type":"string"}}},"EmployeeEmploymentLineRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"fromDate":{"type":"string","format":"date"},"municipality":{"type":["string","null"]},"employmentType":{"type":["string","null"],"enum":["ORDINARY"]},"remunerationType":{"type":["string","null"],"enum":["FIXED_SALARY","HOURLY_WAGE","COMMISSION","BONUS","OTHER"]},"occupationCode":{"type":["string","null"]},"percentage":{"type":["number","null"]},"annualSalary":{"type":["number","null"]},"hourlyWage":{"type":["number","null"]}}},"EmployeeEmploymentRelationRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"startDate":{"type":"string","format":"date"},"endDate":{"type":["string","null"],"format":"date"},"employmentLines":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEmploymentLineRes"}}}},"EmployeeRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"tenantId":{"type":["integer","null"],"format":"int32"},"personId":{"type":["integer","null"],"format":"int32"},"departmentId":{"type":["integer","null"],"format":"int32"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"nationalIdentityNumber":{"type":["string","null"]},"dateOfEmployment":{"type":["string","null"],"format":"date"},"endDateOfEmployment":{"type":["string","null"],"format":"date"},"previousSystemYtdSalary":{"type":["number","null"]},"address":{"oneOf":[{"$ref":"#/components/schemas/EmployeeAddressRes"},{"type":"null"}]},"bankAccount":{"oneOf":[{"$ref":"#/components/schemas/EmployeeBankAccountRes"},{"type":"null"}]},"employmentRelations":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeEmploymentRelationRes"}}}},"DocumentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"attachmentId":{"type":"integer","format":"int32"},"filename":{"type":"string"},"createdAt":{"type":["string","null"]},"signed":{"type":"boolean"},"signerEmail":{"type":["string","null"]},"signRequestedAt":{"type":["string","null"]},"signedAt":{"type":["string","null"]},"archived":{"type":"boolean"},"agreementId":{"type":["integer","null"],"format":"int32"}}},"CreateCustomerReq":{"type":"object","properties":{"name":{"type":"string","maxLength":75,"minLength":0},"organizationNumber":{"type":["string","null"],"description":"Organization number. Required and validated as a Norwegian organization number when privateContact is false and countryCode is NO or omitted.","example":"999999999","maxLength":36,"minLength":0},"privateContact":{"type":"boolean","default":false,"description":"Set to true to create a private customer. The default false creates a company customer."},"email":{"type":["string","null"],"format":"email"},"nationalIdentityNumber":{"type":["string","null"],"description":"Norwegian national identity number for private customers. Must be 11 digits when provided and is used as the highest-confidence eFaktura B2C lookup key.","example":"01010112345","maxLength":11,"minLength":11,"pattern":"\\d{11}"},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]},"skipRegistryLookup":{"type":"boolean"}},"required":["name"]},"BankReconciliationMonthReq":{"type":"object","properties":{"month":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}$"}},"required":["month"]},"BankReconciliationMatchedGroupRes":{"type":"object","properties":{"reconciliationGroupId":{"type":["integer","null"],"format":"int32"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/BankReconciliationTransactionRes"}},"postings":{"type":"array","items":{"$ref":"#/components/schemas/BankReconciliationPostingRes"}}}},"BankReconciliationOverviewRes":{"allOf":[{"$ref":"#/components/schemas/BankReconciliationOverviewResponse"},{"type":"object","properties":{"bankAccountId":{"type":"integer","format":"int32"},"bankAccountName":{"type":"string"},"bankCurrency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"tenantCurrency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"month":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"providerBalance":{"type":["number","null"]},"closed":{"type":["boolean","null"],"description":"Whether the monthly reconciliation is closed and the bank subledger is locked for the month."},"reconciliationLocked":{"type":["boolean","null"]},"canClose":{"type":["boolean","null"]},"canReopen":{"type":["boolean","null"]},"bankInTenantCurrency":{"type":["boolean","null"]},"bankLedgerOpeningBalance":{"type":["number","null"]},"bankLedgerClosingBalance":{"type":["number","null"]},"actualBankMonthStartBalance":{"type":["number","null"]},"actualBankDisplayedBalance":{"type":["number","null"]},"actualBankCurrentMonth":{"type":["boolean","null"]},"pendingTransactionsTotal":{"type":["number","null"]},"pendingPostingsTotal":{"type":["number","null"]},"pendingDiscrepancy":{"type":["number","null"]},"matchedTransactionsTotal":{"type":["number","null"]},"matchedPostingsTotal":{"type":["number","null"]},"matchedDiscrepancy":{"type":["number","null"]},"pendingTransactionCount":{"type":["integer","null"],"format":"int32"},"pendingPostingCount":{"type":["integer","null"],"format":"int32"},"matchedTransactionCount":{"type":["integer","null"],"format":"int32"},"matchedPostingCount":{"type":["integer","null"],"format":"int32"},"pendingTransactions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BankReconciliationTransactionRes"}},"pendingPostings":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BankReconciliationPostingRes"}},"matchedGroups":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BankReconciliationMatchedGroupRes"}}}}]},"BankReconciliationPostingRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherNumber":{"type":["string","null"]},"voucherDate":{"type":["string","null"],"format":"date"},"postingDate":{"type":"string","format":"date"},"description":{"type":["string","null"]},"amount":{"type":"number"},"currencyAmount":{"type":"number"}}},"BankReconciliationTransactionRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"amount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"transactionDate":{"type":"string","format":"date"},"description":{"type":["string","null"]},"paymentReference":{"type":["string","null"]},"voucherId":{"type":["integer","null"],"format":"int64"},"status":{"type":"string","enum":["pending","matched"]}}},"BankReconciliationMatchReq":{"type":"object","properties":{"transactionIds":{"type":"array","items":{"type":"integer","format":"int32"},"minItems":1},"postingIds":{"type":"array","items":{"type":"integer","format":"int64"},"minItems":1},"discrepancyAccount":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]}},"required":["postingIds","transactionIds"]},"BankReconciliationMatchRes":{"type":"object","properties":{"bankAccountId":{"type":"integer","format":"int32"},"success":{"type":"boolean"},"status":{"type":"string","enum":["matched","already_matched","not_matched"]},"requiresDiscrepancyAccount":{"type":"boolean"},"discrepancy":{"type":"number"},"transactionSum":{"type":"number"},"postingSum":{"type":"number"},"reconciledTransactionIds":{"type":"array","items":{"type":"integer","format":"int32"}},"reconciledPostingIds":{"type":"array","items":{"type":"integer","format":"int64"}},"voucherIds":{"type":"array","items":{"type":"integer","format":"int64"}},"errors":{"type":"array","items":{"type":"string"}}}},"BankReconciliationUnmatchGroupRes":{"type":"object","properties":{"bankAccountId":{"type":"integer","format":"int32"},"reconciliationGroupId":{"type":"integer","format":"int32"},"unmatchedTransactionIds":{"type":"array","items":{"type":"integer","format":"int32"}}}},"BankReconciliationApplyRulesReq":{"type":"object","properties":{"month":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}$"},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"}}},"BankReconciliationApplyRulesRes":{"type":"object","properties":{"bankAccountId":{"type":"integer","format":"int32"},"month":{"type":["string","null"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["started","already_running"]}}},"AssetReq":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"accountNumber":{"type":"string","maxLength":30,"minLength":0,"pattern":"1\\d*"},"description":{"type":["string","null"]},"currencyCode":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"acquisitionDate":{"type":["string","null"],"format":"date"},"acquisitionCost":{"type":["number","null"]},"usefulLifeInMonths":{"type":"integer","format":"int32"},"depreciationMethod":{"type":"string","enum":["manual","linear"]}},"required":["accountNumber","name"]},"AgreementSignRequestReq":{"type":"object","properties":{"signerEmail":{"type":["string","null"]},"message":{"type":["string","null"]}}},"AgreementSignRequestRes":{"type":"object","properties":{"agreementId":{"type":"integer","format":"int32"},"documentId":{"type":"integer","format":"int32"},"signRequestId":{"type":"integer","format":"int32"},"signerEmail":{"type":"string"},"requesterEmail":{"type":"string"},"requestedAt":{"type":"string","format":"date-time"},"documentName":{"type":"string"},"messageSent":{"type":"boolean"}}},"AdminCreateTenantsReq":{"type":"object","properties":{"ownerEmail":{"type":"string","format":"email","description":"Email of the tenant owner. If the user does not exist a new account is created.","example":"owner@example.com","minLength":1},"ownerName":{"type":["string","null"],"description":"Full name of the owner. Optional.","example":"Ola Nordmann"},"ownerPhone":{"type":["string","null"],"description":"Phone number of the owner in E.164 format. Optional.","example":"+4794123456"},"organizationNumbers":{"type":"array","description":"Norwegian organization numbers to create tenants for. One tenant is created per number. Non-digits are stripped and duplicates ignored.","example":["999999999"],"items":{"type":"string"},"maxItems":50,"minItems":0},"grantAiakAccess":{"type":"boolean","default":true,"description":"Grant the Aiak accounting office access to the created tenants."},"sendWelcomeEmail":{"type":"boolean","default":true,"description":"Send the welcome email to the owner. New owners get login details, existing owners are told the companies were added."},"registerZtl":{"type":"boolean","default":false,"description":"Start ZTL bank onboarding in the background. The owner still signs with BankID."}},"required":["organizationNumbers","ownerEmail"]},"AdminCreateTenantResultRes":{"type":"object","properties":{"organizationNumber":{"type":"string"},"status":{"type":"string","description":"Outcome for this organization number.","enum":["created","duplicate","failed"],"example":"created"},"tenantId":{"type":["integer","null"],"format":"int32","description":"Id of the created tenant. Null unless status is created."},"companyName":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerCreated":{"type":"boolean","description":"True when a new owner account was created for this request."},"ownerInitialPassword":{"type":["string","null"],"description":"Temporary password for a newly created owner account. Only present when ownerCreated is true. Relay it to the owner securely."},"ztlRegistrationStarted":{"type":"boolean"},"message":{"type":["string","null"],"description":"Error detail when status is failed."}}},"AdminCreateTenantsRes":{"type":"object","properties":{"results":{"type":"array","description":"One result per requested organization number, in request order.","items":{"$ref":"#/components/schemas/AdminCreateTenantResultRes"}}}},"CreateReviewNoteReq":{"type":"object","properties":{"note":{"type":"string","minLength":1},"category":{"type":"string","enum":["general","annual_control","deviation","follow_up"]}},"required":["note"]},"UpdateSupplierReq":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Supplier name to set. Omit or null to leave unchanged.","maxLength":75,"minLength":0,"pattern":".*\\S.*"},"email":{"type":["string","null"],"format":"email","description":"Supplier email to set. Omit or null to leave unchanged."},"phone":{"type":["string","null"],"description":"Supplier phone number to set. Omit or null to leave unchanged."},"iban":{"type":["string","null"],"description":"IBAN to set. Omit or null to leave unchanged."},"bankAccountNumber":{"type":["string","null"],"description":"Norwegian bank account number to set. Omit or null to leave unchanged."},"swiftCode":{"type":["string","null"],"description":"SWIFT/BIC code to set. Omit or null to leave unchanged."}}},"UpdateSupplierInvoiceAddressReq":{"type":"object","properties":{"streetAddress":{"type":["string","null"],"description":"Street address."},"city":{"type":["string","null"],"description":"City."},"state":{"type":["string","null"],"description":"State or region."},"postcode":{"type":["string","null"],"description":"Postal code."},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]}}},"UpdateSupplierInvoiceCostLineReq":{"type":"object","properties":{"debitAccount":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"creditAccount":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"amount":{"type":["number","null"],"description":"The cost line amount.","minimum":0.01},"description":{"type":["string","null"],"description":"The cost line description."},"debitVatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"creditVatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"projectId":{"type":["integer","null"],"format":"int32","description":"The project id."},"departmentId":{"type":["integer","null"],"format":"int32","description":"The department id."},"rowNumber":{"type":["integer","null"],"format":"int32","description":"The row number for the cost line. If omitted, the API assigns the request order."},"accrualEnabled":{"type":"boolean","description":"Whether accrual accounting is enabled for this cost line."},"accrualPeriod":{"type":["string","null"],"description":"The accrual period in yyyy-MM format."},"accrualPeriodCount":{"type":["integer","null"],"format":"int32","description":"The number of accrual periods."},"accrualAccountNumber":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]}}},"UpdateSupplierInvoicePaymentDetailsReq":{"type":"object","properties":{"beneficiaryName":{"type":["string","null"],"description":"The payment beneficiary name."},"accountNumber":{"type":["string","null"],"description":"The beneficiary account number."},"iban":{"type":["string","null"],"description":"The beneficiary IBAN."},"swiftBic":{"type":["string","null"],"description":"The beneficiary bank SWIFT/BIC."},"bankName":{"type":["string","null"],"description":"The beneficiary bank name."},"bankCountryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"routingNumber":{"type":["string","null"],"description":"The bank routing number."},"routingType":{"type":["string","null"],"description":"The bank routing type."},"bankAccountCategory":{"type":["string","null"],"description":"The bank account category."},"localClearingSystem":{"type":["string","null"],"description":"The local clearing system."},"reference":{"type":["string","null"],"description":"The payment reference."},"reason":{"type":["string","null"],"description":"The payment reason."},"beneficiaryAddress":{"oneOf":[{"$ref":"#/components/schemas/UpdateSupplierInvoiceAddressReq"},{"type":"null"}]},"bankAddress":{"oneOf":[{"$ref":"#/components/schemas/UpdateSupplierInvoiceAddressReq"},{"type":"null"}]}}},"UpdateSupplierInvoiceReq":{"type":"object","properties":{"number":{"type":["string","null"],"description":"The supplier invoice number. Omit to preserve the existing number."},"date":{"type":["string","null"],"format":"date","description":"The supplier invoice date. Omit to preserve the existing date."},"dueDate":{"type":["string","null"],"format":"date","description":"The supplier invoice due date. Omit to preserve the existing due date."},"disputed":{"type":["boolean","null"],"description":"Whether the supplier invoice is disputed. true marks it as disputed, false clears the dispute, and omitted preserves the current dispute state."},"paymentDetails":{"oneOf":[{"$ref":"#/components/schemas/UpdateSupplierInvoicePaymentDetailsReq"},{"type":"null"}]},"costLines":{"type":["array","null"],"description":"Cost lines for the registered supplier invoice.\n\nUse these to update invoice amounts, descriptions, VAT codes, and related cost posting data.\n\nIf omitted, the persisted cost lines are reused. If supplied, the list replaces the editable cost lines.","items":{"$ref":"#/components/schemas/UpdateSupplierInvoiceCostLineReq"}}}},"PatchLeadReq":{"type":"object","properties":{"status":{"type":["string","null"],"description":"Lead status to set. Omit or null to leave unchanged. `converted` is not allowed here - call POST /leads/{id}/convert instead. To clear an existing status use PUT /status with explicit null.","enum":["active","disqualified"],"example":"disqualified"},"notes":{"type":["string","null"],"description":"Free-text notes to set. Omit or null to leave unchanged. To clear an existing note use PUT /notes with empty/null.","maxLength":20000,"minLength":0},"email":{"type":["string","null"],"description":"Lead email to set. Omit or null to leave unchanged.","maxLength":320,"minLength":0},"phone":{"type":["string","null"],"description":"Lead phone to set. Omit or null to leave unchanged.","maxLength":64,"minLength":0},"followUpAt":{"type":["string","null"],"format":"date","description":"Follow-up date to set. Omit or null to leave unchanged. To clear use PUT /follow-up with null.","example":"2026-05-22"}}},"PatchEmployeeReq":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":75,"minLength":0,"pattern":".*\\S.*"},"phone":{"type":["string","null"],"maxLength":30,"minLength":0},"email":{"type":["string","null"],"format":"email"},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"province":{"type":["string","null"]},"addressPart1":{"type":["string","null"]},"addressPart2":{"type":["string","null"]},"nationalIdentityNumber":{"type":["string","null"]},"dateOfEmployment":{"type":["string","null"],"format":"date"},"endDateOfEmployment":{"type":["string","null"],"format":"date","description":"Set to null to clear the employment end date."},"enterpriseOrganizationNumber":{"type":["string","null"],"description":"Set to null to clear the enterprise organization number."},"accountNumber":{"type":["string","null"]},"bankCountryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"employmentLines":{"type":["array","null"],"items":{"$ref":"#/components/schemas/EmployeeEmploymentLineReq"}},"departmentId":{"type":["integer","null"],"format":"int32","description":"Set to null to detach the employee from their department."},"previousSystemYtdSalary":{"type":["number","null"],"description":"Set to null to clear the previous system year-to-date salary."},"previousSystemHolidayPayBasis":{"type":["number","null"],"description":"Set to null to clear the previous system holiday pay basis."}}},"UpdateDocumentReq":{"type":"object","properties":{"filename":{"type":"string","minLength":1}},"required":["filename"]},"UpdateCustomerReq":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Customer name to set. Omit or null to leave unchanged.","maxLength":75,"minLength":0,"pattern":".*\\S.*"},"email":{"type":["string","null"],"format":"email","description":"Customer email to set. Omit or null to leave unchanged."},"invoiceEmail":{"type":["string","null"],"format":"email","description":"Invoice email to set. Omit or null to leave unchanged."},"invoiceInEnglish":{"type":["boolean","null"],"description":"Invoice language flag to set. Omit or null to leave unchanged."},"daysUntilDue":{"type":["integer","null"],"format":"int32","description":"Invoice due date offset to set. Omit or null to leave unchanged."},"phone":{"type":["string","null"],"description":"Customer phone number to set. Omit or null to leave unchanged."},"nationalIdentityNumber":{"type":["string","null"],"description":"Norwegian national identity number to set for private customers. Must be 11 digits when provided. Omit or null to leave unchanged.","maxLength":11,"minLength":11,"pattern":"\\d{11}"},"iban":{"type":["string","null"],"description":"IBAN to set. Omit or null to leave unchanged."},"bankAccountNumber":{"type":["string","null"],"description":"Norwegian bank account number to set. Omit or null to leave unchanged."},"swiftCode":{"type":["string","null"],"description":"SWIFT/BIC code to set. Omit or null to leave unchanged."}}},"VatCodeComboItem":{"type":"object","properties":{"code":{"type":"string"},"rate":{"type":"number"},"title":{"type":"string"},"displayText":{"type":"string"},"shortDisplayText":{"type":"string"},"subtitle":{"type":"string"}}},"UserTenantDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"tenantId":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int32"},"email":{"type":"string"},"fullName":{"type":"string"},"authorities":{"type":"string"}}},"SupplierDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"name":{"type":"string"},"type":{"type":"string"}}},"Address":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"countryIsoCode":{"type":"string","maxLength":2,"minLength":0},"province":{"type":["string","null"],"maxLength":50,"minLength":0},"city":{"type":"string","maxLength":40,"minLength":0},"postalCode":{"type":["string","null"],"maxLength":20,"minLength":0},"addressPart1":{"type":"string","maxLength":255,"minLength":0},"addressPart2":{"type":["string","null"],"maxLength":75,"minLength":0}}},"Company":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"organizationNumber":{"type":["string","null"],"maxLength":36,"minLength":0},"name":{"type":"string","maxLength":255,"minLength":0},"countryCode":{"type":"string","enum":["AF","AL","DZ","AO","AR","AM","AU","AT","AZ","BS","BH","BD","BY","BE","BJ","BT","BO","BA","BW","BR","BN","BG","BF","BI","KH","CM","CA","CF","TD","CL","CN","CO","CG","CD","CR","CI","HR","CU","CY","CZ","DK","DJ","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FO","FJ","FI","FR","GF","GA","GM","GE","DE","GH","GR","GL","GT","GN","GW","HT","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MG","MW","MY","MV","ML","MT","MX","MD","MC","MN","ME","MA","MZ","MM","NA","NP","NL","NZ","NI","NE","NG","MK","NO","OM","PK","PA","PG","PY","PE","PH","PL","PT","QA","RO","RU","RW","SA","SN","RS","SL","SG","SK","SI","SO","ZA","KR","SS","ES","LK","SD","SR","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TN","TR","TM","UG","UA","AE","GB","US","UY","UZ","VE","VN","YE","ZM","ZW"]},"foundedDate":{"type":["string","null"],"format":"date"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"addressId":{"type":["integer","null"],"format":"int32"},"address":{"oneOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"companyType":{"type":["string","null"],"enum":["AS","ENK","FLI","STI","NUF","ANS","SA","DA","APS","UTLA","ASA","BA","BBL","BO","BRL","EOFG","FKF","FYLK","GFS","IKJP","SPA","KOMM","IKS","KBO","KF","KIRK","KS","KTRF","ADOS","ANNA","ESEK","ORGL","OPMV","PERS","PK","PRE","SAM","SE","SF","STAT","TVAM","VPFO","SÆR"]},"municipalityCode":{"type":["string","null"],"maxLength":4,"minLength":0},"createdFromBrreg":{"type":"boolean"},"currencyCode":{"type":["string","null"],"enum":["AFN","ALL","DZD","AOA","ARS","AMD","AUD","EUR","AZN","BSD","BHD","BDT","BYN","XOF","BTN","BOB","BAM","BWP","BRL","BND","BGN","BIF","KHR","XAF","CAD","CLP","CNY","COP","CDF","CRC","CUP","CZK","DKK","DJF","DOP","USD","EGP","ERN","SZL","ETB","FJD","GMD","GEL","GHS","GTQ","GNF","HTG","HNL","HKD","HUF","ISK","INR","IDR","IRR","IQD","ILS","JMD","JPY","JOD","KZT","KES","KWD","KGS","LAK","LBP","LSL","LRD","LYD","CHF","MGA","MWK","MYR","MVR","MXN","MDL","MNT","MAD","MZN","MMK","NAD","NPR","NZD","NIO","NGN","MKD","NOK","OMR","PKR","PAB","PGK","PYG","PEN","PHP","PLN","QAR","RON","RUB","RWF","SAR","RSD","SLL","SGD","SOS","ZAR","KRW","SSP","LKR","SDG","SRD","SEK","SYP","TWD","TJS","TZS","THB","TND","TRY","TMT","UGX","UAH","AED","GBP","UYU","UZS","VES","VND","YER","ZMW","ZWL"]},"companyNameEditable":{"type":"boolean"},"canSyncWithBrreg":{"type":"boolean"}}},"Project":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"tenantId":{"type":["integer","null"],"format":"int32"},"tenant":{"oneOf":[{"$ref":"#/components/schemas/Tenant"},{"type":"null"}]},"name":{"type":"string"},"responsibleEmployeeId":{"type":["integer","null"],"format":"int32"},"parentId":{"type":["integer","null"],"format":"int32"},"archived":{"type":"boolean"}}},"Tenant":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"slug":{"type":"string"},"companyId":{"type":"integer","format":"int32"},"company":{"$ref":"#/components/schemas/Company"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"vatRegistrationDate":{"type":["string","null"],"format":"date"},"hasSaleOfProductsWith15PercentVat":{"type":"boolean"},"hasPurchaseOfProductsWith15PercentVat":{"type":"boolean"},"hasSaleOfProductsWith12PercentVat":{"type":"boolean"},"hasZeroRateOutputVat":{"type":"boolean"},"hasOutsideScopeOutputVat":{"type":"boolean"},"shopifyEnabled":{"type":"boolean"},"drivingLogEnabled":{"type":"boolean"},"crmLeadsEnabled":{"type":"boolean"},"projectEnabled":{"type":"boolean"},"incomeReceptionEnabled":{"type":"boolean"},"customsDeclarationAltinnAutoSyncEnabled":{"type":"boolean"},"onboardingFinished":{"type":"boolean"},"ztlPsuIp":{"type":["string","null"]},"soleProprietorshipOwnerPersonIdentifier":{"type":["string","null"]},"companyName":{"type":"string"},"vatRegistered":{"type":"boolean"},"companyTypeCode":{"type":"string","enum":["AS","ENK","FLI","STI","NUF","ANS","SA","DA","APS","UTLA","ASA","BA","BBL","BO","BRL","EOFG","FKF","FYLK","GFS","IKJP","SPA","KOMM","IKS","KBO","KF","KIRK","KS","KTRF","ADOS","ANNA","ESEK","ORGL","OPMV","PERS","PK","PRE","SAM","SE","SF","STAT","TVAM","VPFO","SÆR"]},"companyMunicipalityCode":{"type":["string","null"]},"auditorCompany":{"type":"boolean"},"companyType":{"type":"string","enum":["AS","ENK","FLI","STI","NUF","ANS","SA","DA","APS","UTLA","ASA","BA","BBL","BO","BRL","EOFG","FKF","FYLK","GFS","IKJP","SPA","KOMM","IKS","KBO","KF","KIRK","KS","KTRF","ADOS","ANNA","ESEK","ORGL","OPMV","PERS","PK","PRE","SAM","SE","SF","STAT","TVAM","VPFO","SÆR"]},"subscriptionExempt":{"type":"boolean"},"companyCountryCode":{"type":"string"},"accountantCompany":{"type":"boolean"},"companyOrganizationNumber":{"type":"string"},"companyFli":{"type":"boolean"},"companyStockCompany":{"type":"boolean"}}},"ProductSearchItem":{"type":"object","properties":{"title":{"type":"string"},"costPrice":{"type":"number"},"sellingPrice":{"type":"number"},"displayText":{"type":"string"},"variantId":{"type":["integer","null"],"format":"int32"},"vatCode":{"type":["string","null"]},"vatRate":{"type":["number","null"]},"vatTitle":{"type":["string","null"]},"archived":{"type":"boolean"}}},"CompanyBasicInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"registrationNumber":{"type":["string","null"]},"address":{"type":["string","null"]},"companyTypeCode":{"type":["string","null"]},"companyTypeDescription":{"type":["string","null"]}}},"CrmSavedLeadFilterOptionDto":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}}},"IndustryOptionDto":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}}},"CityOptionDto":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}}},"AccountantOfficeOptionDto":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"}}},"CreditNoteAssignmentInvoiceSearchItem":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"title":{"type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"meta":{"type":"string"},"displayText":{"type":"string"},"href":{"type":"string"}}},"Department":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"tenantId":{"type":["integer","null"],"format":"int32"},"tenant":{"oneOf":[{"$ref":"#/components/schemas/Tenant"},{"type":"null"}]},"name":{"type":"string"},"archived":{"type":"boolean"}}},"Debtor":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"tenantId":{"type":["integer","null"],"format":"int32"},"tenant":{"$ref":"#/components/schemas/Tenant"},"name":{"type":"string"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CustomerDto":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"name":{"type":"string"},"type":{"type":"string"}}},"Currency":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"Creditor":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"tenantId":{"type":["integer","null"],"format":"int32"},"tenant":{"$ref":"#/components/schemas/Tenant"},"name":{"type":"string"},"bankAccountNumber":{"type":["string","null"]},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CompanyBankSearchOption":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"displayText":{"type":"string"}}},"AssignableUser":{"type":"object","properties":{"userId":{"type":"integer","format":"int32"},"fullName":{"type":"string"}}},"BankSearchItem":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"subtitle":{"type":"string"}}},"AssetSearchItem":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"accountNumber":{"type":"string"}}},"WarehouseInventoryRes":{"type":"object","properties":{"warehouseId":{"type":["integer","null"],"format":"int32"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseInventoryRowRes"}},"totalStockValue":{"type":"number"},"totalRetailValue":{"type":"number"}}},"WarehouseInventoryRowRes":{"type":"object","properties":{"warehouseId":{"type":["integer","null"],"format":"int32"},"productId":{"type":"integer","format":"int32"},"productTitle":{"type":"string"},"variantId":{"type":["integer","null"],"format":"int32"},"sku":{"type":"string"},"quantityOnHand":{"type":"integer","format":"int64"},"stockUnitCost":{"type":"number"},"retailUnitPrice":{"type":"number"},"stockValue":{"type":"number"},"retailValue":{"type":"number"},"variantOptionValues":{"type":"array","items":{"type":"string"}}}},"VoucherOverviewPostingRes":{"type":"object","properties":{"date":{"type":"string","format":"date"},"description":{"type":["string","null"]},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"accountName":{"type":"string"},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"amount":{"type":"number"},"supplierName":{"type":["string","null"]},"invoiceNumber":{"type":["string","null"]}}},"VoucherOverviewRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"number":{"type":"string"},"date":{"type":"string","format":"date"},"description":{"type":["string","null"]},"postings":{"type":"array","items":{"$ref":"#/components/schemas/VoucherOverviewPostingRes"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentRes"}}}},"VatCodeRes":{"type":"object","properties":{"code":{"type":"string","$ref":"#/components/schemas/VatCode"},"rate":{"type":"number"},"description":{"type":"string"},"vatType":{"type":"string","enum":["exempt","input_vat","output_vat","outside_scope","reverse_charge"]},"vatCategory":{"type":"string","enum":["exempt","standard","medium","low"]}}},"UserRoleDiscoveryRes":{"type":"object","properties":{"code":{"type":"string","$ref":"#/components/schemas/TenantRoleCode"},"title":{"type":"string"},"description":{"type":"string"},"assignable":{"type":"boolean"},"effectivePermissionCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/EffectiveTenantPermissionCode"}}}},"UserPermissionDiscoveryRes":{"type":"object","properties":{"code":{"type":"string","$ref":"#/components/schemas/AssignableTenantPermissionCode"},"groupName":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"effectivePermissionCodes":{"type":"array","items":{"type":"string","$ref":"#/components/schemas/EffectiveTenantPermissionCode"}}}},"TimesheetEntryRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"projectId":{"type":["integer","null"],"format":"int32"},"employeeId":{"type":"integer","format":"int32"},"tenantId":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"hours":{"type":"number"},"comment":{"type":["string","null"]},"dayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"rowNumber":{"type":"integer","format":"int32"},"displayHours":{"type":"string"}}},"TaxReturnAccountsReceivableAmountsRes":{"type":"object","properties":{"receivablesAndUnbilled":{"type":"number"},"actualLoss":{"type":"number"},"writeDown":{"type":"number"},"writeDownNewCompany":{"type":"number"},"taxValue":{"type":"number","description":"Tax value of receivables (skattemessig verdi)."},"accountingValue":{"type":"number","description":"Accounting value of receivables (regnskapsmessig verdi)."}}},"TaxReturnAccountsReceivableRes":{"type":"object","properties":{"current":{"$ref":"#/components/schemas/TaxReturnAccountsReceivableAmountsRes"},"previous":{"$ref":"#/components/schemas/TaxReturnAccountsReceivableAmountsRes"}}},"TaxReturnAppropriationsRes":{"type":"object","properties":{"unrestrictedEquityOpening":{"type":"number","description":"Unrestricted equity at the start of the year (fri egenkapital)."},"unrestrictedEquityClosing":{"type":"number","description":"Unrestricted equity at the end of the year."},"dividendForYear":{"type":"number","description":"Dividend allocated for the year."},"finalResult":{"type":"number","description":"Result remaining after dividend (profit − dividend)."}}},"TaxReturnAttachmentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"filename":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"TaxReturnBalanceEntryRes":{"type":"object","properties":{"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"accountName":{"type":"string"},"amount":{"type":"number"}}},"TaxReturnBalanceEntrySectionRes":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/TaxReturnBalanceEntryRes"}},"total":{"type":"number"}}},"TaxReturnBalanceSummaryRes":{"type":"object","properties":{"assets":{"type":"number"},"equity":{"type":"number"},"liabilities":{"type":"number"},"equityLiabilitiesTotal":{"type":"number","description":"Equity + liabilities; should equal total assets when the balance sheet balances."}}},"TaxReturnCapitalSummaryRes":{"type":"object","properties":{"tangibleFixedAssets":{"type":"number","description":"Tax value of tangible fixed assets (balance groups A/C/D)."},"inventories":{"type":"number"},"accountsReceivable":{"type":"number"},"securities":{"type":"number"},"properties":{"type":"number"},"outstandingClaims":{"type":"number"},"vatRefund":{"type":"number"},"bankDeposits":{"type":"number"},"cash":{"type":"number"},"otherAssets":{"type":"number"},"otherAdjustments":{"type":"number"},"totalGrossWealth":{"type":"number","description":"Total gross wealth (samlet bruttoformue)."}}},"TaxReturnDeferredTaxRes":{"type":"object","properties":{"taxIncreasingDifferencesFromTemporaryDifferences":{"type":"number"},"taxReducingDifferencesFromTemporaryDifferences":{"type":"number"},"lossCarryforwardFromTaxReturn":{"type":"number"},"totalBasisForDeferredTaxAssets":{"type":"number"},"deferredTaxAssetsInAccountsAtStart":{"type":"number"},"estimatedDeferredTaxAssetsAtYearEnd":{"type":"number","description":"Estimated deferred tax asset at year end (utsatt skattefordel)."},"deferredTaxAssetsIncrease":{"type":"number"}}},"TaxReturnDividendRes":{"type":"object","properties":{"dividendForYear":{"type":"number"},"provisionForDividend":{"type":"number"},"additionalDividend":{"type":"number"},"extraordinaryDividend":{"type":"number"},"profitForYear":{"type":"number"},"equityBeforeDistribution":{"type":"number"},"shareCapital":{"type":"number"},"fundForUnrealisedGains":{"type":"number"},"creditToOwnersEmployees":{"type":"number"},"securityOfferedToOwnersEmployees":{"type":"number"},"dealingsAfterYearEnd":{"type":"number"},"maximumEstimatedDividend":{"type":"number","description":"Maximum dividend that can be distributed within free equity (maks utbytte)."}}},"TaxReturnEquityReconciliationRes":{"type":"object","properties":{"equityOpening":{"type":"number"},"cashDeposits":{"type":"number"},"contributionsInKind":{"type":"number"},"profitForYear":{"type":"number"},"lossForYear":{"type":"number"},"provisionForDividend":{"type":"number"},"additionalDividend":{"type":"number"},"extraordinaryDividend":{"type":"number"},"receivedGroupContribution":{"type":"number"},"cededGroupContribution":{"type":"number"},"reductionShareCapitalCash":{"type":"number"},"reductionShareCapitalOther":{"type":"number"},"waivingOfDebt":{"type":"number"},"purchaseOwnShares":{"type":"number"},"saleOwnShares":{"type":"number"},"debtConvertedToEquity":{"type":"number"},"dividendDifferencePositive":{"type":"number"},"dividendDifferenceNegative":{"type":"number"},"otherPositiveChanges":{"type":"number"},"otherNegativeChanges":{"type":"number"},"reconciledEquity":{"type":"number","description":"Reconciled equity computed from the movements above."},"equityEnteredAccounts":{"type":"number","description":"Equity actually entered in the accounts, for comparison against reconciledEquity."}}},"TaxReturnGatingRes":{"type":"object","properties":{"accountingYearLocked":{"type":"boolean","description":"Whether the accounting year is locked."},"annualResultDisposed":{"type":["boolean","null"],"description":"Whether the annual result has been disposed (resultatdisponering). Null for company types that do not produce annual accounts (ENK, participant-taxed companies)."},"mustLockAccountingYearBeforeSubmission":{"type":"boolean","description":"Whether the accounting year must be locked before the return can be submitted."},"hasSubmittedTaxReturn":{"type":"boolean","description":"Whether a tax return has already been submitted for this year."},"submitBlocked":{"type":"boolean","description":"Whether submission is currently blocked. True when ID-porten is not connected or the accounting year must still be locked."}}},"TaxReturnLastValidationRes":{"type":"object","properties":{"validatedAt":{"type":"string","format":"date-time","description":"When the return was last validated against Skatteetaten."},"valid":{"type":"boolean","description":"Whether the draft passed validation at that time."},"errorCount":{"type":"integer","format":"int32","description":"Number of validation errors at that time."}}},"TaxReturnLiabilitiesSummaryRes":{"type":"object","properties":{"totalDebtInAccounts":{"type":"number"},"vatOwed":{"type":"number"},"adjustmentsAndOtherDebt":{"type":"number"},"totalDebt":{"type":"number","description":"Total debt (samlet gjeld)."}}},"TaxReturnLossCarryforwardRes":{"type":"object","properties":{"fromPreviousYears":{"type":"number","description":"Loss carried forward from previous years, incoming (inngående fremførbart underskudd)."},"attainedPrivateArrangementAndDebtRelief":{"type":"number","description":"Reduction from attained debt forgiveness / private debt arrangement (gjeldsettergivelse). Currently always 0 — not yet computed by reai; kept so the reconciliation below balances."},"applied":{"type":"number","description":"Loss from previous years applied against this year's positive income (bruk av fremførbart underskudd). Same value as taxableIncome.lossCarryforwardUsed."},"negativeTaxableIncomeThisYear":{"type":"number","description":"This year's negative taxable income (årets underskudd), added to the carryforward pool. Zero in a profit year."},"remaining":{"type":"number","description":"Loss remaining to carry forward to next year (utgående). Equals fromPreviousYears − applied − attainedPrivateArrangementAndDebtRelief + negativeTaxableIncomeThisYear."}}},"TaxReturnOtherInfoRes":{"type":"object","properties":{"aidSchemeSkattefunn":{"type":"boolean","description":"Whether the Skattefunn aid scheme is claimed."},"lossCarryforwardFromPreviousYears":{"type":["number","null"],"description":"Manually entered loss carryforward from previous years, if any."},"fixedAssetTemporaryDifferenceAccountingValue":{"type":["number","null"]},"fixedAssetTemporaryDifferenceTaxValue":{"type":["number","null"]},"nonListedShareFormuesverdiTotal":{"type":["number","null"]},"shareIssueAndFormationCostDeduction":{"type":["number","null"]}}},"TaxReturnPermanentDifferenceEntryRes":{"type":"object","properties":{"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"accountName":{"type":"string"},"additions":{"type":"number"},"deductions":{"type":"number"},"kind":{"type":"string","description":"Kind of permanent difference: GENERAL, INCOME_TAX_EXPENSE, SHARE_ISSUE_AND_FORMATION_COST, EXEMPTION_METHOD_SHARE_GAIN_OR_LOSS, EXEMPTION_METHOD_DIVIDEND, EXEMPTION_METHOD_THREE_PERCENT."}}},"TaxReturnPermanentDifferenceTotalsRes":{"type":"object","properties":{"additions":{"type":"number"},"deductions":{"type":"number"}}},"TaxReturnPermanentDifferencesRes":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/TaxReturnPermanentDifferenceEntryRes"}},"totals":{"$ref":"#/components/schemas/TaxReturnPermanentDifferenceTotalsRes"}}},"TaxReturnProfitAndLossRes":{"type":"object","properties":{"revenues":{"type":"number","description":"Operating revenues."},"expenses":{"type":"number","description":"Operating expenses including cost of goods sold."},"financialIncome":{"type":"number"},"financialExpenses":{"type":"number"},"tax":{"type":"number","description":"Tax expense booked on the result (skattekostnad)."},"profit":{"type":"number","description":"Profit or loss for the year (årsresultat)."}}},"TaxReturnReceiptFeedbackRes":{"type":"object","properties":{"validationResult":{"type":["string","null"]},"guidanceMessages":{"type":"array","items":{"type":"string"}}}},"TaxReturnRes":{"type":"object","description":"The computed tax return for one fiscal year. Every amount is derived live from the ledger and stored inputs, exactly as the /tax-return page computes it. Sections that do not apply to the company type are null (for example an ENK has no dividend or equity reconciliation).","properties":{"year":{"type":"integer","format":"int32","description":"Fiscal year the return covers."},"companyType":{"type":"string","description":"Company type: ENK, AS, NUF, ANS, DA, ASA, …"},"periodStart":{"type":"string","format":"date","description":"First day of the fiscal period."},"periodEnd":{"type":"string","format":"date","description":"Last day of the fiscal period."},"profitAndLoss":{"$ref":"#/components/schemas/TaxReturnProfitAndLossRes"},"balanceSummary":{"$ref":"#/components/schemas/TaxReturnBalanceSummaryRes"},"appropriations":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnAppropriationsRes"},{"type":"null"}]},"tangibleFixedAssets":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnBalanceEntrySectionRes"},{"type":"null"}]},"inventories":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnBalanceEntrySectionRes"},{"type":"null"}]},"accountsReceivable":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnAccountsReceivableRes"},{"type":"null"}]},"salaryPensionCost":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnSalaryPensionCostRes"},{"type":"null"}]},"temporaryDifferences":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnTemporaryDifferencesRes"},{"type":"null"}]},"saldoDepreciationSchedule":{"type":"array","description":"Declining-balance (saldo) depreciation schedule per saldogruppe from the næringsspesifikasjon. Empty when nothing has been carried forward. Present for all company types.","items":{"$ref":"#/components/schemas/TaxReturnSaldoDepreciationRes"}},"permanentDifferences":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnPermanentDifferencesRes"},{"type":"null"}]},"taxRelatedResult":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnTaxRelatedResultRes"},{"type":"null"}]},"taxableIncome":{"$ref":"#/components/schemas/TaxReturnTaxableIncomeRes"},"lossCarryforward":{"$ref":"#/components/schemas/TaxReturnLossCarryforwardRes"},"capitalSummary":{"$ref":"#/components/schemas/TaxReturnCapitalSummaryRes"},"liabilitiesSummary":{"$ref":"#/components/schemas/TaxReturnLiabilitiesSummaryRes"},"valuePerShare":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnValuePerShareRes"},{"type":"null"}]},"taxCalculation":{"$ref":"#/components/schemas/TaxReturnTaxCalculationRes"},"deferredTax":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnDeferredTaxRes"},{"type":"null"}]},"equityReconciliation":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnEquityReconciliationRes"},{"type":"null"}]},"dividend":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnDividendRes"},{"type":"null"}]},"otherInfo":{"$ref":"#/components/schemas/TaxReturnOtherInfoRes"},"attachments":{"type":"array","description":"Documentation files uploaded to the return.","items":{"$ref":"#/components/schemas/TaxReturnAttachmentRes"}},"submission":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnSubmissionRes"},{"type":"null"}]},"lastValidation":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnLastValidationRes"},{"type":"null"}]},"sources":{"$ref":"#/components/schemas/TaxReturnSourcesRes"},"gating":{"$ref":"#/components/schemas/TaxReturnGatingRes"}}},"TaxReturnSalaryPensionCostEntryRes":{"type":"object","properties":{"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"accountName":{"type":"string"},"posted":{"type":"number"},"additions":{"type":"number"},"deductions":{"type":"number"}}},"TaxReturnSalaryPensionCostRes":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/TaxReturnSalaryPensionCostEntryRes"}},"totals":{"$ref":"#/components/schemas/TaxReturnSalaryPensionCostTotalsRes"}}},"TaxReturnSalaryPensionCostTotalsRes":{"type":"object","properties":{"posted":{"type":"number"},"additions":{"type":"number"},"deductions":{"type":"number"}}},"TaxReturnSaldoDepreciationRes":{"type":"object","properties":{"objectIdentifier":{"type":"string","description":"Object identifier of the saldo group entry."},"description":{"type":["string","null"]},"acquisitionDate":{"type":["string","null"],"format":"date"},"balanceGroup":{"type":"string","description":"Saldo group letter (a, b, c, d, e, f, g, h, i, j)."},"depreciationRate":{"type":"number","description":"Declining-balance depreciation rate for the group (e.g. 0.20 = 20%)."},"incomingTaxValue":{"type":"number","description":"Tax value carried in from the previous year (inngående skattemessig verdi)."},"newAcquisition":{"type":"number"},"disposalConsideration":{"type":["number","null"]},"depreciationForYear":{"type":"number","description":"Depreciation charged for the year (årets avskrivning)."},"outgoingTaxValue":{"type":"number","description":"Tax value carried out to the next year (utgående skattemessig verdi)."},"hasPhysicalAssetAtYearEnd":{"type":"boolean"}}},"TaxReturnSourcesRes":{"type":"object","properties":{"currentUtkastFetched":{"type":"boolean","description":"Whether this year's Skatteetaten draft (utkast) has been fetched."},"currentUtkastFetchedAt":{"type":["string","null"],"format":"date-time"},"previousYearFinalFetched":{"type":"boolean","description":"Whether the previous year's final (fastsatt) return has been fetched."},"previousYearFiscalYear":{"type":"integer","format":"int32","description":"Fiscal year of the previous-year source that feeds the saldo schedule."},"idPortenConnected":{"type":"boolean","description":"Whether an ID-porten session is connected for this tenant (required to submit, not to read)."},"enkOwnerPersonIdentifierOnTenant":{"type":["boolean","null"],"description":"For ENK only: whether the owner's fødselsnummer is stored on the tenant record. Null for non-ENK company types. Note: a false here does not mean the Skatteetaten fetch is impossible — the owner fnr can also be derived from a connected bank; treat currentUtkastFetched / previousYearFinalFetched as the authoritative fetch-readiness signals."}}},"TaxReturnSubmissionRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"status":{"type":"string","description":"Submission status: INCOMPLETE, FAILED, COMPLETE, SUBMITTED, SUBMITTED_MANUALLY.","enum":["INCOMPLETE","FAILED","COMPLETE","SUBMITTED","SUBMITTED_MANUALLY"]},"altinnInstanceId":{"type":["string","null"]},"skattemeldingDocumentId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"completeAt":{"type":["string","null"],"format":"date-time"},"submittedAt":{"type":["string","null"],"format":"date-time"},"approver":{"type":["string","null"]},"email":{"type":["string","null"]},"submittedInOtherSystem":{"type":"boolean"},"validationError":{"type":["string","null"],"description":"Validation error that blocked the last submit attempt, if any. Retained only for FAILED submissions (it is deleted once a submission succeeds)."},"receiptFeedback":{"oneOf":[{"$ref":"#/components/schemas/TaxReturnReceiptFeedbackRes"},{"type":"null"}]}}},"TaxReturnTaxCalculationRes":{"type":"object","properties":{"taxableIncomeFromTaxReturn":{"type":"number"},"lossCarryforwardFromTaxReturn":{"type":"number"},"estimatedTaxOnProfitLoss":{"type":"number","description":"Estimated tax on the result at the flat 22% company rate (betalbar skatt). Meaningful only for company-taxed entities (AS/ASA). For sole proprietorships (ENK) and participant-taxed companies (ANS/DA) this is NOT the tax actually owed — their income is taxed on the owner's/participants' personal returns at personal rates, so this field does not represent their real tax."},"notEnoughTaxSetAsideFromPreviousYears":{"type":"number"},"tooMuchTaxSetAsideFromPreviousYears":{"type":"number"}}},"TaxReturnTaxRelatedResultRes":{"type":"object","properties":{"accountingRelatedResult":{"type":"number"},"additionsFromPermanentDifferences":{"type":"number"},"deductionsFromPermanentDifferences":{"type":"number"},"changeInTemporaryDifferences":{"type":"number"},"taxRelatedResult":{"type":"number","description":"Tax-related result after permanent and temporary adjustments (skattemessig resultat)."}}},"TaxReturnTaxableIncomeRes":{"type":"object","properties":{"lossFromTaxRelatedResult":{"type":"number"},"negativeTaxableIncome":{"type":"number"},"lossCarryforwardUsed":{"type":"number"},"taxableIncomeForTaxReturn":{"type":"number","description":"Business/taxable income reported in the tax return (næringsinntekt)."}}},"TaxReturnTemporaryDifferenceEntryRes":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":["string","null"]},"accountingValue":{"type":"number"},"taxValue":{"type":"number"},"previousAccountingValue":{"type":"number"},"previousTaxValue":{"type":"number"}}},"TaxReturnTemporaryDifferencesRes":{"type":"object","properties":{"totalChange":{"type":"number","description":"Net change in temporary differences for the year."},"taxIncreasingYearEnd":{"type":"number","description":"Tax-increasing temporary differences at year end."},"taxReducingYearEnd":{"type":"number","description":"Tax-reducing temporary differences at year end."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/TaxReturnTemporaryDifferenceEntryRes"}}}},"TaxReturnValuePerShareRes":{"type":"object","properties":{"totalTaxValue":{"type":"number"},"numberOfShares":{"type":"number"},"totalValuePerShare":{"type":"number"}}},"SupplierOverviewRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"iban":{"type":["string","null"]},"bankAccountNumber":{"type":["string","null"]},"swiftCode":{"type":["string","null"]},"type":{"type":"string","enum":["company","person"]},"archived":{"type":"boolean"},"address":{"oneOf":[{"$ref":"#/components/schemas/ContactAddressRes"},{"type":"null"}]}}},"SupplierInvoiceListItemRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The supplier invoice id. Use this as the path id for supplier invoice operations."},"number":{"type":["string","null"],"description":"The supplier invoice or credit note number from the supplier."},"supplierId":{"type":"integer","format":"int32","description":"The supplier id connected to this document."},"documentType":{"type":"string","description":"Whether this document is an ordinary invoice or a credit note.","enum":["invoice","credit_note"]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"totalAmount":{"type":["number","null"],"description":"The document total in the supplier invoice currency."},"date":{"type":"string","format":"date","description":"The supplier invoice or credit note date."},"dueDate":{"type":["string","null"],"format":"date","description":"The due date, when present on the supplier invoice."},"disputedAt":{"type":["string","null"],"format":"date-time","description":"When the supplier invoice was marked as disputed, or null when it is not disputed."},"voucherId":{"type":["integer","null"],"format":"int64","description":"The latest voucher id for this supplier invoice, when it has a voucher."},"paymentState":{"$ref":"#/components/schemas/SupplierInvoicePaymentStateRes","description":"Payment and settlement state for this document."},"creditNoteApplication":{"oneOf":[{"$ref":"#/components/schemas/SupplierCreditNoteApplicationRes"},{"type":"null"}]}}},"AvailableSupplierCreditNoteRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The id to include in creditNoteIds when applying the credit note."},"number":{"type":"string","description":"The credit note number from the supplier."},"date":{"type":"string","format":"date","description":"The credit note date."},"supplierId":{"type":"integer","format":"int32","description":"The supplier id. It matches the target supplier invoice supplier."},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"amount":{"type":"number","description":"The remaining available credit note amount in the credit note currency."},"companyAmount":{"type":"number","description":"The remaining available credit note amount in tenant company currency."}}},"SubscriptionOverviewRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"customerId":{"type":"integer","format":"int32"},"customerName":{"type":"string"},"serviceRecipients":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionServiceRecipientRes"}},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"agreementId":{"type":["integer","null"],"format":"int32"},"startDate":{"type":"string","format":"date"},"intervalMonths":{"type":"integer","format":"int32"},"billingTiming":{"type":"string","enum":["in_advance","after_period"]},"outputMode":{"type":"string","enum":["create_order","create_invoice"]},"active":{"type":"boolean"},"automaticBillingGeneration":{"type":"boolean","description":"Whether ReAI automatically generates due subscription billing for this subscription."},"nextBillingDate":{"type":"string","format":"date"},"nextBillingPeriodStart":{"type":"string","format":"date"},"nextBillingPeriodEnd":{"type":"string","format":"date"},"amounts":{"$ref":"#/components/schemas/SubscriptionAmountsRes"},"annualRecurringRevenueInCompanyCurrency":{"type":"number"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"generatedBillingCount":{"type":"integer","format":"int64"},"due":{"type":"boolean"}}},"SubscriptionBillingHistoryRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"billingDate":{"type":"string","format":"date"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"outputMode":{"type":"string","enum":["create_order","create_invoice"]},"generatedOrderId":{"type":"integer","format":"int32"},"generatedOrderNumber":{"type":"string"},"generatedInvoiceId":{"type":["integer","null"],"format":"int32"},"generatedInvoiceNumber":{"type":["string","null"]}}},"SalaryPaymentSummaryRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"periodYear":{"type":"integer","format":"int32"},"periodMonth":{"type":"integer","format":"int32"},"voucherDate":{"type":["string","null"],"format":"date"},"voucherNumber":{"type":["string","null"]},"paymentDate":{"type":["string","null"],"format":"date"},"status":{"type":"string","enum":["under_process","unpaid","complete","reversed"]},"payableAmount":{"type":"number"}}},"ReceiptReceptionDocumentListItemRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"receivedAt":{"type":["string","null"],"format":"date-time"},"senderEmail":{"type":["string","null"]},"subject":{"type":["string","null"]},"attachmentId":{"type":"integer","format":"int32"},"attachmentFilename":{"type":"string"},"attachmentMimeType":{"type":"string"},"title":{"type":"string"},"analysisUnavailable":{"type":"boolean"},"unsupportedDocument":{"type":"boolean"}}},"ReceiptReceptionCostLineRes":{"type":"object","properties":{"account":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"accountName":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"amountInclVat":{"type":["number","null"]},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"vatName":{"type":["string","null"]},"vatAmount":{"type":["number","null"]},"vatRate":{"type":["number","null"]},"description":{"type":["string","null"]}}},"ReceiptReceptionDocumentFieldsRes":{"type":"object","properties":{"counterpartyId":{"type":["integer","null"],"format":"int32"},"counterpartyName":{"type":["string","null"]},"documentNumber":{"type":["string","null"]},"documentDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"currency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"duplicateRegistrationId":{"type":["integer","null"],"format":"int32"}}},"ReceiptReceptionDocumentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"receivedAt":{"type":["string","null"],"format":"date-time"},"senderEmail":{"type":["string","null"]},"subject":{"type":["string","null"]},"attachmentId":{"type":"integer","format":"int32"},"attachmentFilename":{"type":"string"},"attachmentMimeType":{"type":"string"},"title":{"type":"string"},"document":{"oneOf":[{"$ref":"#/components/schemas/ReceiptReceptionDocumentFieldsRes"},{"type":"null"}]},"costLines":{"type":"array","items":{"$ref":"#/components/schemas/ReceiptReceptionCostLineRes"}},"payment":{"oneOf":[{"$ref":"#/components/schemas/ReceiptReceptionPaymentReviewRes"},{"type":"null"}]},"creditNote":{"type":"boolean"},"reminder":{"type":"boolean"},"analysisUnavailable":{"type":"boolean"},"unsupportedDocument":{"type":"boolean"},"vatCategory":{"type":"string"}}},"ReceiptReceptionPaymentReviewRes":{"type":"object","properties":{"paymentDate":{"type":["string","null"],"format":"date"},"paymentAmount":{"type":["number","null"]},"documentCurrency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"companyCurrencyAmount":{"type":["number","null"]},"companyCurrency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"matchedTransactionId":{"type":["integer","null"],"format":"int32"}}},"ProjectActivityRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"code":{"type":"string"}}},"PostingGroupRes":{"type":"object","properties":{"postingGroupId":{"type":"integer","format":"int32"},"postingIds":{"type":"array","items":{"type":"integer","format":"int64"}},"entityType":{"type":"string","enum":["supplier","customer","employee","unknown"]},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"OrderOverviewRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"date":{"type":"string","format":"date"},"issueDate":{"type":"string","format":"date"},"number":{"type":"string"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"sendEhf":{"type":"boolean"},"customerId":{"type":["integer","null"],"format":"int32"},"customerName":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"amounts":{"$ref":"#/components/schemas/OrderAmountsRes"},"status":{"type":"string","enum":["open","closed"]},"invoiceId":{"type":["integer","null"],"format":"int32"},"invoiceNumber":{"type":["string","null"]},"orderAmountInCompanyCurrency":{"type":"number"}}},"OfferOverviewRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"string"},"date":{"type":"string","format":"date"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"customerId":{"type":["integer","null"],"format":"int32"},"customerName":{"type":["string","null"]},"totalAmount":{"type":"number"},"totalInCompanyCurrency":{"type":"number"}}},"NewCompaniesApiPage":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"totalPages":{"type":"integer","format":"int32"},"totalCount":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/NewCompanyApiItem"}}}},"NewCompanyApiItem":{"type":"object","properties":{"orgno":{"type":"string"},"name":{"type":"string"},"orgcode":{"type":["string","null"]},"regdate":{"type":["string","null"]}}},"NetworkPersonView":{"type":"object","properties":{"entityKey":{"type":"string"},"label":{"type":"string"}}},"NetworkEntityView":{"type":"object","properties":{"entityKey":{"type":"string"},"entityType":{"type":"string"},"orgno":{"type":["string","null"]},"label":{"type":"string"},"company":{"type":"boolean"}}},"NetworkPathApiResponse":{"type":"object","properties":{"found":{"type":"boolean"},"message":{"type":"string"},"maxNodes":{"type":"integer","format":"int32"},"from":{"oneOf":[{"$ref":"#/components/schemas/NetworkPersonView"},{"type":"null"}]},"to":{"oneOf":[{"$ref":"#/components/schemas/NetworkPersonView"},{"type":"null"}]},"path":{"type":"array","items":{"$ref":"#/components/schemas/NetworkEntityView"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/NetworkPathStepView"}}}},"NetworkPathStepView":{"type":"object","properties":{"fromPerson":{"type":"string"},"fromRoles":{"type":"string"},"company":{"type":"string"},"companyHref":{"type":["string","null"]},"toRoles":{"type":"string"},"toPerson":{"type":"string"}}},"MeRes":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"tenants":{"type":"array","items":{"$ref":"#/components/schemas/MeTenantRes"}}}},"MeTenantRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"slug":{"type":"string"},"companyName":{"type":"string"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"}}},"CurrencyAmountTotalRes":{"type":"object","properties":{"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"amount":{"type":"number"}}},"SupplierLedgerPostingRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"postingGroupId":{"type":["integer","null"],"format":"int32"},"voucherId":{"type":"integer","format":"int64"},"voucherNumber":{"type":["string","null"]},"postingDate":{"type":"string","format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"description":{"type":"string"},"amount":{"type":"number"},"currencyAmount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"supplierInvoiceId":{"type":["integer","null"],"format":"int32"},"supplierInvoiceNumber":{"type":["string","null"]},"supplierInvoiceDocumentType":{"type":["string","null"],"description":"Supplier invoice document type. credit_note means the document is a supplier credit note.","enum":["invoice","credit_note"]},"closed":{"type":"boolean"},"currencyAdjustment":{"type":"boolean"},"invoiceVoucherPosting":{"type":"boolean"}}},"SupplierLedgerRes":{"type":"object","properties":{"supplierId":{"type":["integer","null"],"format":"int32"},"name":{"type":"string"},"organizationNumber":{"type":["string","null"]},"displayName":{"type":"string"},"totalAmount":{"type":"number"},"foreignCurrencyTotals":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyAmountTotalRes"}},"postings":{"type":"array","items":{"$ref":"#/components/schemas/SupplierLedgerPostingRes"}}}},"GeneralLedgerAccountRes":{"type":"object","properties":{"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"accountName":{"type":"string"},"openingBalance":{"type":"number"},"postings":{"type":"array","items":{"$ref":"#/components/schemas/GeneralLedgerPostingRes"}},"closingBalance":{"type":"number"}}},"GeneralLedgerPostingRes":{"type":"object","properties":{"postingId":{"type":"integer","format":"int64"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherNumber":{"type":["string","null"]},"date":{"type":"string","format":"date"},"description":{"type":["string","null"]},"generalSubsidiaryLedgerName":{"type":["string","null"]},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"amount":{"type":"number"},"currencyAmount":{"type":"number"},"customerId":{"type":["integer","null"],"format":"int32"},"customerName":{"type":["string","null"]},"supplierId":{"type":["integer","null"],"format":"int32"},"supplierName":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"employeeId":{"type":["integer","null"],"format":"int32"},"employeeName":{"type":["string","null"]}}},"GeneralLedgerRes":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/GeneralLedgerAccountRes"}},"totalAmount":{"type":"number"}}},"EmployeeLedgerPostingRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"description":{"type":["string","null"]},"postingDate":{"type":["string","null"],"format":"date"},"amount":{"type":"number"},"currencyAmount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherDisplayNumber":{"type":["string","null"]},"salaryPaymentId":{"type":["integer","null"],"format":"int32"},"salaryPaymentNumber":{"type":["string","null"]},"postingGroupId":{"type":["integer","null"],"format":"int32"}}},"EmployeeLedgerRes":{"type":"object","properties":{"employeeId":{"type":"integer","format":"int32"},"name":{"type":"string"},"postings":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeLedgerPostingRes"}},"totalAmount":{"type":"number"},"foreignCurrencyTotals":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyAmountTotalRes"}}}},"CustomerLedgerPostingRes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"customerId":{"type":["integer","null"],"format":"int32"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"amount":{"type":"number"},"currencyAmount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"postingDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"description":{"type":["string","null"]},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherDisplayNumber":{"type":["string","null"]},"invoiceId":{"type":["integer","null"],"format":"int32"},"invoiceNumber":{"type":["string","null"]},"creditedInvoiceId":{"type":["integer","null"],"format":"int32"},"creditedInvoiceIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditedInvoiceNumber":{"type":["string","null"]},"creditedInvoiceNumbers":{"type":"array","items":{"type":"string"}},"postingGroupId":{"type":["integer","null"],"format":"int32"},"creditNote":{"type":"boolean"},"currencyAdjustment":{"type":"boolean"},"invoiceVoucherPosting":{"type":"boolean"}}},"CustomerLedgerRes":{"type":"object","properties":{"customerId":{"type":["integer","null"],"format":"int32"},"name":{"type":"string"},"organizationNumber":{"type":["string","null"]},"totalAmount":{"type":"number"},"foreignCurrencyTotals":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyAmountTotalRes"}},"postings":{"type":"array","items":{"$ref":"#/components/schemas/CustomerLedgerPostingRes"}}}},"AssetLedgerPostingRes":{"type":"object","properties":{"date":{"type":"string","format":"date"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"description":{"type":["string","null"]},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"amount":{"type":"number"}}},"AssetLedgerRes":{"type":"object","properties":{"assetId":{"type":"integer","format":"int32"},"assetName":{"type":"string"},"assetAccountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"acquisitionDate":{"type":"string","format":"date"},"acquisitionCost":{"type":"number"},"totalAmount":{"type":"number"},"depreciationPostings":{"type":"array","items":{"$ref":"#/components/schemas/AssetLedgerPostingRes"}}}},"LeadOverviewRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"orgNumber":{"type":"string"},"companyName":{"type":"string"},"legalFormCode":{"type":["string","null"]},"legalFormDescription":{"type":["string","null"]},"industryCode":{"type":["string","null"]},"industryDescription":{"type":["string","null"]},"city":{"type":["string","null"]},"website":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"leadEmail":{"type":["string","null"]},"leadPhone":{"type":["string","null"]},"hasEmail":{"type":"boolean"},"hasPhone":{"type":"boolean"},"hasAccountant":{"type":"boolean"},"registeredAt":{"type":["string","null"],"format":"date"},"chiefExecutiveName":{"type":["string","null"]},"contactPersonName":{"type":["string","null"]},"chairmanName":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["active","disqualified","converted"]},"notes":{"type":["string","null"]},"latestContactedOn":{"type":["string","null"],"format":"date"},"latestContactSource":{"type":["string","null"],"enum":["email","phone","message","other"]},"latestContactNote":{"type":["string","null"]},"contactEventCount":{"type":"integer","format":"int32"},"convertedCustomerId":{"type":["integer","null"],"format":"int32"},"followUpAt":{"type":["string","null"],"format":"date"},"saved":{"type":"boolean"}}},"LeadPageRes":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LeadOverviewRes"}},"page":{"type":"integer","format":"int32"},"hasPrevious":{"type":"boolean"},"hasNext":{"type":"boolean"},"latestRegisteredAt":{"type":["string","null"],"format":"date"}}},"PersonRoleMatchItemRes":{"type":"object","properties":{"orgNumber":{"type":["string","null"]},"companyName":{"type":["string","null"]},"personId":{"type":"integer","format":"int64"},"personName":{"type":["string","null"]},"roleCode":{"type":["string","null"]},"roleName":{"type":["string","null"]}}},"PersonRoleMatchRes":{"type":"object","properties":{"matched":{"type":"boolean"},"companyMatched":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PersonRoleMatchItemRes"}}}},"PersonProfilePageRes":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PersonProfileRes"}},"hasMore":{"type":"boolean"},"nextStartOrgNo":{"type":["string","null"]},"limit":{"type":"integer","format":"int32"}}},"PersonProfileRes":{"type":"object","properties":{"orgNumber":{"type":"string"},"companyName":{"type":"string"},"legalFormCode":{"type":["string","null"]},"legalFormDescription":{"type":["string","null"]},"city":{"type":["string","null"]},"personId":{"type":"integer","format":"int64"},"personName":{"type":["string","null"]},"roleCode":{"type":["string","null"]},"roleName":{"type":["string","null"]},"linkedinSlug":{"type":["string","null"]}}},"InvoiceOverviewRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"number":{"type":"string"},"voucherId":{"type":["integer","null"],"format":"int64"},"orderId":{"type":["integer","null"],"format":"int32"},"orderNumber":{"type":"string"},"customerId":{"type":["integer","null"],"format":"int32"},"customerName":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"totalAmount":{"type":"number"},"balance":{"type":"number"},"outstanding":{"type":"number"},"invoiceCompanyCurrencyAmount":{"type":"number"},"comment":{"type":["string","null"]},"createdFromInvoiceId":{"type":["integer","null"],"format":"int32"},"creditedInvoiceId":{"type":["integer","null"],"format":"int32"},"creditedInvoiceIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditNoteId":{"type":["integer","null"],"format":"int32"},"creditNoteIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditNotesTotalAmount":{"type":"number"},"appliedInvoiceId":{"type":["integer","null"],"format":"int32"},"appliedInvoiceIds":{"type":"array","items":{"type":"integer","format":"int32"}},"creditNoteAllocationType":{"type":["string","null"],"enum":["invoice_full_reversal","manual_matches_original_invoice_amount","manual_partial_cover"]}}},"InvoicePaymentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"date":{"type":"string","format":"date"},"invoiceCurrencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"companyCurrencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"paidAmount":{"type":"number","description":"Amount paid by the customer in the invoice currency."},"receivedAmount":{"type":"number","description":"Amount received by the company in the company currency."},"bankFee":{"type":["number","null"],"description":"Bank fee in the company currency."},"bankFeeInCurrency":{"type":["number","null"],"description":"Bank fee in the invoice currency."},"companyBankId":{"type":["integer","null"],"format":"int32"},"voucherId":{"type":["integer","null"],"format":"int64"}}},"InvoiceEmailHistoryRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"email":{"type":"string"},"detail":{"type":"string"},"createdAt":{"type":"string","format":"date"}}},"InvoiceEhfHistoryRes":{"type":"object","properties":{"id":{"type":["integer","null"],"format":"int32"},"invoiceId":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date"},"success":{"type":"boolean"},"error":{"type":["string","null"]}}},"InvoiceReceptionDocumentListItemRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"receivedAt":{"type":["string","null"],"format":"date-time"},"senderEmail":{"type":["string","null"]},"subject":{"type":["string","null"]},"attachmentId":{"type":"integer","format":"int32"},"attachmentFilename":{"type":"string"},"attachmentMimeType":{"type":"string"},"title":{"type":"string"}}},"InvoiceReceptionAddressRes":{"type":"object","properties":{"streetAddress":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postcode":{"type":["string","null"]},"countryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]}}},"InvoiceReceptionCostRes":{"type":"object","properties":{"account":{"oneOf":[{"$ref":"#/components/schemas/AccountNumber"},{"type":"null"}]},"accountName":{"type":["string","null"]},"projectId":{"type":["integer","null"],"format":"int32"},"projectName":{"type":["string","null"]},"description":{"type":["string","null"]},"amountInclVat":{"type":["number","null"]},"vatCode":{"oneOf":[{"$ref":"#/components/schemas/VatCode"},{"type":"null"}]},"vatName":{"type":["string","null"]},"vatAmount":{"type":["number","null"]},"vatRate":{"type":["number","null"]}}},"InvoiceReceptionDocumentRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"receivedAt":{"type":["string","null"],"format":"date-time"},"senderEmail":{"type":["string","null"]},"subject":{"type":["string","null"]},"attachmentId":{"type":"integer","format":"int32"},"attachmentFilename":{"type":"string"},"attachmentMimeType":{"type":"string"},"title":{"type":"string"},"invoice":{"oneOf":[{"$ref":"#/components/schemas/InvoiceReceptionInvoiceRes"},{"type":"null"}]},"costs":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceReceptionCostRes"}},"payment":{"oneOf":[{"$ref":"#/components/schemas/InvoiceReceptionPaymentRes"},{"type":"null"}]},"invoiceTotalAmount":{"type":["number","null"]},"creditNote":{"type":"boolean"},"reminder":{"type":"boolean"},"analysisUnavailable":{"type":"boolean"},"vatCategory":{"type":"string"}}},"InvoiceReceptionInvoiceRes":{"type":"object","properties":{"reference":{"type":["string","null"]},"kidNumber":{"type":["string","null"]},"supplierId":{"type":["integer","null"],"format":"int32"},"supplierName":{"type":["string","null"]},"number":{"type":["string","null"]},"date":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"currency":{"oneOf":[{"$ref":"#/components/schemas/CurrencyCode"},{"type":"null"}]},"duplicateInvoiceId":{"type":["integer","null"],"format":"int32"}}},"InvoiceReceptionPaymentRes":{"type":"object","properties":{"beneficiaryName":{"type":"string"},"accountNumber":{"type":["string","null"]},"iban":{"type":["string","null"]},"swiftBic":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankCountryCode":{"oneOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"routingNumber":{"type":["string","null"]},"routingType":{"type":["string","null"]},"bankAccountCategory":{"type":["string","null"]},"localClearingSystem":{"type":["string","null"]},"reference":{"type":["string","null"]},"reason":{"type":["string","null"]},"beneficiaryAddress":{"oneOf":[{"$ref":"#/components/schemas/InvoiceReceptionAddressRes"},{"type":"null"}]},"bankAddress":{"oneOf":[{"$ref":"#/components/schemas/InvoiceReceptionAddressRes"},{"type":"null"}]},"paymentSchedules":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceReceptionPaymentScheduleRes"}}}},"InvoiceReceptionPaymentScheduleRes":{"type":"object","properties":{"amount":{"type":"number"},"date":{"type":"string","format":"date"}}},"GeneralSubAccountSelectionRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"selectableAccountNumber":{"type":"string","description":"Combined parent account number and general sub-account id separated by `/`, matching the web account selector display value. Public API write requests that model subsidiary ledgers separately should use `accountNumber` and `id` instead.","example":"6800/42"},"name":{"type":"string"}}},"ExpenseOverviewRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"integer","format":"int32"},"title":{"type":"string"},"employeeName":{"type":["string","null"]},"status":{"type":"string","enum":["open","for_approval","approved"]},"travel":{"type":"boolean"},"includedInPayslip":{"type":"boolean"},"totalAmount":{"type":"number"},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"voucherId":{"type":["integer","null"],"format":"int64"},"voucherNumber":{"type":["string","null"]},"voucherDate":{"type":["string","null"],"format":"date"},"salaryPaymentId":{"type":["integer","null"],"format":"int32"}}},"EmployeeSummaryRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"email":{"type":"string"}}},"CustomerOverviewRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"invoiceEmail":{"type":["string","null"]},"phone":{"type":["string","null"]},"iban":{"type":["string","null"]},"bankAccountNumber":{"type":["string","null"]},"swiftCode":{"type":["string","null"]},"type":{"type":"string","enum":["company","person"]},"organizationNumber":{"type":["string","null"]},"invoiceInEnglish":{"type":"boolean"},"daysUntilDue":{"type":["integer","null"],"format":"int32"},"archived":{"type":"boolean"},"address":{"oneOf":[{"$ref":"#/components/schemas/ContactAddressRes"},{"type":"null"}]},"deliveryAddress":{"oneOf":[{"$ref":"#/components/schemas/ContactAddressRes"},{"type":"null"}]}}},"CurrencyRes":{"type":"object","properties":{"code":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"name":{"type":"string"}}},"CountryRes":{"type":"object","properties":{"code":{"type":"string","$ref":"#/components/schemas/CountryCode"},"name":{"type":"string"},"currencyCode":{"type":"string","$ref":"#/components/schemas/CurrencyCode"}}},"ChartOfAccountsGeneralSubAccountRes":{"type":"object","properties":{"subAccountId":{"type":"integer","format":"int32"},"number":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"name":{"type":"string"}}},"ChartOfAccountsRes":{"type":"object","properties":{"number":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"restrictedToSystemUsage":{"type":"boolean"},"generalSubAccounts":{"type":"array","items":{"$ref":"#/components/schemas/ChartOfAccountsGeneralSubAccountRes"}}}},"ChartOfAccountsAccountRes":{"type":"object","properties":{"number":{"type":"string","description":"Selectable account number. For subsidiary ledger entries this contains the parent account number and subsidiary id separated by `/`, matching the web combobox value.","example":"2400/123"},"accountNumber":{"type":"string","$ref":"#/components/schemas/AccountNumber"},"displayName":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["asset","liability","equity","revenue","expense","cost_of_goods_sold","tax","extraordinary_item","appropriation"]},"restrictedToSystemUsage":{"type":"boolean"},"subsidiaryLedger":{"oneOf":[{"$ref":"#/components/schemas/ChartOfAccountsSubsidiaryLedgerRes"},{"type":"null"}]}}},"ChartOfAccountsSubsidiaryLedgerRes":{"type":"object","properties":{"type":{"type":"string","enum":["asset","bank","supplier","customer","employee","general"]},"id":{"type":"integer","format":"int32"},"name":{"type":"string"}}},"BankTransactionDetailRes":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"bankAccountId":{"type":"integer","format":"int32"},"bankAccountName":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"transactionDate":{"type":"string","format":"date"},"description":{"type":["string","null"]},"paymentReference":{"type":["string","null"]},"paymentMessage":{"type":["string","null"]},"endToEndId":{"type":["string","null"]},"voucherId":{"type":["integer","null"],"format":"int64"},"reconciledAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","matched"]},"matchedPostings":{"type":"array","items":{"$ref":"#/components/schemas/BankReconciliationPostingRes"}}}},"BankReconciliationFilteredOverviewRes":{"allOf":[{"$ref":"#/components/schemas/BankReconciliationOverviewResponse"},{"type":"object","properties":{"bankAccountId":{"type":"integer","format":"int32"},"bankAccountName":{"type":"string"},"bankCurrency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"tenantCurrency":{"type":"string","$ref":"#/components/schemas/CurrencyCode"},"month":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"providerBalance":{"type":["number","null"]},"closed":{"type":["boolean","null"],"description":"Whether the monthly reconciliation is closed and the bank subledger is locked for the month."},"reconciliationLocked":{"type":["boolean","null"]},"canClose":{"type":["boolean","null"]},"canReopen":{"type":["boolean","null"]},"bankInTenantCurrency":{"type":["boolean","null"]},"bankLedgerOpeningBalance":{"type":["number","null"]},"bankLedgerClosingBalance":{"type":["number","null"]},"actualBankMonthStartBalance":{"type":["number","null"]},"actualBankDisplayedBalance":{"type":["number","null"]},"actualBankCurrentMonth":{"type":["boolean","null"]},"pendingTransactionsTotal":{"type":["number","null"]},"pendingPostingsTotal":{"type":["number","null"]},"pendingDiscrepancy":{"type":["number","null"]},"matchedTransactionsTotal":{"type":["number","null"]},"matchedPostingsTotal":{"type":["number","null"]},"matchedDiscrepancy":{"type":["number","null"]},"pendingTransactionCount":{"type":["integer","null"],"format":"int32"},"pendingPostingCount":{"type":["integer","null"],"format":"int32"},"matchedTransactionCount":{"type":["integer","null"],"format":"int32"},"matchedPostingCount":{"type":["integer","null"],"format":"int32"},"pendingTransactions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BankReconciliationTransactionRes"}},"pendingPostings":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BankReconciliationPostingRes"}},"matchedGroups":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BankReconciliationMatchedGroupRes"}}}}]},"BankReconciliationOverviewResponse":{},"AttachmentEhfAddressRes":{"type":"object","properties":{"street":{"type":["string","null"]},"city":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"countryCode":{"type":["string","null"]}}},"AttachmentEhfAllowanceChargeRes":{"type":"object","properties":{"chargeIndicator":{"type":"boolean"},"reason":{"type":"string"},"amount":{"type":"number"},"currencyCode":{"type":"string"},"taxCategoryId":{"type":"string"},"taxPercent":{"type":"number"},"taxSchemeId":{"type":"string"}}},"AttachmentEhfLegalMonetaryTotalRes":{"type":"object","properties":{"lineExtensionAmount":{"type":["number","null"]},"taxExclusiveAmount":{"type":["number","null"]},"taxInclusiveAmount":{"type":["number","null"]},"chargeTotalAmount":{"type":["number","null"]},"payableRoundingAmount":{"type":["number","null"]},"payableAmount":{"type":["number","null"]}}},"AttachmentEhfLineRes":{"type":"object","properties":{"id":{"type":["string","null"]},"quantity":{"oneOf":[{"$ref":"#/components/schemas/AttachmentEhfQuantityRes"},{"type":"null"}]},"lineExtensionAmount":{"type":["number","null"]},"lineCurrency":{"type":["string","null"]},"description":{"type":["string","null"]},"name":{"type":["string","null"]},"unitPrice":{"type":["number","null"]},"priceCurrency":{"type":["string","null"]},"taxPercent":{"type":["number","null"],"format":"double"},"unitCode":{"type":["string","null"]}}},"AttachmentEhfPartyRes":{"type":"object","properties":{"name":{"type":["string","null"]},"registrationNumber":{"type":["string","null"]},"endpointId":{"type":["string","null"]},"endpointScheme":{"type":["string","null"]},"address":{"oneOf":[{"$ref":"#/components/schemas/AttachmentEhfAddressRes"},{"type":"null"}]}}},"AttachmentEhfPaymentRes":{"type":"object","properties":{"account":{"type":["string","null"]},"bic":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankCountryCode":{"type":["string","null"]},"paymentId":{"type":["string","null"]}}},"AttachmentEhfQuantityRes":{"type":"object","properties":{"value":{"type":"number"},"unitCode":{"type":["string","null"]}}},"AttachmentEhfRes":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","credit_note"]},"id":{"type":["string","null"]},"issueDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"currency":{"type":["string","null"]},"legalMonetaryTotal":{"oneOf":[{"$ref":"#/components/schemas/AttachmentEhfLegalMonetaryTotalRes"},{"type":"null"}]},"allowanceCharges":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentEhfAllowanceChargeRes"}},"supplier":{"oneOf":[{"$ref":"#/components/schemas/AttachmentEhfPartyRes"},{"type":"null"}]},"customer":{"oneOf":[{"$ref":"#/components/schemas/AttachmentEhfPartyRes"},{"type":"null"}]},"payment":{"oneOf":[{"$ref":"#/components/schemas/AttachmentEhfPaymentRes"},{"type":"null"}]},"taxSubtotals":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentEhfTaxSubtotalRes"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentEhfLineRes"}},"invoiceTypeCode":{"type":["string","null"]}}},"AttachmentEhfTaxSubtotalRes":{"type":"object","properties":{"taxableAmount":{"type":["number","null"]},"taxAmount":{"type":["number","null"]},"taxPercent":{"type":["number","null"],"format":"double"},"categoryId":{"type":["string","null"]}}},"AgreementListRes":{"type":"object","properties":{"agreementId":{"type":"integer","format":"int32"},"templateType":{"type":"string","enum":["accounting_services","employee_contract","rent_agreement","service_agreement","purchase_agreement"]},"clientName":{"type":["string","null"]},"signStatus":{"type":"string","enum":["draft","pending","signed"]},"createdAt":{"type":"string","format":"date"},"editedAt":{"type":["string","null"],"format":"date"}}},"AccountantClientOverviewRes":{"type":"object","properties":{"clientTenantId":{"type":"integer","format":"int32"},"companyName":{"type":"string"},"organizationNumber":{"type":"string"},"connected":{"type":"boolean"},"oppdragsansvarligUserId":{"type":["integer","null"],"format":"int32"},"oppdragsansvarlig":{"type":["string","null"]},"lastAnnualControl":{"type":["string","null"]},"missingAnnualControl":{"type":"boolean"}}},"AgreementComboboxItemDto":{"type":"object","properties":{"value":{"type":"string"},"title":{"type":"string"},"displayText":{"type":"string"},"meta":{"type":"string"},"href":{"type":"string"}}},"ZtlDiagnosticBankOptionDto":{"type":"object","properties":{"bankId":{"type":"integer","format":"int32"},"tenantId":{"type":"integer","format":"int32"},"syncEnabled":{"type":"boolean"},"label":{"type":"string"}}},"AdminConsentOptionDto":{"type":"object","properties":{"consentId":{"type":"integer","format":"int32"},"label":{"type":"string"}}},"AccountComboboxItem":{"type":"object","properties":{"number":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","REVENUE","EXPENSE","COST_OF_GOODS_SOLD","TAX","EXTRAORDINARY_ITEM","APPROPRIATION"]},"subId":{"type":["integer","null"],"format":"int32"},"subName":{"type":["string","null"]},"href":{"type":["string","null"]}}},"ManualVoucherAccountSearchResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountComboboxItem"}},"emptyStateMessage":{"type":["string","null"]},"emptyStateAction":{"oneOf":[{"$ref":"#/components/schemas/ManualVoucherEmptyStateAction"},{"type":"null"}]}}},"ManualVoucherEmptyStateAction":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}}},"ApiLifecycleOutcomeRes":{"type":"object","properties":{"outcome":{"type":"string","description":"Result of a public API lifecycle command.","enum":["deleted","archived","reversed"]}}},"CurrencyCode":{"type":"string","description":"ISO 4217 three-letter currency code. Use the `code` value returned by `GET /api/currencies`.","example":"NOK","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$"},"CountryCode":{"type":"string","description":"Two-letter country code supported by ReAI. Use the `code` value returned by `GET /api/countries`.","example":"NO","maxLength":2,"minLength":2,"pattern":"^[A-Z]{2}$"},"VatCode":{"type":"string","description":"VAT code. Use the `code` value returned by `GET /api/vat-codes`.","example":"3"},"AccountNumber":{"type":"string","description":"Base chart of accounts number. Use the `number` value returned by `GET /api/chart-of-accounts` or the `accountNumber` value returned by `GET /api/chart-of-accounts/accounts`.","example":"3000"},"TenantRoleCode":{"type":"string","description":"Tenant role code. Use the `code` value returned by `GET /api/users/roles`.","enum":["ROLE_OWNER","ROLE_TENANT_ADMIN","ROLE_ACCOUNTANT","ROLE_EMPLOYEE","ROLE_AUDITOR"],"example":"ROLE_EMPLOYEE"},"AssignableTenantRoleCode":{"type":"string","description":"Assignable tenant role code. Use an `assignable=true` role returned by `GET /api/users/roles`.","enum":["ROLE_TENANT_ADMIN","ROLE_ACCOUNTANT","ROLE_EMPLOYEE","ROLE_AUDITOR"],"example":"ROLE_EMPLOYEE"},"AssignableTenantPermissionCode":{"type":"string","description":"Directly assignable tenant permission code. Use the `code` value returned by `GET /api/users/permissions`.","enum":["tenant:user:read","tenant:user:write","tenant:company:read","tenant:company:write","tenant:document:read","tenant:document:write","tenant:ledger:read","tenant:ledger:write","tenant:tax-return:submit","tenant:loan:read","tenant:loan:write","tenant:customer:read","tenant:customer:write","tenant:supplier:read","tenant:supplier:write","tenant:lead:read","tenant:lead:write","tenant:bank:read","tenant:bank:write","tenant:invoice:read","tenant:invoice:write","tenant:supplier-invoice:read","tenant:supplier-invoice:write","tenant:employee:read","tenant:employee:write","tenant:inventory:read","tenant:inventory:write","tenant:product:read","tenant:product:write","tenant:project:read","tenant:project:write","tenant:expense:read","tenant:expense:write","tenant:expense:approve","tenant:timesheet:read","tenant:timesheet:write","tenant:setting:read","tenant:setting:write","tenant:attachment:write"],"example":"tenant:invoice:read"},"EffectiveTenantPermissionCode":{"type":"string","description":"Effective tenant permission code, including implied read permissions and self-scoped permissions granted through roles.","enum":["tenant:user:read","tenant:user:write","tenant:company:read","tenant:company:write","tenant:document:read","tenant:document:write","tenant:ledger:read","tenant:ledger:write","tenant:tax-return:submit","tenant:loan:read","tenant:loan:write","tenant:customer:read","tenant:customer:write","tenant:supplier:read","tenant:supplier:write","tenant:lead:read","tenant:lead:write","tenant:bank:read","tenant:bank:write","tenant:invoice:read","tenant:invoice:write","tenant:supplier-invoice:read","tenant:supplier-invoice:write","tenant:employee:read","tenant:employee:write","self:employee:read","self:employee:write","tenant:inventory:read","tenant:inventory:write","tenant:product:read","tenant:product:write","tenant:project:read","tenant:project:write","tenant:expense:read","tenant:expense:write","tenant:expense:approve","self:expense:read","self:expense:write","tenant:timesheet:read","tenant:timesheet:write","self:timesheet:read","self:timesheet:write","tenant:setting:read","tenant:setting:write","tenant:attachment:write"],"example":"self:timesheet:read"},"ProblemDetail":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string","example":"Invalid request"},"status":{"type":"integer","format":"int32","example":400},"detail":{"type":"string","example":"status has invalid value 'bad'. Allowed values: active, disqualified."},"instance":{"type":"string","example":"/api/leads/org/937522169/status"},"error":{"type":"string","example":"status has invalid value 'bad'. Allowed values: active, disqualified."},"fieldErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","example":"status"},"message":{"type":"string","example":"must not be blank"}}}}}}},"securitySchemes":{"bearer-token":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}