Welcome to the Fetch Data Plans List API Integration page. This guide will help you integrate our API to fetch a list of all active data plans on the Vtunaija website, including each plan’s ID, name, price, validity, and other details.
curl -X POST https://vtunaija.com.ng/api/listdataplans/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
}'
{
"status": "success",
"Status": "successful",
"count": 178,
"dataplans": [
{
"data_plan_id": 121,
"the_network_name": "MTN",
"size": "1GB DataShare",
"the_datatype_name": "DataShare",
"price_for_basicuser": "680.00",
"price_for_premiumuser": "460.00",
"commission_for_basicuser": "0.00",
"commission_for_premiumuser": "0.00",
"duration": "7",
"status": "On"
},
{
"data_plan_id": 122,
"the_network_name": "MTN",
"size": "2GB Datashare",
"the_datatype_name": "DataShare",
"price_for_basicuser": "1360.00",
"price_for_premiumuser": "1040.00",
"commission_for_basicuser": "0.00",
"commission_for_premiumuser": "0.00",
"duration": "30",
"status": "On"
},
{
"data_plan_id": 22,
"the_network_name": "GLO",
"size": "500 MB",
"the_datatype_name": "Corporate",
"price_for_basicuser": "215.00",
"price_for_premiumuser": "190.00",
"commission_for_basicuser": "0.00",
"commission_for_premiumuser": "0.00",
"duration": "30",
"status": "On"
},
{
"data_plan_id": 23,
"the_network_name": "GLO",
"size": "1 GB",
"the_datatype_name": "Corporate",
"price_for_basicuser": "430.00",
"price_for_premiumuser": "380.00",
"commission_for_basicuser": "0.00",
"commission_for_premiumuser": "0.00",
"duration": "30",
"status": "On"
},
{
"data_plan_id": 28,
"the_network_name": "AIRTEL",
"size": "500 MB",
"the_datatype_name": "Corporate",
"price_for_basicuser": "495.00",
"price_for_premiumuser": "489.00",
"commission_for_basicuser": "0.30",
"commission_for_premiumuser": "0.50",
"duration": "7",
"status": "On"
},
{
"data_plan_id": 29,
"the_network_name": "AIRTEL",
"size": "1 GB",
"the_datatype_name": "Corporate",
"price_for_basicuser": "792.00",
"price_for_premiumuser": "782.40",
"commission_for_basicuser": "0.60",
"commission_for_premiumuser": "0.80",
"duration": "7",
"status": "On"
},
{
"data_plan_id": 219,
"the_network_name": "9MOBILE",
"size": "9mobile 100MB - 100 Naira",
"the_datatype_name": "GiftingPlan",
"price_for_basicuser": "100.55",
"price_for_premiumuser": "100.55",
"commission_for_basicuser": "2.51",
"commission_for_premiumuser": "2.51",
"duration": "1",
"status": "On"
},
{
"data_plan_id": 220,
"the_network_name": "9MOBILE",
"size": "9mobile 650MB - 200 Naira",
"the_datatype_name": "GiftingPlan",
"price_for_basicuser": "200.10",
"price_for_premiumuser": "200.10",
"commission_for_basicuser": "5.00",
"commission_for_premiumuser": "5.00",
"duration": "1",
"status": "On"
}
]
}
This section shows the possible failed API responses and the scenarios when they will be returned. These responses are sent whenever something goes wrong with the API request, such as invalid input, missing API key, inactive account, or wrong request method.
{ "status": "fail", "Status": "failed", "message": "Invalid request method. Only POST requests are allowed." } - Returned when the request method is not POST. { "status": "fail", "Status": "failed", "message": "No input data received." } - Returned when the POST body is empty. { "status": "fail", "Status": "failed", "message": "Missing or invalid API key in Authorization header. Format: Authorization: Token {api_key}" } - Returned when the Authorization header is missing or incorrectly formatted. { "status": "fail", "Status": "failed", "message": "API key provided in the API request does not exist on our platform." } - Returned when the API key does not exist in the database. { "status": "fail", "Status": "failed", "message": "Your account is inactive. Please contact support." } - Returned when the user’s account status is inactive. { "status": "fail", "Status": "failed", "message": "Invalid JSON input." } - Returned when the POST body contains malformed or invalid JSON.