Nabola Developer API
Build integrations with Nigeria's leading waste-to-cash platform.
The Nabola API allows verified partners to access platform data, create waste logs, query machine locations, and retrieve analytics. All API access requires a partner account approved by the Nabola team.
Authentication
All API requests must include your API key in the X-API-Key header.
curl -H "X-API-Key: nbl_your_api_key_here" \
https://bybimport.com/nabola.bybimport.com/public/api/v1/stats
Alternatively, pass it as a query parameter (not recommended for production):
https://bybimport.com/nabola.bybimport.com/public/api/v1/stats?api_key=nbl_your_api_key_here
Base URL
https://bybimport.com/nabola.bybimport.com/public/api/v1
All endpoints are relative to this base URL. The API returns JSON responses.
Error Handling
The API uses standard HTTP status codes. All error responses include an error field.
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request — invalid parameters |
| 401 | Unauthorized — missing or invalid API key |
| 403 | Forbidden — insufficient permissions |
| 404 | Not Found |
| 422 | Validation Error |
| 429 | Rate Limit Exceeded |
| 500 | Server Error |
// Error response example
{
"error": "Permission denied. Your key does not have 'read_waste' access."
}
Rate Limits
API requests are limited to 60 requests per minute per API key. Rate limit headers are included in every response:
X-RateLimit-Remaining: 58
X-Nabola-Version: 1.0
Health Check
Check if the API is online.
{
"status": "ok",
"version": "1.0",
"service": "Nabola API",
"time": "2026-04-07T10:00:00+01:00"
}
Partner Info
Returns information about the authenticated partner account.
{
"success": true,
"data": {
"company_name": "EcoTech Nigeria",
"company_type": "tech",
"status": "active",
"permissions": ["read_stats", "read_machines"],
"api_calls": 1247,
"last_used": "2026-04-07T09:45:00+01:00",
"member_since": "2026-04-01"
}
}
Platform Stats
Returns real-time platform statistics.
{
"success": true,
"data": {
"total_users": 12500,
"total_waste_logs": 48000,
"confirmed_pickups": 32000,
"total_kg_recycled": 98500.5,
"total_co2_saved": 246251.25,
"active_machines": 5,
"timestamp": "2026-04-07T10:00:00+01:00"
}
}
Machines
Returns a paginated list of active Nabola recycling machines.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| state | string | optional | Filter by Nigerian state |
| lga | string | optional | Filter by LGA |
| page | integer | optional | Page number (default: 1) |
curl -H "X-API-Key: YOUR_KEY" \
"https://bybimport.com/nabola.bybimport.com/public/api/v1/machines?state=Lagos"
Waste Logs
Returns paginated waste logs. Requires read_waste permission.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | optional | pending, confirmed, rejected |
| from | date | optional | Start date (YYYY-MM-DD) |
| to | date | optional | End date (YYYY-MM-DD) |
| per_page | integer | optional | Results per page (max: 100) |
Create Waste Log
Creates a new waste log for a registered Nabola user.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| user_email | string | required | Email of registered Nabola user |
| waste_category | string | required | plastic, metal, glass, organic, electronic, mixed |
| weight_kg | number | required | Weight in kilograms (min: 0.1) |
| address | string | required | Collection address |
| notes | string | optional | Additional notes |
curl -X POST \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"user_email":"user@example.com","waste_category":"plastic","weight_kg":2.5,"address":"123 Lagos Street"}' \
https://bybimport.com/nabola.bybimport.com/public/api/v1/waste-logs
Users
Look up a Nabola user by email address.
curl -H "X-API-Key: YOUR_KEY" \
https://bybimport.com/nabola.bybimport.com/public/api/v1/users/user@example.com
Analytics
Returns daily recycling analytics and state-level breakdowns.
| Parameter | Type | Description |
|---|---|---|
| days | integer | Number of days to look back (max: 90, default: 30) |
Permissions
| Permission | Description |
|---|---|
| read_stats | Access platform statistics and analytics |
| read_machines | Access machine directory (included by default) |
| read_waste | Read waste logs and pickup data |
| create_waste | Create new waste logs for users |
| read_users | Look up user profiles by email |
Webhooks
Configure a webhook URL in your partner dashboard to receive real-time events. Nabola will send a POST request to your URL when events occur.
Event Types
| Event | Description |
|---|---|
| waste_log.confirmed | A waste pickup has been confirmed |
| waste_log.created | A new waste log was submitted |
| user.registered | A new user joined the platform |
// Webhook payload example
{
"event": "waste_log.confirmed",
"timestamp": "2026-04-07T10:00:00+01:00",
"data": {
"id": 1234,
"user_email": "user@example.com",
"weight_kg": 2.5,
"coins_earned": 50,
"status": "confirmed"
}
}
SDKs & Examples
JavaScript / Node.js
const response = await fetch('https://bybimport.com/nabola.bybimport.com/public/api/v1/stats', {
headers: { 'X-API-Key': 'nbl_your_key_here' }
});
const data = await response.json();
console.log(data.data.total_users);
Python
import requests
headers = {'X-API-Key': 'nbl_your_key_here'}
r = requests.get('https://bybimport.com/nabola.bybimport.com/public/api/v1/stats', headers=headers)
print(r.json()['data']['total_kg_recycled'])
PHP
$ch = curl_init('https://bybimport.com/nabola.bybimport.com/public/api/v1/stats');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: nbl_your_key_here']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
echo $data['data']['total_users'];
Support
For API support, partnership inquiries, or to report issues:
- Email: nabolaafrica@gmail.com
- Telegram: @i_usenabola
- Website: nabola.bybimport.com