1app
Create Boldd AccountLogin
  • Introduction
  • Authentication
  • Balance
  • Get Exchange Rate
  • Response Code
  • RECEIVE PAYMENTS
    • Payments
      • Initialize Payment
      • Verify Payment
      • Payment List
      • Payment Details
    • Inline/Popup Checkout
    • Payouts / Settlements
      • Payouts List
      • Settlement Transactions
    • Dispute Management
      • Fetch Disputes
      • Accept a Dispute
      • Decline a Dispute
    • Customers List
    • Webhook Notifications
    • Repush Notification
  • Virtual Accounts
    • Get Available Banks
    • Setup Preferred Bank
    • Generate Account
    • Virtual Account List
    • Account Transactions
    • Virtual Account Webhook
      • Notifications history
  • MAKE PAYMENTS
    • Airtime Purchase
    • Send Money
      • Verify Account Number
      • Make Transfer
    • Data Purchase
      • Data Plans
      • Data Bundle
    • Electricity
      • Electricity Billers
      • Verify Meter Number
      • Vend Electricity
    • Cable TV
      • Cable TV List
      • Verify IUC
      • Vend CableTv
    • Bank List
    • Payment Status
  • CUSTOMERS
    • Create Customer
  • VIRTUAL CARDS
    • Create Card Account
    • Cards Issuance
    • Card Funding
    • Card Transactions
    • Get all Cards
    • Cards Details
    • Cards Pan
    • Freeze and Unfreeze Card
  • USD Account
    • Create USD Account
  • IDENTITY
    • BVN Check
    • NIN Checks
  • SUB-ACCOUNTS
    • Create a Sub-Account
    • Attach Bank to a Sub-Account
    • Attach Payout Account
    • Get All Sub-Accounts
    • Sub-Accounts History
    • Sub-Accounts Wallet
  • Miscellaneous
    • Create Wallet
    • Universal Blacklist
  • Contact
    • Contact Us
Powered by GitBook
On this page
  • Data Plans
  • Sample Response

Was this helpful?

  1. MAKE PAYMENTS
  2. Data Purchase

Data Plans

Get Data Bundle Plans

Data Plans

GET {{base_url}}/getdataplans

Headers

Name
Type
Description

authorization*

PUBLIC KEY

Set value to Bearer PUBLIC_KEY

Request Body

Name
Type
Description

provider*

Network Provider e.g. MTN, AIRTEL, GLO, 9MOBILE

datatype

String

Pass data as direct or sme to get Direct data or SME plans respectively.

When nothing is passed, SME data plans would be returned

{
    "status": true,
    "message": "Data Plans Retrieved",
    "data": [
        {
            "pname": "MTN 1.0GB/30days",
            "price": 260,
            "datacode": "1000",
            "point": "1.0"
        },
        {
            "pname": "MTN 1.0GB/30days (SME)",
            "price": 260,
            "datacode": "mtn1000sme",
            "point": "1.0"
        },
        {
            "pname": "MTN 10.0GB/30days",
            "price": 2900,
            "datacode": "10000",
            "point": "10.0"
        }
    ]
}

Take a look at how you might do this:

curl --location --request GET 'https://api.oneappgo.com/v1/getdataplans?provider=MTN' \
--header 'Authorization: Bearer PUBLIC_KEY'
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.oneappgo.com/v1/getdataplans?provider=MTN',
  'headers': {
    'Authorization': 'Bearer PUBLIC_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.oneappgo.com/v1/getdataplans?provider=MTN',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer PUBLIC_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.oneappgo.com/v1/getdataplans?provider=MTN"

payload={}
headers = {
  'Authorization': 'Bearer PUBLIC_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var headers = {
  'Authorization': 'Bearer PUBLIC_KEY'
};
var request = http.Request('GET', Uri.parse('https://api.oneappgo.com/v1/getdataplans?provider=MTN'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

Sample Response

{
    "status": true,
    "message": "Data Plans Retrieved",
    "data": [
        {
            "pname": "MTN 1.0GB/30days",
            "price": 260,
            "datacode": "1000",
            "point": "1.0",
            "dtype": "sme"
        },
        {
            "pname": "MTN 1.0GB/30days (SME)",
            "price": 260,
            "datacode": "mtn1000sme",
            "point": "1.0",
            "dtype": "sme"
        },
        {
            "pname": "MTN 10.0GB/30days",
            "price": 2900,
            "datacode": "10000",
            "point": "10.0"
            "dtype": "direct"
        }
    ]
}
PreviousData PurchaseNextData Bundle

Last updated 1 year ago

Was this helpful?