API Overview
RESTful API for the Net Manager ISP customer portal.
Response format
Every response follows a consistent envelope:
{
"success": true,
"data": { ... },
"message": "Success message",
"timestamp": "2026-08-03T10:30:00Z"
}
Authentication
Most endpoints require a bearer token: Authorization: Bearer {access_token}
Sandbox
Base URL: nm.apnanetwork.net/backend/api/v1/sandbox
Test credentials — Customer ID: TEST001, Password: test1234
Conventions for the backend team
Verbs
GET read · POST create/action · PUT full replace · PATCH partial update · DELETE remove. Every path below is relative to the base URL.
Live network data lives under /mikrotik-api
Anything read live from the router (status, traffic, speedtest, diagnostics) is prefixed /mikrotik-api — matching the confirmed sample /mikrotik-api/status. Stored/portal data (billing, tickets, shop, profile) uses its own resource prefix.
Prayer times are external — do not build
The app fetches prayer timings straight from api.aladhan.com. No backend endpoint is required. Proxy it only if you want to hide it behind your own domain.
Authentication
User authentication and session management.
Request Body
{
"customer_id": "CK2206",
"password": "user_password"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customer_id | string | Required | Unique customer identifier |
| password | string | Required | User password |
Success Response (200)
{
"success": true,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"user": {
"id": "user_uuid",
"customer_id": "CK2206",
"name": "Arif Hossain",
"email": "arif@example.com",
"mobile": "01712345678"
}
},
"message": "Login successful"
}
Error Codes
Authentication required
Requires a valid bearer token in the Authorization header.
{
"success": true,
"message": "Logged out successfully"
}
Get a new access token using the refresh token when the current one expires.
Request Body
{
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Request a password reset via SMS to the registered mobile number.
{
"customer_id": "CK2206"
}
Password requirements
At least 8 characters · one uppercase letter · one number
{
"current_password": "old_password",
"new_password": "new_password",
"confirm_password": "new_password"
}
Create an account. Backs the sign-up mode on the login screen.
Request Body
{
"customer_id": "CK2206",
"mobile": "01712345678",
"password": "user_password"
}
Note
Customer ID is issued by the ISP at installation; sign-up links an app login to an existing subscriber, it does not create a new subscriber.
Sign out a specific device/session. Use current as the id to revoke the calling session (logout).
{
"success": true,
"message": "Session revoked"
}
Network & Connection
Real-time network status, speed tests, and diagnostics.
Real-time data
Returns current connection status including speeds, session info, and usage.
{
"success": true,
"data": {
"status": "online",
"package": {
"name": "Premium 50 Mbps",
"speed": "50 Mbps",
"price": 800
},
"connection": {
"download_speed": 48.6,
"upload_speed": 49.1,
"ping": 12,
"packet_loss": 0.2
},
"session": {
"public_ip": "103.245.123.45",
"uptime": "2d 14h 23m"
}
}
}
Polled ~1×/sec by the app
The home hero and Realtime Traffic screen redraw the download/upload graph continuously. Return the current instantaneous throughput; the client keeps its own rolling 30-sample window. A WebSocket push at /mikrotik-api/traffic/stream is preferred if feasible — it removes the polling load.
Success Response (200)
{
"success": true,
"data": {
"timestamp": "2026-08-03T10:30:12Z",
"download_mbps": 42.7,
"upload_mbps": 8.3
}
}
Initiate a speed test. Use the returned test_id to fetch results.
{
"success": true,
"data": {
"test_id": "test_uuid",
"status": "initiated",
"estimated_duration": 15
}
}
Run comprehensive network diagnostic tests (7 checks).
Diagnostic tests include
Router reachability · ISP gateway · DNS resolution · Internet connectivity · Bandwidth test · Packet loss · Network stability
Get monthly data usage statistics with download/upload breakdown.
{
"success": true,
"data": {
"month": "2026-08",
"download": {
"amount": 1200,
"unit": "GB",
"percentage": 62
},
"upload": {
"amount": 320,
"unit": "GB",
"percentage": 28
}
}
}
Billing & Payments
Invoice management, payments, and package handling.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | Optional | Filter: all, paid, pending, overdue |
| page | number | Optional | Page number (default: 1) |
| limit | number | Optional | Items per page (default: 20) |
Initiate payment for one or multiple invoices.
Request Body
{
"invoice_ids": ["inv_uuid_1", "inv_uuid_2"],
"payment_method": "bkash",
"return_url": "https://app.example.com/payment/callback"
}
Supported Payment Methods
bkash · nagad · rocket · card · bank_transfer
All plans the customer can switch to. Powers the Packages / Upgrade screen.
{
"success": true,
"data": [
{
"package_id": "pkg_uuid_3",
"name": "Premium 100 Mbps",
"speed": "100 Mbps",
"price": 1500,
"is_current": false,
"features": ["BDIX", "OTT", "Free installation"]
}
]
}
Get the user's currently active internet package details.
{
"success": true,
"data": {
"package_id": "pkg_uuid",
"name": "Premium 50 Mbps",
"speed": "50 Mbps",
"price": 800,
"status": "active",
"expiry_date": "2026-08-15",
"days_remaining": 12
}
}
Request to upgrade or change the internet package.
{
"new_package_id": "pkg_uuid_3",
"effective_date": "immediate"
}
Support & Tickets
Customer support ticket system and FAQs.
Get the list of support ticket categories with priority and resolution times.
Available categories
No Internet · Billing Issue · Package Change · Relocation · Router Problem · Fiber Problem · Device Issue · Other
File upload
Content-Type must be multipart/form-data when attaching files.
Form Data
| Field | Type | Required | Description |
|---|---|---|---|
| category_id | string | Required | Ticket category ID |
| title | string | Required | Brief title |
| description | string | Required | Detailed description |
| attachment | file | Optional | Image attachment (max 10MB) |
Get detailed ticket information including full chat history.
Includes
Ticket details · status and priority · complete chat history · assigned engineer info · attachments
Post a message into the ticket chat thread. multipart/form-data when attaching a file.
{
"message": "Still no internet after restarting the router.",
"attachment": "(optional file)"
}
Close or reopen a ticket from the customer side.
{
"status": "closed"
}
Values
open · closed. Reopening a resolved ticket may be restricted server-side — return TICKET_ALREADY_CLOSED if not allowed.
Shop & Orders
E-commerce for routers, cables, and accessories.
Get the list of available products with filtering options.
GET /shop/products?category=router&page=1&limit=20
Request Body
{
"items": [
{
"product_id": "prod_uuid_1",
"quantity": 1
}
],
"delivery_details": {
"full_name": "Arif Hossain",
"phone": "01712345678",
"address": "House 23, Road 7, Banani"
},
"payment_method": "cod",
"promo_code": "NET10"
}
Validate a promo code and calculate the discount.
{
"promo_code": "NET10",
"subtotal": 3100
}
Customer's past orders with status. Query: status (all, pending, shipped, delivered, cancelled).
{
"success": true,
"data": [
{
"order_id": "NM-004821",
"status": "shipped",
"total": 4990,
"placed_at": "2026-07-28T09:12:00Z"
}
]
}
Cancel an order that has not yet shipped.
{
"success": true,
"message": "Order cancelled"
}
Guard
Return ORDER_CANNOT_BE_CANCELLED if the order is already shipped or delivered.
User Management
User profile and photo management.
Get the current user's profile information.
{
"success": true,
"data": {
"id": "user_uuid",
"customer_id": "CK2206",
"name": "Arif Hossain",
"email": "arif@example.com",
"mobile": "01712345678",
"address": "House 23, Road 7, Banani",
"zone": "Banani",
"joining_date": "2024-01-15"
}
}
Update user profile information.
{
"name": "Arif Hossain",
"email": "newemail@example.com",
"mobile": "01712345678",
"address": "New Address"
}
Requirements
Content-Type: multipart/form-data · max file size 5MB · JPG or PNG
Notifications
Push notifications and announcements.
Query Parameters
| Parameter | Description |
|---|---|
| type | Filter: all, billing, package, maintenance, promotion |
| unread_only | Show only unread notifications (true/false) |
Mark all notifications as read for the current user.
Mark a single notification read when the user opens it.
{
"read": true
}
Remove a notification from the user's list (swipe-to-dismiss).
{
"success": true,
"message": "Notification deleted"
}
Get system-wide announcements like maintenance notices and promotions.
Media Content
Movies, TV series, and tutorials.
Get the list of movie categories (Action, Drama, Bangla Cinema, etc.).
Get movies in a specific category with pagination.
Get detailed movie information including cast, synopsis, and stream URL.
BDIX cache server
Movies are cached on local BDIX servers for faster streaming within Bangladesh.
Get the list of TV series with seasons and episodes.
Get setup guides and tutorial videos (router setup, Wi-Fi optimization, etc.).
Settings & Preferences
User settings, rewards, and referrals.
Get the user's app settings including notifications, appearance, and prayer times.
{
"success": true,
"data": {
"notifications": {
"push_enabled": true,
"billing_alerts": true
},
"appearance": {
"language": "en",
"dark_mode": false,
"primary_color": "#862BAE"
}
}
}
Persist a settings change. Send only the keys that changed — language toggle, dark mode, notification switches, or the brand colour picker.
{
"appearance": {
"language": "bn",
"primary_color": "#862BAE"
},
"notifications": {
"billing_alerts": false
}
}
Current points balance and whether today's spin is still available. Read on app open to render the daily-reward card.
{
"success": true,
"data": {
"points_balance": 240,
"spin_available": true,
"last_spin_date": "2026-08-02"
}
}
Get the user's referral code, stats, and earnings.
Referral program
Earn ৳200 for each successful referral when they activate a monthly package.
Spin the daily reward wheel to earn points (once per day).
API Health Check
Probe every read-only endpoint in one click. Fires GET requests only — never POST, PUT, PATCH, or DELETE — so it is safe to run against live.
Error Codes Reference
Complete list of API error codes and their meanings.
Error Response Format
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
},
"timestamp": "2026-08-03T10:30:00Z"
}