Retrieve a list of all departments configured within the banking application for sub-user management.
List Departments
This endpoint retrieves a list of all departments configured within the banking application. Departments are organizational units created by an Owner or a Partner on behalf of another user, and are used exclusively to structure sub-user management within a business. Each department record includes its creator details and a count of authorized sub-users currently assigned to it.
Endpoint
GET /api/teams/departments
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when building or rendering a department management interface for business customers. It is also useful when filtering or grouping sub-users by department, or when configuring access levels and responsibilities for authorized users within an organization. This endpoint is intended for system administrators and organizational managers — not for end customers.
Response
200 OK
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the department. |
name | string | Name of the department (e.g., "Finance", "Operations"). |
description | string | A short description of the department's purpose. |
creator | object | Information about the user who created the department. |
creator.id | integer | Unique identifier of the creator. |
creator.name | string | Display name of the creator. |
authorizedUserCount | integer | Number of sub-users currently authorized under this department. |
[
{
"id": 101,
"name": "Compliance",
"description": "Handles regulatory and legal compliance.",
"creator": {
"id": 12,
"name": "Admin User"
},
"authorizedUserCount": 4
},
{
"id": 102,
"name": "Support",
"description": "Customer service and help desk operations.",
"creator": {
"id": 14,
"name": "Team Manager"
},
"authorizedUserCount": 7
}
]Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to view departments |
| 500 | Internal server error |
Common Mistakes
- Departments are only applicable to business customers with sub-user management enabled — calling this endpoint in a personal customer context will not return relevant data.
- Department names are not standardized across organizations; do not rely on specific names being present when parsing the response.
- Ensure the Bearer token is refreshed before it expires (10-minute lifetime) to avoid 401 errors during longer workflows.
Related Endpoints
POST /api/teams/departments— Create a new departmentPUT /api/teams/departments/{id}— Update an existing departmentDELETE /api/teams/departments/{id}— Delete a departmentGET /api/teams/subusers— List sub-users, which can be filtered or grouped by department
Example
curl -X GET https://api.banking.netevia.dev/api/teams/departments \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"