API Reference
API Endpoints Directory
Comprehensive catalog of REST API endpoints registered across all 13 backend apps.
API Endpoints Directory
IMPLEMENTED
The following endpoints are registered in backend/sheba_core/urls.py.
1. Authentication & Users
POST /api/v1/auth/login/: Authenticate staff credentials, return token.GET /api/v1/auth/me/: Retrieve current user profile and permission list.GET/POST /api/v1/staff/: Staff profile list and creation.GET/POST /api/v1/roles/: Roles management.GET /api/v1/permissions/: List system permission definitions.
2. Subscribers & Packages
GET/POST /api/v1/customers/: Customer list, creation, and filtering.GET/PATCH/DELETE /api/v1/customers/{id}/: Customer detail and update.POST /api/v1/customers/{id}/toggle_status/: Suspend or resume Internet access.GET /api/v1/customers/{id}/financial-summary/: Live consolidated breakdown of subscriber balance, dues, advances, open invoices, and recent ledger entries.POST /api/v1/customers/{id}/recalculate-balance/: Authoritative recalculation of dues and advance balances from live records.POST /api/v1/customers/{id}/grant-grace-period/: Extends service access bydaysorpromise_date, restoresACTIVEstatus, and dispatches post-commit network sync.POST /api/v1/customer/query/: Public subscriber lookup by phone/username.GET/POST /api/v1/packages/: Broadband package management.GET/POST /api/v1/offers/: Promotional campaigns and discounts.
3. Network & Hardware
GET/POST /api/v1/routers/: MikroTik router list and registration.POST /api/v1/routers/{id}/sync/: Trigger manual sync with MikroTik.POST /api/v1/routers/{id}/reboot/: Remote router reboot.GET /api/v1/routers/{id}/traffic/: Real-time interface bandwidth stats.GET/POST /api/v1/olts/: OLT chassis list and setup.GET /api/v1/onus/: Optical ONU listing and optical power readouts.POST /api/v1/onus/{id}/reboot/: Remote ONU reboot.GET /api/v1/user-sessions/: Real-time active PPPoE tunnels.POST /api/v1/user-sessions/{id}/kick/: Terminate active PPPoE tunnel.
4. Billing, Invoices & Finance
GET/POST /api/v1/invoices/: View, generate, and filter invoices (supports nested itemizedlines).POST /api/v1/invoices/generate-batch/: Recurring monthly invoice generation (defaults to async Celery dispatch returning HTTP 202; supports synchronous execution with?async=false).GET /api/v1/invoice-lines/: List itemized invoice fee items (supports filter?invoice=<uuid>).POST /api/v1/recharges/: Process subscription validity recharge with automatic invoice clearing.POST /api/v1/recharges/{id}/reverse/: Non-destructive compensating reversal for an erroneous recharge.GET /api/v1/billing-accounts/: Customer financial accounts.GET /api/v1/ledger-entries/: Immutable double-entry financial ledger journal.POST /api/v1/adjustments/: Staff manual fee adjustments or waivers.GET/POST /api/v1/transactions/: Payment transaction records.
5. Operations & Staff Tools
GET/POST /api/v1/tickets/: NOC incident support tickets.POST /api/v1/tickets/{id}/reply/: Post ticket reply or internal technician note.GET/POST /api/v1/tasks/: Field maintenance tasks.GET/POST /api/v1/employees/: HR staff records.GET/POST /api/v1/attendance/: Staff daily attendance logging.GET/POST /api/v1/store-items/: Inventory item catalog.GET/POST /api/v1/call-logs/: Telephony customer communications.GET /api/v1/reports/dashboard/: Executive business analytics.