Welcome to the Data API Sandbox Sandbox Integration page. This guide will help you integrate our Sandbox Data API into your system.
On Sandbox environment the mobile number you are purchasing data for must be 08011111111 any other mobile number that is not 08011111111 the data purchase request will fail.
curl -X POST https://sandbox.vtunaija.com.ng/api/data/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "1",
"mobile_number": "08011111111",
"Ported_number": "true",
"request-id": "78977865523",
"plan": "2"
}'
{
"Status": "successful",
"status": "success",
"api_response": "Dear Customer, You have successfully shared 1GB Data to 2348011111111. Your SME data balance is 398009.91GB expires 27/12/2026. Thankyou",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "260.00",
"transaction_internal_id": "18989"
}
{
"Status": "failed",
"status": "fail",
"api_response": "Failed Failed Failed. Something went wrong",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "0.00",
"transaction_internal_id": "18989"
}
{
"Status": "processing",
"status": "processing",
"api_response": "Pending data purchase for 2348011111111.",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "260.00",
"transaction_internal_id": "18989"
}
This is an example of a failed API response caused by factors such as an insufficient wallet balance, an incorrect API key, missing POST fields and so on.
{
"Status": "failed",
"status": "fail",
"message": "Insufficient wallet balance",
}
network: This identifies the specific network for which the user is purchasing data. The network post field is represented by the numbers 1, 2, 3, or 4: 1 indicates MTN, 2 indicates GLO, 3 indicates 9Mobile, and 4 indicates Airtel. For the complete list of Sandbox Vtunaija Network IDs and Plan IDs, check the API Documentation Page 1.
mobile_number: This is the phone number for which the user wants to purchase data. On Sandbox environment the mobile number must be 08011111111 any other mobile number that is not 08011111111 the data purchase request will fail.
Ported_number: This field is used to bypass the mobile number validator. Setting this field to 'true' means the validator is bypassed, while 'false' means it is not bypassed. This field is optional and defaults to 'true' if not provided during API data integration.
request-id: This is the unique ID you send as the Request ID.
plan: This is the particular data plan that the user wants to buy. The data plans are represented by Plan IDs. For the complete list of Sandbox Vtunaija Network IDs and Plan IDs, check the API Documentation Page 1.