{"openapi":"3.1.0","info":{"title":"CraftDMS API","description":"Document Management System API with global exception handling using ProblemDetail (RFC 9457)","license":{"name":"MIT License","url":"https://opensource.org/licenses/MIT"},"version":"1.0.0"},"servers":[{"url":"https://api.craftdms.com","description":"CRAFTDMS DEV API Server"}],"security":[{"keycloak":[]}],"tags":[{"name":"Partner Settings Management","description":"APIs for managing partner settings per tenant"},{"name":"Roles","description":"APIs for retrieving available roles"},{"name":"Document Status Test","description":"Test endpoints for document status updates"},{"name":"Document category","description":"List document categories"},{"name":"Me","description":"APIs for current user information"},{"name":"Document Settings - Custom Data Fields Management","description":"APIs for managing custom data fields"},{"name":"Pricing Engine - Data Storage","description":"APIs for managing pricing engine - Data Storage Pricing"},{"name":"Subscription Test","description":"Test endpoints for subscription cron jobs"},{"name":"Business Events","description":"APIs for searching and retrieving business events (audit log)"},{"name":"Read Notification Cleanup Test","description":"Test endpoints for the read-notification cleanup job"},{"name":"Unread Notification Reminder Test","description":"Test endpoints for the unread-notification reminder job"},{"name":"User Management","description":"APIs for managing users"},{"name":"Other Documents Archive Test","description":"Test endpoint for other documents cascade archive job"},{"name":"Invoice Management","description":"APIs for managing invoices"},{"name":"Organizational Unit Management","description":"APIs for managing organizational units"},{"name":"Document Settings Management","description":"APIs for managing document settings"},{"name":"Document Notifications","description":"The per-document notification feed: a merged, paged view of the user-authored messages and system events scoped to a document. Any authenticated user may call it; results are limited to documents the caller may read, and within an accessible document all items are visible."},{"name":"Document Type Management","description":"APIs for managing document types"},{"name":"Document content","description":"APIs for document files, versions, and binary content"},{"name":"Document overview","description":"APIs for document overview data"},{"name":"Subscription Ad-Hoc Orders","description":"APIs for managing subscription ad-hoc order pricing"},{"name":"NAV Taxpayer Validation","description":"APIs for validating Hungarian tax numbers via NAV"},{"name":"Document resource","description":"APIs for single-document operations"},{"name":"Subscription Data Storage Pricing","description":"APIs for managing subscription data storage pricing"},{"name":"Pricing Engine - Feature Access","description":"APIs for managing pricing engine - feature access pricing"},{"name":"Role Group Management","description":"APIs for managing role groups"},{"name":"Invoice Item Management","description":"APIs for managing invoice items (charge items)"},{"name":"Document files","description":"APIs for creating and uploading documents (documents)"},{"name":"Document Versions","description":"APIs for document version operations"},{"name":"Document Auto-Archival Test","description":"Test endpoint for the document auto-archival cron job"},{"name":"Document Mass Operations","description":"APIs for document and document mass operations"},{"name":"Partner Management","description":"APIs for managing partners"},{"name":"Notifications","description":"APIs for the recipient's view of notifications: list/search received notifications, read one in full, mark them as read, and get the unread count. Any authenticated user may access only their own notifications; the user is derived from the JWT token."},{"name":"Pricing Engine - Data Tier Price","description":"APIs for accessing data tier prices for subscription management"},{"name":"User Role Management","description":"APIs for managing user roles"},{"name":"Related Documents","description":"List and batch-create OTHER_DOCUMENTs related to a document"},{"name":"Unread Notification Cleanup Test","description":"Test endpoints for the unread-notification cleanup job"},{"name":"Tenant Status Test","description":"Test endpoints for billing-driven tenant suspension"},{"name":"Messages","description":"APIs for sending and managing direct messages"},{"name":"Subscription Feature Access Pricing","description":"APIs for managing subscription feature access pricing"},{"name":"User Notification Channel Settings","description":"APIs for managing user-level notification channel preference overrides. Any authenticated user may access their own settings; tenant and user context are derived from the JWT token."},{"name":"Tenant Management","description":"APIs for managing tenants"},{"name":"Szamlazz Outgoing Invoice","description":"APIs for Szamlazz.hu outgoing invoice management"},{"name":"Incomplete Document Management Test","description":"Test endpoint for the incomplete document management cron job"},{"name":"Notification Settings Management","description":"APIs for managing tenant-level notification settings and channel defaults"},{"name":"Partner Settings Test","description":"Manual triggers for partner settings cron jobs"},{"name":"Document","description":"APIs for creating, searching, and managing documents"},{"name":"Monthly Invoice Test","description":"Test endpoints for monthly invoice issuance"},{"name":"Document Relationship Management","description":"Create, search, list, update, and delete document relationships (primary direction stored; reciprocals from Relationship enum)"},{"name":"Contract Expiration Warning Test","description":"Test endpoints for the contract expiration warning job"},{"name":"Subscription Management","description":"APIs for managing subscriptions"}],"paths":{"/api/users/{userId}/roles":{"get":{"tags":["User Role Management"],"summary":"Get user roles","description":"Retrieves global, tenant, and org unit roles for a user. SUPER_ADMIN can get roles for any user. TENANT_ADMIN can only get roles for users in their own tenant.","operationId":"getUserRoles","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role (SUPER_ADMIN or TENANT_ADMIN)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"User roles retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRolesResponse"}}}}}},"put":{"tags":["User Role Management"],"summary":"Update user roles","description":"Updates global, tenant, and org unit roles for a user. SUPER_ADMIN can update roles for any user. TENANT_ADMIN can only update roles for users in their own tenant. Validation: SUPER_ADMIN cannot coexist with other roles. TENANT_ADMIN cannot coexist with other tenant roles or org unit roles for that tenant. SUPER_ADMIN and TENANT_ADMIN cannot degrade themselves to lower level roles.","operationId":"updateUserRoles","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRolesRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role (SUPER_ADMIN or TENANT_ADMIN)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"User roles updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/user/{id}":{"get":{"tags":["User Management"],"summary":"Get a user by ID","description":"Retrieves a user with the specified ID. TENANT_ADMIN can access users who belong to at least one tenant where they have admin privileges.","operationId":"getUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"User retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}},"put":{"tags":["User Management"],"summary":"Update an existing user","description":"Updates a user with the provided information","operationId":"updateUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}},"delete":{"tags":["User Management"],"summary":"Delete a user by ID","description":"Soft deletes a user with the specified ID. TENANT_ADMIN can only delete users in their own tenant. Optionally accepts a JSON body with a deleteReason. Note: some HTTP proxies and load balancers strip request bodies on DELETE; if deleteReason is not being persisted, verify that your infrastructure passes the body through.","operationId":"deleteUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserRequest"}}}},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - TENANT_ADMIN can only delete users in their own tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"User deleted successfully"}}}},"/api/tenant/{id}":{"get":{"tags":["Tenant Management"],"summary":"Get a tenant by ID","description":"Retrieves a tenant with the specified ID","operationId":"getTenant","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Tenant retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}}}},"put":{"tags":["Tenant Management"],"summary":"Update an existing tenant","description":"Updates a tenant with the provided information","operationId":"updateTenant","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Tenant updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}}}},"delete":{"tags":["Tenant Management"],"summary":"Delete a tenant by ID","description":"Soft deletes a tenant with the specified ID","operationId":"deleteTenant","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Tenant deleted successfully"}}}},"/api/role-group/{id}":{"get":{"tags":["Role Group Management"],"summary":"Get a role group by ID","description":"Retrieves a role group with the specified ID. SUPER_ADMIN can access any role group. TENANT_ADMIN can only access role groups in their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"getRoleGroup","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - TENANT_ADMIN can only access role groups in their own tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Role group retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleGroupResponse"}}}}}},"put":{"tags":["Role Group Management"],"summary":"Update an existing role group","description":"Updates an existing role group with the provided information. All fields are required (full update). SUPER_ADMIN can modify all fields. TENANT_ADMIN can modify name, description, and roleIds within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"updateRoleGroup","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleGroupRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to this role group's tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Role group updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleGroupResponse"}}}}}}},"/api/partner/{partnerId}":{"put":{"tags":["Partner Management"],"summary":"Update an existing partner","description":"Updates all editable basic data fields of a partner and reconciles its contact list in a single transaction. Contacts in the request with an id are updated; without an id are created; existing contacts not in the request are hard-deleted. If contacts is null the existing contacts are left unchanged. For Hungarian partners (country=HU), the tax ID is re-validated against the NAV API only when the tax ID has changed. Tenant association is immutable. Updates are not allowed on partners in DELETED status. TENANT_ADMIN can only update partners within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"updatePartner","parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartnerRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Partner updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerResponse"}}}}}}},"/api/partner-settings/{partnerSettingsId}":{"put":{"tags":["Partner Settings Management"],"summary":"Update partner settings","description":"Updates the partner settings for a tenant. Requires SUPER_ADMIN, TENANT_ADMIN or TENANT_PARTNER_SETTINGS_WRITE role; non-SUPER_ADMIN callers can only update settings within a tenant where they hold the role.","operationId":"updatePartnerSettings","parameters":[{"name":"partnerSettingsId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartnerSettingsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the specified tenant's settings","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Partner settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSettingsResponse"}}}}}}},"/api/org-unit/{orgUnitId}":{"get":{"tags":["Organizational Unit Management"],"summary":"Get an organizational unit by ID","description":"Retrieves an organizational unit with the specified ID. SUPER_ADMIN can access any org unit. TENANT_ADMIN can only access org units in their own tenant.","operationId":"getOrgUnit","parameters":[{"name":"orgUnitId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - TENANT_ADMIN can only access org units in their own tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Organizational unit retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse"}}}}}},"put":{"tags":["Organizational Unit Management"],"summary":"Update an existing organizational unit","description":"Updates an organizational unit with the provided information","operationId":"updateOrgUnit","parameters":[{"name":"orgUnitId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgUnitRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Organizational unit updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse"}}}}}},"delete":{"tags":["Organizational Unit Management"],"summary":"Delete an organizational unit by ID","description":"Soft deletes an organizational unit with the specified ID","operationId":"deleteOrgUnit","parameters":[{"name":"orgUnitId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Organizational unit deleted successfully"}}}},"/api/notifications/status":{"put":{"tags":["Notifications"],"summary":"Bulk-update notification status","description":"Updates the status of one or more of the caller's notifications (e.g. mark as read). The new status must be valid for each notification's channel (READ only for IN_APP, FAILED only for EMAIL); marking READ stamps the read timestamp. IDs not owned by the caller are ignored and not counted.","operationId":"updateStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Notifications updated; returns the updated count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationStatusResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/notification-settings/{tenantId}":{"get":{"tags":["Notification Settings Management"],"summary":"Get tenant-level basic notification settings","description":"Retrieves the basic notification configuration (numeric thresholds) for the given tenant. TENANT_ADMIN can only access tenants they administer; SUPER_ADMIN can access any tenant.","operationId":"getBasicSettings","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the specified tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Basic notification settings retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingsResponse"}}}}}},"put":{"tags":["Notification Settings Management"],"summary":"Update tenant-level basic notification settings","description":"Updates the basic notification configuration (numeric thresholds) for the given tenant. All four fields are required and must be positive integers.","operationId":"updateBasicSettings","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationSettingsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the specified tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Basic notification settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingsResponse"}}}}}}},"/api/notification-settings/{tenantId}/channels":{"get":{"tags":["Notification Settings Management"],"summary":"Get tenant-level channel default settings","description":"Retrieves the tenant-level channel defaults (email/in-app toggles per EventType). Returns one entry per event type, sorted by enum ordinal.","operationId":"getChannelSettings","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the specified tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Channel default settings retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationChannelSettingResponse"}}}}}}},"put":{"tags":["Notification Settings Management"],"summary":"Bulk update tenant-level channel default settings","description":"Updates the tenant-level channel defaults (email/in-app toggles) in bulk. The payload must contain exactly one entry for every EventType. At least one channel must be enabled per event type, except ORGANIZATION_PROCESS_UPDATES which is opt-in and may have both channels disabled.","operationId":"updateChannelSettings","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateNotificationChannelSettingItem"}}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the specified tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Channel default settings updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationChannelSettingResponse"}}}}}}}},"/api/notification-settings/user/channels":{"get":{"tags":["User Notification Channel Settings"],"summary":"Get effective channel settings for the authenticated user","description":"Returns the merged view of channel settings for all EventTypes. User overrides take precedence over tenant defaults. The 'overridden' flag is true when the value comes from a user-specific row and false when inherited from the tenant default.","operationId":"getEffectiveChannelSettings","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Effective channel settings retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserNotificationChannelSettingResponse"}}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"put":{"tags":["User Notification Channel Settings"],"summary":"Bulk update user-level channel overrides","description":"Saves user-level channel preferences using delta logic: values matching the tenant default remove any existing override (revert to default); values differing from the tenant default are upserted as user overrides. The payload must contain exactly one entry for every EventType.","operationId":"updateChannelSettings_1","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateNotificationChannelSettingItem"}}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Channel overrides updated; returns merged effective settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserNotificationChannelSettingResponse"}}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"delete":{"tags":["User Notification Channel Settings"],"summary":"Remove all user overrides","description":"Deletes all user-level channel overrides, reverting every event type to the tenant defaults.","operationId":"deleteAllChannelOverrides","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"All overrides deleted; all event types revert to tenant defaults"},"401":{"description":"Unauthenticated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/messages/{messageId}":{"get":{"tags":["Messages"],"summary":"Get a message by ID","description":"Returns full message detail, including each recipient and the users it resolved to with their per-user read status. Visible to the sender, a recipient, a TENANT_ADMIN of the message's tenant, or a SUPER_ADMIN.","operationId":"getMessage","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - you cannot view this message","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Message retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetailResponse"}}}}}},"put":{"tags":["Messages"],"summary":"Update a message","description":"Updates a message and fully re-resolves its targets (old recipients and notifications are discarded and recreated). Only the sender may update, and only before the message has been delivered (scheduledAt must be in the future).","operationId":"updateMessage","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - only the sender can update the message","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Message updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetailResponse"}}}}}},"delete":{"tags":["Messages"],"summary":"Delete a message","description":"Soft-deletes a message and its notifications. Permitted for a SUPER_ADMIN, a TENANT_ADMIN of the message's tenant, or the sender.","operationId":"deleteMessage","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - you cannot delete this message","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Message deleted successfully"}}}},"/api/me":{"get":{"tags":["Me"],"summary":"Get current user information","description":"Retrieves the current user's information including all roles (global, tenant, and org-unit level)","operationId":"getMe","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"User information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}},"put":{"tags":["Me"],"summary":"Update current user profile","description":"Full update of the current user's own profile: the personal details (firstName, lastName, emailAddress, phoneNumber) are synced to Keycloak and the appLanguage preference is applied. Setting appLanguage back to the tenant default removes the override. All fields are required.","operationId":"updateMe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/document-type/{documentTypeId}":{"get":{"tags":["Document Type Management"],"summary":"Get a document type by ID","description":"Retrieves a single document type by its ID. Users can only retrieve document types within their own tenants.","operationId":"getDocumentType","parameters":[{"name":"documentTypeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document type retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeResponse"}}}}}},"put":{"tags":["Document Type Management"],"summary":"Update an existing document type","description":"Updates the name of an existing document type.","operationId":"updateDocumentType","parameters":[{"name":"documentTypeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentTypeRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document type updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeResponse"}}}}}}},"/api/document-settings/{documentSettingsId}":{"put":{"tags":["Document Settings Management"],"summary":"Update document settings","description":"Updates document settings by ID","operationId":"updateDocumentSettings","parameters":[{"name":"documentSettingsId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentSettingsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSettingsResponse"}}}}}}},"/api/document-relationship/{documentId}":{"put":{"tags":["Document Relationship Management"],"summary":"Modify document relationships","description":"Updates existing relationship rows. Only the forward (primary) direction is stored; reciprocal views are derived from the Relationship enum. Each item must match the current database row (old*) and the relationship must involve the path document. L1: SUPER_ADMIN and TENANT_ADMIN. L2: TENANT_ADMIN may only change relationships for documents in tenants where they are tenant admin.","operationId":"updateDocumentRelationships","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationshipUpdateItem"}}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Relationships updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationshipUpdateItem"}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/custom-data-field/{customDataFieldId}":{"get":{"tags":["Document Settings - Custom Data Fields Management"],"summary":"Get a custom data field by ID","description":"Retrieves a single custom data field by its ID. Users can only retrieve fields within their own tenants.","operationId":"getCustomDataField","parameters":[{"name":"customDataFieldId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Custom data field retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDataFieldResponse"}}}}}},"put":{"tags":["Document Settings - Custom Data Fields Management"],"summary":"Update an existing custom data field","description":"Updates an existing custom data field. Some fields cannot be modified if the field is in use.","operationId":"updateCustomDataField","parameters":[{"name":"customDataFieldId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomDataFieldRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Custom data field updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDataFieldResponse"}}}}}}},"/api/user":{"post":{"tags":["User Management"],"summary":"Create a new user","description":"Creates a new user with the provided information","operationId":"createUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"User created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/api/user/{id}/resend-invitation":{"post":{"tags":["User Management"],"summary":"Resend the invitation email","description":"Sends a new invitation email with a fresh activation link to a user who has not yet activated their account","operationId":"resendInvitation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Invitation email sent"}}}},"/api/user/status":{"post":{"tags":["User Management"],"summary":"Update user status in bulk","description":"Updates the status of multiple users. This operation is transactional - either all users are updated or none are. TENANT_ADMIN can only update status for users in their own tenant. When deleting multiple users, all users receive the same deleteReason.","operationId":"updateUserStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - TENANT_ADMIN can only update status for users in their own tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"User statuses updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/api/user/search":{"post":{"tags":["User Management"],"summary":"Search users with pagination","description":"Searches for users based on various criteria","operationId":"searchUsers","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUserRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Users retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/api/user/anonymisation/trigger":{"post":{"tags":["User Management"],"summary":"Trigger user anonymisation (testing only)","description":"Manually triggers the deleted-user anonymisation process as if run by the scheduler. Restricted to SUPER_ADMIN.","operationId":"triggerAnonymisation","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Anonymisation process completed","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/test/unread-notification-reminder/run":{"post":{"tags":["Unread Notification Reminder Test"],"summary":"Run the unread-notification reminder job","description":"Manually triggers the unread-notification reminder scan using an optional reference date (treated as start-of-day UTC). If no date is provided, uses today's date. This simulates what the daily cron job does, respecting the same per-tenant window and idempotency rules (each original is reminded at most once).","operationId":"runUnreadNotificationReminderJob","parameters":[{"name":"referenceDate","in":"query","description":"Reference date treated as 'now' at start-of-day UTC (format: yyyy-MM-dd). If omitted, uses today's date. Use future dates to simulate unread notifications entering the reminder window.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-09-01"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnreadNotificationReminderRunResponse"}}}}}}},"/api/test/tenant-status/run":{"post":{"tags":["Tenant Status Test"],"summary":"Run the billing-driven tenant suspension job","description":"Manually trigger the daily job that suspends subscriptions with overdue unpaid invoices. Suspension counts are written to the application log.","operationId":"runSuspensionJob","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job executed","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/test/subscription/process-version-expiry":{"post":{"tags":["Subscription Test"],"summary":"Trigger version expiry job (pair-aware activation + expiry suspension)","description":"Manually triggers the every-5-minute job that activates PENDING FA + DSP pairs (covers semantics) and suspends ACTIVE versions whose validTo has passed.","operationId":"processVersionExpiry","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Version expiry processing completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ActivationResponse"}}}}}}},"/api/test/subscription/clone-recurring-adhoc":{"post":{"tags":["Subscription Test"],"summary":"Trigger recurring ad-hoc item cloning","description":"Manually triggers the monthly cron job that clones recurring ad-hoc items from the previous billing month into the current month.","operationId":"cloneRecurringAdHocItems","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Cloning completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CloningResponse"}}}}}}},"/api/test/subscription/activate-pending":{"post":{"tags":["Subscription Test"],"summary":"Trigger pending subscription activation","description":"Manually triggers the daily cron job that activates PENDING subscriptions whose mandatory feature validFrom has passed.","operationId":"activatePendingSubscriptions","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Activation completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ActivationResponse"}}}}}}},"/api/test/partner-settings/nav-update":{"post":{"tags":["Partner Settings Test"],"summary":"Trigger NAV update job","description":"Manually triggers the NAV partner data update job for Hungarian partners. If no reference time is provided, uses current UTC time.","operationId":"triggerNavUpdate","parameters":[{"name":"referenceTime","in":"query","description":"Reference time for logging (format: yyyy-MM-ddTHH:mm:ssZ). If omitted, uses current UTC time.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2025-06-15T04:00:00Z"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"NAV update job completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NavUpdateResponse"}}}}}}},"/api/test/partner-settings/auto-suspend":{"post":{"tags":["Partner Settings Test"],"summary":"Trigger auto-suspend job","description":"Manually triggers the auto-suspend inactive partners job. If no reference time is provided, uses current UTC time. Use custom reference times to simulate 'what if' scenarios.","operationId":"triggerAutoSuspend","parameters":[{"name":"referenceTime","in":"query","description":"Reference time for inactivity calculations (format: yyyy-MM-ddTHH:mm:ssZ). If omitted, uses current UTC time.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2025-06-15T02:00:00Z"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Auto-suspend job completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AutoSuspendResponse"}}}}}}},"/api/test/partner-settings/auto-delete":{"post":{"tags":["Partner Settings Test"],"summary":"Trigger auto-delete job","description":"Manually triggers the auto-delete suspended partners job. If no reference time is provided, uses current UTC time. Use custom reference times to simulate 'what if' scenarios.","operationId":"triggerAutoDelete","parameters":[{"name":"referenceTime","in":"query","description":"Reference time for deletion calculations (format: yyyy-MM-ddTHH:mm:ssZ). If omitted, uses current UTC time.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2025-06-15T02:30:00Z"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Auto-delete job completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AutoDeleteResponse"}}}}}}},"/api/test/other-documents-archive/trigger":{"post":{"tags":["Other Documents Archive Test"],"summary":"Trigger other documents cascade archive job","description":"Manually triggers the cascade archive job that archives OTHER_DOCUMENT entries linked to ARCHIVED documents for tenants where cascadeArchiveToDocuments is enabled. If no reference time is provided, uses the current UTC time. This simulates what the daily cron job at 03:30 UTC does.","operationId":"trigger","parameters":[{"name":"referenceTime","in":"query","description":"Reference time for the archive timestamp (format: yyyy-MM-ddTHH:mm:ssZ). If omitted, uses the current UTC time.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2025-06-15T03:30:00Z"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Archive job completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OtherDocumentsArchiveResponse"}}}}}}},"/api/test/invoices/issue-monthly":{"post":{"tags":["Monthly Invoice Test"],"summary":"Issue monthly invoices for a period","description":"Manually trigger monthly invoice issuance for the specified accounting period.","operationId":"issueMonthlyInvoices","parameters":[{"name":"year","in":"query","description":"Year of accounting period (e.g. 2025). If omitted, uses previous month.","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"month","in":"query","description":"Month of accounting period (1-12). If omitted, uses previous month.","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Invoices issued successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MonthlyInvoiceIssueResponse"}}}}}}},"/api/test/incomplete-document-management/trigger":{"post":{"tags":["Incomplete Document Management Test"],"summary":"Trigger incomplete document management job","description":"Manually triggers the job that archives or deletes INCOMPLETE documents that have been inactive longer than the tenant-configured threshold. If no reference time is provided, uses the current UTC time. This simulates what the daily cron job at 04:30 UTC does.","operationId":"trigger_1","parameters":[{"name":"referenceTime","in":"query","description":"Reference time for the inactivity cutoff and action timestamp (format: yyyy-MM-ddTHH:mm:ssZ). If omitted, uses the current UTC time.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2025-06-15T04:30:00Z"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IncompleteDocumentManagementResponse"}}}}}}},"/api/test/document-status/update":{"post":{"tags":["Document Status Test"],"summary":"Update document statuses","description":"Manually trigger document status update using an optional reference date. If no date is provided, uses today's date. This simulates what the daily cron job does.","operationId":"updateDocumentStatuses","parameters":[{"name":"referenceDate","in":"query","description":"Reference date for status calculation (format: yyyy-MM-dd). If omitted, uses today's date. Use future dates to simulate 'what if' scenarios.","required":false,"schema":{"type":"string","format":"date"},"example":"2025-06-15"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Status update completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentStatusUpdateResponse"}}}}}}},"/api/test/document-auto-archival/trigger":{"post":{"tags":["Document Auto-Archival Test"],"summary":"Trigger document auto-archival job","description":"Manually triggers the job that moves EXPIRED documents to ARCHIVED status when they have been expired longer than the tenant-configured threshold. If no reference date is provided, uses today's date. Note: this endpoint only handles the EXPIRED → ARCHIVED transition. The daily cron at 03:00 UTC runs the full status update (all transitions). Note: linked other documents are NOT cascade-archived by this endpoint. To test the full flow, also trigger POST /api/test/other-documents-archive/trigger after this endpoint.","operationId":"trigger_2","parameters":[{"name":"referenceDate","in":"query","description":"Reference date for the archival threshold calculation (format: yyyy-MM-dd). If omitted, uses today's date. Use future dates to simulate 'what if' scenarios.","required":false,"schema":{"type":"string","format":"date"},"example":"2025-06-15"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job completed successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DocumentAutoArchivalResponse"}}}}}}},"/api/test/delete-unread-notifications/run":{"post":{"tags":["Unread Notification Cleanup Test"],"summary":"Run the unread-notification cleanup job","description":"Manually triggers the unread-notification cleanup scan using an optional reference date (treated as start-of-day UTC). If no date is provided, uses today's date. This simulates what the daily cron job does, hard-deleting unread (PENDING/SENT) notifications older than each tenant's threshold.","operationId":"runUnreadNotificationCleanupJob","parameters":[{"name":"referenceDate","in":"query","description":"Reference date treated as 'now' at start-of-day UTC (format: yyyy-MM-dd). If omitted, uses today's date. Use future dates to simulate unread notifications crossing the deletion threshold.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-09-01"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnreadNotificationCleanupRunResponse"}}}}}}},"/api/test/delete-read-notifications/run":{"post":{"tags":["Read Notification Cleanup Test"],"summary":"Run the read-notification cleanup job","description":"Manually triggers the read-notification cleanup scan using an optional reference date (treated as start-of-day UTC). If no date is provided, uses today's date. This simulates what the daily cron job does, hard-deleting READ notifications whose read_at is older than each tenant's threshold.","operationId":"runReadNotificationCleanupJob","parameters":[{"name":"referenceDate","in":"query","description":"Reference date treated as 'now' at start-of-day UTC (format: yyyy-MM-dd). If omitted, uses today's date. Use future dates to simulate read notifications crossing the deletion threshold.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-09-01"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReadNotificationCleanupRunResponse"}}}}}}},"/api/test/contract-expiration-warning/run":{"post":{"tags":["Contract Expiration Warning Test"],"summary":"Run the contract expiration warning job","description":"Manually triggers the contract expiration warning scan using an optional reference date. If no date is provided, uses today's date. This simulates what the daily cron job does, respecting the same per-tenant window and idempotency rules.","operationId":"run","parameters":[{"name":"referenceDate","in":"query","description":"Reference date treated as 'today' (format: yyyy-MM-dd). If omitted, uses today's date. Use future dates to simulate contracts entering the warning window.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-09-01"}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Job completed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContractExpirationWarningRunResponse"}}}}}}},"/api/test/billing/create-invoice":{"post":{"tags":["billing-test-controller"],"operationId":"createTestInvoice","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BillingCreateResponse"}}}}}}},"/api/test-data/reset":{"post":{"tags":["test-data-controller"],"operationId":"resetDatabase","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/tenant":{"post":{"tags":["Tenant Management"],"summary":"Create a new tenant","description":"Creates a new tenant with the provided information","operationId":"createTenant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Tenant created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}}}}},"/api/tenant/search":{"post":{"tags":["Tenant Management"],"summary":"Search tenants with pagination","description":"Searches for tenants based on various criteria","operationId":"searchTenants","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTenantRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Tenants retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}}}}},"/api/subscription/{subscriptionId}/admin-suspend":{"post":{"tags":["Subscription Management"],"summary":"Admin suspend subscription","description":"SUPER_ADMIN only. Suspends the subscription and patches feature access and data storage validTo to current time.","operationId":"adminSuspend","parameters":[{"name":"subscriptionId","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Subscription suspended"}}}},"/api/subscription/{id}/feature-access-pricing":{"get":{"tags":["Subscription Feature Access Pricing"],"summary":"Get all feature access pricing versions","description":"Returns all versions of feature access pricing for a subscription","operationId":"getAllVersions","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"All feature access pricing versions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingAllVersionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"post":{"tags":["Subscription Feature Access Pricing"],"summary":"Create new feature access pricing version","description":"Creates a new version of feature access pricing for a subscription. If a previous version is ACTIVE, it will be automatically suspended.","operationId":"createVersion","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionFeatureAccessPricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Feature access pricing version created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionFeatureAccessPricingVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/data-storage-pricing":{"get":{"tags":["Subscription Data Storage Pricing"],"summary":"Get all data storage pricing versions","description":"Returns all versions of data storage pricing for a subscription. The API requires authentication and returns user information based on the token.","operationId":"getAllVersions_1","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"All data storage pricing versions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingAllVersionsResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"post":{"tags":["Subscription Data Storage Pricing"],"summary":"Create new data storage pricing version","description":"Creates a new version of data storage pricing for a subscription. If a previous version is ACTIVE, it will be automatically suspended.","operationId":"createVersion_1","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionDataStoragePricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Data storage pricing version created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDataStoragePricingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/ad-hoc-order-pricing":{"get":{"tags":["Subscription Ad-Hoc Orders"],"summary":"Get all ad-hoc order pricing items","description":"Returns all ad-hoc price elements for the subscription","operationId":"getAdHocOrderPricing","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Ad-hoc order pricing items retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdHocOrderPricingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"post":{"tags":["Subscription Ad-Hoc Orders"],"summary":"Create ad-hoc order pricing item","description":"Creates a new ad-hoc price item under the subscription","operationId":"createAdHocOrderPricingItem","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdHocOrderPricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Ad-hoc order pricing item created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdHocOrderPricingItemDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/role-group":{"post":{"tags":["Role Group Management"],"summary":"Create a new role group","description":"Creates a new role group with the provided information. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"createRoleGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleGroupRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to specified tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Role group created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleGroupResponse"}}}}}}},"/api/role-group/status":{"post":{"tags":["Role Group Management"],"summary":"Update role group status in bulk","description":"Updates the status of multiple role groups. This operation is transactional - either all role groups are updated or none are. If status = DELETED and there are no associations in USER_ORG_UNIT_ROLE_GROUP_JOIN, the role group is hard deleted. If associations exist, only status is set to DELETED. TENANT_ADMIN can only change status for Role Groups within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"updateRoleGroupStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleGroupStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to one or more role groups' tenants","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Role group statuses updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleGroupResponse"}}}}}}},"/api/role-group/search":{"post":{"tags":["Role Group Management"],"summary":"Search role groups with pagination","description":"Searches for role groups based on various criteria. SUPER_ADMIN can search any role groups. TENANT_ADMIN can only search role groups in their own tenant.","operationId":"searchRoleGroups","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRoleGroupRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Role groups retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleGroupResponse"}}}}}}},"/api/role-group/mass-role-management/remove-users":{"post":{"tags":["Role Group Management"],"summary":"Mass remove users from a role group","description":"Removes multiple users from a role group for a specific org unit. SUPER_ADMIN can modify all. TENANT_ADMIN can only modify role groups in their own tenants.","operationId":"massRemoveUsersFromRoleGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MassRemoveUsersRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to this role group's tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Users removed successfully"}}}},"/api/role-group/mass-role-management/add-users":{"post":{"tags":["Role Group Management"],"summary":"Mass add users to a role group","description":"Adds multiple users to a role group for a specific org unit. SUPER_ADMIN can modify all. TENANT_ADMIN can only modify role groups in their own tenants.","operationId":"massAddUsersToRoleGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MassAddUsersRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to this role group's tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Users added successfully"}}}},"/api/pricing-engine/feature-access-pricing":{"post":{"tags":["Pricing Engine - Feature Access"],"summary":"Create new feature access pricing or new version","description":"Creates a new feature access pricing or a new version of an existing feature. If a feature with the given displayName exists, creates a new version. Otherwise, creates a new feature with version 1. Requires SUPER_ADMIN role.","operationId":"createFeatureAccessPricing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeatureAccessPricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Feature access pricing created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/feature-access-pricing/status":{"post":{"tags":["Pricing Engine - Feature Access"],"summary":"Update status of latest feature version","description":"Modifies the status of the latest version of a feature to SUSPENDED. Only SUSPENDED status is allowed. Requires SUPER_ADMIN role.","operationId":"updateFeatureAccessPricingStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeatureAccessPricingStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/data-storage-pricing":{"get":{"tags":["Pricing Engine - Data Storage"],"summary":"Get latest data storage pricing version","description":"Returns the latest version of the data storage pricing entity","operationId":"getLatestVersion","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - SUPER_ADMIN role required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Latest pricing version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}}}},"post":{"tags":["Pricing Engine - Data Storage"],"summary":"Create new data storage pricing version","description":"Creates a new version of data storage pricing. If status is ACTIVE, the previous active version will be automatically suspended.","operationId":"createNewVersion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataStoragePricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - SUPER_ADMIN role required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"New pricing version created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}}}}},"/api/partner":{"post":{"tags":["Partner Management"],"summary":"Create a new partner","description":"Creates a new partner with contacts. For Hungarian partners (country=HU), the tax ID is validated against the NAV API if available. TENANT_ADMIN can only create partners within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"createPartner","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the specified tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Partner created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerResponse"}}}}}}},"/api/partner/status":{"post":{"tags":["Partner Management"],"summary":"Update partner status in bulk","description":"Updates the status of multiple partners. This operation is transactional - either all partners are updated or none are. TENANT_ADMIN can only change status for partners within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"updatePartnerStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartnerStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to one or more partners' tenants","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Partner statuses updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartnerResponse"}}}}}}}},"/api/partner/search":{"post":{"tags":["Partner Management"],"summary":"Search partners with pagination","description":"Searches for partners based on various criteria. Requires SUPER_ADMIN, TENANT_ADMIN, or ORG_UNIT_ADMIN role. Results are scoped to the user's allowed tenants.","operationId":"searchPartners","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPartnerRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Partner retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerResponse"}}}}}}},"/api/partner-settings/search":{"post":{"tags":["Partner Settings Management"],"summary":"Search partner settings","description":"Searches partner settings. Results are automatically scoped to the tenants accessible by the current user.","operationId":"searchPartnerSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPartnerSettingsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Partner settings retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartnerSettingsResponse"}}}}}}}},"/api/org-unit":{"post":{"tags":["Organizational Unit Management"],"summary":"Create a new organizational unit","description":"Creates a new organizational unit with the provided information","operationId":"createOrgUnit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgUnitRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Organizational unit created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse"}}}}}}},"/api/org-unit/status":{"post":{"tags":["Organizational Unit Management"],"summary":"Update org unit status in bulk","description":"Updates the status of multiple org units. This operation is transactional - either all org units are updated or none are. If status is set to DELETED and there are no associated users and no entity relationships, the org unit will be hard deleted. Otherwise, it will be soft deleted (status set to DELETED).","operationId":"updateOrgUnitStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgUnitStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role (SUPER_ADMIN or TENANT_ADMIN)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Org unit statuses updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse"}}}}}}},"/api/org-unit/search":{"post":{"tags":["Organizational Unit Management"],"summary":"Search organizational units with pagination","description":"Searches for organizational units based on various criteria. SUPER_ADMIN can search any org units. TENANT_ADMIN can only search org units in their own tenant.","operationId":"searchOrgUnits","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchOrgUnitRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Organizational units retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse"}}}}}}},"/api/notifications/search":{"post":{"tags":["Notifications"],"summary":"Search my received notifications","description":"Searches the authenticated user's received notifications across both sources (direct messages and system events) with optional filters (title, sender, source, status, channel, date range). Undelivered (PENDING) notifications are excluded. Default sort is by createdAt descending.","operationId":"searchNotifications","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchNotificationsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Notifications retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSummaryResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/nav/validate-taxpayer":{"post":{"tags":["NAV Taxpayer Validation"],"summary":"Validate a Hungarian tax number","description":"Validates a Hungarian tax number against the NAV Online Számla API and returns taxpayer information if valid","operationId":"validateTaxpayer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxpayerValidationRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"NAV API unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Validation completed (check 'valid' field for result)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxpayerValidationResponse"}}}},"502":{"description":"NAV API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxpayerValidationResponse"}}}}}}},"/api/messages":{"post":{"tags":["Messages"],"summary":"Create a direct message","description":"Creates a message, resolves its recipients (users, role groups, org units) to individual users, and creates one IN_APP notification per resolved user. Notifications are SENT immediately when scheduledAt is null, otherwise PENDING. Any authenticated user may send a message within a tenant they belong to.","operationId":"createMessage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - you are not a member of the tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Message created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetailResponse"}}}}}}},"/api/messages/search":{"post":{"tags":["Messages"],"summary":"Search messages","description":"Searches messages within a tenant. Regular users only see messages they sent or received; a TENANT_ADMIN sees all messages in their tenant and a SUPER_ADMIN sees all. Default sort is by message date (createdAt) descending.","operationId":"searchMessages","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchMessagesRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - you do not have access to this tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Messages retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSummaryResponse"}}}}}}},"/api/me/notifications/status":{"post":{"tags":["Me"],"summary":"Mark my in-app notifications as read","description":"Bulk-updates the status of the caller's own in-app notifications. Only READ is accepted; marking READ stamps the read timestamp. The operation is transactional and all-or-none: if any ID is missing or not one of the caller's in-app notifications, nothing is updated. Returns the updated notifications.","operationId":"markMyNotificationsRead","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeNotificationStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Notifications updated; returns the updated items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MeNotificationResponse"}}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/me/notifications/search":{"post":{"tags":["Me"],"summary":"Search my in-app notifications","description":"Searches the authenticated user's in-app notifications (channel IN_APP and recipient are server-hardcoded) with optional filters (status, eventCategory, date range). Each item carries its actor (sender for messages, event actor for events) and, for events, the eventCategory and entityId for deep-linking. Undelivered (PENDING) notifications are excluded. Default sort is by createdAt descending.","operationId":"searchMyNotifications","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeNotificationSearchRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Notifications retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeNotificationResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/invoice/search":{"post":{"tags":["Invoice Management"],"summary":"Search invoices with pagination","description":"Searches for invoices based on various criteria. SUPER_ADMIN can search all invoices. TENANT_ADMIN can only search invoices for their own tenants.","operationId":"searchInvoices","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchInvoiceRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Invoices retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}}}}},"/api/invoice-item/search":{"post":{"tags":["Invoice Item Management"],"summary":"Search invoice items with pagination","description":"Searches for invoice items (charge items) based on various criteria. SUPER_ADMIN can search all items. TENANT_ADMIN can only search items for their own tenants.","operationId":"searchInvoiceItems","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchInvoiceItemRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Invoice items retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItemResponse"}}}}}}},"/api/document":{"post":{"tags":["Document"],"summary":"Create a new document","description":"Creates a new document with financial data and optional custom field values.","operationId":"createDocument","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Document created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}}}}},"/api/document/{documentId}/related-documents/batch":{"post":{"tags":["Related Documents"],"summary":"Batch-create related documents","description":"Creates N OTHER_DOCUMENTs, uploads one file to each, and links each to the document. All files must share the same document type. Names are auto-generated from the parent document number unless overridden positionally via metadata.names.","operationId":"batchCreateRelatedDocuments","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BatchUploadRequest"},"encoding":{"metadata":{"contentType":"application/json"}}}}},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Related documents created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateRelatedDocumentsResponse"}}}}}}},"/api/document/{documentId}/file":{"post":{"tags":["Document files"],"summary":"Upload file to document","description":"Uploads a file to a document (document). Creates a new version of the document. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only upload to documents in tenants where they are tenant admins.","operationId":"uploadDocumentFile","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadDocumentRequest"},"encoding":{"metadata":{"contentType":"application/json"}}}}},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Document uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionResponse"}}}}}}},"/api/document/search":{"post":{"tags":["Document"],"summary":"Search documents with pagination","description":"Searches documents by criteria. Response includes documentSensitivity and documentCategory. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only search in tenants where they are tenant admins.","operationId":"searchDocuments","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchDocumentRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}}}}},"/api/document/notifications/search":{"post":{"tags":["Document Notifications"],"summary":"Search a document's notification feed","description":"Returns the merged message + event feed for the requested document(s), newest first, each item tagged with its source (MESSAGE/EVENT) and the caller's read-state. Optional filters: source, the caller's read status, and a creation date range. Documents the caller cannot read contribute no items.","operationId":"searchDocumentNotifications","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchDocumentNotificationsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feed retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNotificationItemResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/document/mass-operation/delete-user":{"post":{"tags":["Document Mass Operations"],"summary":"Mass delete document owner","description":"Removes the specified user as owner from the given documents (clears owner; document owner is left empty). L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only manipulate owners in documents where they are tenant admins; SUPER_ADMIN has no limitations.","operationId":"massDeleteUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MassDeleteDocumentOwnerRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document owners updated successfully"}}}},"/api/document/mass-operation/change-org-unit":{"post":{"tags":["Document Mass Operations"],"summary":"Mass change org unit for documents","description":"Changes the org unit for multiple documents. WARNING: This operation clears the document owner and sets status to INCOMPLETE. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only manipulate documents in their admin tenants.","operationId":"massChangeOrgUnit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MassChangeOrgUnitRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Org unit changed successfully"}}}},"/api/document/mass-operation/add-user":{"post":{"tags":["Document Mass Operations"],"summary":"Mass add document owner","description":"Reassigns owner for multiple documents. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only manipulate owners in documents where they are tenant admins; SUPER_ADMIN has no limitations.","operationId":"massAddUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MassAddDocumentOwnerRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document owners updated successfully"}}}},"/api/document/download":{"post":{"tags":["Document"],"summary":"Download document PDF(s)","description":"Downloads one or multiple document PDFs. Single document returns a PDF file; multiple return a ZIP. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only download documents in tenants where they are tenant admins. Returns the latest uploaded version of each requested document from storage.","operationId":"downloadDocuments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDownloadRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Single document: application/pdf; multiple: application/zip","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/api/document-type":{"post":{"tags":["Document Type Management"],"summary":"Create a new document type","description":"Creates a new document type with the provided information. Individual prefix must be unique across the tenant.","operationId":"createDocumentType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentTypeRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Document type created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeResponse"}}}}}}},"/api/document-type/status":{"post":{"tags":["Document Type Management"],"summary":"Update document type status in bulk","description":"Updates the status of multiple document types. This operation is transactional - either all document types are updated or none are.","operationId":"updateDocumentTypeStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentTypeStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document type statuses updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeResponse"}}}}}}},"/api/document-type/search":{"post":{"tags":["Document Type Management"],"summary":"Search document types with pagination","description":"Searches for document types based on various criteria. Users can only search document types within their own tenants.","operationId":"searchDocumentTypes","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchDocumentTypeRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document types retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeResponse"}}}}}}},"/api/document-settings/search":{"post":{"tags":["Document Settings Management"],"summary":"Search document settings with pagination","description":"Searches for document settings based on tenant IDs","operationId":"searchDocumentSettings","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchDocumentSettingsRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document settings retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSettingsResponse"}}}}}}},"/api/document-relationship":{"post":{"tags":["Document Relationship Management"],"summary":"Create document relationship","description":"Creates a relationship between two documents. Non-primary types are normalized by swapping source and target so only the primary direction is stored. L1: SUPER_ADMIN and TENANT_ADMIN. L2: TENANT_ADMIN may only create relationships between documents in tenants where they are tenant admin.","operationId":"createDocumentRelationship","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationshipCreateRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Relationship created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationshipCreated"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/document-relationship/{sourceDocumentId}/batch":{"post":{"tags":["Document Relationship Management"],"summary":"Batch-create document relationships","description":"Associates multiple target documents to a single source document in one call. Anchoring the source in the path prevents accidental cross-document changes. Idempotent: relationships that already exist (forward or reciprocal duplicates) are silently skipped. Purely additive — existing relationships are never modified or removed. All per-pair validation rules from POST /api/document-relationship apply; any validation failure on a single pair (self-reference, not found, tenant mismatch, category mismatch, exclusive-type conflict, L2 auth) aborts the whole batch. L1: SUPER_ADMIN and TENANT_ADMIN. L2: TENANT_ADMIN may only create relationships between documents in tenants where they are tenant admin.","operationId":"createDocumentRelationshipsBatch","parameters":[{"name":"sourceDocumentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationshipBatchCreateRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Batch processed (returns created/skipped/total counts)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationshipBatchCreated"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/document-relationship/search":{"post":{"tags":["Document Relationship Management"],"summary":"Search document relationships (paginated)","description":"Filters by tenant (required) and optional source/target/type. When documentId is set, traverses up to fetchDepth hops upstream (document as target, walking to sources) and downstream (document as source, walking to targets); fetchDepth 0 returns only edges incident on that document. documentId cannot be combined with sourceDocumentId or targetDocumentId. L1: SUPER_ADMIN and TENANT_ADMIN. L2: TENANT_ADMIN only for tenants they administer.","operationId":"searchDocumentRelationships","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationshipSearchRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Search results (Spring Data Page JSON)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationshipSearchItem"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/custom-data-field":{"post":{"tags":["Document Settings - Custom Data Fields Management"],"summary":"Create a new custom data field","description":"Creates a new custom data field with the provided information. Name must be unique per tenant.","operationId":"createCustomDataField","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomDataFieldRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Custom data field created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDataFieldResponse"}}}}}}},"/api/custom-data-field/status":{"post":{"tags":["Document Settings - Custom Data Fields Management"],"summary":"Update custom data field status in bulk","description":"Updates the status of multiple custom data fields. This operation is transactional - either all fields are updated or none are.","operationId":"updateCustomDataFieldStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomDataFieldStatusRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Custom data field statuses updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDataFieldResponse"}}}}}}},"/api/custom-data-field/search":{"post":{"tags":["Document Settings - Custom Data Fields Management"],"summary":"Search custom data fields with pagination","description":"Searches for custom data fields based on various criteria. Users can only search fields within their own tenants.","operationId":"searchCustomDataFields","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCustomDataFieldRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Custom data fields retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDataFieldResponse"}}}}}}},"/api/business-events/search":{"post":{"tags":["Business Events"],"summary":"Search business events","description":"Searches business events (audit log) with pagination and optional filters. tenantIds is required. TENANT_ADMIN can only search events within tenants they administer. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"searchBusinessEvents","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchBusinessEventRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - insufficient role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Business events retrieved successfully. Response is a paginated Page<BusinessEventResponse> wrapper.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessEventResponse"}}}},"401":{"description":"Unauthorized - missing or invalid authentication token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/feature-access-pricing/latest":{"get":{"tags":["Subscription Feature Access Pricing"],"summary":"Get latest feature access pricing","description":"Returns the latest feature access pricing details for a subscription","operationId":"getLatestVersion_1","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Latest feature access pricing retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionFeatureAccessPricingLatestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"patch":{"tags":["Subscription Feature Access Pricing"],"summary":"Patch latest feature access pricing version","description":"Updates validFrom and/or validTo of the latest feature access pricing version. validFrom can only be changed if it has not yet started.","operationId":"patchLatestVersion","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFeatureAccessPricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature access pricing version updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionFeatureAccessPricingVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/data-storage-pricing/latest":{"get":{"tags":["Subscription Data Storage Pricing"],"summary":"Get latest data storage pricing","description":"Returns the latest data storage pricing details for a subscription. The API requires authentication and returns user information based on the token.","operationId":"getLatestVersion_2","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Latest data storage pricing retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingLatestResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}},"patch":{"tags":["Subscription Data Storage Pricing"],"summary":"Patch latest data storage pricing version","description":"Updates validFrom of the latest data storage pricing version. validFrom can only be changed if it has not yet started. validTo cannot be patched directly — it follows feature access validTo, so a non-null validTo is rejected with 400 (CRAFT2-802).","operationId":"patchLatestVersion_1","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDataStoragePricingRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Data storage pricing version updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDataStoragePricingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/partner/{partnerId}/contact":{"patch":{"tags":["Partner Management"],"summary":"Add a contact to a partner","description":"Adds a new contact to an existing partner. TENANT_ADMIN can only add contacts to partners within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"addContact","parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerContactRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the partner's tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"201":{"description":"Contact created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerContactResponse"}}}}}}},"/api/document/{documentId}":{"delete":{"tags":["Document"],"summary":"Archive document","description":"Soft-deletes a document by setting its status to ARCHIVED. Optionally cascades to directly linked target documents when cascade_archive_to_documents is enabled. L1: SUPER_ADMIN, TENANT_ADMIN, ORG_UNIT_ADMIN. L2: TENANT_ADMIN restricted to their admin tenants; ORG_UNIT_ADMIN restricted to org units they belong to.","operationId":"archiveDocument","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveDocumentRequest"}}}},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Document archived (no content body)"}}},"patch":{"tags":["Document resource"],"summary":"Update document (partial)","description":"Updates a document by ID. Only sent fields are updated (partial update). L1: SUPER_ADMIN and TENANT_ADMIN only. L2: You can only update documents in the tenant that your user is associated with. Body may contain any subset of document fields (name, description, status, dates, financial data, etc.).","operationId":"updateDocument","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentRequest"}}},"required":true},"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - document not in your tenant(s)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}}}}},"/api/test-data/wf":{"get":{"tags":["test-data-controller"],"operationId":"wf","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/tenant/{id}/dashboard":{"get":{"tags":["Tenant Management"],"summary":"Get tenant dashboard data","description":"Returns aggregated data for the tenant dashboard screen","operationId":"getTenantDashboard","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Dashboard data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDashboardResponse"}}}}}}},"/api/szamlazz-outgoing-invoice/{id}/pdf":{"get":{"tags":["Szamlazz Outgoing Invoice"],"summary":"Download outgoing invoice PDF","description":"Downloads the PDF of an outgoing invoice received from Szamlazz.hu via the Pénzügyi Adatkapcsolat. All three identifiers must match the same record: externalId ({id}), invoiceNumber, and szamlazzId (Szamlazz.hu internal numeric ID).","operationId":"downloadInvoicePdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceNumber","in":"query","required":true,"schema":{"type":"string"}},{"name":"szamlazzId","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable - Storage service error","content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"PDF retrieved successfully","content":{"application/pdf":{}}},"401":{"description":"Unauthorized - Missing or invalid authentication token","content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{subscriptionId}":{"get":{"tags":["Subscription Management"],"summary":"Get subscription overview","description":"Returns an overview of a subscription including status, validity dates, and all pricing items","operationId":"getSubscriptionOverview","parameters":[{"name":"subscriptionId","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Subscription overview retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOverviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{subscriptionId}/summary":{"get":{"tags":["Subscription Management"],"summary":"Get subscription summary","description":"Returns the subscription summary including status, validity dates and subscription types","operationId":"getSummary","parameters":[{"name":"subscriptionId","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Subscription summary retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/feature-access-pricing/version":{"get":{"tags":["Subscription Feature Access Pricing"],"summary":"Get available versions list","description":"Returns the list of available feature access pricing versions for a subscription","operationId":"getVersionList","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Version list retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingVersionListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/feature-access-pricing/version/{versionNumber}":{"get":{"tags":["Subscription Feature Access Pricing"],"summary":"Get specific version of feature access pricing","description":"Returns a specific version of feature access pricing for a subscription","operationId":"getVersionByNumber","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}},{"name":"versionNumber","in":"path","description":"Version number","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature access pricing version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionFeatureAccessPricingVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/data-storage-pricing/version":{"get":{"tags":["Subscription Data Storage Pricing"],"summary":"Get available versions list","description":"Returns the list of available data storage pricing versions for a subscription. The API requires authentication and returns user information based on the token.","operationId":"getVersionList_1","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Version list retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingVersionListResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/data-storage-pricing/version/{versionNumber}":{"get":{"tags":["Subscription Data Storage Pricing"],"summary":"Get specific version of data storage pricing","description":"Retrieves a specific version of data storage pricing and all associated data tiers for a subscription. The API requires authentication and returns user information based on the token.","operationId":"getDataStoragePricingVersion","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}},{"name":"versionNumber","in":"path","description":"Version number","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Data storage pricing version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDataStoragePricingResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/roles":{"get":{"tags":["Roles"],"summary":"Get all available roles","description":"Retrieves all available roles in the system, filtered by user permissions. SUPER_ADMIN gets all roles including all org-unit role groups. TENANT_ADMIN gets all global and tenant roles, but only org-unit role groups for tenants they have access to.","operationId":"getAllRoles","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - caller does not have the required role (SUPER_ADMIN or TENANT_ADMIN)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"All roles retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllRolesResponse"}}}},"401":{"description":"Unauthorized - the request is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/role-group/role-summary":{"get":{"tags":["Role Group Management"],"summary":"Get role summaries for all existing roles","description":"Retrieves role summaries for all existing (non-deleted) roles in the system. Used by the Add/Edit Role Group screen to show available roles. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"getAllRoleSummaries","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have required role","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Role summaries retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleSummary"}}}}}}},"/api/role-group/mass-role-management/users-not-associated":{"get":{"tags":["Role Group Management"],"summary":"Get users not associated with a role group","description":"Retrieves users that are not associated with the specified role group. Optionally filtered by tenant. SUPER_ADMIN can access all. TENANT_ADMIN can only access their own tenants.","operationId":"getUsersNotAssociatedWithRoleGroup","parameters":[{"name":"roleGroupId","in":"query","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to specified tenant or role group","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Users retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}}}}},"/api/role-group/mass-role-management/role-groups":{"get":{"tags":["Role Group Management"],"summary":"Get role groups with users for mass role management","description":"Retrieves role groups with their associated users. Optionally filtered by tenant. SUPER_ADMIN can access all. TENANT_ADMIN can only access their own tenants.","operationId":"getRoleGroupsWithUsers","parameters":[{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to specified tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Role groups with users retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleGroupWithUsersResponse"}}}}}}},"/api/pricing-engine/feature-access-pricing/{id}":{"get":{"tags":["Pricing Engine - Feature Access"],"summary":"Get feature with all price versions","description":"Retrieves a feature with all its price versions by feature ID. Requires SUPER_ADMIN role.","operationId":"getFeatureWithVersions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature with versions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingDetailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/feature-access-pricing/{id}/version":{"get":{"tags":["Pricing Engine - Feature Access"],"summary":"Get all versions for a feature","description":"Retrieves a list of all versions for a particular feature with version number and ID. Requires SUPER_ADMIN role.","operationId":"getFeatureVersions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature versions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureVersionListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/feature-access-pricing/{id}/version/{versionNumber}":{"get":{"tags":["Pricing Engine - Feature Access"],"summary":"Get specific version of a feature","description":"Retrieves a specific version of a feature by feature ID and version number. Requires SUPER_ADMIN role.","operationId":"getFeatureVersion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionNumber","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/feature-access-pricing/type":{"get":{"tags":["Pricing Engine - Feature Access"],"summary":"Get all feature types","description":"Retrieves a list of all available feature types (MANDATORY, OPTIONAL). Requires SUPER_ADMIN role.","operationId":"getFeatureTypes","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Feature types retrieved successfully","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/feature-access-pricing/latest":{"get":{"tags":["Pricing Engine - Feature Access"],"summary":"Get all features with latest price versions","description":"Retrieves a list of all features with their current latest price versions. Requires SUPER_ADMIN role.","operationId":"getLatestVersions","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Features with latest versions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessPricingLatestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/feature-access-pricing/apis":{"get":{"tags":["Pricing Engine - Feature Access"],"summary":"Get all available APIs","description":"Retrieves a list of all available APIs (CONTRACT_MANAGEMENT, NOTIFICATIONS). Requires SUPER_ADMIN role.","operationId":"getAvailableApis","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Available APIs retrieved successfully","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/pricing-engine/data-tier-price":{"get":{"tags":["Pricing Engine - Data Tier Price"],"summary":"Get latest data tier price version","description":"Returns the latest version of data tier prices for subscription data storage pricing","operationId":"getLatestVersion_3","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Latest version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTierPriceVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTierPriceVersionResponse"}}}}}}},"/api/pricing-engine/data-tier-price/{id}":{"get":{"tags":["Pricing Engine - Data Tier Price"],"summary":"Get data tier price version by ID","description":"Returns a specific version of data tier prices by its ID","operationId":"getById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTierPriceVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTierPriceVersionResponse"}}}}}}},"/api/pricing-engine/data-tier-price/versions":{"get":{"tags":["Pricing Engine - Data Tier Price"],"summary":"Get all data tier price versions","description":"Returns all versions of data tier prices","operationId":"getAllVersions_2","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Versions retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataTierPriceVersionResponse"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataTierPriceVersionResponse"}}}}}}}},"/api/pricing-engine/data-storage-pricing/{id}":{"get":{"tags":["Pricing Engine - Data Storage"],"summary":"Get data storage pricing by ID","description":"Returns a specific data storage pricing version by its ID","operationId":"getById_1","parameters":[{"name":"id","in":"path","description":"Pricing ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - SUPER_ADMIN role required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Pricing version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}}}}},"/api/pricing-engine/data-storage-pricing/versions":{"get":{"tags":["Pricing Engine - Data Storage"],"summary":"Get all data storage pricing versions","description":"Returns all versions of the data storage pricing entity sorted by version number descending","operationId":"getAllVersions_3","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - SUPER_ADMIN role required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"All pricing versions retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataStoragePricingResponse"}}}}}}}},"/api/partner/{id}":{"get":{"tags":["Partner Management"],"summary":"Get partner by ID","description":"Retrieves a single partner by its external ID. TENANT_ADMIN can only access partners within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"getPartner","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the partner's tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Partner retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerResponse"}}}}}}},"/api/notifications/{notificationId}":{"get":{"tags":["Notifications"],"summary":"Get a notification by ID","description":"Returns full detail of one of the caller's notifications. Message-based notifications include the sender and attachment; event-based notifications include eventType, eventCategory and entityId for deep-linking. A notification not owned by the caller returns 404.","operationId":"getNotification","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Notification retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationDetailResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/notifications/unread-count":{"get":{"tags":["Notifications"],"summary":"Get unread notification count","description":"Returns the count of the caller's unread in-app notifications (status SENT, channel IN_APP), for the bell-icon badge. Counts both message-based and event-based notifications.","operationId":"getUnreadCount","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Unread count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadNotificationCountResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/me/user-dashboard":{"get":{"tags":["Me"],"summary":"Get current user dashboard counts","description":"Returns aggregated counts for the current user's dashboard: documents, contracts, and workflow processes.","operationId":"getUserDashboard","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Dashboard counts retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDashboardResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDashboardResponse"}}}}}}},"/api/me/notifications/unread-count":{"get":{"tags":["Me"],"summary":"Get my unread in-app notification count","description":"Returns the count of the caller's unread in-app notifications (status SENT, channel IN_APP), for the sidebar badge.","operationId":"getMyUnreadNotificationCount","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Unread count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadNotificationCountResponse"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/invoice/{id}":{"get":{"tags":["Invoice Management"],"summary":"Get invoice by ID","description":"Retrieves a single invoice by its ID. SUPER_ADMIN can access all invoices. TENANT_ADMIN can only access invoices for their own tenants.","operationId":"getInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied or user does not have access to this invoice's tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Invoice retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}}}}},"/api/invoice/{id}/pdf":{"get":{"tags":["Invoice Management"],"summary":"Download invoice PDF","description":"Downloads the PDF version of an invoice. SUPER_ADMIN can access all invoices. TENANT_ADMIN can only access invoices for their own tenants.","operationId":"getInvoicePdf","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied or user does not have access to this invoice's tenant","content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"PDF retrieved successfully","content":{"application/pdf":{}}}}}},"/api/invoice/currency":{"get":{"tags":["Invoice Management"],"summary":"Get available currencies","description":"Returns a list of available currency codes. Requires SUPER_ADMIN, TENANT_ADMIN, or ORG_UNIT_ADMIN role.","operationId":"getAvailableCurrencies","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Currencies retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/api/document/{documentId}/versions":{"get":{"tags":["Document Versions"],"summary":"Get document versions summary","description":"Retrieves all document versions for a document (document external ID) with isCurrent flags. The isCurrent flag indicates the latest version per document sensitivity (ORIGINAL, DRAFT, ANONYMIZED). L1: SUPER_ADMIN and TENANT_ADMIN only. L2: You can only access documents in tenants where you are a tenant admin.","operationId":"getDocumentVersions","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - insufficient role permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document versions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionsResponse"}}}}}}},"/api/document/{documentId}/related-documents":{"get":{"tags":["Related Documents"],"summary":"List related documents","description":"Returns the paginated list of OTHER_DOCUMENTs related to the given document (Spring Data Page JSON envelope).","operationId":"listRelatedDocuments","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Related documents retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedDocument"}}}}}}},"/api/document/{documentId}/overview":{"get":{"tags":["Document overview"],"summary":"Get document overview","description":"Returns overview data including basic data, tenure, financial data, and custom fields. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: You can only view documents in the tenant that your user is associated with.","operationId":"getDocumentOverview","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied - insufficient role permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document overview retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOverviewResponse"}}}}}}},"/api/document/{documentId}/document-versions":{"get":{"tags":["Document content"],"summary":"List document file versions","description":"Returns all file versions for a document, ordered by version number descending. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only view documents in tenants where they are tenant admins.","operationId":"listDocumentFileVersions","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document versions retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentVersionResponse"}}}}}}}},"/api/document/{documentId}/document-type/{documentType}/versions/{versionNumber}/content":{"get":{"tags":["Document content"],"summary":"Get document version content","description":"Streams binary document content from S3. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: You can only view documents in the tenant that your user is associated with.","operationId":"getDocumentContent","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentType","in":"path","required":true,"schema":{"type":"string","enum":["ANONYMIZED","ORIGINAL","DRAFT"]}},{"name":"versionNumber","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Storage service unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document content streamed successfully","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/document/{documentId}/document-type/{documentType}/latest/content":{"get":{"tags":["Document content"],"summary":"Get latest document content","description":"Streams binary content of the latest version for a sensitivity band from S3. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: You can only view documents in the tenant that your user is associated with.","operationId":"getLatestDocumentContent","parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentType","in":"path","required":true,"schema":{"type":"string","enum":["ANONYMIZED","ORIGINAL","DRAFT"]}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Storage service unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Latest document content streamed successfully","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/document/document-versions/{documentVersionId}":{"get":{"tags":["Document content"],"summary":"Get document file version","description":"Returns a specific file version with download URL. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: TENANT_ADMIN can only view documents in tenants where they are tenant admins.","operationId":"getDocumentFileVersion","parameters":[{"name":"documentVersionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document version retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionResponse"}}}}}}},"/api/document/document-versions/{documentVersionId}/download":{"get":{"tags":["Document content"],"summary":"Download document file version","description":"Downloads binary document content by document file version ID. L1: SUPER_ADMIN and TENANT_ADMIN only. L2: You can only view documents in the tenant that your user is associated with.","operationId":"downloadDocumentFileVersion","parameters":[{"name":"documentVersionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Storage service unavailable","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Document content streamed successfully","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/document/categories":{"get":{"tags":["Document category"],"summary":"List document categories","description":"Returns available document categories with IDs so clients can send documentCategoryId in create requests. This is a read-only lookup and is accessible for SUPER_ADMIN, TENANT_ADMIN, and ORG_UNIT_ADMIN.","operationId":"listCategories","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryResponse"}}}}}}}},"/api/document-relationship/all":{"get":{"tags":["Document Relationship Management"],"summary":"List all relationships for a document (graph traversal)","description":"Returns a flat list for the given document: fetchDepth 0 = incident edges only; fetchDepth &gt; 0 = BFS upstream (anchor as target) then downstream (anchor as source), de-duplicated by relationship id (cycle-safe). Optional relationshipType filters to a primary Relationship. Max depth 50. L1: SUPER_ADMIN and TENANT_ADMIN. L2: TENANT_ADMIN only for tenants they administer.","operationId":"listAllRelationshipsForDocument","parameters":[{"name":"tenantId","in":"query","description":"Tenant external id","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"query","description":"Anchor document external id","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fetchDepth","in":"query","description":"Max hops per direction; default 0; max 50","required":false,"schema":{"type":"integer","format":"int32","maximum":50,"minimum":0}},{"name":"relationshipType","in":"query","description":"Optional primary Relationship enum name","required":false,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Flat list of relationships relative to the document","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationshipSearchItem"}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/document-category":{"get":{"tags":["Document category"],"summary":"List all document categories (legacy path)","description":"Returns all available document categories. Same data as GET /api/document/categories in a wrapped shape for older clients. Role access is intentionally aligned with GET /api/document/categories.","operationId":"getAllCategories","responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Categories retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCategoryListResponse"}}}}}}},"/api/business-events/{eventId}":{"get":{"tags":["Business Events"],"summary":"Get a business event by ID","description":"Retrieves a single business event with full detail. TENANT_ADMIN can only access events within tenants they administer. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"getBusinessEvent","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - insufficient role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"200":{"description":"Business event retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessEventResponse"}}}},"401":{"description":"Unauthorized - missing or invalid authentication token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/subscription/{id}/ad-hoc-order-pricing/{itemId}":{"delete":{"tags":["Subscription Ad-Hoc Orders"],"summary":"Delete ad-hoc order pricing item","description":"Deletes an ad-hoc order pricing item from the subscription. Only items with status PLANNED can be deleted.","operationId":"deleteAdHocOrderPricingItem","parameters":[{"name":"id","in":"path","description":"Subscription ID (UUID)","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","description":"Ad-hoc item ID (UUID)","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Ad-hoc order pricing item deleted successfully"},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/partner/{partnerId}/contact/{contactId}":{"delete":{"tags":["Partner Management"],"summary":"Delete a contact from a partner","description":"Hard deletes a contact from a partner. TENANT_ADMIN can only delete contacts from partners within their own tenant. Requires SUPER_ADMIN or TENANT_ADMIN role.","operationId":"deleteContact","parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden - User does not have access to the partner's tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Contact deleted successfully"}}}},"/api/notification-settings/user/channels/{eventType}":{"delete":{"tags":["User Notification Channel Settings"],"summary":"Remove user override for a specific event type","description":"Deletes the user override for the given event type, reverting that event type to the tenant default.","operationId":"deleteChannelOverride","parameters":[{"name":"eventType","in":"path","required":true,"schema":{"type":"string","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"]}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Override deleted (or no override existed); event type reverts to tenant default"},"401":{"description":"Unauthenticated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}},"/api/document-relationship/{id}":{"delete":{"tags":["Document Relationship Management"],"summary":"Delete document relationship","description":"Hard-deletes a relationship, permanently removing the row. L1: SUPER_ADMIN and TENANT_ADMIN. L2: TENANT_ADMIN may only delete relationships for documents in tenants where they are tenant admin.","operationId":"deleteDocumentRelationship","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found - Resource not found","$ref":"#/components/responses/problemDetail"},"400":{"description":"Bad Request - Validation error or invalid input","$ref":"#/components/responses/problemDetail"},"409":{"description":"Conflict - Resource conflict","$ref":"#/components/responses/problemDetail"},"422":{"description":"Unprocessable Entity - Business logic error","$ref":"#/components/responses/problemDetail"},"500":{"description":"Internal Server Error - Unexpected error","$ref":"#/components/responses/problemDetail"},"403":{"description":"Access denied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"503":{"description":"Service unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}},"204":{"description":"Relationship deleted (no content body)"},"401":{"description":"Not authenticated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetailWithError"}}}}}}}},"components":{"schemas":{"FieldError":{"type":"object","properties":{"fieldName":{"type":"string"},"errorList":{"type":"array","items":{"type":"string"}}}},"ProblemDetailWithError":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}}}},"OrgUnitRoleRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"roleGroupId":{"type":"string"},"roleGroups":{"type":"array","items":{"type":"string","enum":["ORG_UNIT_ADMIN","READ_ALL","WRITE_ALL","DOCUMENT_READ","BILLING_READ"]}}},"required":["roleGroups"]},"TenantOrgUnitRolesRequest":{"type":"object","properties":{"orgUnits":{"type":"array","items":{"$ref":"#/components/schemas/OrgUnitRoleRequest"}},"tenantId":{"type":"string"},"tenantName":{"type":"string"}},"required":["orgUnits"]},"TenantRoleRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["TENANT_ADMIN","TENANT_USER","BILLING_ADMIN","TENANT_PARTNER_SETTINGS_READ","TENANT_PARTNER_SETTINGS_WRITE"]}}},"required":["roles"]},"UpdateUserRolesRequest":{"type":"object","properties":{"globalRoles":{"type":"array","items":{"type":"string","enum":["SUPER_ADMIN","TENANT_ADMIN","ORG_UNIT_ADMIN"]}},"tenantRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantRoleRequest"}},"orgUnitRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantOrgUnitRolesRequest"}}},"required":["globalRoles","orgUnitRoles","tenantRoles"]},"MeResponse":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]},"associatedTenants":{"type":"array","items":{"type":"string"}},"associatedTenantNames":{"type":"array","items":{"type":"string"}},"emailAddress":{"type":"string"},"mobileNumber":{"type":"string"},"appLanguage":{"type":"string"},"globalRoles":{"type":"array","items":{"type":"string","enum":["SUPER_ADMIN","TENANT_ADMIN","ORG_UNIT_ADMIN"]}},"tenantRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantRoleInfo"}},"orgUnitRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantOrgUnitRoles"}}}},"OrgUnitRoleGroupInfo":{"type":"object","properties":{"roleGroupId":{"type":"string"},"roleGroupName":{"type":"string"},"roles":{"type":"string"}}},"OrgUnitWithRoleGroups":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"roleGroups":{"type":"array","items":{"$ref":"#/components/schemas/OrgUnitRoleGroupInfo"}},"roles":{"type":"array","items":{"type":"string"}}}},"TenantOrgUnitRoles":{"type":"object","properties":{"tenantId":{"type":"string"},"tenantName":{"type":"string"},"orgUnits":{"type":"array","items":{"$ref":"#/components/schemas/OrgUnitWithRoleGroups"}}}},"TenantRoleInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}}},"UpdateUserRequest":{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"associatedTenantIds":{"type":"array","items":{"type":"string","minLength":1}},"emailAddress":{"type":"string","minLength":1},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]},"phoneNumber":{"type":"string"}},"required":["associatedTenantIds","emailAddress","firstName","lastName","status"]},"UserResponse":{"type":"object","properties":{"id":{"type":"string"},"keycloakUserId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"associatedTenantIds":{"type":"array","items":{"type":"string"}},"emailAddress":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]},"phoneNumber":{"type":"string"},"creationDate":{"type":"string","format":"date-time"}}},"UpdateTenantRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"taxId":{"type":"string","minLength":1},"billingEmailAddresses":{"type":"array","items":{"type":"string","format":"email","minLength":1},"minItems":1},"country":{"type":"string","enum":["HUNGARY"]},"city":{"type":"string","minLength":1},"zipCode":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"invoiceLanguage":{"type":"string"}},"required":["address","billingEmailAddresses","city","name","taxId","zipCode"]},"SubscriptionInfo":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","CANCELLED","DELETED"]},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}}},"TenantResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"taxId":{"type":"string"},"billingEmailAddresses":{"type":"array","items":{"type":"string"}},"country":{"type":"string","enum":["HUNGARY"]},"city":{"type":"string"},"zipCode":{"type":"string"},"address":{"type":"string"},"invoiceLanguage":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"subscription":{"$ref":"#/components/schemas/SubscriptionInfo"}}},"UpdateRoleGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"roleIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["description","name","roleIds"]},"RoleGroupResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tenantId":{"type":"string"},"tenantName":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","DELETED"]},"createdAt":{"type":"string","format":"date-time"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/RoleSummary"}}}},"RoleSummary":{"type":"object","properties":{"roleId":{"type":"string"},"roleFullName":{"type":"string"},"roleFeature":{"type":"string"},"roleAccessLevel":{"type":"string"}}},"UpdatePartnerContactRequest":{"type":"object","description":"Request to add or update a partner contact within an UpdatePartnerRequest. If 'id' is present, the existing contact with that id is updated. If 'id' is absent, a new contact is created.","properties":{"id":{"type":"string","description":"Existing contact id. Present = update existing; absent = create new.","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","description":"Name of the contact person","example":"John Doe","maxLength":255,"minLength":0},"email":{"type":"string","format":"email","description":"Email address of the contact","example":"john.doe@example.com","maxLength":255,"minLength":0},"phone":{"type":"string","description":"Phone number of the contact","example":"+36201234567","maxLength":100,"minLength":0},"position":{"type":"string","description":"Position or role of the contact","example":"CFO","maxLength":255,"minLength":0}},"required":["name"]},"UpdatePartnerRequest":{"type":"object","description":"Request to update an existing partner. Updates all editable basic fields and reconciles the contact list. Tenant association, createdAt and createdByUser are immutable and not present in this DTO.","properties":{"name":{"type":"string","description":"Name of the partner","example":"Acme Corporation","maxLength":255,"minLength":0},"description":{"type":"string","description":"Description of the partner","example":"Our main supplier for office equipment","maxLength":2000,"minLength":0},"taxId":{"type":"string","description":"Tax identification number","example":"12345678-1-42","maxLength":255,"minLength":0},"registrationNumber":{"type":"string","description":"Company registration number","example":"01-09-123456","maxLength":255,"minLength":0},"address":{"type":"string","description":"Street address","example":123,"maxLength":500,"minLength":0},"country":{"type":"string","description":"Country: 'HU' for Hungarian partners, or a free-text country name for international partners.","example":"HU","maxLength":100,"minLength":0},"zipCode":{"type":"string","description":"Postal/zip code","example":1234,"maxLength":20,"minLength":0},"city":{"type":"string","description":"City name","example":"Budapest","maxLength":255,"minLength":0},"contacts":{"type":"array","description":"Full contact list for this partner. null = leave existing contacts unchanged. Empty list = delete all existing contacts. Otherwise: contacts with an id are updated, contacts without an id are created, existing contacts not in the list are hard-deleted.","items":{"$ref":"#/components/schemas/UpdatePartnerContactRequest"}}},"required":["address","city","description","name","registrationNumber","taxId","zipCode"]},"PartnerContactResponse":{"type":"object","description":"Partner contact response","properties":{"id":{"type":"string","description":"Contact unique identifier","example":"550e8400-e29b-41d4-a716-446655440001"},"name":{"type":"string","description":"Name of the contact person","example":"John Doe"},"email":{"type":"string","description":"Email address of the contact","example":"john.doe@example.com"},"phone":{"type":"string","description":"Phone number of the contact","example":"+36201234567"},"position":{"type":"string","description":"Position or role of the contact","example":"CFO"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}},"PartnerResponse":{"type":"object","description":"Partner response","properties":{"id":{"type":"string","description":"Partner unique identifier","example":"550e8400-e29b-41d4-a716-446655440000"},"tenantId":{"type":"string","description":"Tenant unique identifier","example":"550e8400-e29b-41d4-a716-446655440001"},"tenantName":{"type":"string","description":"Tenant name","example":"Acme Inc."},"name":{"type":"string","description":"Partner name","example":"Supplier Co."},"description":{"type":"string","description":"Partner description","example":"Main office equipment supplier"},"taxId":{"type":"string","description":"Tax identification number","example":"12345678-1-42"},"taxIdValidated":{"type":"boolean","description":"Whether the tax ID was validated by NAV (Hungarian tax authority). True = validated, false = validation skipped, null = not applicable (non-HU or no tax ID)"},"registrationNumber":{"type":"string","description":"Company registration number","example":"01-09-123456"},"address":{"type":"string","description":"Street address","example":123},"country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)","example":"HU"},"zipCode":{"type":"string","description":"Postal/zip code","example":1234},"city":{"type":"string","description":"City name","example":"Budapest"},"status":{"type":"string","description":"Partner status","enum":["ACTIVE","SUSPENDED","DELETED"],"example":"ACTIVE"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"createdByUserName":{"type":"string","description":"Name of the user who created the partner"},"contacts":{"type":"array","description":"List of partner contacts","items":{"$ref":"#/components/schemas/PartnerContactResponse"}}}},"UpdatePartnerSettingsRequest":{"type":"object","description":"Request to update partner settings","properties":{"autoSuspendInactiveEnabled":{"type":"boolean","description":"Whether inactive partners should be automatically suspended"},"autoSuspendInactiveDays":{"type":"integer","format":"int32","description":"Number of days of inactivity before a partner is automatically suspended (minimum 7 when enabled)","example":90},"autoDeleteSuspendedEnabled":{"type":"boolean","description":"Whether suspended partners should be automatically deleted"},"autoDeleteSuspendedDays":{"type":"integer","format":"int32","description":"Number of days a partner remains suspended before being automatically deleted (minimum 7 when enabled)","example":180},"autoUpdatePartnerDataEnabled":{"type":"boolean","description":"Whether partner data should be automatically updated from external sources"}}},"PartnerSettingsResponse":{"type":"object","description":"Partner settings response","properties":{"id":{"type":"string","description":"Partner settings unique identifier","example":"550e8400-e29b-41d4-a716-446655440000"},"tenantId":{"type":"string","description":"Tenant unique identifier","example":"550e8400-e29b-41d4-a716-446655440001"},"autoSuspendInactiveEnabled":{"type":"boolean","description":"Whether inactive partners should be automatically suspended"},"autoSuspendInactiveDays":{"type":"integer","format":"int32","description":"Number of days of inactivity before a partner is automatically suspended","example":90},"autoDeleteSuspendedEnabled":{"type":"boolean","description":"Whether suspended partners should be automatically deleted"},"autoDeleteSuspendedDays":{"type":"integer","format":"int32","description":"Number of days a partner remains suspended before being automatically deleted","example":180},"autoUpdatePartnerDataEnabled":{"type":"boolean","description":"Whether partner data should be automatically updated from external sources"}}},"UpdateOrgUnitRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]}},"required":["name","status"]},"OrgUnitResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tenantId":{"type":"string"},"tenantName":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]},"createdAt":{"type":"string","format":"date-time"},"associatedUsersCount":{"type":"integer","format":"int32"},"associatedUsers":{"type":"array","items":{"type":"string"}}}},"UpdateNotificationStatusRequest":{"type":"object","description":"Request to bulk-update the status of the caller's own notifications (e.g. mark as read)","properties":{"notificationIds":{"type":"array","description":"External IDs of the notifications to update; only those belonging to the caller are affected","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","description":"The new status. Must be valid for each notification's channel (READ only for IN_APP, FAILED only for EMAIL).","enum":["PENDING","SENT","READ","FAILED"],"example":"READ"}},"required":["newStatus","notificationIds"]},"UpdateNotificationStatusResponse":{"type":"object","description":"Result of a bulk notification status update","properties":{"updatedCount":{"type":"integer","format":"int32","description":"Number of notifications actually updated (excludes IDs not owned by the caller)","example":3}}},"UpdateNotificationSettingsRequest":{"type":"object","description":"Request to update tenant-level basic notification settings","properties":{"contractExpirationWarningDays":{"type":"integer","format":"int32","description":"Days before contract expiration to send a warning notification","example":120},"unreadReminderDays":{"type":"integer","format":"int32","description":"Days after an unread notification before sending a reminder","example":30},"deleteUnreadAfterDays":{"type":"integer","format":"int32","description":"Days after which unread notifications are deleted","example":30},"deleteReadAfterDays":{"type":"integer","format":"int32","description":"Days after which read notifications are deleted","example":30}},"required":["contractExpirationWarningDays","deleteReadAfterDays","deleteUnreadAfterDays","unreadReminderDays"]},"NotificationSettingsResponse":{"type":"object","description":"Tenant-level basic notification settings response","properties":{"contractExpirationWarningDays":{"type":"integer","format":"int32","description":"Days before contract expiration to send a warning notification","example":120},"unreadReminderDays":{"type":"integer","format":"int32","description":"Days after an unread notification before sending a reminder","example":30},"deleteUnreadAfterDays":{"type":"integer","format":"int32","description":"Days after which unread notifications are deleted","example":30},"deleteReadAfterDays":{"type":"integer","format":"int32","description":"Days after which read notifications are deleted","example":30}}},"UpdateNotificationChannelSettingItem":{"type":"object","description":"Channel preference for a single notification event type","properties":{"eventType":{"type":"string","description":"Notification event type","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"],"example":"CONTRACT_EXPIRING"},"emailEnabled":{"type":"boolean","description":"Whether the email channel is enabled for this event type"},"inAppEnabled":{"type":"boolean","description":"Whether the in-app channel is enabled for this event type"}},"required":["emailEnabled","eventType","inAppEnabled"]},"NotificationChannelSettingResponse":{"type":"object","description":"Tenant-level channel default for a single notification event type","properties":{"eventType":{"type":"string","description":"Notification event type","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"],"example":"CONTRACT_EXPIRING"},"emailEnabled":{"type":"boolean","description":"Whether the email channel is enabled for this event type"},"inAppEnabled":{"type":"boolean","description":"Whether the in-app channel is enabled for this event type"}}},"UserNotificationChannelSettingResponse":{"type":"object","description":"Effective channel setting for a single notification event type — user override merged with tenant default","properties":{"eventType":{"type":"string","description":"Notification event type","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"],"example":"CONTRACT_EXPIRING"},"emailEnabled":{"type":"boolean","description":"Whether the email channel is enabled for this event type"},"inAppEnabled":{"type":"boolean","description":"Whether the in-app channel is enabled for this event type"},"overridden":{"type":"boolean","description":"True if this value comes from a user override; false if inherited from the tenant default"}}},"UpdateMessageRequest":{"type":"object","description":"Request to update an existing direct message. Targets are fully re-resolved.","properties":{"title":{"type":"string","description":"Message title / subject","example":"Updated title","maxLength":500,"minLength":0},"body":{"type":"string","description":"Message body / note","example":"Updated body content.","minLength":1},"recipientUserIds":{"type":"array","description":"Individual user recipients (external IDs)","items":{"type":"string"}},"recipientRoleGroupIds":{"type":"array","description":"Role group recipients (external IDs); all members are notified","items":{"type":"string"}},"recipientOrgUnitIds":{"type":"array","description":"Org unit recipients (external IDs); all members are notified","items":{"type":"string"}},"attachmentId":{"type":"string","description":"Reference to a stored file (optional)","example":"550e8400-e29b-41d4-a716-446655440099"},"scheduledAt":{"type":"string","format":"date-time","description":"When to deliver the message. Null means immediate delivery; when set, must be in the future.","example":"2026-10-01T08:00:00Z"}},"required":["body","title"]},"MessageDetailResponse":{"type":"object","description":"Full detail of a direct message, including resolved recipients and their read status","properties":{"id":{"type":"string","description":"Message external ID","example":"550e8400-e29b-41d4-a716-446655440000"},"title":{"type":"string","description":"Message title / subject","example":"Warn me when September Ends"},"body":{"type":"string","description":"Message body / note","example":"Reminder text here."},"sender":{"$ref":"#/components/schemas/MessageUserSummary","description":"The user who sent the message"},"recipients":{"type":"array","description":"The sender's original targets and the users they resolved to","items":{"$ref":"#/components/schemas/MessageRecipientDetail"}},"attachmentId":{"type":"string","description":"Reference to a stored file (null if none)","example":"550e8400-e29b-41d4-a716-446655440099"},"scheduledAt":{"type":"string","format":"date-time","description":"Scheduled delivery time (null if delivered immediately)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}},"MessageRecipientDetail":{"type":"object","description":"A sender's original target (user, role group or org unit) and the users it resolved to","properties":{"recipientId":{"type":"string","description":"Recipient external ID","example":"550e8400-e29b-41d4-a716-446655440020"},"type":{"type":"string","description":"Target type","enum":["USER","ROLE_GROUP","ORG_UNIT"],"example":"ROLE_GROUP"},"targetId":{"type":"string","description":"External ID of the targeted user/role group/org unit","example":"550e8400-e29b-41d4-a716-446655440030"},"targetName":{"type":"string","description":"Display name of the targeted user/role group/org unit","example":"Contract Management"},"resolvedUsers":{"type":"array","description":"The individual users this target resolved to, with their read status","items":{"$ref":"#/components/schemas/ResolvedRecipientUser"}}}},"MessageUserSummary":{"type":"object","description":"Minimal user reference (sender or recipient)","properties":{"userId":{"type":"string","description":"User external ID","example":"550e8400-e29b-41d4-a716-446655440010"},"name":{"type":"string","description":"User display name","example":"John Doe"},"email":{"type":"string","description":"User email address (populated in detail views only)","example":"john@example.com"}}},"ResolvedRecipientUser":{"type":"object","description":"An individual user a recipient was resolved to, with their per-user read/delivery status","properties":{"userId":{"type":"string","description":"User external ID","example":"550e8400-e29b-41d4-a716-446655440010"},"name":{"type":"string","description":"User display name","example":"John Doe"},"status":{"type":"string","description":"Notification delivery status for this user","enum":["PENDING","SENT","READ","FAILED"],"example":"SENT"},"readAt":{"type":"string","format":"date-time","description":"When the user read the notification (null if unread)"}}},"UpdateMeRequest":{"type":"object","properties":{"firstName":{"type":"string","description":"User's first name.","example":"John","minLength":1},"lastName":{"type":"string","description":"User's last name.","example":"Doe","minLength":1},"emailAddress":{"type":"string","format":"email","description":"User's email address.","example":"john.doe@example.com","minLength":1},"phoneNumber":{"type":"string","description":"User's phone number. Digits and an optional leading '+' only.","example":"+36201234567","minLength":1,"pattern":"^[+0-9]*$"},"appLanguage":{"type":"string","description":"User UI language. Allowed values: hu, en.","enum":["hu","en"],"example":"hu","pattern":"^(hu|en)$"}},"required":["appLanguage","emailAddress","firstName","lastName","phoneNumber"]},"DocumentCategoryDto":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"UpdateDocumentTypeRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"individualPrefix":{"type":"string"},"associatedDocumentCategories":{"type":"array","items":{"$ref":"#/components/schemas/DocumentCategoryDto"}}},"required":["name"]},"CustomDataFieldResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","BOOLEAN","SINGLE_CHOICE","MULTIPLE_CHOICE"]},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"isMandatory":{"type":"boolean"},"isIndexed":{"type":"boolean"},"tenantId":{"type":"string"},"associatedDocumentTypeIds":{"type":"array","items":{"type":"string"}},"associatedDocumentCategoryIds":{"type":"array","items":{"type":"string"}},"associatedOrgUnitIds":{"type":"array","items":{"type":"string"}},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionDto"}},"createdAt":{"type":"string","format":"date-time"},"createdByUser":{"type":"string"},"createdByUserName":{"type":"string"},"documentCount":{"type":"integer","format":"int32"}}},"DocumentTypeResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tenantId":{"type":"string"},"individualPrefix":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"associatedDocumentCategories":{"type":"array","items":{"$ref":"#/components/schemas/DocumentCategoryDto"}},"createdAt":{"type":"string","format":"date-time"},"createdByUser":{"type":"string"},"createdByUserName":{"type":"string"},"numberOfDocuments":{"type":"integer","format":"int64"},"customDataFields":{"type":"array","description":"Custom data field schema for this document type. Present only when the search request set includeCustomDataFields=true; absent (key omitted) otherwise.","items":{"$ref":"#/components/schemas/CustomDataFieldResponse"}}}},"OptionDto":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}}},"UpdateDocumentSettingsRequest":{"type":"object","properties":{"documentPrefix":{"type":"string","minLength":1},"archiveAfterExpirationEnabled":{"type":"boolean"},"archiveAfterExpirationMonths":{"type":"integer","format":"int32"},"incompleteStateAction":{"type":"string","enum":["ARCHIVE","DELETE","NONE"]},"incompleteStateActionMonths":{"type":"integer","format":"int32"},"aboutToExpireDays":{"type":"integer","format":"int32","maximum":365},"cascadeArchiveToDocuments":{"type":"boolean"}},"required":["archiveAfterExpirationEnabled","documentPrefix","incompleteStateAction"]},"DocumentSettingsResponse":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"documentPrefix":{"type":"string"},"archiveAfterExpirationEnabled":{"type":"boolean"},"archiveAfterExpirationMonths":{"type":"integer","format":"int32"},"incompleteStateAction":{"type":"string","enum":["ARCHIVE","DELETE","NONE"]},"incompleteStateActionMonths":{"type":"integer","format":"int32"},"aboutToExpireDays":{"type":"integer","format":"int32"},"cascadeArchiveToDocuments":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"DocumentRelationshipUpdateItem":{"type":"object","description":"Document relationship modification item","properties":{"relationshipId":{"type":"string","format":"uuid","description":"External id of the relationship row"},"oldSourceDocumentId":{"type":"string","format":"uuid","description":"Previous source document external id"},"oldTargetDocumentId":{"type":"string","format":"uuid","description":"Previous target document external id"},"oldRelationshipType":{"type":"string","description":"Previous relationship type (primary enum name only)","minLength":1},"newSourceDocumentId":{"type":"string","format":"uuid","description":"New source document external id"},"newTargetDocumentId":{"type":"string","format":"uuid","description":"New target document external id"},"newRelationshipType":{"type":"string","description":"New relationship type (primary enum name only)","minLength":1},"createdAt":{"type":"string","format":"date-time","description":"Relationship row created at (set by server on response)"}},"required":["newRelationshipType","newSourceDocumentId","newTargetDocumentId","oldRelationshipType","oldSourceDocumentId","oldTargetDocumentId","relationshipId"]},"UpdateCustomDataFieldRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"isMandatory":{"type":"boolean"},"isIndexed":{"type":"boolean"},"tenantId":{"type":"string","minLength":1},"associatedDocumentTypeIds":{"type":"array","items":{"type":"string"}},"associatedDocumentCategoryIds":{"type":"array","items":{"type":"string"}},"associatedOrgUnitIds":{"type":"array","items":{"type":"string"}},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","BOOLEAN","SINGLE_CHOICE","MULTIPLE_CHOICE"]},"options":{"type":"array","items":{"type":"string"}}},"required":["fieldType","isIndexed","isMandatory","name","tenantId"]},"CreateUserRequest":{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"associatedTenantIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"emailAddress":{"type":"string","minLength":1},"phoneNumber":{"type":"string"}},"required":["associatedTenantIds","emailAddress","firstName","lastName"]},"UpdateUserStatusRequest":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]},"deleteReason":{"type":"string","maxLength":500,"minLength":0}},"required":["newStatus","userIds"]},"SearchUserRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tenantIds":{"type":"array","items":{"type":"string"}},"emailAddress":{"type":"string"},"phoneNumber":{"type":"string"},"creationDate":{"type":"string","format":"date-time"},"status":{"type":"string"},"orgUnits":{"type":"array","items":{"type":"string"}},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":0},"size":{"type":"integer","format":"int32","minimum":1},"sort":{"type":"array","items":{"type":"string"}}}},"UnreadNotificationReminderRunResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceDate":{"type":"string","format":"date"},"reminded":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"}}},"ActivationResponse":{"type":"object","properties":{"message":{"type":"string"}}},"CloningResponse":{"type":"object","properties":{"message":{"type":"string"},"clonedItems":{"type":"integer","format":"int32"}}},"NavUpdateResponse":{"type":"object","description":"Response from NAV partner data update job","properties":{"referenceTime":{"type":"string","format":"date-time","description":"Reference time used for logging","example":"2025-01-15T04:00:00"},"totalTenants":{"type":"integer","format":"int32","description":"Total number of tenants with auto-update enabled","example":5},"tenantsProcessed":{"type":"integer","format":"int32","description":"Number of tenants successfully processed","example":5},"tenantsFailed":{"type":"integer","format":"int32","description":"Number of tenants that failed during processing","example":0},"partnersUpdated":{"type":"integer","format":"int32","description":"Total number of partners updated from NAV across all tenants","example":25},"navServiceUnavailable":{"type":"boolean","description":"Whether the NAV service was unavailable","example":false},"message":{"type":"string","description":"Summary message of job execution","example":"NAV update job completed successfully"}}},"AutoSuspendResponse":{"type":"object","description":"Response from auto-suspend partner settings job","properties":{"referenceTime":{"type":"string","format":"date-time","description":"Reference time used for inactivity calculations","example":"2025-01-15T02:00:00"},"totalTenants":{"type":"integer","format":"int32","description":"Total number of tenants with auto-suspend enabled","example":5},"tenantsProcessed":{"type":"integer","format":"int32","description":"Number of tenants successfully processed","example":5},"tenantsFailed":{"type":"integer","format":"int32","description":"Number of tenants that failed during processing","example":0},"partnersSuspended":{"type":"integer","format":"int32","description":"Total number of partners suspended across all tenants","example":12},"message":{"type":"string","description":"Summary message of job execution","example":"Auto-suspend job completed successfully"}}},"AutoDeleteResponse":{"type":"object","description":"Response from auto-delete partner settings job","properties":{"referenceTime":{"type":"string","format":"date-time","description":"Reference time used for deletion calculations","example":"2025-01-15T02:30:00"},"totalTenants":{"type":"integer","format":"int32","description":"Total number of tenants with auto-delete enabled","example":5},"tenantsProcessed":{"type":"integer","format":"int32","description":"Number of tenants successfully processed","example":5},"tenantsFailed":{"type":"integer","format":"int32","description":"Number of tenants that failed during processing","example":0},"partnersDeleted":{"type":"integer","format":"int32","description":"Total number of partners deleted across all tenants","example":3},"message":{"type":"string","description":"Summary message of job execution","example":"Auto-delete job completed successfully"}}},"OtherDocumentsArchiveResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceTime":{"type":"string","format":"date-time"},"totalTenants":{"type":"integer","format":"int32"},"tenantsProcessed":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"},"documentsArchived":{"type":"integer","format":"int32"}}},"MonthlyInvoiceIssueResponse":{"type":"object","properties":{"message":{"type":"string"},"accountingPeriod":{"type":"string"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"issueDate":{"type":"string","format":"date"},"fulfillmentDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"invoicesCreated":{"type":"integer","format":"int32"},"invoiceIds":{"type":"array","items":{"type":"string"}}}},"IncompleteDocumentManagementResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceTime":{"type":"string","format":"date-time"},"totalTenants":{"type":"integer","format":"int32"},"tenantsProcessed":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"},"documentsArchived":{"type":"integer","format":"int32"},"documentsDeleted":{"type":"integer","format":"int32"}}},"DocumentStatusUpdateResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceDate":{"type":"string","format":"date"},"totalProcessed":{"type":"integer","format":"int32"},"updated":{"type":"integer","format":"int32"},"unchanged":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/StatusChange"}}}},"StatusChange":{"type":"object","properties":{"documentId":{"type":"string"},"documentNumber":{"type":"string"},"previousStatus":{"type":"string","enum":["INCOMPLETE","ACTIVE","ABOUT_TO_EXPIRE","EXPIRED","ARCHIVED"]},"newStatus":{"type":"string","enum":["INCOMPLETE","ACTIVE","ABOUT_TO_EXPIRE","EXPIRED","ARCHIVED"]}}},"DocumentAutoArchivalResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceDate":{"type":"string","format":"date"},"totalProcessed":{"type":"integer","format":"int32"},"tenantsProcessed":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"},"archived":{"type":"integer","format":"int32"},"unchanged":{"type":"integer","format":"int32"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/StatusChange"}}}},"UnreadNotificationCleanupRunResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceDate":{"type":"string","format":"date"},"deleted":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"}}},"ReadNotificationCleanupRunResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceDate":{"type":"string","format":"date"},"deleted":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"}}},"ContractExpirationWarningRunResponse":{"type":"object","properties":{"message":{"type":"string"},"referenceDate":{"type":"string","format":"date"},"emitted":{"type":"integer","format":"int32"},"skipped":{"type":"integer","format":"int32"},"tenantsFailed":{"type":"integer","format":"int32"}}},"BillingCreateResponse":{"type":"object","properties":{"success":{"type":"boolean"},"billNumber":{"type":"string"},"billNetValue":{"type":"number"},"billGrossValue":{"type":"number"},"pdfContent":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"receivable":{"type":"number"},"urlForBuyer":{"type":"string"}}},"CreateTenantRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"taxId":{"type":"string","minLength":1},"billingEmailAddresses":{"type":"array","items":{"type":"string","format":"email","minLength":1},"minItems":1},"country":{"type":"string","enum":["HUNGARY"]},"city":{"type":"string","minLength":1},"zipCode":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"invoiceLanguage":{"type":"string"}},"required":["address","billingEmailAddresses","city","name","taxId","zipCode"]},"SearchTenantRequest":{"type":"object","properties":{"name":{"type":"string"},"taxId":{"type":"string"},"billingEmailAddress":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"zipCode":{"type":"string"},"address":{"type":"string"},"tenantIds":{"type":"array","items":{"type":"string"}},"subscriptionId":{"type":"string"},"subscriptionStatus":{"type":"string"},"subscriptionValidityFrom":{"type":"string","format":"date"},"subscriptionValidityTo":{"type":"string","format":"date"},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"CreateSubscriptionFeatureAccessPricingRequest":{"type":"object","properties":{"currencyCode":{"type":"string","maxLength":3,"minLength":3},"features":{"type":"array","items":{"$ref":"#/components/schemas/FeatureRequest"},"minItems":1},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}},"required":["currencyCode","features","validFrom"]},"FeatureRequest":{"type":"object","properties":{"featureId":{"type":"string","format":"uuid"},"featurePriceVersionId":{"type":"string","format":"uuid"},"finalPrice":{"type":"number"},"threshold":{"$ref":"#/components/schemas/ThresholdRequest"}},"required":["featureId","featurePriceVersionId","finalPrice","threshold"]},"ThresholdRequest":{"type":"object","properties":{"type":{"type":"string","enum":["NONE","NUMBER_OF_FREE_USERS"]},"freeResourceAmount":{"type":"integer","format":"int32"},"perExtraResourceCharge":{"type":"number"}},"required":["type"]},"FeatureDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"featureId":{"type":"string","format":"uuid"},"featurePriceVersionId":{"type":"string","format":"uuid"},"featureName":{"type":"string"},"listPrice":{"type":"number"},"finalPrice":{"type":"number"},"threshold":{"$ref":"#/components/schemas/ThresholdDto"},"createdAt":{"type":"string","format":"date-time"},"featureType":{"type":"string","enum":["MANDATORY","OPTIONAL"]}}},"SubscriptionFeatureAccessPricingVersionResponse":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid"},"version":{"$ref":"#/components/schemas/VersionDto"}}},"ThresholdDto":{"type":"object","properties":{"type":{"type":"string","enum":["NONE","NUMBER_OF_FREE_USERS"]},"freeResourceAmount":{"type":"integer","format":"int32"},"perExtraResourceCharge":{"type":"number"}}},"VersionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"versionNumber":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED"]},"createdAt":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"validFrom":{"type":"string","format":"date-time"},"currencyCode":{"type":"string"},"features":{"type":"array","items":{"$ref":"#/components/schemas/FeatureDto"}}}},"CreateSubscriptionDataStoragePricingRequest":{"type":"object","properties":{"dataStoragePricingTierId":{"type":"string","format":"uuid"},"finalPrice":{"type":"number","minimum":0},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"faPatch":{"$ref":"#/components/schemas/FaPatchOnDspCreateRequest"}},"required":["dataStoragePricingTierId","finalPrice","validFrom"]},"FaPatchOnDspCreateRequest":{"type":"object","properties":{"validFromMatchesDsp":{"type":"boolean"},"newValidTo":{"type":"string","format":"date-time"}}},"DataTierResponse":{"type":"object","properties":{"id":{"type":"string"},"dataTierId":{"type":"string"},"dataTierName":{"type":"string"},"storageGB":{"type":"number"},"listPrice":{"type":"number"},"finalPrice":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}},"SubscriptionDataStoragePricingResponse":{"type":"object","properties":{"subscriptionId":{"type":"string"},"version":{"$ref":"#/components/schemas/VersionResponse"}}},"VersionResponse":{"type":"object","properties":{"id":{"type":"string"},"versionNumber":{"type":"integer","format":"int32"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"validFrom":{"type":"string","format":"date-time"},"currencyCode":{"type":"string"},"dataTiers":{"type":"array","items":{"$ref":"#/components/schemas/DataTierResponse"}}}},"BillingPeriodRequest":{"type":"object","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}},"required":["end","start"]},"CreateAdHocOrderPricingRequest":{"type":"object","properties":{"description":{"type":"string","minLength":1},"accountingCode":{"type":"string","minLength":1},"billingPeriod":{"$ref":"#/components/schemas/BillingPeriodRequest"},"quantity":{"type":"number"},"unitOfQuantity":{"type":"string","enum":["HOUR","PIECE","DAY","MONTH"]},"netPrice":{"type":"number"},"currencyCode":{"type":"string","minLength":1},"recurringCharge":{"type":"boolean"}},"required":["accountingCode","billingPeriod","currencyCode","description","netPrice","quantity","unitOfQuantity"]},"AdHocOrderPricingItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string"},"accountingCode":{"type":"string"},"billingPeriod":{"$ref":"#/components/schemas/BillingPeriodDto"},"status":{"type":"string","enum":["PLANNED","BILLED","CANCELLED"]},"quantity":{"type":"number"},"unitOfQuantity":{"type":"string","enum":["HOUR","PIECE","DAY","MONTH"]},"netPrice":{"type":"number"},"currencyCode":{"type":"string"},"netTotal":{"type":"number"},"recurringCharge":{"type":"boolean"}}},"BillingPeriodDto":{"type":"object","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}}},"CreateRoleGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"tenantId":{"type":"string","minLength":1},"roleIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["description","name","roleIds","tenantId"]},"UpdateRoleGroupStatusRequest":{"type":"object","properties":{"roleGroupIds":{"type":"array","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","enum":["ACTIVE","DELETED"]}},"required":["newStatus","roleGroupIds"]},"SearchRoleGroupRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"tenantIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MassRemoveUsersRequest":{"type":"object","properties":{"roleGroupId":{"type":"string"},"userIds":{"type":"array","items":{"type":"string"},"minItems":1},"orgUnitId":{"type":"string"}},"required":["roleGroupId","userIds"]},"MassAddUsersRequest":{"type":"object","properties":{"roleGroupId":{"type":"string"},"userIds":{"type":"array","items":{"type":"string"},"minItems":1},"orgUnitId":{"type":"string"}},"required":["orgUnitId","roleGroupId","userIds"]},"CreateFeatureAccessPricingRequest":{"type":"object","description":"Request to create a new feature access pricing or a new version","properties":{"displayName":{"type":"string","description":"Feature display name","example":"Contract AI Extractor","minLength":1},"description":{"type":"string","description":"Feature description","example":"Extracts structured metadata from PDF contracts"},"accountingCode":{"type":"string","description":"Accounting code","example":13454322,"minLength":1},"currencyCode":{"type":"string","description":"Currency code (ISO 4217)","example":"HUF","minLength":1},"listPrice":{"type":"number","description":"List price","example":9500},"status":{"type":"string","description":"Status of the version","enum":["ACTIVE","SUSPENDED"],"example":"ACTIVE","minLength":1},"featureType":{"type":"string","description":"Feature type","enum":["MANDATORY","OPTIONAL"],"example":"OPTIONAL","minLength":1},"apisIncluded":{"type":"array","description":"List of APIs included in this feature","example":["CONTRACT_MANAGEMENT","DOCUMENT_PROCESSING"],"items":{"type":"string","enum":["CONTRACT_MANAGEMENT","NOTIFICATIONS","DOCUMENT_PROCESSING"]}},"validTo":{"type":"string","format":"date","description":"Optional end date for the version (null = open ended)","example":"2025-12-31"}},"required":["accountingCode","apisIncluded","currencyCode","displayName","featureType","listPrice","status"]},"FeatureAccessPricingVersionResponse":{"type":"object","description":"Feature access pricing with specific version","properties":{"id":{"type":"string","description":"Feature ID (external UUID)","example":"7b8c75e5-2546-4f6b-bc16-16bd783abf91"},"description":{"type":"string","description":"Feature description","example":"Contract AI Extractor"},"version":{"$ref":"#/components/schemas/FeaturePriceVersionSingleDto","description":"Specific version of the feature price"},"displayName":{"type":"string","description":"Feature display name","example":"Contract AI Extractor"},"createdAt":{"type":"string","format":"date-time","description":"Feature creation timestamp","example":"2025-10-01T10:01:00Z"}}},"FeaturePriceVersionSingleDto":{"type":"object","description":"Single feature price version","properties":{"id":{"type":"string","description":"Version ID (external UUID)","example":"8f2c1c0d-4e3c-46a3-aa81-b6d870c1f899"},"status":{"type":"string","description":"Version status","example":"ACTIVE"},"versionNumber":{"type":"integer","format":"int32","description":"Version number","example":2},"accountingCode":{"type":"string","description":"Accounting code","example":13454322},"listPrice":{"type":"number","description":"List price","example":9500},"currencyCode":{"type":"string","description":"Currency code (ISO 4217)","example":"HUF"},"featureType":{"type":"string","description":"Feature type","example":"OPTIONAL"},"createdAt":{"type":"string","format":"date-time","description":"Version creation timestamp","example":"2025-10-12T10:01:00Z"},"validTo":{"type":"string","format":"date","description":"Valid to date (null if open-ended)","example":"2025-12-12T10:01:00Z"}}},"UpdateFeatureAccessPricingStatusRequest":{"type":"object","description":"Request to update the status of the latest feature version","properties":{"featureId":{"type":"string","description":"Feature ID (external UUID)","example":"7b8c75e5-2546-4f6b-bc16-16bd783abf91","minLength":1},"newStatus":{"type":"string","description":"New status (can only be SUSPENDED)","enum":["SUSPENDED"],"example":"SUSPENDED","minLength":1}},"required":["featureId","newStatus"]},"CreateDataStoragePricingRequest":{"type":"object","properties":{"currencyCode":{"type":"string","maxLength":3,"minLength":3},"status":{"type":"string","pattern":"^(ACTIVE|SUSPENDED)$"},"accountingCode":{"type":"string","minLength":1},"validTo":{"type":"string","format":"date-time"},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/CreateDataStoragePricingTierRequest"},"minItems":1}},"required":["accountingCode","currencyCode","status","tiers"]},"CreateDataStoragePricingTierRequest":{"type":"object","properties":{"storageGB":{"type":"integer","format":"int32","minimum":1},"listPrice":{"type":"number","minimum":0.0}},"required":["listPrice","storageGB"]},"DataStoragePricingResponse":{"type":"object","properties":{"id":{"type":"string"},"versionNumber":{"type":"integer","format":"int32"},"currencyCode":{"type":"string"},"status":{"type":"string"},"accountingCode":{"type":"string"},"validTo":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/DataStoragePricingTierResponse"}}}},"DataStoragePricingTierResponse":{"type":"object","properties":{"id":{"type":"string"},"storageGB":{"type":"integer","format":"int32"},"listPrice":{"type":"number"}}},"CreatePartnerContactRequest":{"type":"object","description":"Request to create a partner contact","properties":{"name":{"type":"string","description":"Name of the contact person","example":"John Doe","maxLength":255,"minLength":0},"email":{"type":"string","format":"email","description":"Email address of the contact","example":"john.doe@example.com","maxLength":255,"minLength":0},"phone":{"type":"string","description":"Phone number of the contact","example":"+36201234567","maxLength":100,"minLength":0},"position":{"type":"string","description":"Position or role of the contact","example":"CFO","maxLength":255,"minLength":0}},"required":["name"]},"CreatePartnerRequest":{"type":"object","description":"Request to create a new partner","properties":{"associatedTenantId":{"type":"string","description":"The tenant ID to associate the partner with","example":"550e8400-e29b-41d4-a716-446655440000","minLength":1},"name":{"type":"string","description":"Name of the partner","example":"Acme Corporation","maxLength":255,"minLength":0},"description":{"type":"string","description":"Description of the partner","example":"Our main supplier for office equipment","maxLength":2000,"minLength":0},"taxId":{"type":"string","description":"Tax identification number","example":"12345678-1-42","maxLength":255,"minLength":0},"registrationNumber":{"type":"string","description":"Company registration number","example":"01-09-123456","maxLength":255,"minLength":0},"address":{"type":"string","description":"Street address","example":123,"maxLength":500,"minLength":0},"country":{"type":"string","description":"Country: 'HU' for Hungarian partners, or a free-text country name for international partners.","example":"HU","maxLength":100,"minLength":0},"zipCode":{"type":"string","description":"Postal/zip code","example":1234,"maxLength":20,"minLength":0},"city":{"type":"string","description":"City name","example":"Budapest","maxLength":255,"minLength":0},"contacts":{"type":"array","description":"List of partner contacts","items":{"$ref":"#/components/schemas/CreatePartnerContactRequest"}}},"required":["address","associatedTenantId","city","description","name","registrationNumber","taxId","zipCode"]},"UpdatePartnerStatusRequest":{"type":"object","properties":{"partnerIds":{"type":"array","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","enum":["ACTIVE","SUSPENDED","DELETED"]}},"required":["newStatus","partnerIds"]},"SearchPartnerRequest":{"type":"object","properties":{"tenantIds":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"description":{"type":"string"},"taxId":{"type":"string"},"status":{"type":"string"},"statuses":{"type":"array","items":{"type":"string"}},"registrationNumber":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SearchPartnerSettingsRequest":{"type":"object","description":"Request to search partner settings","properties":{"tenantIds":{"type":"array","description":"Optional list of tenant IDs to filter by. When empty, returns settings for all accessible tenants.","example":["550e8400-e29b-41d4-a716-446655440001"],"items":{"type":"string"}}}},"CreateOrgUnitRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"tenantId":{"type":"string","minLength":1},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]}},"required":["name","status","tenantId"]},"UpdateOrgUnitStatusRequest":{"type":"object","properties":{"orgUnitIds":{"type":"array","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]}},"required":["newStatus","orgUnitIds"]},"SearchOrgUnitRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tenantIds":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","DELETED"]}},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SearchNotificationsRequest":{"type":"object","description":"Search criteria for the authenticated user's received notifications. All fields are optional; results are always scoped to the caller's own notifications.","properties":{"title":{"type":"string","description":"Case-insensitive title fragment. Matches message-based notifications only (event titles are derived, not stored), so a title filter excludes event notifications.","example":"reminder"},"senderUserId":{"type":"string","description":"Filter by sender user (external ID). Matches message-based notifications only (events have no sender).","example":"550e8400-e29b-41d4-a716-446655440010"},"source":{"type":"string","description":"Filter by source: MESSAGE = direct messages only, EVENT = system events only, null = all","enum":["MESSAGE","EVENT"],"example":"MESSAGE"},"status":{"type":"string","description":"Filter by status: SENT = unread, READ = read, null = all delivered. PENDING (undelivered) notifications are never returned.","enum":["PENDING","SENT","READ","FAILED"],"example":"SENT"},"channel":{"type":"string","description":"Filter by channel: IN_APP or EMAIL, null = all","enum":["IN_APP","EMAIL"],"example":"IN_APP"},"createdFrom":{"type":"string","format":"date-time","description":"Only notifications created on or after this instant","example":"2026-01-01T00:00:00Z"},"createdTo":{"type":"string","format":"date-time","description":"Only notifications created on or before this instant","example":"2026-12-31T23:59:59Z"}}},"NotificationSenderSummary":{"type":"object","description":"The user who sent a message-based notification (null for system events)","properties":{"userId":{"type":"string","description":"Sender user external ID","example":"550e8400-e29b-41d4-a716-446655440010"},"name":{"type":"string","description":"Sender display name","example":"John Doe"},"email":{"type":"string","description":"Sender email address (populated in detail views only)","example":"john@example.com"}}},"NotificationSummaryResponse":{"type":"object","description":"A received notification as shown in the notification list / search results","properties":{"notificationId":{"type":"string","description":"Notification external ID","example":"550e8400-e29b-41d4-a716-446655440000"},"source":{"type":"string","description":"Where the notification originated","enum":["MESSAGE","EVENT"],"example":"MESSAGE"},"title":{"type":"string","description":"Title: the message subject (MESSAGE) or the event display name (EVENT)","example":"Warn me when September Ends"},"body":{"type":"string","description":"Body: the message note (MESSAGE) or text derived from the event payload (EVENT)","example":"Reminder text here."},"sender":{"$ref":"#/components/schemas/NotificationSenderSummary","description":"The sender (MESSAGE only; null for system events)"},"hasAttachment":{"type":"boolean","description":"Whether the source message has an attachment (always false for events)","example":true},"status":{"type":"string","description":"Delivery status: SENT = unread, READ = read","enum":["PENDING","SENT","READ","FAILED"],"example":"SENT"},"readAt":{"type":"string","format":"date-time","description":"When the user opened the notification (null if unread)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}},"TaxpayerValidationRequest":{"type":"object","description":"Request to validate a Hungarian tax number","properties":{"taxNumber":{"type":"string","description":"Hungarian tax number. Can be 8 digits only (e.g., '12345678') or full format (e.g., '12345678-1-23')","example":12345678,"minLength":1,"pattern":"^\\d{8}(-\\d-\\d{2})?$"}},"required":["taxNumber"]},"TaxpayerAddressResponse":{"type":"object","description":"Taxpayer address from NAV","properties":{"countryCode":{"type":"string","description":"Country code","example":"HU"},"postalCode":{"type":"string","description":"Postal code","example":1234},"city":{"type":"string","description":"City name","example":"Budapest"},"streetName":{"type":"string","description":"Street name","example":"Váci"},"publicPlaceCategory":{"type":"string","description":"Public place category (utca, út, etc.)","example":"utca"},"number":{"type":"string","description":"House number","example":1},"building":{"type":"string","description":"Building identifier","example":"A"},"staircase":{"type":"string","description":"Staircase identifier","example":"B"},"floor":{"type":"string","description":"Floor number","example":3},"door":{"type":"string","description":"Door number","example":12}}},"TaxpayerValidationResponse":{"type":"object","description":"Result of taxpayer validation from NAV","properties":{"valid":{"type":"boolean","description":"Whether the tax number is valid and active","example":true},"taxNumber":{"type":"string","description":"The validated tax number (8 digits)","example":12345678},"taxpayerName":{"type":"string","description":"Full company/taxpayer name","example":"Example Company Kft."},"taxpayerShortName":{"type":"string","description":"Short company/taxpayer name","example":"Example Kft."},"fullTaxNumber":{"type":"string","description":"Full tax number with VAT code and county code","example":"12345678-1-23"},"headquarters":{"$ref":"#/components/schemas/TaxpayerAddressResponse","description":"Headquarters address"}}},"CreateMessageRequest":{"type":"object","description":"Request to create a new direct message","properties":{"tenantId":{"type":"string","description":"The tenant the message belongs to","example":"550e8400-e29b-41d4-a716-446655440000","minLength":1},"documentId":{"type":"string","description":"Document (external ID) to scope this message to. Null sends an ordinary direct message; when set, the message appears in that document's notification feed and not in the global /api/messages listing. The sender must be able to read the document.","example":"550e8400-e29b-41d4-a716-446655440042"},"title":{"type":"string","description":"Message title / subject","example":"Warn me when September Ends","maxLength":500,"minLength":0},"body":{"type":"string","description":"Message body / note","example":"Reminder text here.","minLength":1},"recipientUserIds":{"type":"array","description":"Individual user recipients (external IDs)","items":{"type":"string"}},"recipientRoleGroupIds":{"type":"array","description":"Role group recipients (external IDs); all members are notified","items":{"type":"string"}},"recipientOrgUnitIds":{"type":"array","description":"Org unit recipients (external IDs); all members are notified","items":{"type":"string"}},"attachmentId":{"type":"string","description":"Reference to a stored file (optional)","example":"550e8400-e29b-41d4-a716-446655440099"},"scheduledAt":{"type":"string","format":"date-time","description":"When to deliver the message. Null means immediate delivery; when set, must be in the future.","example":"2026-09-30T08:00:00Z"}},"required":["body","tenantId","title"]},"SearchMessagesRequest":{"type":"object","description":"Search criteria for direct messages","properties":{"tenantId":{"type":"string","description":"The tenant to search within (external ID)","example":"550e8400-e29b-41d4-a716-446655440000","minLength":1},"title":{"type":"string","description":"Case-insensitive title fragment","example":"reminder"},"senderUserId":{"type":"string","description":"Filter by sender user (external ID)","example":"550e8400-e29b-41d4-a716-446655440010"},"createdFrom":{"type":"string","format":"date-time","description":"Only messages created on or after this instant","example":"2026-01-01T00:00:00Z"},"createdTo":{"type":"string","format":"date-time","description":"Only messages created on or before this instant","example":"2026-12-31T23:59:59Z"}},"required":["tenantId"]},"MessageSummaryResponse":{"type":"object","description":"A direct message as shown in the overview / search results","properties":{"id":{"type":"string","description":"Message external ID","example":"550e8400-e29b-41d4-a716-446655440000"},"title":{"type":"string","description":"Message title / subject","example":"Warn me when September Ends"},"body":{"type":"string","description":"Message body / note","example":"Reminder text here."},"sender":{"$ref":"#/components/schemas/MessageUserSummary","description":"The originator user"},"targets":{"type":"array","description":"The sender's original targets (the \"Target\" column)","items":{"$ref":"#/components/schemas/MessageTargetSummary"}},"hasAttachment":{"type":"boolean","description":"Whether the message has an attachment (the \"Note attached\" column)","example":true},"scheduledAt":{"type":"string","format":"date-time","description":"Scheduled delivery time (null if delivered immediately)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"messageDate":{"type":"string","format":"date-time","description":"The message date for the overview: scheduledAt when set, otherwise createdAt"}}},"MessageTargetSummary":{"type":"object","description":"Concise summary of one of a message's original targets, for the overview list","properties":{"type":{"type":"string","description":"Target type","enum":["USER","ROLE_GROUP","ORG_UNIT"],"example":"USER"},"targetId":{"type":"string","description":"External ID of the targeted user/role group/org unit","example":"550e8400-e29b-41d4-a716-446655440030"},"targetName":{"type":"string","description":"Display name of the targeted user/role group/org unit","example":"John Doe"}}},"UpdateMeNotificationStatusRequest":{"type":"object","description":"Request to bulk-update the status of the caller's own in-app notifications (e.g. mark as read). Transactional: all IDs are updated or none.","properties":{"notificationIds":{"type":"array","description":"External IDs of the notifications to update; all must belong to the caller. At most 500 IDs per request.","items":{"type":"string"},"maxItems":500,"minItems":0},"newStatus":{"type":"string","description":"The new status. Only READ is accepted for in-app notifications.","enum":["PENDING","SENT","READ","FAILED"],"example":"READ"}},"required":["newStatus","notificationIds"]},"MeNotificationActor":{"type":"object","description":"The user behind a notification: the sender (MESSAGE) or the event actor (EVENT). Null for system events with no actor.","properties":{"userId":{"type":"string","description":"Actor user external ID","example":"550e8400-e29b-41d4-a716-446655440010"},"name":{"type":"string","description":"Actor display name","example":"John Doe"}}},"MeNotificationResponse":{"type":"object","description":"An in-app notification as shown in the notification pane","properties":{"notificationId":{"type":"string","description":"Notification external ID","example":"550e8400-e29b-41d4-a716-446655440000"},"source":{"type":"string","description":"Where the notification originated","enum":["MESSAGE","EVENT"],"example":"EVENT"},"title":{"type":"string","description":"Title: the message subject (MESSAGE) or the event display name (EVENT)","example":"Contract Created"},"body":{"type":"string","description":"Body: the message note (MESSAGE) or text derived from the event payload (EVENT)","example":"New contract: Service Agreement 2026"},"actor":{"$ref":"#/components/schemas/MeNotificationActor","description":"The user behind the notification: sender (MESSAGE) or event actor (EVENT). Null for system events with no actor."},"eventCategory":{"type":"string","description":"Category of the entity to deep-link to. Set for event notifications and document-scoped messages; null for ordinary direct messages.","enum":["TENANT","USER","CONTRACT","INVOICE","PARTNER","SUBSCRIPTION","SYSTEM","OTHER_DOCUMENT","PROCESS"],"example":"CONTRACT"},"entityId":{"type":"string","description":"External ID of the entity to deep-link to. Set for event notifications and document-scoped messages; null for ordinary direct messages.","example":"550e8400-e29b-41d4-a716-446655440099"},"navigable":{"type":"boolean","description":"Whether the current recipient may actually open the linked entity. False when there is no deep-link, or when the recipient lacks access to the entity (e.g. a non-admin who received a broadcast USER_CREATED / PARTNER_CREATED notification). The pane renders a link only when this is true.","example":true},"status":{"type":"string","description":"Delivery status: SENT = unread, READ = read","enum":["PENDING","SENT","READ","FAILED"],"example":"SENT"},"readAt":{"type":"string","format":"date-time","description":"When the user opened the notification (null if unread)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}},"MeNotificationSearchRequest":{"type":"object","description":"Search criteria for the authenticated user's in-app notifications. All fields are optional; results are always scoped to the caller and to the IN_APP channel.","properties":{"status":{"type":"string","description":"Filter by status: SENT = unread, READ = read, null = all delivered. Only SENT and READ are meaningful here — PENDING (undelivered) notifications are never returned, and FAILED is an EMAIL-only state.","enum":["SENT","READ"],"example":"SENT"},"eventCategory":{"type":"string","description":"Filter by event category. Matches event-based notifications only (messages have no category), so this filter excludes message notifications.","enum":["TENANT","USER","CONTRACT","INVOICE","PARTNER","SUBSCRIPTION","SYSTEM","OTHER_DOCUMENT","PROCESS"],"example":"CONTRACT"},"createdFrom":{"type":"string","format":"date-time","description":"Only notifications created on or after this instant","example":"2026-01-01T00:00:00Z"},"createdTo":{"type":"string","format":"date-time","description":"Only notifications created on or before this instant","example":"2026-12-31T23:59:59Z"}}},"SearchInvoiceRequest":{"type":"object","properties":{"tenantIds":{"type":"array","items":{"type":"string"}},"issueDateIsAfterorEqualTo":{"type":"string","format":"date-time"},"issueDateIsBefore":{"type":"string","format":"date-time"},"paymentDueDateIsBefore":{"type":"string","format":"date-time"},"paymentDueDateIsAfterOrEqualTo":{"type":"string","format":"date-time"},"billingPeriodStart":{"type":"string","format":"date-time"},"billingPeriodEnd":{"type":"string","format":"date-time"},"invoiceStatuses":{"type":"array","items":{"type":"string","enum":["DRAFT","ISSUED","PAID","CANCELLED","OVERDUE","DELETED"]}},"invoiceNumber":{"type":"string"},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"InvoiceResponse":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"subscriptionId":{"type":"integer","format":"int64"},"subscriptionVersionId":{"type":"integer","format":"int64"},"invoiceNumber":{"type":"string"},"currencyCode":{"type":"string"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["DRAFT","ISSUED","PAID","CANCELLED","OVERDUE","DELETED"]},"displayStatus":{"type":"string","enum":["PAID","CANCELLED","DRAFT","OVERDUE","PENDING"]},"totalNetAmount":{"type":"number"},"totalTaxAmount":{"type":"number"},"totalGrossAmount":{"type":"number"},"accountingPeriodStart":{"type":"string","format":"date-time"},"accountingPeriodEnd":{"type":"string","format":"date-time"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SearchInvoiceItemRequest":{"type":"object","properties":{"tenantIds":{"type":"array","items":{"type":"string"}},"invoiceNumber":{"type":"string"},"accountingPeriodStart":{"type":"string","format":"date-time"},"accountingPeriodEnd":{"type":"string","format":"date-time"},"issueDateIsAfterOrEqualTo":{"type":"string","format":"date-time"},"issueDateIsBefore":{"type":"string","format":"date-time"},"paymentDueDateIsBefore":{"type":"string","format":"date-time"},"paymentDueDateIsAfterOrEqualTo":{"type":"string","format":"date-time"}}},"InvoiceItemResponse":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"tenantName":{"type":"string"},"invoiceId":{"type":"string"},"invoiceNumber":{"type":"string"},"accountingPeriodStart":{"type":"string","format":"date-time"},"accountingPeriodEnd":{"type":"string","format":"date-time"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"chargeType":{"type":"string","enum":["FEATURE_VERSION","DATA_TIER_VERSION","AD_HOC_ITEM","EXTRA_USERS"]},"chargeItemDescription":{"type":"string"},"accountingCode":{"type":"string"},"quantity":{"type":"number"},"netAmount":{"type":"number"},"grossAmount":{"type":"number"},"currencyCode":{"type":"string"},"comment":{"type":"string"}}},"CreateDocumentFinancialDataRequest":{"type":"object","properties":{"totalDocumentValue":{"type":"number","minimum":0.0},"documentValueNet":{"type":"number","minimum":0.0},"documentValueGross":{"type":"number","minimum":0.0},"currencyCode":{"type":"string","maxLength":3,"minLength":3,"pattern":"^(HUF|EUR)$"},"netGross":{"type":"string","enum":["NET","GROSS"]},"paymentDirection":{"type":"string","enum":["INCOMING","OUTGOING"]},"paymentFrequency":{"type":"string","enum":["ONE_TIME","MONTHLY","QUARTERLY","TWICE_A_YEAR","YEARLY"]},"paymentDeadlineDays":{"type":"integer","format":"int32","minimum":0},"perBillPayable":{"type":"number","minimum":0.0},"vatPercentage":{"type":"number","maximum":100.0,"minimum":0.0}}},"CreateDocumentRequest":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1},"documentTypeId":{"type":"string","minLength":1},"documentCategoryId":{"type":"string","format":"uuid","description":"Document category id (Category.externalId). If omitted, backend falls back to CONTRACT.","example":"d0cae227-5a21-4e76-8326-ae167a0a99d1"},"orgUnitId":{"type":"string","minLength":1},"partnerId":{"type":"string","minLength":1},"documentNumber":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"visibility":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"ownerUserId":{"type":"string"},"effectiveDate":{"type":"string","format":"date"},"expirationDate":{"type":"string","format":"date"},"financialData":{"$ref":"#/components/schemas/CreateDocumentFinancialDataRequest"},"customFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueRequest"}}},"required":["documentTypeId","name","orgUnitId","partnerId","tenantId","visibility"]},"CustomFieldValueRequest":{"type":"object","properties":{"customFieldId":{"type":"string","minLength":1},"valueText":{"type":"string"},"valueNumber":{"type":"number"},"valueDate":{"type":"string","format":"date"},"valueBoolean":{"type":"boolean"},"selectedOptionIds":{"type":"array","items":{"type":"string"}}},"required":["customFieldId"]},"DocumentFinancialDataResponse":{"type":"object","properties":{"currencyCode":{"type":"string"},"paymentDirection":{"type":"string","enum":["INCOMING","OUTGOING"]},"totalDocumentValue":{"type":"number"},"netGross":{"type":"string","enum":["NET","GROSS"]},"paymentFrequency":{"type":"string","enum":["ONE_TIME","MONTHLY","QUARTERLY","TWICE_A_YEAR","YEARLY"]},"paymentDeadlineDays":{"type":"integer","format":"int32"},"perBillPayable":{"type":"number"},"vatPercentage":{"type":"number"},"documentValueNet":{"type":"number"},"documentValueGross":{"type":"number"}}},"DocumentResponse":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"documentNumber":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["INCOMPLETE","ACTIVE","ABOUT_TO_EXPIRE","EXPIRED","ARCHIVED"]},"visibility":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"ownerId":{"type":"string"},"ownerName":{"type":"string"},"orgUnitId":{"type":"string"},"orgUnitName":{"type":"string"},"partnerId":{"type":"string"},"partnerName":{"type":"string"},"documentTypeId":{"type":"string"},"documentTypeName":{"type":"string"},"effectiveDate":{"type":"string","format":"date"},"expirationDate":{"type":"string","format":"date"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"documentFinancialData":{"$ref":"#/components/schemas/DocumentFinancialDataResponse"},"documentSensitivity":{"type":"string","enum":["ANONYMIZED","ORIGINAL","DRAFT"]},"documentCategory":{"type":"string","enum":["CONTRACT","OTHER_DOCUMENT"]}}},"BatchCreateRelatedDocumentsMetadata":{"type":"object","description":"Metadata for batch creation of related documents","properties":{"documentTypeId":{"type":"string","description":"Document type external id; applies to every uploaded file","minLength":1},"names":{"type":"array","description":"Optional per-file name overrides (positional). Null/blank entries fall back to a generated name.","items":{"type":"string"}}},"required":["documentTypeId"]},"BatchUploadRequest":{"type":"object","description":"Multipart request for batch upload of related documents","properties":{"metadata":{"$ref":"#/components/schemas/BatchCreateRelatedDocumentsMetadata","description":"Metadata as JSON"},"files":{"type":"array","description":"Files to upload (one OTHER_DOCUMENT per file)","items":{"format":"binary"}}}},"BatchCreateRelatedDocumentsResponse":{"type":"object","description":"Created related documents, in the same order as the uploaded files","properties":{"createdDocuments":{"type":"array","description":"Created related documents","items":{"$ref":"#/components/schemas/RelatedDocument"}}}},"RelatedDocument":{"type":"object","description":"OTHER_DOCUMENT linked to a document with fields needed for list rendering","properties":{"id":{"type":"string","format":"uuid","description":"Related document external id"},"relationshipId":{"type":"string","format":"uuid","description":"Relationship row external id (needed for unlink)"},"documentNumber":{"type":"string","description":"Document number (e.g. OTH/2026/0001)"},"name":{"type":"string","description":"Document name"},"documentTypeName":{"type":"string","description":"Document type name"},"partnerName":{"type":"string","description":"Partner name (inherited from related document's partner)"},"createdAt":{"type":"string","format":"date-time","description":"Created at"},"createdByUserId":{"type":"string","format":"uuid","description":"Created-by user external id"},"addedByUserName":{"type":"string","description":"Display name of the user who added the document"}}},"DocumentMetadataRequest":{"type":"object","description":"Document metadata as JSON","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"documentSensitivity":{"type":"string","enum":["ANONYMIZED","ORIGINAL","DRAFT"]},"description":{"type":"string","maxLength":2000,"minLength":0}},"required":["documentSensitivity","name"]},"UploadDocumentRequest":{"type":"object","description":"Multipart request for document upload","properties":{"metadata":{"$ref":"#/components/schemas/DocumentMetadataRequest","description":"Document metadata as JSON"},"file":{"type":"string","format":"binary","description":"The document file to upload"}}},"DocumentVersionResponse":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"type":"string"},"versionNumber":{"type":"integer","format":"int32"},"name":{"type":"string"},"description":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"fileSizeBytes":{"type":"integer","format":"int64"},"checksum":{"type":"string"},"sensitivity":{"type":"string","enum":["ANONYMIZED","ORIGINAL","DRAFT"]},"downloadUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"type":"string"}}},"CustomFieldFilter":{"type":"object","properties":{"customDataFieldId":{"type":"string","format":"uuid"},"valueText":{"type":"string"},"valueNumberFrom":{"type":"number"},"valueNumberTo":{"type":"number"},"valueDateFrom":{"type":"string","format":"date"},"valueDateTo":{"type":"string","format":"date"},"valueBoolean":{"type":"boolean"},"selectedOptionIds":{"type":"array","items":{"type":"string"}}}},"SearchDocumentRequest":{"type":"object","properties":{"tenantIds":{"type":"array","items":{"type":"string"}},"documentNumber":{"type":"string"},"documentName":{"type":"string"},"quickSearch":{"type":"string"},"orgUnit":{"type":"string"},"effectiveDate":{"type":"string","format":"date-time"},"effectiveDateTo":{"type":"string","format":"date-time"},"expirationDateFrom":{"type":"string","format":"date-time"},"expirationDate":{"type":"string","format":"date-time"},"partnerId":{"type":"string"},"partnerName":{"type":"string"},"status":{"type":"string","enum":["INCOMPLETE","ACTIVE","ABOUT_TO_EXPIRE","EXPIRED","ARCHIVED"]},"statuses":{"type":"array","items":{"type":"string","enum":["INCOMPLETE","ACTIVE","ABOUT_TO_EXPIRE","EXPIRED","ARCHIVED"]}},"visibility":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"ownerName":{"type":"string"},"ownerUserId":{"type":"string","format":"uuid"},"createdByUserId":{"type":"string","format":"uuid"},"documentTypeName":{"type":"string"},"documentSensitivity":{"type":"string","enum":["ANONYMIZED","ORIGINAL","DRAFT"]},"documentCategory":{"type":"string","enum":["CONTRACT","OTHER_DOCUMENT"]},"customFieldFilters":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldFilter"}},"associatedToDocumentId":{"type":"string","format":"uuid"},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SearchDocumentNotificationsRequest":{"type":"object","description":"Search criteria for a document's notification feed (the merged message + event items scoped to one or more documents). The filter set is expected to grow over time.","properties":{"documentIds":{"type":"array","description":"Documents (external IDs) to return the feed for; at least one is required (max 100). Items from documents the caller cannot read are excluded.","items":{"type":"string"},"maxItems":100,"minItems":0},"source":{"type":"string","description":"Filter by source: MESSAGE (user-authored) or EVENT (system). Null returns both.","example":"MESSAGE"},"status":{"type":"string","description":"Filter by the caller's read-state for the item (e.g. SENT = unread, READ = read). Items the caller did not receive are excluded when this is set. Null returns all.","example":"SENT"},"createdFrom":{"type":"string","format":"date-time","description":"Only items created on or after this instant","example":"2026-01-01T00:00:00Z"},"createdTo":{"type":"string","format":"date-time","description":"Only items created on or before this instant","example":"2026-12-31T23:59:59Z"}},"required":["documentIds"]},"DocumentNotificationItemResponse":{"type":"object","description":"One item in a document's notification feed: a user-authored message or a system event scoped to the document, tagged with its source and the caller's read-state.","properties":{"id":{"type":"string","description":"External ID of the underlying message or business event","example":"550e8400-e29b-41d4-a716-446655440000"},"source":{"type":"string","description":"Item source","enum":["MESSAGE","EVENT"],"example":"MESSAGE"},"documentId":{"type":"string","description":"External ID of the document this item is scoped to","example":"550e8400-e29b-41d4-a716-446655440042"},"title":{"type":"string","description":"Title / subject"},"body":{"type":"string","description":"Body / note"},"author":{"$ref":"#/components/schemas/MessageUserSummary","description":"The author: the sender of a message or the actor of an event. Null for actor-less events."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp driving the newest-first ordering: a message's creation time or an event's occurrence time"},"scheduledAt":{"type":"string","format":"date-time","description":"Scheduled delivery time (MESSAGE only; null otherwise)"},"status":{"type":"string","description":"The caller's read-state for this item; null if the caller is not a recipient","enum":["PENDING","SENT","READ","FAILED"],"example":"SENT"},"readAt":{"type":"string","format":"date-time","description":"When the caller read this item; null if unread or not a recipient"},"notificationId":{"type":"string","description":"The caller's notification (external ID) for this item, used to mark it read via POST /api/notifications; null if the caller is not a recipient"},"recipients":{"type":"array","description":"The message's original targets (users / role groups / org units); MESSAGE items only, null for events","items":{"$ref":"#/components/schemas/MessageTargetSummary"}},"eventType":{"type":"string","description":"Event type (EVENT only; null for messages)","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"]},"eventCategory":{"type":"string","description":"Event category (EVENT only; null for messages)","enum":["TENANT","USER","CONTRACT","INVOICE","PARTNER","SUBSCRIPTION","SYSTEM","OTHER_DOCUMENT","PROCESS"]}}},"MassDeleteDocumentOwnerRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"documentOwnerToDelete":{"type":"string","format":"uuid"}},"required":["documentIds","documentOwnerToDelete"]},"MassChangeOrgUnitRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"newOrgUnit":{"type":"string","format":"uuid"}},"required":["documentIds","newOrgUnit"]},"MassAddDocumentOwnerRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"newOwner":{"type":"string","format":"uuid"}},"required":["documentIds","newOwner"]},"DocumentDownloadRequest":{"type":"object","properties":{"documentIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["documentIds"]},"CreateDocumentTypeRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"tenantId":{"type":"string","minLength":1},"individualPrefix":{"type":"string"},"associatedDocumentCategories":{"type":"array","items":{"$ref":"#/components/schemas/DocumentCategoryDto"},"minItems":1}},"required":["associatedDocumentCategories","name","tenantId"]},"UpdateDocumentTypeStatusRequest":{"type":"object","properties":{"documentTypeIds":{"type":"array","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","enum":["ACTIVE","SUSPENDED"]}},"required":["documentTypeIds","newStatus"]},"SearchDocumentTypeRequest":{"type":"object","properties":{"ids":{"type":"array","description":"Optional list of document-type externalIds to restrict results to. Empty or null = no id filter.","example":["7b8c75e5-2546-4f6b-bc16-16bd783abf91"],"items":{"type":"string"}},"tenantIds":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string","enum":["ACTIVE","SUSPENDED"]}},"documentTypeName":{"type":"string"},"associatedDocumentCategories":{"type":"array","items":{"$ref":"#/components/schemas/DocumentCategoryDto"}},"categoryCode":{"type":"string","description":"Optional category-code filter (Step-1 dropdown for the Create-New-Document wizard). Mutually exclusive with associatedDocumentCategories in practice; passing both AND-combines the predicates.","enum":["CONTRACT","OTHER_DOCUMENT"],"example":"OTHER_DOCUMENT"},"includeCustomDataFields":{"type":"boolean","default":false,"description":"When true, each returned type carries its full custom-data-field schema (used for Step-2 of the Create-New-Document wizard). When false/omitted, response is identical to the legacy dropdown payload."},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SearchDocumentSettingsRequest":{"type":"object","properties":{"tenantIds":{"type":"array","items":{"type":"string"}}}},"DocumentRelationshipCreateRequest":{"type":"object","description":"Create a document relationship (any Relationship enum name; stored as primary direction)","properties":{"sourceDocumentId":{"type":"string","format":"uuid"},"targetDocumentId":{"type":"string","format":"uuid"},"relationshipType":{"type":"string","description":"Relationship enum name (primary or non-primary; non-primary is normalized by swapping endpoints)","minLength":1}},"required":["relationshipType","sourceDocumentId","targetDocumentId"]},"DocumentRelationshipCreated":{"type":"object","description":"Created relationship (always primary direction as persisted)","properties":{"id":{"type":"string","format":"uuid","description":"Relationship row external id"},"sourceDocumentId":{"type":"string","format":"uuid","description":"Stored source document external id"},"targetDocumentId":{"type":"string","format":"uuid","description":"Stored target document external id"},"relationshipType":{"type":"string","description":"Stored relationship type (primary enum name)"},"createdAt":{"type":"string","format":"date-time","description":"Created at"}}},"DocumentRelationshipBatchCreateRequest":{"type":"object","description":"Create multiple relationships between a source document and many target documents in one call. Non-primary types are normalized by swapping endpoints; the source is anchored in the URL path.","properties":{"targetDocumentIds":{"type":"array","description":"External ids of target documents to associate with the source document (max 100 per request)","items":{"type":"string","format":"uuid"},"maxItems":100,"minItems":0},"relationshipType":{"type":"string","description":"Relationship enum name (primary or non-primary; non-primary is normalized by swapping endpoints)","minLength":1}},"required":["relationshipType","targetDocumentIds"]},"DocumentRelationshipBatchCreated":{"type":"object","description":"Result of a batch document-relationship create. Idempotent: existing relationships are silently skipped.","properties":{"created":{"type":"integer","format":"int32","description":"Number of relationships actually created in this call"},"skipped":{"type":"integer","format":"int32","description":"Number of requested relationships that already existed and were silently skipped"},"total":{"type":"integer","format":"int32","description":"Total number of relationships processed (created + skipped)"}}},"DocumentRelationshipSearchRequest":{"type":"object","description":"Filter document relationships; fetchDepth applies only when documentId is set","properties":{"tenantId":{"type":"string","format":"uuid","description":"Tenant external id"},"sourceDocumentId":{"type":"string","format":"uuid","description":"Filter by source document external id (mutually exclusive with documentId)"},"targetDocumentId":{"type":"string","format":"uuid","description":"Filter by target document external id (mutually exclusive with documentId)"},"documentId":{"type":"string","format":"uuid","description":"Anchor document: match source or target (mutually exclusive with sourceDocumentId and targetDocumentId)"},"relationshipType":{"type":"string","description":"Primary Relationship enum name only; optional filter"},"fetchDepth":{"type":"integer","format":"int32","description":"Max traversal depth per direction when documentId is set; 0 = immediate edges only. Capped at 50.","maximum":50,"minimum":0}},"required":["tenantId"]},"DocumentRelationshipSearchItem":{"type":"object","description":"One relationship row in search results","properties":{"id":{"type":"string","format":"uuid","description":"Relationship external id"},"sourceDocumentId":{"type":"string","format":"uuid","description":"Source document external id"},"targetDocumentId":{"type":"string","format":"uuid","description":"Target document external id"},"relationshipType":{"type":"string","description":"Stored primary relationship type"},"createdAt":{"type":"string","format":"date-time","description":"Created at"},"direction":{"type":"string","description":"UPSTREAM or DOWNSTREAM relative to queried documentId; null when documentId filter was not used; cross-edges default to DOWNSTREAM"},"sourcePartnerId":{"type":"string","format":"uuid","description":"Source document's partner external id"},"targetPartnerId":{"type":"string","format":"uuid","description":"Target document's partner external id"}}},"CreateCustomDataFieldRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"isMandatory":{"type":"boolean"},"isIndexed":{"type":"boolean"},"tenantId":{"type":"string","minLength":1},"associatedDocumentTypeIds":{"type":"array","items":{"type":"string"}},"associatedDocumentCategoryIds":{"type":"array","items":{"type":"string"}},"associatedOrgUnitIds":{"type":"array","items":{"type":"string"}},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","BOOLEAN","SINGLE_CHOICE","MULTIPLE_CHOICE"]},"options":{"type":"array","items":{"type":"string"}}},"required":["fieldType","isIndexed","isMandatory","name","tenantId"]},"UpdateCustomDataFieldStatusRequest":{"type":"object","properties":{"customDataFieldIds":{"type":"array","items":{"type":"string"},"minItems":1},"newStatus":{"type":"string","enum":["ACTIVE","SUSPENDED"]}},"required":["customDataFieldIds","newStatus"]},"SearchCustomDataFieldRequest":{"type":"object","properties":{"tenantIds":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string","enum":["ACTIVE","SUSPENDED"]}},"customFieldName":{"type":"string"},"associatedOrgUnitIds":{"type":"array","items":{"type":"string"}},"associatedDocumentTypeIds":{"type":"array","items":{"type":"string"}},"associatedDocumentCategoryIds":{"type":"array","items":{"type":"string"}},"isMandatory":{"type":"boolean"},"isIndexed":{"type":"boolean"},"translatedSortOrders":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SearchBusinessEventRequest":{"type":"object","description":"Search request for business events (audit log)","properties":{"tenantIds":{"type":"array","description":"List of tenant IDs to filter by (required)","items":{"type":"string","minLength":1},"minItems":1},"entityId":{"type":"string","description":"Entity ID to filter by (e.g. document UUID)","example":"550e8400-e29b-41d4-a716-446655440001"},"entityType":{"type":"string","description":"Entity type to filter by (exact case-sensitive match, e.g. 'Partner', 'Contract', 'Document')"},"eventCategory":{"type":"string","description":"Event category to filter by (e.g. CONTRACT, PARTNER)"},"eventType":{"type":"string","description":"Event type to filter by (e.g. CONTRACT_METADATA_CHANGED)"},"actorUserId":{"type":"string","description":"Actor user ID to filter by","example":"550e8400-e29b-41d4-a716-446655440000"},"occurredFrom":{"type":"string","format":"date-time","description":"Filter events occurring on or after this timestamp"},"occurredTo":{"type":"string","format":"date-time","description":"Filter events occurring on or before this timestamp"}},"required":["tenantIds"]},"BusinessEventActorResponse":{"type":"object","description":"Actor (user) who triggered the business event","properties":{"userId":{"type":"string","description":"Actor user ID","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","description":"Actor display name","example":"John Doe"}}},"BusinessEventResponse":{"type":"object","description":"Business event response","properties":{"eventId":{"type":"string","description":"Event unique identifier","example":"550e8400-e29b-41d4-a716-446655440000"},"eventType":{"type":"string","description":"Type of the business event","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"]},"eventCategory":{"type":"string","description":"Category of the business event","enum":["TENANT","USER","CONTRACT","INVOICE","PARTNER","SUBSCRIPTION","SYSTEM","OTHER_DOCUMENT","PROCESS"]},"actor":{"$ref":"#/components/schemas/BusinessEventActorResponse","description":"Actor who triggered the event"},"entityId":{"type":"string","description":"ID of the entity this event relates to","example":"550e8400-e29b-41d4-a716-446655440001"},"entityType":{"type":"string","description":"Type of entity this event relates to","example":"Document"},"occurredAt":{"type":"string","format":"date-time","description":"Timestamp when the event occurred"},"detail":{"type":"object","additionalProperties":{},"description":"Raw event detail payload (structure varies per event type)"}}},"PatchFeatureAccessPricingRequest":{"type":"object","properties":{"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}}},"PatchDataStoragePricingRequest":{"type":"object","properties":{"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}}},"UpdateDocumentRequest":{"type":"object","properties":{"documentTypeId":{"type":"string"},"orgUnitId":{"type":"string"},"partnerId":{"type":"string"},"documentNumber":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"ownerUserId":{"type":"string","format":"uuid"},"effectiveDate":{"type":"string","format":"date"},"expirationDate":{"type":"string","format":"date"},"totalDocumentValue":{"type":"number"},"currencyCode":{"type":"string"},"netGross":{"type":"string","enum":["NET","GROSS"]},"paymentDirection":{"type":"string","enum":["INCOMING","OUTGOING"]},"paymentFrequency":{"type":"string","enum":["ONE_TIME","MONTHLY","QUARTERLY","TWICE_A_YEAR","YEARLY"]},"paymentDeadlineDays":{"type":"integer","format":"int32"},"perBillPayable":{"type":"number"},"vatPercentage":{"type":"number","maximum":100.0,"minimum":0.0},"documentValueNet":{"type":"number","minimum":0.0},"documentValueGross":{"type":"number","minimum":0.0},"customFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldValueRequest"}}}},"UserRolesResponse":{"type":"object","properties":{"globalRoles":{"type":"array","items":{"type":"string"}},"tenantRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantRoleInfo"}},"orgUnitRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantOrgUnitRoles"}}}},"TenantDashboardResponse":{"type":"object","properties":{"nextBillDueAmount":{"type":"number","description":"Outstanding amount of the next unpaid invoice (remaining after partial payments), null if none exists"},"nextBillDueCurrency":{"type":"string","description":"Currency code of the next unpaid invoice (ISO 4217), null if none exists"},"nextBillDueDate":{"type":"string","format":"date","description":"Due date of the next unpaid invoice, null if none exists"},"previousBillPaymentStatus":{"type":"string","description":"Payment status of the most recently closed invoice, null if none exists","enum":["PAID","CANCELLED"]},"totalDataStoredBytes":{"type":"integer","format":"int64"},"dataStorageLimitBytes":{"type":"integer","format":"int64"},"documentsStored":{"type":"integer","format":"int64"},"usersRegistered":{"type":"integer","format":"int64"}},"required":["dataStorageLimitBytes","documentsStored","totalDataStoredBytes","usersRegistered"]},"SubscriptionItemResponse":{"type":"object","properties":{"subscriptionType":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"versionNumber":{"type":"integer","format":"int32"},"monthlyCharge":{"type":"number"}}},"SubscriptionOverviewResponse":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","CANCELLED","DELETED"]},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"currencyCode":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionItemResponse"}}}},"SubscriptionSummaryResponse":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","ACTIVE","SUSPENDED","CANCELLED","DELETED"]},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"currencyCode":{"type":"string"},"subscriptionTypes":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionTypeDto"}},"suspensionReason":{"type":"string","enum":["MANUAL","BILLING","EXPIRY"]}}},"SubscriptionTypeDto":{"type":"object","properties":{"type":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"version":{"type":"string"},"monthlyCharge":{"type":"number"},"recurring":{"type":"boolean"}}},"FeatureAccessPricingAllVersionsResponse":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VersionDto"}}}},"FeatureAccessPricingVersionListResponse":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/VersionInfoDto"}}}},"VersionInfoDto":{"type":"object","properties":{"versionNumber":{"type":"integer","format":"int32"},"id":{"type":"string","format":"uuid"}}},"SubscriptionFeatureAccessPricingLatestResponse":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"version":{"$ref":"#/components/schemas/VersionDto"}}},"DataStoragePricingAllVersionsResponse":{"type":"object","properties":{"subscriptionId":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VersionWithDataTierResponse"}}}},"VersionWithDataTierResponse":{"type":"object","properties":{"id":{"type":"string"},"versionNumber":{"type":"integer","format":"int32"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"validFrom":{"type":"string","format":"date-time"},"currencyCode":{"type":"string"},"dataTier":{"$ref":"#/components/schemas/DataTierResponse"}}},"DataStoragePricingVersionListResponse":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/VersionInfoDto"}}}},"DataStoragePricingLatestResponse":{"type":"object","properties":{"subscriptionId":{"type":"string"},"version":{"$ref":"#/components/schemas/VersionWithDataTierResponse"}}},"AdHocOrderPricingResponse":{"type":"object","properties":{"subscriptionId":{"type":"string","format":"uuid"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AdHocOrderPricingItemDto"}}}},"AllRolesResponse":{"type":"object","properties":{"globalRoles":{"type":"array","items":{"$ref":"#/components/schemas/GlobalRoleInfo"}},"tenantRoles":{"type":"array","items":{"$ref":"#/components/schemas/TenantRoleItem"}},"orgUnitRoles":{"type":"array","items":{"$ref":"#/components/schemas/OrgUnitRoleItem"}}}},"GlobalRoleInfo":{"type":"object","properties":{"id":{"type":"string"},"roleName":{"type":"string"}}},"OrgUnitRoleItem":{"type":"object","properties":{"id":{"type":"string"},"roleGroupName":{"type":"string"},"tenantId":{"type":"string"}}},"TenantRoleItem":{"type":"object","properties":{"id":{"type":"string"},"roleName":{"type":"string"}}},"UserInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"}}},"RoleGroupWithUsersResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tenantId":{"type":"string"},"tenantName":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserInfo"}}}},"FeatureAccessPricingDetailResponse":{"type":"object","description":"Feature access pricing with all versions","properties":{"id":{"type":"string","description":"Feature ID (external UUID)","example":"3f9b1c36-4d83-4e6f-9a91-a8e4c4c91e11"},"description":{"type":"string","description":"Feature description","example":"Base platform access"},"versions":{"type":"array","description":"All versions of the feature price","items":{"$ref":"#/components/schemas/FeaturePriceVersionDetailDto"}},"displayName":{"type":"string","description":"Feature display name","example":"Base system access"},"createdAt":{"type":"string","format":"date-time","description":"Feature creation timestamp","example":"2025-10-01T10:01:00Z"}}},"FeaturePriceVersionDetailDto":{"type":"object","description":"Feature price version details","properties":{"id":{"type":"string","description":"Version ID (external UUID)","example":"e2a4d8c9-92c3-47de-b0bb-1f5b8e9e4cb2"},"status":{"type":"string","description":"Version status","example":"ACTIVE"},"versionNumber":{"type":"integer","format":"int32","description":"Version number","example":1},"validTo":{"type":"string","format":"date","description":"Valid to date (null if open-ended)","example":"2025-11-01T00:00:00Z"},"accountingCode":{"type":"string","description":"Accounting code","example":13443532},"currencyCode":{"type":"string","description":"Currency code (ISO 4217)","example":"HUF"},"listPrice":{"type":"number","description":"List price","example":15000},"featureType":{"type":"string","description":"Feature type","example":"MANDATORY"},"apisIncluded":{"type":"array","description":"APIs included in this version","example":["CONTRACT_MANAGEMENT","NOTIFICATIONS"],"items":{"type":"string","enum":["CONTRACT_MANAGEMENT","NOTIFICATIONS","DOCUMENT_PROCESSING"]}},"createdAt":{"type":"string","format":"date-time","description":"Version creation timestamp","example":"2025-10-12T10:01:00Z"}}},"FeatureVersionListResponse":{"type":"object","description":"List of feature price versions","properties":{"versions":{"type":"array","description":"List of versions with version number and ID","items":{"$ref":"#/components/schemas/FeatureVersionSummaryDto"}}}},"FeatureVersionSummaryDto":{"type":"object","description":"Feature version summary","properties":{"id":{"type":"string","description":"Version ID (external UUID)","example":"a12c1e97-4c8d-4f3b-9b3b-663d9012c1fe"},"versionNumber":{"type":"integer","format":"int32","description":"Version number","example":1}}},"FeatureAccessPricingLatestResponse":{"type":"object","description":"Feature access pricing with latest version","properties":{"id":{"type":"string","description":"Feature ID (external UUID)","example":"3f9b1c36-4d83-4e6f-9a91-a8e4c4c91e11"},"description":{"type":"string","description":"Feature description","example":"Base platform access"},"displayName":{"type":"string","description":"Feature display name","example":"Base system access"},"createdAt":{"type":"string","format":"date-time","description":"Feature creation timestamp","example":"2025-10-01T10:01:00Z"},"latestVersion":{"$ref":"#/components/schemas/FeaturePriceVersionLatestDto","description":"Latest version of the feature price"}}},"FeaturePriceVersionLatestDto":{"type":"object","description":"Latest feature price version","properties":{"id":{"type":"string","description":"Version ID (external UUID)","example":"e2a4d8c9-92c3-47de-b0bb-1f5b8e9e4cb2"},"status":{"type":"string","description":"Version status","example":"ACTIVE"},"versionNumber":{"type":"integer","format":"int32","description":"Version number","example":1},"accountingCode":{"type":"string","description":"Accounting code","example":13443532},"listPrice":{"type":"number","description":"List price","example":15000},"currencyCode":{"type":"string","description":"Currency code (ISO 4217)","example":"HUF"},"featureType":{"type":"string","description":"Feature type","example":"MANDATORY"},"createdAt":{"type":"string","format":"date-time","description":"Version creation timestamp","example":"2025-10-12T10:01:00Z"},"validTo":{"type":"string","format":"date","description":"Valid to date (null if open-ended)","example":"2025-12-12T10:01:00Z"}}},"DataTierPriceResponse":{"type":"object","properties":{"id":{"type":"string"},"storageGB":{"type":"number"},"listPrice":{"type":"number"}}},"DataTierPriceVersionResponse":{"type":"object","properties":{"id":{"type":"string"},"versionNumber":{"type":"integer","format":"int32"},"currencyCode":{"type":"string"},"status":{"type":"string"},"accountingCode":{"type":"string"},"validTo":{"type":"string","format":"date"},"createdAt":{"type":"string","format":"date-time"},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/DataTierPriceResponse"}}}},"NotificationDetailResponse":{"type":"object","description":"Full detail of a received notification. Message-based and event-based notifications populate different fields: message-based set sender/attachmentId; event-based (and document-scoped messages) set eventCategory/entityId for deep-linking (event-based also set eventType).","properties":{"notificationId":{"type":"string","description":"Notification external ID","example":"550e8400-e29b-41d4-a716-446655440000"},"source":{"type":"string","description":"Where the notification originated","enum":["MESSAGE","EVENT"],"example":"MESSAGE"},"title":{"type":"string","description":"Title: the message subject (MESSAGE) or the event display name (EVENT)","example":"Warn me when September Ends"},"body":{"type":"string","description":"Body: the message note (MESSAGE) or text derived from the event payload (EVENT)","example":"Reminder text here."},"sender":{"$ref":"#/components/schemas/NotificationSenderSummary","description":"The sender (MESSAGE only; null for system events)"},"attachmentId":{"type":"string","description":"Reference to the source message's attachment (MESSAGE only; null otherwise)","example":"550e8400-e29b-41d4-a716-446655440099"},"eventType":{"type":"string","description":"The event type (EVENT only; null for messages)","enum":["TENANT_BILLING","TENANT_SECURITY_ACCESS","TENANT_PRICING_CHANGES","TENANT_USER_MANAGEMENT","TENANT_ORGANIZATION_CHANGES","USER_CREATED","SYSTEM_UPDATE_MAINTENANCE","CONTRACT_CREATED","CONTRACT_OWNER_CHANGED","CONTRACT_ORG_CHANGED","CONTRACT_VERSION_CHANGED","CONTRACT_EXPIRING","CONTRACT_METADATA_CHANGED","CONTRACT_CUSTOM_NOTIFICATION","PARTNER_CREATED","PARTNER_DATA_CHANGED","PARTNER_DOCUMENT_ASSOCIATED","OTHER_DOC_CREATED","OTHER_DOC_OWNER_CHANGED","OTHER_DOC_ORG_CHANGED","OTHER_DOC_METADATA_CHANGED","PROCESS_STATE_CHANGED","PROCESS_TASK_RECEIVED","STEP_COMPLETED_BY_ME","OVERDUE_TASK_REMINDER","ORGANIZATION_PROCESS_UPDATES"],"example":"PARTNER_CREATED"},"eventCategory":{"type":"string","description":"Category of the entity to deep-link to. Set for event notifications and document-scoped messages; null for ordinary direct messages.","enum":["TENANT","USER","CONTRACT","INVOICE","PARTNER","SUBSCRIPTION","SYSTEM","OTHER_DOCUMENT","PROCESS"],"example":"PARTNER"},"entityId":{"type":"string","description":"External ID of the entity to deep-link to. Set for event notifications and document-scoped messages; null for ordinary direct messages.","example":"550e8400-e29b-41d4-a716-446655440042"},"channel":{"type":"string","description":"Delivery channel","enum":["IN_APP","EMAIL"],"example":"IN_APP"},"status":{"type":"string","description":"Delivery status: SENT = unread, READ = read","enum":["PENDING","SENT","READ","FAILED"],"example":"SENT"},"readAt":{"type":"string","format":"date-time","description":"When the user opened the notification (null if unread)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}},"UnreadNotificationCountResponse":{"type":"object","description":"Count of the caller's unread in-app notifications, for the bell-icon badge","properties":{"unreadCount":{"type":"integer","format":"int64","description":"Number of unread (SENT, IN_APP) notifications","example":5}}},"UserDashboardResponse":{"type":"object","properties":{"documentsUploaded":{"type":"integer","format":"int64"},"contractsOwned":{"type":"integer","format":"int64"},"contractsNeedingAttention":{"type":"integer","format":"int64"},"processesStartedByMe":{"type":"integer","format":"int64"},"processesClaimable":{"type":"integer","format":"int64"},"processesClaimedPendingApproval":{"type":"integer","format":"int64"}},"required":["contractsNeedingAttention","contractsOwned","documentsUploaded","processesClaimable","processesClaimedPendingApproval","processesStartedByMe"]},"DocumentVersionSummaryDto":{"type":"object","description":"Summary of a document version","properties":{"id":{"type":"string","description":"Document version external ID","example":"c0d6c4b6-3e3b-4c55-9c06-8f6a9b2b8d11"},"documentSensitivity":{"type":"string","description":"Document sensitivity classification","enum":["ANONYMIZED","ORIGINAL","DRAFT"],"example":"ORIGINAL"},"documentCategory":{"type":"string","description":"Document category code (e.g. CONTRACT)","example":"CONTRACT"},"versionNumber":{"type":"integer","format":"int32","description":"Version number within the document","example":1},"isCurrent":{"type":"boolean","description":"Whether this is the current (latest) version for this document sensitivity","example":true},"name":{"type":"string","description":"User-provided document name","example":"Final signed contract"},"fileName":{"type":"string","description":"Original file name","example":"contract-original-v1.pdf"},"fileType":{"type":"string","description":"MIME type of the file","example":"application/pdf"},"uploadedAt":{"type":"string","format":"date-time","description":"Timestamp when the document was uploaded","example":"2025-10-12T10:05:00"}}},"DocumentVersionsResponse":{"type":"object","description":"Response containing all document versions for a document","properties":{"documentId":{"type":"string","description":"Document external ID","example":"8c4f2df8-3e47-4e19-9b6f-9a0f9a0df2a1"},"versions":{"type":"array","description":"List of document versions with isCurrent flags","items":{"$ref":"#/components/schemas/DocumentVersionSummaryDto"}}}},"BasicData":{"type":"object","properties":{"documentNumber":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["INCOMPLETE","ACTIVE","ABOUT_TO_EXPIRE","EXPIRED","ARCHIVED"]},"visibility":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"documentCategory":{"$ref":"#/components/schemas/IdName"},"documentType":{"$ref":"#/components/schemas/IdName"},"partner":{"$ref":"#/components/schemas/IdName"},"owner":{"$ref":"#/components/schemas/OwnerData"},"organization":{"$ref":"#/components/schemas/IdName"}}},"CustomFieldData":{"type":"object","properties":{"fieldId":{"type":"string"},"name":{"type":"string"},"fieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","BOOLEAN","SINGLE_CHOICE","MULTIPLE_CHOICE"]},"isMandatory":{"type":"boolean"},"value":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionDto"}},"selectedOptionIds":{"type":"array","items":{"type":"string"}}}},"DocumentOverviewResponse":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"basicData":{"$ref":"#/components/schemas/BasicData"},"tenureData":{"$ref":"#/components/schemas/TenureData"},"financialData":{"$ref":"#/components/schemas/FinancialData"},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldData"}}}},"FinancialData":{"type":"object","properties":{"totalDocumentValue":{"type":"number"},"documentValueNet":{"type":"number"},"documentValueGross":{"type":"number"},"vatPercentage":{"type":"number"},"currencyCode":{"type":"string"},"netGross":{"type":"string","enum":["NET","GROSS"]},"paymentDirection":{"type":"string","enum":["INCOMING","OUTGOING"]},"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"}}},"IdName":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"OwnerData":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"}}},"PaymentTerms":{"type":"object","properties":{"frequency":{"type":"string","enum":["ONE_TIME","MONTHLY","QUARTERLY","TWICE_A_YEAR","YEARLY"]},"paymentDeadlineDays":{"type":"integer","format":"int32"},"perBillPayable":{"type":"number"}}},"TenureData":{"type":"object","properties":{"effectiveDate":{"type":"string","format":"date"},"expirationDate":{"type":"string","format":"date"},"remainingDays":{"type":"integer","format":"int64"},"isIndefinite":{"type":"boolean"}}},"CategoryResponse":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","enum":["CONTRACT","OTHER_DOCUMENT"]}}},"DocumentCategoryItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"DocumentCategoryListResponse":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/DocumentCategoryItemDto"}}}},"DeleteUserRequest":{"type":"object","properties":{"deleteReason":{"type":"string","maxLength":500,"minLength":0}}},"ArchiveDocumentRequest":{"type":"object","properties":{"deleteReason":{"type":"string","maxLength":1000,"minLength":0}}}},"responses":{"problemDetail":{"description":"Standard error response following RFC 9457 Problem Detail specification","content":{"application/json":{"schema":{"description":"Problem detail as per RFC 9457","properties":{"type":{"description":"A URI reference that identifies the problem type"},"title":{"description":"A short, human-readable summary of the problem type"},"status":{"format":"int32","description":"The HTTP status code"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem"},"timestamp":{"format":"date-time","description":"Timestamp when the error occurred (extension field)"}}}}}}},"securitySchemes":{"keycloak":{"type":"oauth2","name":"Authorization","in":"header","flows":{"authorizationCode":{"authorizationUrl":"https://auth.craftdms.com/realms/craft/protocol/openid-connect/auth","tokenUrl":"https://auth.craftdms.com/realms/craft/protocol/openid-connect/token","refreshUrl":"https://auth.craftdms.com/realms/craft/protocol/openid-connect/token","scopes":{},"x-logout-url":"https://auth.craftdms.com/realms/craft/protocol/openid-connect/logout"}}}}}}