Quick Start

Follow these steps to make your first API call:

  1. Get your API key – shown below (generate one in Settings if empty).
  2. Fetch data networksGET /networks
  3. Fetch data plansGET /plans/{network_id}
  4. Purchase dataPOST /data/purchase
  5. Fetch airtime networksGET /airtime/networks
  6. Purchase airtimePOST /airtime/purchase
  7. Fetch electricity distributorsGET /electricity/distributors
  8. Verify a meterPOST /electricity/verify
  9. Purchase electricityPOST /electricity/purchase
  10. Fetch cable servicesGET /cable/services
  11. Fetch cable plansGET /cable/plans/{serviceId}
  12. Verify smartcardPOST /cable/verify
  13. Purchase cablePOST /cable/purchase
  14. Fetch exam servicesGET /exam/services
  15. Purchase exam pinsPOST /exam/purchase
Pro tip: Use the "Run in Postman" buttons to test endpoints instantly.

Authentication

All API requests require an API key. Your API key:

Not generated yet Generate 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

GET /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

GET /plans/{network_id}

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

POST /data/purchase

Purchase data for a phone number.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
mobile_network_idintegerYes1Network ID from /networks
data_plan_idintegerYes85Plan ID from /plans (the id field)
phone_numberstringYes"08012345678"11‑digit recipient number
referencestringNo"txn_12345"Your unique transaction reference
coupon_codestringNo"SAVE10"Discount coupon
ported_numberbooleanNofalseWhether 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

GET /transaction/{reference}

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

GET /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

POST /airtime/purchase

Purchase airtime for a phone number.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
mobile_network_idintegerYes1Network ID from /airtime/networks
amountdecimalYes100.00Airtime amount (min 50, max 5000)
phone_numberstringYes"08012345678"11‑digit recipient number
referencestringNo"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

GET /airtime/status/{reference}

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

GET /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

POST /electricity/verify

Verify a meter number and retrieve customer information.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
meter_numberstringYes"12345678901"The meter number to verify
distributor_codestringYes"ikeja-electric"vtpass_code from /electricity/distributors
meter_typestringYes"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

POST /electricity/purchase

Purchase electricity for a meter.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
meter_numberstringYes"12345678901"Meter number from verification
distributor_codestringYes"ikeja-electric"vtpass_code from /electricity/distributors
meter_typestringYes"prepaid""prepaid" or "postpaid"
amountdecimalYes5000.00Purchase amount (min 100)
phone_numberstringYes"08012345678"Phone number of customer
customer_namestringYes"JOHN DOE"Name of the customer (from verify)
customer_addressstringYes"123 MAIN ST, LAGOS"Address of the customer (from verify)
referencestringNo"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

GET /electricity/status/{reference}

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

GET /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

GET /cable/plans/{serviceId}

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

POST /cable/verify

Verify a smartcard number and retrieve customer information.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
card_numberstringYes"1234567890"The smartcard number
service_idstringYes"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

POST /cable/purchase

Subscribe to a cable TV plan.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
phone_numberstringYes"08012345678"11‑digit phone number
card_numberstringYes"1234567890"Smartcard number
service_idstringYes"dstv"Service ID from /cable/services
variation_codestringYes"dstv-premium"Plan variation_code from /cable/plans
referencestringNo"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

GET /cable/status/{reference}

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

GET /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

POST /exam/purchase

Purchase exam pins for a specific exam.

Body Parameters (JSON):

ParameterTypeRequiredExampleDescription
exam_namestringYes"WAEC"Exam type: WAEC, NECO, or NABTEB
quantityintegerYes2Number of pins (1‑10)
referencestringNo"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

GET /exam/status/{reference}

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 /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

401 Unauthorized (missing/invalid API key)
402 Insufficient balance
403 Access restricted (not an API user)
400 Bad request (validation error)
404 Resource not found
409 Duplicate transaction
500 Server error

All error responses include a message field explaining the issue.