Appearance
Subscriber
Base URL:
https://your-domain.com
The subscriber API is for the subscriber's own mobile app: a signed-in subscriber reads their profile, bills, usage, notices, tickets and documents, and can make the few changes the ISP allows. Every endpoint answers about the subscriber who owns the token, never anyone else. Available from Zal Ultra v2.30.7.
Getting a token: call POST /api/v1/subscriber/login with the subscriber's username (or email) and password, then send the returned token as Authorization: Bearer <token> with Accept: application/json on every request. Token lifetime, refresh and logout are described on the Subscriber Auth page.
Only a subscriber token is accepted here. A staff (user) token gets 403 Forbidden with {"status": "error", "message": "Oops! Insufficient Permission"}, and staff use the User API instead.
Conventions
These rules apply to every endpoint in the subscriber API.
Success envelope. A single record comes back as {"status": "success", "data": {...}}. A list comes back as {"status": "success", "data": [...], "meta": {...}}, where meta is:
json
{
"current_page": 1,
"last_page": 3,
"per_page": 20,
"total": 47
}Paging. Every list takes the query parameters page (default 1) and per_page (default 20). per_page is clamped to the range 1 to 50, so a larger value returns 50 items and a value below 1 returns 1. Lists are sorted newest first unless the endpoint says otherwise.
Not found or not yours. An ID that does not exist and an ID that belongs to another subscriber get the same answer, so an app cannot probe for other people's records:
json
{
"status": "error",
"message": "Not Found"
}IDs in the URL must be numeric. A non-numeric ID (for example /invoices/abc) does not match the route and gets 404 with a message such as Route not found: GET /api/v1/subscriber/invoices/abc.
Money. Amounts in the billing endpoints are JSON numbers rounded to 2 decimals (for example 1050.5), in the ISP's currency (BDT for a Bangladeshi ISP). The amount carries no currency code.
Dates. Dates are ISO 8601 strings in the server's time zone (for example 2026-10-24T09:15:02+06:00), or null when the value is empty or unreadable. The exceptions are the profile endpoints on this page, which return the stored database values, and a document's verification_date; each is described where it appears.
Errors. Every error has a message:
| Status | When | Body |
|---|---|---|
401 | Missing, expired or revoked token | {"message": "Unauthenticated."} |
403 | A staff token, or an action the ISP turned off | {"status": "error", "message": "..."} |
404 | Not found or not yours | {"status": "error", "message": "Not Found"} |
409 | The same POST was sent twice within 20 seconds | {"status": "error", "message": "This request was already submitted a moment ago. Refresh the page and check before trying again."} |
422 | Validation failed | {"message": "...", "errors": {"field": ["..."]}} |
429 | More than 60 requests a minute | {"message": "Too Many Attempts."} |
A 422 uses Laravel's standard validation shape: message repeats the first error (with "(and N more errors)" when there are several) and errors lists every failed field. It has no status key.
All subscriber endpoints
| Area | Endpoints | Page |
|---|---|---|
| Sign-in | Login, Logout, Logout All Devices, Refresh Token | Subscriber Auth |
| Profile | Profile, Profile Details, Update Profile, Change Photo | This page |
| Billing | Invoices, Invoice, Payments, Payment, Ledger | Billing |
| Usage | Usage, Sessions, Connection Logs | Usage & Sessions |
| Notices | Notices, Notice | Notices |
| Support | Ticket Categories, Tickets, Ticket, Open Ticket, Reply, Close, Attachment | Tickets |
| Documents | Documents, Upload Document, Document File | Documents |
| Portal | Portal sign-in for the app's WebView (web route) | Portal Sign-In |
Subscriber Profile
Get the signed-in subscriber's basic profile.
| Property | Value |
|---|---|
| Endpoint | Subscriber Profile |
| Method | GET |
| URL | /api/v1/subscriber/profile |
| Authentication | Bearer Token (Subscriber) |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer subscriber-token | Yes |
Request Body: None
Success Response (200 OK):
json
{
"status": "success",
"data": {
"subscriber": {
"id": 1042,
"username": "subscriber001",
"fullname": "Rahim Uddin",
"email": "[email protected]",
"phone": "01712345678",
"address": "House 12, Road 5, Mirpur 10, Dhaka",
"profile_status": 2,
"package_id": 7,
"isp_id": 1,
"branch_id": 1,
"last_login_time": "2026-10-24 09:15:02",
"last_activation_time": "2026-10-02 10:12:00",
"expiration_date": "2026-11-01 23:59:00"
}
}
}Field notes:
profile_status: 2 is Active. Only an active subscriber can log in.last_login_time,last_activation_timeandexpiration_dateare the stored values (YYYY-MM-DD HH:MM:SS, server time), ornull.
Error Response (401 Unauthorized):
json
{
"message": "Unauthenticated."
}Error Response (403 Forbidden):
json
{
"status": "error",
"message": "Oops! Insufficient Permission"
}Code Examples:
bash
curl -X GET "https://your-domain.com/api/v1/subscriber/profile" \
-H "Accept: application/json" \
-H "Authorization: Bearer your-auth-token"php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$response = $client->request('GET', '/api/v1/subscriber/profile', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const response = await fetch(`${BASE_URL}/api/v1/subscriber/profile`, {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
response = requests.get(
f"{BASE_URL}/api/v1/subscriber/profile",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
)
data = response.json()
print(data)go
package main
import (
"fmt"
"io"
"net/http"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
endpoint := baseURL + "/api/v1/subscriber/profile"
req, _ := http.NewRequest("GET", endpoint, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let response = client
.get(format!("{BASE_URL}/api/v1/subscriber/profile"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Subscriber Profile Details
Get the subscriber's full profile: account, package, balance, due amount, quota usage, the last 10 invoices, ledger lines and payments, and what the ISP lets the subscriber change.
| Property | Value |
|---|---|
| Endpoint | Subscriber Profile Details |
| Method | GET |
| URL | /api/v1/subscriber/profile-details |
| Authentication | Bearer Token (Subscriber) |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer subscriber-token | Yes |
Request Body: None
Success Response (200 OK):
The example is shortened: data holds every column of the subscriber's record, and each related object (package_data, isp_data, branch_data, the invoices, ledgers and payments rows and so on) holds the full row of its table.
json
{
"status": "success",
"data": {
"id": 1042,
"fullname": "Rahim Uddin",
"username": "subscriber001",
"connection_username": "subscriber001",
"connection_password": "rahim@4421",
"identity": "1990123456789",
"phone": "01712345678",
"email": "[email protected]",
"address": "House 12, Road 5, Mirpur 10, Dhaka",
"photo": "a3f9c1d27b8e4.jpg",
"salesperson_id": 5,
"package_id": 7,
"country": 1,
"province": 3,
"city": 12,
"area": 41,
"subarea": 118,
"latitude": "23.8069",
"longitude": "90.3687",
"department": null,
"isp_id": 1,
"branch_id": 1,
"profile_status": 2,
"connection_type": 1,
"mac_address": "A4:2B:B0:11:7C:9E",
"static_ip": null,
"nas_id": 2,
"last_login_time": "2026-10-24 09:15:02",
"last_activation_time": "2026-10-02 10:12:00",
"total_data_quota": 0,
"used_data_quota": 0,
"total_session_quota": 0,
"expiration_date": "2026-11-01 23:59:00",
"last_expiration_date": "2026-10-01 23:59:00",
"join_date": "2025-03-10 11:00:00",
"created_at": "2025-03-10T05:00:00.000000Z",
"updated_at": "2026-10-24T03:15:02.000000Z",
"tickets_count": 3,
"is_online": true,
"expiration_details": {
"value": "01 Nov 2026 23:59:00",
"formatted": "01 Nov 2026 23:59:00",
"is_expired": false,
"badge_class": "badge-light-success"
},
"last_expiration_details": {
"value": "2026-10-01 23:59:00",
"formatted": "01 Oct 2026 23:59:00"
},
"last_activation_details": {
"value": "2026-10-02 10:12:00",
"formatted": "02 Oct 2026 10:12:00"
},
"session_quota_minutes": 0,
"due_balance": 500,
"package_name": "Home Fiber 40",
"package_price": 1050,
"package_speed": "40 Mbps",
"salesperson_username": "reseller.mirpur",
"salesperson_fullname": "Mirpur Net Point",
"salesperson_profile_type": 4,
"isp_name": "Dhaka Fiber Net",
"branch_name": "Mirpur",
"nas_name": "Mirpur-CCR",
"nas_ip": null,
"country_name": "Bangladesh",
"province_name": "Dhaka Division",
"city_name": "Dhaka",
"area_name": "Mirpur",
"subarea_name": "Mirpur 10",
"current_balance": "350.00",
"online_uptime": "3h 25m",
"bandwidth_usage": {
"total_gb": 100,
"used_gb": 37,
"remaining_gb": 63,
"usage_percentage": 37
},
"session_usage": {
"total_minutes": 0,
"used_minutes": 0,
"remaining_minutes": 0,
"usage_percentage": 0
},
"package_data": {
"id": 7,
"name": "Home Fiber 40",
"duration": 1,
"duration_type": 3,
"status": 1
},
"radacct_online_data": {
"radacctid": 884213,
"username": "subscriber001",
"acctstarttime": "2026-10-24 06:00:11",
"framedipaddress": "100.64.12.34"
},
"current_balance_data": {
"id": 99120,
"balance": "350.00"
},
"isp_data": {
"id": 1,
"company_name": "Dhaka Fiber Net",
"phone": "01700000000",
"email": "[email protected]",
"website": "https://dhakafiber.net",
"facebook": "https://facebook.com/dhakafiber",
"instagram": null,
"youtube": null,
"country": "Bangladesh",
"province": "Dhaka",
"city": "Dhaka",
"created_at": "2025-01-10T08:00:00.000000Z",
"updated_at": "2026-09-01T08:00:00.000000Z"
},
"branch_data": {
"id": 1,
"name": "Mirpur"
},
"invoices": [
{
"id": 2041,
"activation_unique_id": "a3f9c1d27b8e4",
"invoice_status": 6,
"billing_total_amount": 1050,
"billing_paid_amount": 550
}
],
"ledgers": [],
"payments": [],
"photo_url": "https://your-domain.com/storage/photos/subscriber/a3f9c1d27b8e4.jpg",
"self_service": {
"profile_edit": true,
"document_upload": true,
"identity_optional": false,
"portal_sign_in": true
}
}
}Field notes:
connection_passwordis the subscriber's own PPPoE or Hotspot password, shown so the app can display it.photo_urlis the full URL of the profile photo, ornullwhen there is none.self_servicesays what the ISP lets this subscriber do, so the app can hide actions that would be refused:profile_edit:PATCH /api/v1/subscriber/profileis allowed (otherwise it returns403).document_upload:POST /api/v1/subscriber/documentsis allowed.identity_optional: theidentityfield may be left empty when editing the profile.portal_sign_in: the app can open the portal already signed in with Portal Sign-In. It isfalsewhen the ISP uses SMS two-factor login for subscribers.
due_balanceis the unpaid amount of the subscriber's partial and due invoices.current_balanceis the subscriber's wallet balance from the latest ledger line (0when there is none).is_onlineistruewhile a session is open;radacct_online_datais that session (ornull) andonline_uptimeits length.expiration_details.is_expiredtells whether the connection's expiry time has passed.package_priceis the package fee the subscriber pays on renewal, the same amount the portal charges (extra fees are not included), ornullwhen it cannot be worked out.package_speedis the package's bandwidth with its unit (for example40 Mbps), ornullwhen the package has none set. Both were alwaysnullbefore v2.30.8.bandwidth_usageis the data quota of the current period:total_gb(the quota,0for unlimited),used_gb,remaining_gbandusage_percentage. Before v2.30.8used_gbandusage_percentagewere always0. For a traffic graph use Usage.isp_dataholds the ISP's public contact details only. The owner's name and the company registration number are not included (from v2.30.8).- Values come straight from the database.
created_atandupdated_atare UTC ISO strings; other timestamps areYYYY-MM-DD HH:MM:SSin server time; some decimal amounts (such ascurrent_balance) are strings. - Router credentials, RADIUS rows, the salesperson's own record and branch tokens are never included.
Error Response (401 Unauthorized):
json
{
"message": "Unauthenticated."
}Error Response (403 Forbidden):
json
{
"status": "error",
"message": "Oops! Insufficient Permission"
}Code Examples:
bash
curl -X GET "https://your-domain.com/api/v1/subscriber/profile-details" \
-H "Accept: application/json" \
-H "Authorization: Bearer your-auth-token"php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$response = $client->request('GET', '/api/v1/subscriber/profile-details', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const response = await fetch(`${BASE_URL}/api/v1/subscriber/profile-details`, {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
response = requests.get(
f"{BASE_URL}/api/v1/subscriber/profile-details",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
)
data = response.json()
print(data)go
package main
import (
"fmt"
"io"
"net/http"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
endpoint := baseURL + "/api/v1/subscriber/profile-details"
req, _ := http.NewRequest("GET", endpoint, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let response = client
.get(format!("{BASE_URL}/api/v1/subscriber/profile-details"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Update Profile
Change the subscriber's own contact details. Only the fields sent are changed; any other field is ignored.
| Property | Value |
|---|---|
| Endpoint | Update Profile |
| Method | PATCH |
| URL | /api/v1/subscriber/profile |
| Authentication | Bearer Token (Subscriber) |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Content-Type | application/json | Yes |
Authorization | Bearer subscriber-token | Yes |
Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
fullname | string | No | Full name, max 255 characters. Cannot be empty when sent |
email | string | No | Email, max 255 characters. Must not belong to another subscriber |
phone | string | No | Phone, max 255 characters. Must not belong to another subscriber |
identity | string | No | National ID, letters and numbers only. Must not belong to another subscriber. May be empty only when self_service.identity_optional is true |
address | string | No | Address, max 1000 characters |
country | integer | No | Area ID of the country |
province | integer | No | Area ID of the province |
city | integer | No | Area ID of the city |
area | integer | No | Area ID of the area |
subarea | integer | No | Area ID of the sub-area |
latitude | number | No | Latitude, -90 to 90 |
longitude | number | No | Longitude, -180 to 180 |
department | integer | No | Department ID |
Request Body:
json
{
"phone": "01799000111",
"address": "House 7, Road 3, Mirpur 11, Dhaka"
}Success Response (200 OK):
Returns the same payload as Subscriber Profile Details, with the changes applied.
json
{
"status": "success",
"data": {
"id": 1042,
"username": "subscriber001",
"fullname": "Rahim Uddin",
"phone": "01799000111",
"address": "House 7, Road 3, Mirpur 11, Dhaka",
"photo_url": "https://your-domain.com/storage/photos/subscriber/a3f9c1d27b8e4.jpg",
"self_service": {
"profile_edit": true,
"document_upload": true,
"identity_optional": false,
"portal_sign_in": true
}
}
}Error Response (403 Forbidden):
Profile editing is off unless the ISP turned it on (Settings > Subscriber).
json
{
"status": "error",
"message": "Profile editing is turned off by your provider."
}Error Response (422 Unprocessable Entity):
json
{
"message": "The phone has already been taken.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}Code Examples:
bash
curl -X PATCH "https://your-domain.com/api/v1/subscriber/profile" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-auth-token" \
-d '{
"phone": "01799000111",
"address": "House 7, Road 3, Mirpur 11, Dhaka"
}'php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$response = $client->request('PATCH', '/api/v1/subscriber/profile', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'json' => [
'phone' => '01799000111',
'address' => 'House 7, Road 3, Mirpur 11, Dhaka',
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const response = await fetch(`${BASE_URL}/api/v1/subscriber/profile`, {
method: 'PATCH',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
body: JSON.stringify({
phone: '01799000111',
address: 'House 7, Road 3, Mirpur 11, Dhaka',
}),
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
response = requests.patch(
f"{BASE_URL}/api/v1/subscriber/profile",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
json={
"phone": "01799000111",
"address": "House 7, Road 3, Mirpur 11, Dhaka",
},
)
data = response.json()
print(data)go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
endpoint := baseURL + "/api/v1/subscriber/profile"
payload, _ := json.Marshal(map[string]any{
"phone": "01799000111",
"address": "House 7, Road 3, Mirpur 11, Dhaka",
})
req, _ := http.NewRequest("PATCH", endpoint, bytes.NewBuffer(payload))
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
use serde_json::json;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let response = client
.patch(format!("{BASE_URL}/api/v1/subscriber/profile"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.json(&json!({
"phone": "01799000111",
"address": "House 7, Road 3, Mirpur 11, Dhaka"
}))
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Change Profile Photo
Upload a new profile photo. It is cropped to 160 x 160 pixels and replaces the previous photo.
| Property | Value |
|---|---|
| Endpoint | Change Profile Photo |
| Method | POST |
| URL | /api/v1/subscriber/profile/photo |
| Authentication | Bearer Token (Subscriber) |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer subscriber-token | Yes |
Form Data (multipart/form-data):
| Parameter | Type | Required | Description |
|---|---|---|---|
photo | file | Yes | JPEG or PNG image, max 5 MB |
Success Response (200 OK):
json
{
"status": "success",
"data": {
"photo_url": "https://your-domain.com/storage/photos/subscriber/5c21ab9e04f7d.png"
}
}Error Response (422 Unprocessable Entity):
json
{
"message": "The photo field must be an image. (and 1 more error)",
"errors": {
"photo": [
"The photo field must be an image.",
"The photo field must be a file of type: jpeg, png, jpg."
]
}
}Code Examples:
bash
curl -X POST "https://your-domain.com/api/v1/subscriber/profile/photo" \
-H "Accept: application/json" \
-H "Authorization: Bearer your-auth-token" \
-F "[email protected]"