Documentation

Admin Users

Manage administrator accounts

List Admins

Retrieve a paginated list of all administrator accounts.

Endpoint

GET/auth/admin/users

List all admin users with optional filtering and pagination.

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer {access_token}

Query Parameters

ParameterTypeRequiredDescription
qstringNoSearch by email or full name
rolestringNoFilter by roleValues: admin, operator, viewer, finance
activebooleanNoFilter by active status
limitintegerNo (default: 20)Page size
offsetintegerNo (default: 0)Page offset

Response- List of admin users

json
{
  "admins": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "admin@example.com",
      "full_name": "John Doe",
      "role": "admin",
      "is_active": true,
      "mfa_enabled": true,
      "last_login_at": "2025-01-14T10:30:00Z",
      "created_at": "2025-01-01T00:00:00Z",
      "updated_at": "2025-01-14T10:30:00Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total_count": 15
  }
}

Error Responses

StatusCodeDescription
403forbiddenAdmin role required

Get Admin Details

Retrieve details of a specific administrator.

Endpoint

GET/auth/admin/users/{userID}

Get detailed information about a specific admin user.

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer {access_token}

Path Parameters

ParameterTypeRequiredDescription
userIDstringYesUUID of the admin user

Response- Admin user details

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "admin@example.com",
  "full_name": "John Doe",
  "role": "admin",
  "is_active": true,
  "mfa_enabled": true,
  "last_login_at": "2025-01-14T10:30:00Z",
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-14T10:30:00Z"
}

Error Responses

StatusCodeDescription
404not_foundAdmin user not found
403forbiddenAdmin role required

Update Admin

Update an administrator's profile.

Endpoint

PATCH/auth/admin/users/{userID}

Update an admin user's profile. All fields are optional - only provided fields will be updated.

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer {access_token}
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
userIDstringYesUUID of the admin user to update

Request Body- Fields to update

json
{
  "email": "newemail@example.com",
  "full_name": "Jane Doe",
  "role": "operator",
  "is_active": true
}

Response- Updated admin user

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "newemail@example.com",
  "full_name": "Jane Doe",
  "role": "operator",
  "is_active": true,
  "mfa_enabled": true,
  "updated_at": "2025-01-14T12:00:00Z"
}

Error Responses

StatusCodeDescription
400validation_failedInvalid email format or role
404not_foundAdmin user not found
403forbiddenAdmin role required

Request Body Parameters

FieldTypeRequiredDescription
emailstringNoNew email address
full_namestringNoNew full name
rolestringNoNew role: admin, operator, viewer, finance
is_activebooleanNoActive status

Admin Roles

Understanding the different administrator roles and their permissions.

Role Definitions

RoleDescriptionKey Permissions
adminFull administrative accessAll permissions including user management
operatorOperational accessCreate accounts, transactions, view data
viewerRead-only accessView accounts, transactions, reports
financeFinance operationsManage processors, settlements, reports

Permission Matrix

PermissionAdminOperatorViewerFinance
manage_adminsYesNoNoNo
view_accountsYesYesYesYes
create_accountYesYesNoNo
view_transactionsYesYesYesYes
create_transactionYesYesNoNo
manage_processorsYesNoNoYes
manage_pos_terminalsYesNoNoYes
view_reportsYesNoNoYes