Skip to content

Zal Ultra API Documentation ​

Version: 2.21.0
Base URL: https://your-domain.com

Overview ​

Complete API documentation for the Zal Ultra ISP Management System.

Important

Most API endpoints require authentication. You must first obtain an access token by calling the User Login or Subscriber Login endpoint before accessing protected resources.


Authentication ​

To access protected endpoints, include the Bearer token in your request header:

http
Authorization: Bearer your-auth-token

Getting Your Token

  1. Call the login endpoint with your credentials
  2. Extract the token from the response
  3. Include it in all subsequent requests as Authorization: Bearer {token}
  4. Renew it with the refresh-token endpoint before expires_at

Token rules

Tokens live 30 days (server-configurable) and are rotated on refresh. They are revoked immediately when the user is disabled, the user's password is changed, or a logout endpoint is called — an expired or revoked token cannot be refreshed, so always handle 401 by logging in again. Full rules: Auth → Token Expiry.

Code Examples ​

Every endpoint page includes ready-to-run examples in cURL, PHP, JavaScript, Python, Go and Rust. Pick a language tab once — the whole site remembers your choice.

📁 Quickstart: login → refresh → create a subscriber →

Common Headers ​

HeaderValueRequired
Acceptapplication/jsonYes
Content-Typeapplication/jsonYes (POST/PUT)

Common Query Parameters ​

ParameterTypeRequiredDescription
isp_idintegerYesISP identifier
branch_idintegerYesBranch identifier
user_idintegerYesUser identifier

API Modules ​

1. Public Endpoints ​

No authentication required

MethodEndpointDescription
GET/api/healthHealth check

📁 View Public API →


2. Authentication ​

User Authentication ​

MethodEndpointDescription
POST/api/v1/users/loginAdmin/Staff login (30-day token)
GET/api/v1/users/profileGet current user
POST/api/v1/users/refresh-tokenRefresh token
POST/api/v1/users/logoutLogout (current token)
POST/api/v1/users/logout-allLogout all devices

📁 View User Auth →

Subscriber Authentication ​

MethodEndpointDescription
POST/api/v1/subscriber/loginSubscriber login (30-day token)
GET/api/v1/subscriber/profileGet profile
POST/api/v1/subscriber/refresh-tokenRefresh token
POST/api/v1/subscriber/logoutSubscriber logout
POST/api/v1/subscriber/logout-allLogout all devices

📁 View Subscriber Auth →


3. Subscriber Portal ​

Requires subscriber authentication token

MethodEndpointDescription
GET/api/v1/subscriber/profileGet profile
GET/api/v1/subscriber/packageGet package info
GET/api/v1/subscriber/invoicesGet invoices
GET/api/v1/subscriber/paymentsGet payments
GET/api/v1/subscriber/usageGet usage stats
POST/api/v1/subscriber/change-passwordChange password

📁 View Subscriber Portal →


4. User (Admin/Staff) API ​

Requires admin/staff authentication token

Subscriber Management ​

MethodEndpointDescription
GET/api/v1/subscribersFetch all subscribers
GET/api/v1/subscribers/{id}Fetch subscriber
POST/api/v1/subscribersCreate subscriber
PUT/api/v1/subscribers/{id}Update subscriber
DELETE/api/v1/subscribers/{id}Delete subscriber
POST/api/v1/subscribers/{id}/activateActivate subscriber
POST/api/v1/subscribers/{id}/suspendSuspend subscriber
POST/api/v1/subscribers/importImport subscribers
GET/api/v1/subscribers/exportExport subscribers

📁 View Subscribers API →


User Management ​

MethodEndpointDescription
GET/api/v1/usersFetch all users
GET/api/v1/users/{id}Fetch user
POST/api/v1/usersCreate user
PUT/api/v1/users/{id}Update user
DELETE/api/v1/users/{id}Delete user
GET/api/v1/users/resellersFetch resellers
GET/api/v1/users/staffFetch staff

📁 View Users API →


Package Management ​

MethodEndpointDescription
GET/api/v1/packagesFetch all packages
GET/api/v1/packages/{id}Fetch package
POST/api/v1/packagesCreate package
PUT/api/v1/packages/{id}Update package
DELETE/api/v1/packages/{id}Delete package
POST/api/v1/packages/assignAssign package
GET/api/v1/packages/pricingGet pricing

📁 View Packages API →


Invoice Management ​

MethodEndpointDescription
GET/api/v1/invoicesFetch all invoices
GET/api/v1/invoices/{id}Fetch invoice
POST/api/v1/invoicesCreate invoice
PUT/api/v1/invoices/{id}Update invoice
DELETE/api/v1/invoices/{id}Delete invoice
POST/api/v1/invoices/generateGenerate invoice
POST/api/v1/invoices/{id}/payPay invoice
POST/api/v1/invoices/{id}/reverseReverse invoice

📁 View Invoices API →


Payment Management ​

MethodEndpointDescription
GET/api/v1/paymentsFetch all payments
GET/api/v1/payments/{id}Fetch payment
POST/api/v1/paymentsCreate payment
PUT/api/v1/payments/{id}Update payment
DELETE/api/v1/payments/{id}Delete payment
GET/api/v1/payments/methodsGet payment methods

📁 View Payments API →


Ledger Management ​

MethodEndpointDescription
GET/api/v1/ledgersFetch all ledgers
GET/api/v1/ledgers/{id}Fetch ledger
GET/api/v1/ledgers/historyLedger history

📁 View Ledgers API →


Dashboard ​

MethodEndpointDescription
GET/api/v1/dashboard/statsDashboard statistics
GET/api/v1/dashboard/chartsDashboard charts

📁 View Dashboard API →


Settings ​

MethodEndpointDescription
GET/api/v1/settings/generalGet general settings
PUT/api/v1/settings/generalUpdate general settings
GET/api/v1/settings/softwareGet software settings
PUT/api/v1/settings/softwareUpdate software settings
GET/api/v1/settings/smsGet SMS settings
PUT/api/v1/settings/smsUpdate SMS settings

📁 View Settings API →


OLT/ONU Management ​

MethodEndpointDescription
GET/api/v1/oltsFetch all OLTs
GET/api/v1/olts/{id}Fetch OLT
POST/api/v1/oltsCreate OLT
PUT/api/v1/olts/{id}Update OLT
DELETE/api/v1/olts/{id}Delete OLT
POST/api/v1/olts/{id}/syncSync OLT
GET/api/v1/onusFetch all ONUs
POST/api/v1/onus/{id}/commandSend ONU command

📁 View OLT/ONU API →


Policies ​

MethodEndpointDescription
GET/api/v1/policiesFetch all policies
GET/api/v1/policies/{id}Fetch policy
POST/api/v1/policiesCreate policy
PUT/api/v1/policies/{id}Update policy
DELETE/api/v1/policies/{id}Delete policy

📁 View Policies API →


Extra Fees ​

MethodEndpointDescription
GET/api/v1/extra-feesFetch all extra fees
GET/api/v1/extra-fees/{id}Fetch extra fee
POST/api/v1/extra-feesCreate extra fee
PUT/api/v1/extra-fees/{id}Update extra fee
DELETE/api/v1/extra-fees/{id}Delete extra fee
DELETE/api/v1/extra-fees/group/{id}Delete extra fee group

📁 View Extra Fees API →


Bandwidth Allocations ​

MethodEndpointDescription
GET/api/v1/bandwidthFetch all bandwidth allocations
GET/api/v1/bandwidth/{id}Fetch bandwidth
POST/api/v1/bandwidthCreate bandwidth
PUT/api/v1/bandwidth/{id}Update bandwidth
DELETE/api/v1/bandwidth/{id}Delete bandwidth
DELETE/api/v1/bandwidth/group/{id}Delete bandwidth group

📁 View Bandwidth API →


NAS (Network Access Server) ​

MethodEndpointDescription
GET/api/v1/nasFetch all NAS
GET/api/v1/nas/{id}Fetch NAS
POST/api/v1/nasCreate NAS
PUT/api/v1/nas/{id}Update NAS
DELETE/api/v1/nas/{id}Delete NAS
POST/api/v1/nas/{id}/testTest NAS connection

📁 View NAS API →


IP Pools ​

MethodEndpointDescription
GET/api/v1/ip-poolsFetch all IP pools
GET/api/v1/ip-pools/{id}Fetch IP pool
POST/api/v1/ip-poolsCreate IP pool
PUT/api/v1/ip-pools/{id}Update IP pool
DELETE/api/v1/ip-pools/{id}Delete IP pool
POST/api/v1/ip-pools/{id}/generateGenerate IPs

📁 View IP Pools API →


Areas ​

MethodEndpointDescription
GET/api/v1/areasFetch all areas
GET/api/v1/areas/{id}Fetch area
POST/api/v1/areasCreate area
PUT/api/v1/areas/{id}Update area
DELETE/api/v1/areas/{id}Delete area
GET/api/v1/areas/hierarchyFetch area hierarchy

📁 View Areas API →


Tickets ​

MethodEndpointDescription
GET/api/v1/ticketsFetch all tickets
GET/api/v1/tickets/{id}Fetch ticket
POST/api/v1/ticketsCreate ticket
PUT/api/v1/tickets/{id}Update ticket
DELETE/api/v1/tickets/{id}Delete ticket
POST/api/v1/tickets/{id}/replyReply to ticket
PUT/api/v1/tickets/{id}/statusChange ticket status

📁 View Tickets API →


Roles ​

MethodEndpointDescription
GET/api/v1/rolesFetch all roles
GET/api/v1/roles/{id}Fetch role
POST/api/v1/rolesCreate role
PUT/api/v1/roles/{id}Update role
DELETE/api/v1/roles/{id}Delete role
POST/api/v1/roles/{id}/copyCopy role

📁 View Roles API →


Permissions ​

MethodEndpointDescription
GET/api/v1/permissionsFetch all permissions
GET/api/v1/permissions/groupedFetch grouped permissions

📁 View Permissions API →


Notes ​

MethodEndpointDescription
GET/api/v1/notesFetch all notes
GET/api/v1/notes/{id}Fetch note
POST/api/v1/notesCreate note
PUT/api/v1/notes/{id}Update note
DELETE/api/v1/notes/{id}Delete note

📁 View Notes API →


Notices ​

MethodEndpointDescription
GET/api/v1/noticesFetch all notices
GET/api/v1/notices/{id}Fetch notice
POST/api/v1/noticesCreate notice
PUT/api/v1/notices/{id}Update notice
DELETE/api/v1/notices/{id}Delete notice

📁 View Notices API →


Email Templates ​

MethodEndpointDescription
GET/api/v1/email-templatesFetch all email templates
GET/api/v1/email-templates/{id}Fetch email template
POST/api/v1/email-templatesCreate email template
PUT/api/v1/email-templates/{id}Update email template
DELETE/api/v1/email-templates/{id}Delete email template

📁 View Email Templates API →


SMS Templates ​

MethodEndpointDescription
GET/api/v1/sms-templatesFetch all SMS templates
GET/api/v1/sms-templates/{id}Fetch SMS template
POST/api/v1/sms-templatesCreate SMS template
PUT/api/v1/sms-templates/{id}Update SMS template
DELETE/api/v1/sms-templates/{id}Delete SMS template

📁 View SMS Templates API →


Activity Logs ​

MethodEndpointDescription
GET/api/v1/activity-logsFetch all activity logs
GET/api/v1/activity-logs/{id}Fetch activity log
GET/api/v1/activity-logs/by-subjectFetch logs by subject
GET/api/v1/activity-logs/by-user/{id}Fetch logs by user

📁 View Activity Logs API →


ISPs ​

MethodEndpointDescription
GET/api/v1/ispsFetch all ISPs
GET/api/v1/isps/{id}Fetch ISP
POST/api/v1/ispsCreate ISP
PUT/api/v1/isps/{id}Update ISP
DELETE/api/v1/isps/{id}Delete ISP

📁 View ISPs API →


Branches ​

MethodEndpointDescription
GET/api/v1/branchesFetch all branches
GET/api/v1/branches/{id}Fetch branch
POST/api/v1/branchesCreate branch
PUT/api/v1/branches/{id}Update branch
DELETE/api/v1/branches/{id}Delete branch

📁 View Branches API →


Inventory ​

MethodEndpointDescription
GET/api/v1/inventoryFetch all inventory
GET/api/v1/inventory/{id}Fetch inventory item
POST/api/v1/inventoryCreate inventory item
PUT/api/v1/inventory/{id}Update inventory item
DELETE/api/v1/inventory/{id}Delete inventory item
POST/api/v1/inventory/{id}/assignAssign inventory
POST/api/v1/inventory/{id}/unassignUnassign inventory

📁 View Inventory API →


Expenses ​

MethodEndpointDescription
GET/api/v1/expensesFetch all expenses
GET/api/v1/expenses/categoriesFetch expense categories
GET/api/v1/expenses/{id}Fetch expense
POST/api/v1/expensesCreate expense
PUT/api/v1/expenses/{id}Update expense
DELETE/api/v1/expenses/{id}Delete expense

📁 View Expenses API →


MAC Binding ​

MethodEndpointDescription
GET/api/v1/mac-bindingFetch all MAC bindings
GET/api/v1/mac-binding/{id}Fetch subscriber MAC
POST/api/v1/mac-binding/bindBind MAC address
POST/api/v1/mac-binding/unbindUnbind MAC address

📁 View MAC Binding API →


Reports ​

MethodEndpointDescription
GET/api/v1/reports/subscriber-summarySubscriber summary
GET/api/v1/reports/revenue-summaryRevenue summary
GET/api/v1/reports/package-distributionPackage distribution
GET/api/v1/reports/salesperson-performanceSalesperson performance
GET/api/v1/reports/expiring-subscribersExpiring subscribers
GET/api/v1/reports/daily-collectionDaily collection

📁 View Reports API →


RADIUS ​

MethodEndpointDescription
GET/api/v1/radius/online-sessionsOnline sessions
GET/api/v1/radius/session-historySession history
GET/api/v1/radius/radcheck/{username}Get subscriber radcheck
GET/api/v1/radius/radreply/{username}Get subscriber radreply
GET/api/v1/radius/radusergroup/{username}Get subscriber radusergroup
GET/api/v1/radius/usage-stats/{username}Get usage stats
POST/api/v1/radius/disconnectDisconnect session

📁 View RADIUS API →


SMS ​

MethodEndpointDescription
POST/api/v1/sms/sendSend SMS
POST/api/v1/sms/send-to-subscriberSend SMS to subscriber
POST/api/v1/sms/send-bulkSend bulk SMS

📁 View SMS API →


Balance ​

MethodEndpointDescription
GET/api/v1/balance/subscriber/{id}Get subscriber balance
GET/api/v1/balance/user/{id}Get user balance
POST/api/v1/balance/subscriber/addAdd subscriber balance
GET/api/v1/balance/subscriber/{id}/ledgerGet subscriber ledger

📁 View Balance API →


5. Payment Gateways ​

Bkash Integration ​

MethodEndpointDescription
POST/api/queryBillQuery bill
POST/api/payBillPay bill
POST/api/searchTransactionSearch transaction

📁 View Payment Gateways →


HTTP Status Codes ​

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
422Validation Error
500Server Error

Error Response Format ​

json
{
    "success": false,
    "message": "Error description",
    "errors": {
        "field_name": ["Validation error message"]
    }
}

Environment Variables ​

VariableDescription
zalultra_urlBase URL of the API server
zalultra_tokenAdmin/Staff authentication token
subscriber_tokenSubscriber authentication token
zalultra_emailAdmin login email
zalultra_passwordAdmin login password
zalultra_sub_usernameSubscriber login username
zalultra_sub_passwordSubscriber login password

Quick Reference ​

Method Colors ​

  • GET - Retrieve data
  • POST - Create/Action
  • PUT - Update
  • DELETE - Delete

Required Fields ​

Fields marked with Required or in red are mandatory.

www.onezeroart.com