Skip to main content

List data bundles

GET/airtime/v1/products

Returns the data bundles on sale. Each bundle has an id and a code. Send either one to buy the bundle.

We add and withdraw bundles from time to time. Call this endpoint for the current list instead of hard-coding bundles. Your key needs the Airtime API turned on. See API keys and base URLs. To buy one, see Buy airtime or data.

Query parameters​

  • #carrierstringOptional
    Return bundles for one network only. ORANGE, or LONESTAR for Lonestar Cell MTN. Leave it out for both.
    Example: LONESTAR
  • #typestringOptional
    Return products of this type only. DATA is the only type.
    Example: DATA

Example request​

curl "https://sandbox-api.ponitor.com/airtime/v1/products?carrier=LONESTAR&type=DATA" \
-H "apiKey: $PONITOR_API_KEY"

Responses​

OK. The bundles on sale, each a product object. The list can be empty.

{
"products": [
{
"id": "prod_hceed9ywq1er",
"code": "mtn-data-1-8gb-7d",
"type": "DATA",
"carrier": "LONESTAR",
"name": "Lonestar Cell MTN 1.8GB, 7 days",
"data": "1.8GB",
"validity": "7 days",
"price": 2,
"currency": "USD"
},
{
"id": "prod_p4nzx9xp335h",
"code": "mtn-data-15gb-30d",
"type": "DATA",
"carrier": "LONESTAR",
"name": "Lonestar Cell MTN 15GB, 30 days",
"data": "15GB",
"validity": "30 days",
"price": 9,
"currency": "USD"
}
]
}

These bundles are examples. The bundles and prices on sale are what this endpoint returns.

The product object​

FieldDescription
idThe bundle's ID, prod_ and 12 characters. It never changes, so store it. Send it as productId to buy.
codeA readable code, such as mtn-data-15gb-30d. Lowercase letters, digits and dashes, never an underscore. Send it as productCode to buy, or use it instead of the ID to get the bundle.
typeDATA.
carrierORANGE or LONESTAR (Lonestar Cell MTN). The bundle works only for numbers on that network.
nameA name you can show your customers, such as Lonestar Cell MTN 15GB, 30 days.
dataThe data allowance as text, such as 350MB, 1.8GB or 1TB. 1 GB is 1024 MB.
validityHow long the bundle lasts after it arrives, as text, such as 1 day, 7 days or 30 days.
priceWhat your account is charged, in currency. No added fees.
currencyUSD.