API Method: GET /api/teams/departments
/api/teams/departments
**Description:**This endpoint retrieves a list of all departments configured within the banking application. Departments are organizational units created either by an Owner or a Partner (a privileged role) on behalf of an Author (another user role). These departments help structure sub-user management within a company or team, especially when organizing roles and permissions.
For example, in a small company with only two or three employees, each employee might be assigned to a different department. These departments are primarily used to manage sub-users and their access levels or responsibilities within the system. Some department names may be common (like "Finance" or "Operations"), while others may vary depending on the organization. In certain cases, department labels may also help identify or restrict access by users exhibiting abusive or inappropriate behavior.
Departments are used only for managing sub-users.
Request:
-
Method: GET
-
Endpoint:
https://api.banking.netevia.dev/api/teams/departments
-
Headers:
Authorization
: Bearer<access_token>
(required)
Response:
- Status Code: 200 OK
- Content Type:
application/json
- Body: A JSON array of department objects, each containing detailed metadata about the department and its creator.
Response Model:
[
{
"id": 0,
"name": "string",
"description": "string",
"creator": {
"id": 0,
"name": "string"
},
"authorizedUserCount": 0
}
]
Fields:
-
id
(integer) – Unique identifier for the department. -
name
(string) – Name of the department (e.g., "Finance", "Operations"). -
description
(string) – A short description or purpose of the department. -
creator
(object) – Information about the user who created the department:id
(integer) – Creator’s unique ID.name
(string) – Creator’s name.
-
authorizedUserCount
(integer) – Number of sub-users currently authorized under this department.
Example Response:
[
{
"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 Responses:
- 401 Unauthorized – Missing or invalid authorization token.
- 403 Forbidden – Insufficient permissions to view departments.
- 500 Internal Server Error – A server-side error occurred while processing the request.
Notes:
- This endpoint is typically used in scenarios where sub-user roles, permissions, or workflows need to be grouped or filtered by department.
- Department names may vary across organizations and are not standardized.
- This API is not meant for public users — it is intended for internal use by system administrators or organizational managers setting up access for sub-users.