Skip to content

Zal Pro API v1 โ€‹

Base URL: https://your-domain.com/api/v1

๐Ÿงช Beta

The v1 API is newly released. Endpoints are provided as-is โ€” please verify each on your own instance before relying on it in production, especially the money/router endpoints (subscriber activation and disconnect), which move balances and reprovision the router.

Overview โ€‹

The v1 API greatly expands what you can automate in Zal Pro โ€” subscribers, activation & billing, packages, tickets, network, resellers/staff/admins, and roles & permissions.

It runs alongside the original legacy API (/api/user, /api/ticket), which stays unchanged โ€” existing integrations keep working. All new endpoints live under the versioned prefix /api/v1/.

Authentication โ€‹

Same as the rest of Zal Pro โ€” HTTP Basic Authentication using the API username/password from Settings โ†’ Others API & Server Settings. See the Authentication guide.

bash
curl -u "your_api_username:your_api_password" \
  "https://your-domain.com/api/v1/subscriber/list"

URL format

Multi-word endpoints use underscores (a CodeIgniter routing requirement) โ€” e.g. /api/v1/dashboard/online_count, /api/v1/subscriber/reset_password. If clean URLs are off on your server, prefix paths with index.php/.

Modules โ€‹

ModuleWhat it covers
Auth & DashboardCredential check, self-info, headline stats & charts
SubscribersSubscriber CRUD, usage, notes, password & MAC binding
Activation & DisconnectActivate / renew / change package, and disconnect a session
Packages & PoliciesPackage reads + safe edits, RADIUS policy reads
TicketsFull ticket CRUD, comments, assign, categories
BillingPayments, invoices, subscriber balance/due
AreasCities / areas / sub-areas + hierarchy
NoticesNotice CRUD
NetworkNAS reads, RADIUS online sessions & history
ResellersFranchise / dealer / subdealer CRUD
Staff & AdminsStaff and primary-admin CRUD
Roles & PermissionsRoles CRUD + per-role permissions

Conventions โ€‹

  • Requests: GET uses query params; POST/DELETE bodies use form fields (application/x-www-form-urlencoded), not raw JSON.
  • Responses: always JSON. Lists return an array; actions return { "success": "..." } (or { "error": "..." }).
  • List filters: most list endpoints accept limit and offset for paging.

HTTP status codes โ€‹

CodeMeaning
200Success (some business errors also return 200 with an error field)
400Validation error
401Bad Basic Auth credentials
403API disabled or IP not whitelisted
404Resource not found
422Not allowed in this state (e.g. insufficient balance, unsupported connection type)
429Too frequent (e.g. re-activation within 2 minutes)

www.onezeroart.com