API Documentation
Quick Start
Follow these steps to make your first API call:
- Get your API key – shown below (generate one in Settings if empty).
- Fetch data networks –
GET /networks - Fetch data plans –
GET /plans/{network_id} - Purchase data –
POST /data/purchase - Fetch airtime networks –
GET /airtime/networks - Purchase airtime –
POST /airtime/purchase - Fetch electricity distributors –
GET /electricity/distributors - Verify a meter –
POST /electricity/verify - Purchase electricity –
POST /electricity/purchase - Fetch cable services –
GET /cable/services - Fetch cable plans –
GET /cable/plans/{serviceId} - Verify smartcard –
POST /cable/verify - Purchase cable –
POST /cable/purchase - Fetch exam services –
GET /exam/services - Purchase exam pins –
POST /exam/purchase
Authentication
All API requests require an API key. Your API key:
Include the key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
All endpoints return JSON. The base URL for all requests is https://swyftdataweb.com/api/v1.
Data Networks
Returns a list of available mobile networks for data.
curl -X GET "https://swyftdataweb.com/api/v1/networks" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": [
{"id": 1, "name": "MTN", "code": "mtn"},
{"id": 2, "name": "Airtel", "code": "airtel"},
{"id": 3, "name": "Glo", "code": "glo"},
{"id": 4, "name": "9mobile", "code": "9mobile"}
]
}
Data Plans
Returns data plans for a specific network with API user pricing.
curl -X GET "https://swyftdataweb.com/api/v1/plans/1" \
-H "Authorization: Bearer YOUR_API_KEY"
View the full data plans reference for all available plans and pricing.
Purchase Data
Purchase data for a phone number.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
mobile_network_id | integer | Yes | 1 | Network ID from /networks |
data_plan_id | integer | Yes | 85 | Plan ID from /plans (the id field) |
phone_number | string | Yes | "08012345678" | 11‑digit recipient number |
reference | string | No | "txn_12345" | Your unique transaction reference |
coupon_code | string | No | "SAVE10" | Discount coupon |
ported_number | boolean | No | false | Whether number is ported |
curl -X POST "https://swyftdataweb.com/api/v1/data/purchase" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mobile_network_id":1,"data_plan_id":85,"phone_number":"08012345678","reference":"txn_12345"}'
Success Response (200):
{
"status": "success",
"message": "Data purchase successful",
"data": {
"reference": "txn_12345",
"amount": 25.00,
"phone": "09012345678"
}
}
Data Transaction Status
Check the status of a data transaction by reference.
curl -X GET "https://swyftdataweb.com/api/v1/transaction/txn_12345" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": {
"reference": "txn_12345",
"status": "completed",
"amount": 25.00,
"phone": "09012345678",
"created_at": "2026-04-19T10:30:00.000000Z"
}
}
Airtime Networks
Returns a list of mobile networks available for airtime purchase.
curl -X GET "https://swyftdataweb.com/api/v1/airtime/networks" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": [
{"id": 1, "name": "MTN", "code": "mtn"},
{"id": 2, "name": "Airtel", "code": "airtel"},
{"id": 3, "name": "Glo", "code": "glo"},
{"id": 4, "name": "9mobile", "code": "9mobile"}
]
}
Purchase Airtime
Purchase airtime for a phone number.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
mobile_network_id | integer | Yes | 1 | Network ID from /airtime/networks |
amount | decimal | Yes | 100.00 | Airtime amount (min 50, max 5000) |
phone_number | string | Yes | "08012345678" | 11‑digit recipient number |
reference | string | No | "airt_txn_123" | Your unique transaction reference |
curl -X POST "https://swyftdataweb.com/api/v1/airtime/purchase" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mobile_network_id":1,"amount":100,"phone_number":"08012345678","reference":"airt_txn_123"}'
Success Response (200):
{
"status": "success",
"message": "Airtime purchase successful",
"data": {
"reference": "airt_txn_123",
"amount": 100,
"phone": "08012345678"
}
}
Airtime Transaction Status
Check the status of an airtime transaction by reference.
curl -X GET "https://swyftdataweb.com/api/v1/airtime/status/airt_txn_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": {
"reference": "airt_txn_123",
"status": "completed",
"amount": 100,
"phone": "08012345678",
"created_at": "2026-05-17T12:00:00.000000Z"
}
}
Electricity Distributors
Returns a list of available electricity distributors.
curl -X GET "https://swyftdataweb.com/api/v1/electricity/distributors" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": [
{"id": 1, "name": "Ikeja Electric", "vtpass_code": "ikeja-electric"},
{"id": 2, "name": "Eko Electric", "vtpass_code": "eko-electric"},
...
]
}
Verify Meter
Verify a meter number and retrieve customer information.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
meter_number | string | Yes | "12345678901" | The meter number to verify |
distributor_code | string | Yes | "ikeja-electric" | vtpass_code from /electricity/distributors |
meter_type | string | Yes | "prepaid" | "prepaid" or "postpaid" |
curl -X POST "https://swyftdataweb.com/api/v1/electricity/verify" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"meter_number":"12345678901","distributor_code":"ikeja-electric","meter_type":"prepaid"}'
Success Response (200):
{
"code": "000",
"content": {
"Customer_Name": "JOHN DOE",
"Address": "123 MAIN ST, LAGOS"
}
}
Purchase Electricity
Purchase electricity for a meter.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
meter_number | string | Yes | "12345678901" | Meter number from verification |
distributor_code | string | Yes | "ikeja-electric" | vtpass_code from /electricity/distributors |
meter_type | string | Yes | "prepaid" | "prepaid" or "postpaid" |
amount | decimal | Yes | 5000.00 | Purchase amount (min 100) |
phone_number | string | Yes | "08012345678" | Phone number of customer |
customer_name | string | Yes | "JOHN DOE" | Name of the customer (from verify) |
customer_address | string | Yes | "123 MAIN ST, LAGOS" | Address of the customer (from verify) |
reference | string | No | "elec_12345" | Your unique transaction reference |
curl -X POST "https://swyftdataweb.com/api/v1/electricity/purchase" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"meter_number":"12345678901","distributor_code":"ikeja-electric","meter_type":"prepaid","amount":5000,"phone_number":"08012345678","customer_name":"JOHN DOE","customer_address":"123 MAIN ST, LAGOS","reference":"elec_12345"}'
Success Response (200):
{
"status": "success",
"message": "Electricity purchase successful",
"data": {
"reference": "elec_12345",
"amount": 5000,
"token": "1234-5678-9012-3456",
"units": "150.5"
}
}
Electricity Transaction Status
Check the status of an electricity transaction by reference.
curl -X GET "https://swyftdataweb.com/api/v1/electricity/status/elec_12345" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": {
"reference": "elec_12345",
"status": "completed",
"amount": 5000,
"token": "1234-5678-9012-3456",
"units": "150.5",
"meter_number": "12345678901",
"created_at": "2026-05-19T08:30:00.000000Z"
}
}
Cable Services
Returns a list of available cable TV providers.
curl -X GET "https://swyftdataweb.com/api/v1/cable/services" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": [
{"id": 1, "name": "DSTV", "service_id": "dstv"},
{"id": 2, "name": "GOTV", "service_id": "gotv"},
{"id": 3, "name": "Startimes", "service_id": "startimes"}
]
}
Cable Plans
Returns available subscription plans for a cable service.
curl -X GET "https://swyftdataweb.com/api/v1/cable/plans/1" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"service": "DSTV",
"data": [
{"id": 10, "plan_name": "DStv Premium", "variation_code": "dstv-premium", "amount": 24500},
{"id": 11, "plan_name": "DStv Compact Plus", "variation_code": "dstv-compact-plus", "amount": 16600}
]
}
Verify Smartcard
Verify a smartcard number and retrieve customer information.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
card_number | string | Yes | "1234567890" | The smartcard number |
service_id | string | Yes | "dstv" | Service ID from /cable/services |
curl -X POST "https://swyftdataweb.com/api/v1/cable/verify" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"card_number":"1234567890","service_id":"dstv"}'
Success Response (200):
{
"status": "success",
"data": {
"code": "000",
"content": {
"Customer_Name": "JANE DOE"
}
}
}
Purchase Cable
Subscribe to a cable TV plan.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
phone_number | string | Yes | "08012345678" | 11‑digit phone number |
card_number | string | Yes | "1234567890" | Smartcard number |
service_id | string | Yes | "dstv" | Service ID from /cable/services |
variation_code | string | Yes | "dstv-premium" | Plan variation_code from /cable/plans |
reference | string | No | "cable_123" | Your unique transaction reference |
curl -X POST "https://swyftdataweb.com/api/v1/cable/purchase" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone_number":"08012345678","card_number":"1234567890","service_id":"dstv","variation_code":"dstv-premium","reference":"cable_123"}'
Success Response (200):
{
"status": "success",
"message": "Cable subscription successful",
"data": {
"reference": "cable_123",
"amount": 24500,
"card": "1234567890"
}
}
Cable Transaction Status
Check the status of a cable transaction by reference.
curl -X GET "https://swyftdataweb.com/api/v1/cable/status/cable_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": {
"reference": "cable_123",
"status": "completed",
"amount": 24500,
"card": "1234567890",
"created_at": "2026-05-19T09:00:00.000000Z"
}
}
Exam Services
Returns a list of available exam types with prices.
curl -X GET "https://swyftdataweb.com/api/v1/exam/services" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": [
{"name": "WAEC", "price": 3300},
{"name": "NECO", "price": 1200},
{"name": "NABTEB", "price": 2300}
]
}
Purchase Exam Pins
Purchase exam pins for a specific exam.
Body Parameters (JSON):
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
exam_name | string | Yes | "WAEC" | Exam type: WAEC, NECO, or NABTEB |
quantity | integer | Yes | 2 | Number of pins (1‑10) |
reference | string | No | "exam_123" | Your unique transaction reference |
curl -X POST "https://swyftdataweb.com/api/v1/exam/purchase" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"exam_name":"WAEC","quantity":2,"reference":"exam_123"}'
Success Response (200):
{
"status": "success",
"message": "Exam pins purchased successfully",
"data": {
"reference": "exam_123",
"amount": 6600,
"exam": "WAEC",
"quantity": 2,
"pins": ["WAEC1234567", "WAEC7654321"]
}
}
Exam Transaction Status
Check the status of an exam pin transaction by reference.
curl -X GET "https://swyftdataweb.com/api/v1/exam/status/exam_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": {
"reference": "exam_123",
"status": "completed",
"exam": "WAEC",
"quantity": 2,
"amount": 6600,
"pins": ["WAEC1234567", "WAEC7654321"],
"created_at": "2026-05-19T10:00:00.000000Z"
}
}
Balance
Get your current wallet balance (shared across all services).
curl -X GET "https://swyftdataweb.com/api/v1/balance" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"status": "success",
"data": {
"balance": 15000.50,
"currency": "NGN"
}
}
Error Codes
All error responses include a message field explaining the issue.