API Console

Current API dashboard

A clean control surface for the backend routes already in the app: users, businesses, package types, packages, orders, and USSD data.

Users

0

Admin-managed account records.

Packages

0

Sellable data bundle definitions.

Package Types

0

Telecom-specific bundle groups.

Businesses

0

Accounts tied to a user owner.

API surface

Current routes exposed by the backend.

GET/api/users

Lists all users for admin sessions.

POST/api/users

Creates a new user with hashed password storage.

GET/api/packages

Fetches all data packages and their relationships.

POST/api/packages

Creates a package record.

GET/api/packagetypes

Returns package types tied to telecom companies.

POST/api/packagetypes

Creates a package type entry.

GET/api/business

Returns registered businesses.

POST/api/business

Creates a business record for a user.

POST/api/order

Creates an order and starts the payment/topup flow.

GET/api/ussd

Returns saved USSD codes.

Users

User records exposed by `/api/users`.

IDNameMobileState
user-001Amina0612345678ACTIVE
user-002Yusuf0611223344ACTIVE

Sample user detail

A compact record view using the shared field components.

ID
user-001
Name
Amina
Mobile
0612345678
Role
ADMIN
Status
ACTIVE
Created
2026-07-14

Latest order snapshot

Shows how order states can be rendered from `/api/order`.

Order ID
ord-001
Telecom
Somtel
Amount
5.00
Order Status
PENDING
Payment Status
PENDING

Packages

Package cards are rendered as a structured table with size and validity cues.

IDNamePriceValidity
pkg-001Daily Social1.00DAY
pkg-002Weekly Combo5.00UNLIMITED

Example package payload

{
  "name": "Daily Social",
  "amount": "1.00",
  "validity": 1,
  "validityType": "DAY",
  "packageTypeId": "type-001"
}

Example order payload

{
  "userId": "user-001",
  "packageId": "pkg-001",
  "dataNumber": "0612345678",
  "paymentNumber": "0612345678",
  "telecomCompany": "Somtel",
  "amount": "5.00"
}