Organizations
Organizations endpoints of the bizSupply API.
GET /api/v1/organizations
List all organizations (SYSTEM_ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
pageable | query | yes |
Responses
| Status | Description |
|---|---|
200 | Paginated list of organizations |
403 | Insufficient role |
POST /api/v1/organizations
Create a new team organization.
The authenticated user becomes the OWNER of the new organization.
Request body
application/json→OrganizationCreateRequest
Responses
| Status | Description |
|---|---|
200 | Created organization |
400 | Invalid request body |
GET /api/v1/organizations/me
Get the current user's active organization.
Responses
| Status | Description |
|---|---|
200 | Active organization details |
401 | Authentication required |
PUT /api/v1/organizations/me
Update the name of the current user's active organization.
Request body
application/json→OrganizationUpdateRequest
Responses
| Status | Description |
|---|---|
200 | Updated organization |
403 | Insufficient role (OWNER or ADMIN required) |
GET /api/v1/organizations/slug/{slug}
Get an organization by slug.
The caller must be a member of the organization or SYSTEM_ADMIN.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
slug | path | yes | Organization URL slug. |
Responses
| Status | Description |
|---|---|
200 | Organization details |
403 | Not a member of this organization |
404 | Organization not found |
GET /api/v1/organizations/{id}
Get an organization by ID.
The caller must be a member of the organization or SYSTEM_ADMIN.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
id | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
200 | Organization details |
403 | Not a member of this organization |
404 | Organization not found |
PUT /api/v1/organizations/{id}
Update an organization by ID (OWNER or ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
id | path | yes | Organization UUID. |
Request body
application/json→UpdateOrganizationRequest
Responses
| Status | Description |
|---|---|
200 | Updated organization |
403 | Insufficient role |
404 | Organization not found |
DELETE /api/v1/organizations/{id}
Soft-delete an organization by ID (OWNER only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
id | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
204 | Organization deleted |
403 | Insufficient role |
404 | Organization not found |
POST /api/v1/organizations/{id}/restore
Restore a soft-deleted organization (SYSTEM_ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
id | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
200 | Organization restored |
403 | Insufficient role |
GET /api/v1/organizations/{orgId}/ancestors
List ancestor organizations in the hierarchy.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
200 | List of ancestor organizations |
403 | Not a member of this organization |
GET /api/v1/organizations/{orgId}/children
List direct child organizations of an organization.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Parent organization UUID. |
Responses
| Status | Description |
|---|---|
200 | List of child organizations |
403 | Not a member of this organization |
GET /api/v1/organizations/{orgId}/identities
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes |
Responses
| Status | Description |
|---|---|
200 | OK |
POST /api/v1/organizations/{orgId}/identities
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes |
Request body
application/json→OrganizationIdentityCreateRequest
Responses
| Status | Description |
|---|---|
200 | OK |
PUT /api/v1/organizations/{orgId}/identities/{identityId}
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | |
identityId | path | yes |
Request body
application/json→OrganizationIdentityUpdateRequest
Responses
| Status | Description |
|---|---|
200 | OK |
DELETE /api/v1/organizations/{orgId}/identities/{identityId}
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | |
identityId | path | yes |
Responses
| Status | Description |
|---|---|
200 | OK |
POST /api/v1/organizations/{orgId}/identities/{identityId}/primary
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | |
identityId | path | yes |
Responses
| Status | Description |
|---|---|
200 | OK |
GET /api/v1/organizations/{orgId}/quotas
Get organization quotas (OWNER or ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
200 | Organization quotas |
403 | Insufficient role |
PUT /api/v1/organizations/{orgId}/quotas
Update organization quotas (SYSTEM_ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Request body
application/json→OrganizationQuotasDto
Responses
| Status | Description |
|---|---|
200 | Updated organization quotas |
403 | Insufficient role |
GET /api/v1/organizations/{orgId}/settings
Get organization settings (OWNER or ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Responses
| Status | Description |
|---|---|
200 | Organization settings |
403 | Insufficient role |
PUT /api/v1/organizations/{orgId}/settings
Update organization settings (OWNER or ADMIN only).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Organization UUID. |
Request body
application/json→OrganizationSettingsDto
Responses
| Status | Description |
|---|---|
200 | Updated organization settings |
403 | Insufficient role |
GET /api/v1/organizations/{orgId}/tree
Get the full organization tree rooted at an organization.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
orgId | path | yes | Root organization UUID. |
Responses
| Status | Description |
|---|---|
200 | Organization tree |
403 | Not a member of this organization |