Skip to main content
Powering SA prepaid since 2003 / No monthly fees, ever
SIMcloud bulk airtime and data recharge platform

Data API

The Data API lets your app offer mobile data bundles and order one for a recipient. Read the current catalogue for the chosen network before ordering. After a recharge is queued, check its status with the original request ID.

On this page

GET /api/data.php · POST /api/data.php

Open the API reference

List data products

GET without an order identifier lists the configured data catalogue. Use products=1 and optionally network. Look up the current sellvalue for the recipient’s network before ordering. Each product includes its network, amount and bundle description.

GET /api/data.php

curl -4 -sS -i "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/data.php" \
  -H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
  --get \
  --data-urlencode 'products=1' \
  --data-urlencode 'network=vodacom'

HTTP 200 response excerpt

{
  "status": "success",
  "service": "data"
}

Place a data order

Send msisdn, the published network code, amount matching an active bundle’s sell value, and your reference. The example uses R25 as a synthetic catalogue value. Check the current catalogue for the value you intend to send. The API also accepts sellvalue as an alias for amount. Save request_id on HTTP 201.

  1. A duplicate within the five-minute window can return 409. Check the earlier request before resubmitting.
  2. If the current bundle or amount is rejected, refresh the catalogue. Balance errors can include required_balance and available_balance.

POST /api/data.php

curl -4 -sS -i -X POST "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/data.php" \
  -H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{
  "msisdn": "YOUR_LOCAL_CELL",
  "network": "pd-vodacom",
  "amount": 25,
  "reference": "DOCS-DATA-01"
}'

HTTP 201 response excerpt

{
  "status": "success",
  "service": "data",
  "queue_status": "queued"
}

Query a data order

Set SIMCLOUD_DATA_ID to the request_id from placement, or query by the allocated orderno. Without either identifier the endpoint returns the catalogue. Check for delivered or failed before treating the recharge as final.

GET /api/data.php

curl -4 -sS -i "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/data.php" \
  -H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
  --get \
  --data-urlencode "request_id=$SIMCLOUD_DATA_ID"

HTTP 200 response excerpt

{
  "status": "queued"
}