URL: /api/cableapi
Methods: POST, GET
This API endpoint allows users to purchase cable Tv Subscription.
To access this endpoint, users must include their API key and secret key in the request headers.
See usage example in the code snippets below:
POST request to purchase tv subscription:
Content-Type: application/json
api-key: your-api-key
secret-key: your-secret-key
{
"phone": "08032566178",
"number": "0000000000",
"firstLevel": "DSTV", // value of this key can either be firstLevel or fId, e.g. "dstv" to avoid whitespace issue
"secondLevel": "dstv padi" // value of this key can either be secondLevel or sId, e.g. "dstv-padi" to avoid whitespace issue
}
Response:
- Status Code: 200
{
"message": "Transaction successful",
"data": {
"transactionId": "1234567890",
"email": "user@example.com",
"activity": "DSTV",
"message": "dstv padi",
"status": "Successful",
"recipient": "0000000000",
"amount": 2950,
"initialBalance": 3000,
"finalBalance": 50,
"Method": API,
}
}
{
"error": "Transaction failed",
"data": {
"transactionId": "0000000000",
"email": "user@example.com",
"activity": "DSTV",
"message": "dstv padi",
"status": "Failed",
"recipient": "0000000000",
"amount": 2950,
"initialBalance": 3000,
"finalBalance": 3000
"Method": API,
}
}
See usage example in the code snippets below:
GET request for available firstLevel and secondLevel:
Content-Type: application/json
api-key: your-api-key
secret-key: your-secret-key
Response:
- Status Code: 200
[
{
"available": true,
"firstLevel": "DSTV",
"fId": "dstv",
"amounts": [null],
"secondLevels": [
{
"available": true,
"secondLevel": "DStv Padi",
"sId": "dstv-padi",
"amounts": [4400]
},
{
"available": true,
"secondLevel": "DStv-Yanga",
"sId": "dstv-yanga",
"amounts": [6600]
},
{
"available": true,
"secondLevel": "Dstv Confam",
"sId": "dstv-confam",
"amounts": [11000]
},
{
"available": true,
"secondLevel": "Dstv Compat",
"sId": "dstv-compat",
"amounts": [19000]
},
{
"available": true,
"secondLevel": "Dstv French Touch Add-on",
"sId": "dstv-french-touch-add-on",
"amounts": [7000]
},
{
"available": true,
"secondLevel": "ExtraView Access",
"sId": "extraview-access",
"amounts": [6000]
},
{
"available": true,
"secondLevel": "Dstv Yanga+Showmax",
"sId": "dstv-yangashowmax",
"amounts": [7750]
},
{
"available": true,
"secondLevel": "Dstv Great Wall Standalone Bouque+showmax",
"sId": "dstv-great-wall-standalone-bouqueshowmax",
"amounts": [7300]
},
{
"available": true,
"secondLevel": "Dstv FTA Plus",
"sId": "dstv-fta-plus",
"amounts": [1600]
},
{
"available": true,
"secondLevel": "DStv Access",
"sId": "dstv-access",
"amounts": [2000]
},
{
"available": true,
"secondLevel": "Dstv Family",
"sId": "dstv-family",
"amounts": [4000]
},
{
"available": true,
"secondLevel": "DSTV MOBILE",
"sId": "dstv-mobile",
"amounts": [790]
},
{
"available": true,
"secondLevel": "Dstv Movie Bundle Add-on",
"sId": "dstv-movie-bundle-add-on",
"amounts": [3500]
},
{
"available": true,
"secondLevel": "DStv PVR Access Service",
"sId": "dstv-pvr-access-service",
"amounts": [4000]
}
]
},
{
"available": true,
"firstLevel": "GOTV",
"fId": "gotv",
"amounts": [0],
"secondLevels": [
{
"available": true,
"secondLevel": "GOtv Max",
"sId": "gotv-max",
"amounts": [8500]
},
{
"available": true,
"secondLevel": "Gotv Jolli",
"sId": "gotv-jolli",
"amounts": [5800]
},
{
"available": true,
"secondLevel": "Gotv Jinja",
"sId": "gotv-jinja",
"amounts": [3900]
},
{
"available": true,
"secondLevel": "Gotv Smallie-monthly",
"sId": "gotv-smallie-monthly",
"amounts": [1900]
},
{
"available": true,
"secondLevel": "Gotv Smallie-quarterly",
"sId": "gotv-smallie-quarterly",
"amounts": [5100]
},
{
"available": true,
"secondLevel": "Gotv Smallie-yearly",
"sId": "gotv-smallie-yearly",
"amounts": [15000]
},
{
"available": true,
"secondLevel": "Gotv Supa-monthly",
"sId": "gotv-supa-monthly",
"amounts": [11400]
},
{
"available": true,
"secondLevel": "Gotv Supa Plus-monthly",
"sId": "gotv-supa-plus-monthly",
"amounts": [16800]
}
]
},
{
"available": true,
"firstLevel": "STARTIMES",
"fId": "startimes",
"amounts": [0],
"secondLevels": [
{
"available": true,
"secondLevel": "Nova (Dish) 1 Month",
"sId": "nova-dish-1-month",
"amounts": [1900]
},
{
"available": true,
"secondLevel": "Basic (Antenna)",
"sId": "basic-antenna",
"amounts": [3700]
},
{
"available": true,
"secondLevel": "Basic (Dish)",
"sId": "basic-dish",
"amounts": [4700]
},
{
"available": true,
"secondLevel": "Classic (Antenna)",
"sId": "classic-antenna",
"amounts": [5500]
},
{
"available": true,
"secondLevel": "Nova(Antenna)-700 Naira-1 Week",
"sId": "novaantenna-700-naira-1-week",
"amounts": [700]
},
{
"available": true,
"secondLevel": "Basic (Antenna)-1250 Naira-1 Week",
"sId": "basic-antenna-1250-naira-1-week",
"amounts": [1250]
},
{
"available": true,
"secondLevel": "Basic (Dish)-1550 Naira -1 Week",
"sId": "basic-dish-1550-naira-1-week",
"amounts": [1550]
},
{
"available": true,
"secondLevel": "Classic (Antenna) - 1900 Naira - 1 Week",
"sId": "classic-antenna-1900-naira-1-week",
"amounts": [1900]
},
{
"available": true,
"secondLevel": "Super (Dish) - 3000 Naira - 1 Week",
"sId": "super-dish-3000-naira-1-week",
"amounts": [3000]
},
{
"available": true,
"secondLevel": "Nova (Antenna) - 1900 Naira - 1 Month",
"sId": "nova-antenna-1900-naira-1-month",
"amounts": [1900]
},
{
"available": true,
"secondLevel": "Classic (Dish) - 2300 Naira - 1 Week",
"sId": "classic-dish-2300-naira-1-week",
"amounts": [2300]
},
{
"available": true,
"secondLevel": "Classic (Dish) - 6800 Naira - 1 Month",
"sId": "classic-dish-6800-naira-1-month",
"amounts": [6800]
},
{
"available": true,
"secondLevel": "Nova (Dish) - 650 Naira - 1 Week",
"sId": "nova-dish-650-naira-1-week",
"amounts": [650]
}
]
},
{
"available": true,
"firstLevel": "SHOWMAX",
"fId": "showmax",
"amounts": [0],
"secondLevels": [
{
"available": true,
"secondLevel": "Full",
"sId": "full",
"amounts": [4500]
},
{
"available": true,
"secondLevel": "Mobile Only - N2,000",
"sId": "mobile-only-n2000",
"amounts": [2000]
},
{
"available": true,
"secondLevel": "Full Sports Mobile Only - N6,500",
"sId": "full-sports-mobile-only-n6500",
"amounts": [6500]
},
{
"available": true,
"secondLevel": "Sports Mobile Only - N4,500",
"sId": "sports-mobile-only-n4500",
"amounts": [4500]
},
{
"available": true,
"secondLevel": "Full - N9,000 - 3 Months",
"sId": "full-n9000-3-months",
"amounts": [9000]
},
{
"available": true,
"secondLevel": "Mobile Only - N4,000 - 3 Months",
"sId": "mobile-only-n4000-3-months",
"amounts": [4000]
},
{
"available": true,
"secondLevel": "Sports Mobile Only - N13,500 - 3 Months",
"sId": "sports-mobile-only-n13500-3-months",
"amounts": [13500]
},
{
"available": true,
"secondLevel": "Sports Only - N3,600",
"sId": "sports-only-n3600",
"amounts": [3600]
},
{
"available": true,
"secondLevel": "Sports Only 3 months - N7,200",
"sId": "sports-only-3-months-n7200",
"amounts": [7200]
}
]
}
]