Internet Order

This endpoint allows users to place an order to purchase mobile internet data from a specific provider.

Endpoint

POST https://backendapi.sayswitchgroup.com/api/v1/internet/data

cURL Request

curl -X POST https://backendapi.sayswitchgroup.com/api/v1/internet/data \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "MTN",
    "plan_id": 46,
    "number": "07066369927",
    "reference": "2024041521481039"
  }'

Notes

  • Ensure that the reference is unique for each request to avoid duplication.

  • The plan_id must be a valid ID obtained from the internet Plans endpoint.

Sample Response

{
  "success": true,
  "code": "00000",
  "message": "SUCCESSFUL",
  "data": {
    "orderNo": "17485319933161880294374534",
    "reference": "2024041521481039",
    "status": "delivered",
    "errorMsg": "TRANSACTION SUCCESSFUL"
  }
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the request was successful (true or false).
codestringStatus code, where "00000" typically means success.
messagestringA brief message describing the result of the request.
dataobjectContains details about the transaction/order.
orderNostringUnique order number assigned to the transaction.
referencestringThe transaction reference ID sent in the request payload.
statusstringStatus of the order (e.g., "delivered", "failed", "pending").
errorMsgstringA message describing the outcome of the transaction.