Skip to content
API Documentation

Datamax API Documentation

Base URL

https://yourdomain.com/wp-json/datamax/v1/order

Authentication

  • Header: X-API-Key: YOUR_API_KEY
  • Query param: ?api_key=YOUR_API_KEY

Endpoint: Create Order

POST /wp-json/datamax/v1/order

Required Parameters

ParameterTypeDescription
networkstringmtn or airteltigo
volumestringVolume identifier (e.g., 1GB)
customer_numberstringRecipient's phone number

Example Request

{
  "network": "mtn",
  "volume": "1GB",
  "customer_number": "0240000000"
}

Sample cURL

curl -X POST https://yourdomain.com/wp-json/datamax/v1/order \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "network": "mtn",
        "volume": "1GB",
        "customer_number": "0541234567"
      }'

Successful Response

{
  "status": "success",
  "message": "Order created",
  "order_id": 397
}

Error Responses

CodeMessage
400Missing required parameters
401Invalid or missing API key
404Product not found
429Rate limit exceeded (max 10 reqs/min)
500Internal server error

Rate Limiting

Maximum 10 requests per minute per API key.

Your API KEY

Please log in to view your API key.