Appearance
Staff & Admins ​
Base URL:
https://your-domain.com/api/v1
Requires HTTP Basic Auth. Passwords are never returned. To reset a password, use the module's update endpoint with a password field.
Staff ​
List / Get ​
GET /api/v1/staff/list — Filters: role, status, created_by, search, limit, offset. GET /api/v1/staff/get/{id} — Single staff. 404 if not found.
Create ​
POST /api/v1/staff/create
- Required:
name,username,password,nic,email,phone,address,city,role(required) (a staff role id — see Roles) - Optional:
created_by(creating admin id; defaults to the primary admin) - 200:
{ "success": "Staff Successfully Created.", "id": 55 }
Update ​
POST /api/v1/staff/update — Params: id (required), name, nic, email, phone, address (+ optional city, role, status, password).
Delete ​
DELETE /api/v1/staff/delete/{id} — Guarded: refused if the staff is a subscriber's salesperson.
Admins (primary admins) ​
Primary admins own an ISP.
List / Get ​
GET /api/v1/admin/list — Filters: ispid, status, search, limit, offset. GET /api/v1/admin/get/{id} — Single admin. 404 if not found.
Create ​
POST /api/v1/admin/create
- Required:
ispid(required),name,username,password,nic,email,phone,address,city - Optional:
created_by - 200:
{ "success": "Admin Successfully Created.", "id": 3 }
Update ​
POST /api/v1/admin/update — Params: id (required), name, nic, email, phone, address (+ optional city, ispid, status, password).
Delete ​
DELETE /api/v1/admin/delete/{id} — Heavily guarded: refused if the admin owns any account or its ISP has subscribers.
