TenantAdminController
The tenant registry, for the platform operator.
| Base path | /api/admin/tenants |
| Module | Billing & Platform |
| Endpoints | 7 |
| OpenAPI tag | Tenant Administration |
| Source | backend/src/main/java/com/motorph/payroll/controller/admin/TenantAdminController.java |
Endpoints
| Method | Path | Requires | Handler |
|---|---|---|---|
GET | /api/admin/tenants | Any authenticated user | list() |
GET | /api/admin/tenants/{id} | Any authenticated user | getById() |
POST | /api/admin/tenants | Any authenticated user | create() |
PUT | /api/admin/tenants/{id} | Any authenticated user | update() |
PATCH | /api/admin/tenants/{id}/suspend | Any authenticated user | suspend() |
PATCH | /api/admin/tenants/{id}/reactivate | Any authenticated user | reactivate() |
POST | /api/admin/tenants/{id}/repair | Any authenticated user | repair() |
Notes
POST /api/admin/tenants— Creates a company and everything it needs to be worked in.POST /api/admin/tenants/{id}/repair— Finishes a tenant whose provisioning did not complete.
Call chain
10 of 14 reachable repositories shown.
Dependencies
Constructor-injected by Lombok's @RequiredArgsConstructor: TenantAdminService, TenantProvisioningService.
Tables reached
| Entity | Table | Tenant-scoped |
|---|---|---|
| CompanyProfile | company_profile | Yes |
| CrmPicklistItem | crm_picklist_item | Yes |
| CrmSettings | crm_settings | Yes |
| DeductionType | deduction_types | Yes |
| DeMinimisBenefitType | de_minimis_benefit_types | Yes |
| Department | department | Yes |
| LeaveRequestType | leave_request_type | Yes |
| PayrollSettings | payroll_settings | Yes |
| Permission | permission | — |
| PhHoliday | ph_holidays | Yes |
| Position | position | Yes |
| Role | role | — |
| Tenant | tenant | — |
| User | users | — |
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.