List Departments

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

FieldTypeDescription
idintegerUnique identifier for the department.
namestringName of the department (e.g., "Finance", "Operations").
descriptionstringA short description of the department's purpose.
creatorobjectInformation about the user who created the department.
creator.idintegerUnique identifier of the creator.
creator.namestringDisplay name of the creator.
authorizedUserCountintegerNumber 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

CodeWhen it happens
401Token missing, expired, or invalid
403Insufficient permissions to view departments
500Internal 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 department
  • PUT /api/teams/departments/{id} — Update an existing department
  • DELETE /api/teams/departments/{id} — Delete a department
  • GET /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"
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json