Appearance
User - Dashboard
Base URL:
https://your-domain.com
Admin endpoints for dashboard statistics. All endpoints require admin/staff authentication.
Subscriber Stats
Retrieve subscriber statistics for the dashboard including counts by status.
| Property | Value |
|---|---|
| Endpoint | Subscriber Stats |
| Method | GET |
| URL | /api/v1/dashboard/subscriber-stats |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Request Body: None
Success Response (200 OK):
json
{
"success": true,
"data": {
"total_subscribers": 500,
"active_subscribers": 350,
"expired_subscribers": 100,
"pending_subscribers": 30,
"disabled_subscribers": 20,
"online_subscribers": 250,
"expiring_today": 15,
"expiring_this_week": 45
}
}Error Response (401 Unauthorized):
json
{
"success": false,
"message": "Unauthenticated"
}Accounting Stats
Retrieve financial/accounting statistics for the dashboard.
| Property | Value |
|---|---|
| Endpoint | Accounting Stats |
| Method | GET |
| URL | /api/v1/dashboard/accounting-stats |
| Authentication | Bearer Token |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Request Body: None
Success Response (200 OK):
json
{
"success": true,
"data": {
"today_collection": 15000,
"this_month_collection": 450000,
"total_outstanding": 85000,
"total_invoices": 1200,
"paid_invoices": 950,
"unpaid_invoices": 250,
"this_month_expenses": 50000,
"net_revenue": 400000
}
}Error Response (401 Unauthorized):
json
{
"success": false,
"message": "Unauthenticated"
}User Stats
Retrieve user/staff statistics for the dashboard.
| Property | Value |
|---|---|
| Endpoint | User Stats |
| Method | GET |
| URL | /api/v1/dashboard/user-stats |
| Authentication | Bearer Token |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Request Body: None
Success Response (200 OK):
json
{
"success": true,
"data": {
"total_users": 25,
"admin_users": 2,
"staff_users": 10,
"reseller_users": 13,
"active_users": 23,
"inactive_users": 2,
"top_collectors": [
{
"user_id": 5,
"name": "Sales User 1",
"collection": 120000
}
]
}
}Error Response (401 Unauthorized):
json
{
"success": false,
"message": "Unauthenticated"
}