RadioMax API Documentation

Version 1.0 | Base URL: https://radiomax.media

Overview

Welcome to the RadioMax API documentation. This API provides access to disbursement data for radio game winners. All API requests require authentication via API key.

Getting Started

Before using the API, you must:

  1. Contact RadioMax to create your developer account
  2. Complete the API registration form
  3. Receive your initial credentials via email

Registration Contact:

📞 Tel: +231 778065593, +231 77708771, +231 555553831

📍 Address: Duazon, Robertsfield Highway
Opposite United Methodist Church, Margibi County, Liberia

API Environments (Base URL)

Environment URL Purpose
Sandbox https://radiomax.media/sandbox Testing with mock data
Production https://radiomax.media Live production data

Sandbox Features

  • Mock data that simulates real API responses
  • No authentication required (use test key: sandbox_1234567890)
  • Higher rate limits (100 requests/minute)
  • Separate test database
  • Sample user ID: sandbox_user_01

Authentication

All API requests must include your API key in the X-API-Key header.

POST

Generate/Refresh API Key

/sandbox/generate-api-key

curl -X GET https://radiomax.media/sandbox/generate-api-key 

/generate-api-key

curl -X POST https://radiomax.media/generate-api-key \
-H "Content-Type: application/json" \
-d '{"user_id": "your_user_id", "password": "your_password"}'

Request Body

Field Type Description
user_id string Your RadioMax user ID
password string Your account password

Response

{
    "message": "API key generated successfully",
    "api_key": "22b2d9ac65fef30e180d3becc32eeee7023f2baf",
    "status": 200
}

API Endpoints

Daily Disbursement Example

GET /api/disbursement/daily

fetch('https://radiomax.media/api/daily/disbursement', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
})

Response

{
    "Montserrado": {
        "total_winner": 12,
        "total_amount": "6,500.00",
        "total_radio_stations": 4,
        "number_of_game": 3
    },
    "Grand Bassa": {
        "total_winner": 5,
        "total_amount": "2,750.00",
        "total_radio_stations": 2,
        "number_of_game": 1
    }
}

Weekly Disbursement Example

GET /api/disbursement/weekly

fetch('https://radiomax.media/api/weekly/disbursement', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
})

Response

{
    "Montserrado": {
        "total_winner": 84,
        "total_amount": "45,200.00",
        "total_radio_stations": 8,
        "number_of_game": 21
    },
    "Sinoe": {
        "total_winner": 18,
        "total_amount": "9,500.00",
        "total_radio_stations": 3,
        "number_of_game": 6
    }
}

Monthly Disbursement Example

GET /api//monthly/disbursement

fetch('https://radiomax.media/api/disbursement/monthly', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
})

Response

{
    "Montserrado": {
        "total_winner": 320,
        "total_amount": "175,000.00",
        "total_radio_stations": 12,
        "number_of_game": 90
    },
    "Nimba": {
        "total_winner": 95,
        "total_amount": "52,300.00",
        "total_radio_stations": 5,
        "number_of_game": 28
    }
}

Disbursement Overview Example

GET /api/disbursement/overview

fetch('https://radiomax.media/api/disbursement/overview', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
})

Response

{
    "Montserrado": {
        "total_winner": 15,
        "total_amount": "75,000.00",
        "total_radio_stations": 3,
        "number_of_game": 5
    },
    "Nimba": {
        "total_winner": 8,
        "total_amount": "40,000.00",
        "total_radio_stations": 2,
        "number_of_game": 3
    }
}

Data Models

Disbursement Response

Field Type Description
county object County name as key
total_winner integer Number of winners
total_amount string Formatted total amount disbursed
total_radio_stations integer Number of participating stations
number_of_game integer Number of games played

Error Codes

Code Message Description
401 API key required Missing X-API-Key header
403 Invalid API key Invalid or inactive API key
404 User not found Invalid user ID in key generation