Skip to content

API

A documented, versioned REST API. The website uses the same records.

Access

Every request needs an API key in the X-API-Key header. Keys are issued by the platform administrators, with a daily limit by tier. Public keys return approved information only. Partner keys, issued under a data-sharing agreement, also return records that are awaiting review, marked as such. Reporter names and contact details are never returned.

The full, testable reference is the OpenAPI (Swagger) page at /api/docs on the API address. Paths are shown there relative to /api/v1. Lists are paged with page and limit and return data and meta.

Main endpoints

API endpoints
MethodPathWhat it returns
GET/api/v1/waste-sitesMapped waste locations. Filter by lga, ward, bbox, from, to, category, verification, source, setting, risk, minVolume, maxVolume.
GET/api/v1/waste-sites/{id}One site with its observations, verification history, sources, approved photos and collection history.
GET/api/v1/waste-observationsTime-stamped observations. Every estimate has its basis, method, confidence and time.
GET/api/v1/collection-pointsCollection points, marked official or not and checked or not.
GET/api/v1/hotspotsCalculated groups of sites, ranked for attention.
GET/api/v1/analyticsApproved summary statistics.
POST/api/v1/reportsSubmit a new observation. It enters the review queue as unverified.
GET/api/v1/correctionsCorrection history of a site, collection point or facility: every change with the old and new value, when, by which role and why. Use table and recordId.
GET/api/v1/waste-sites/historyReview decisions, moves and status changes of the sites on the map, for replaying how the map changed.
POST/api/v1/feeds/collection-eventsPartner keys only. Send collection, transport, transfer, treatment and disposal events. See "Sending data" below.
POST/api/v1/feeds/vehicle-positionsPartner keys only. Send GPS positions of collection trucks.

Also: spatial questions under /spatial, journeys under /journeys, and CSV or GeoJSON downloads under /export.

Examples

curl "https://YOUR-API-ADDRESS/api/v1/waste-sites?lga=Obio-Akpor&verification=FIELD_VERIFIED&limit=20" \
  -H "X-API-Key: YOUR_KEY"
{
  "data": [{
    "id": "c4642d4c-b56a-42c1-940d-a1f0314a4e7b",
    "latitude": 4.8901, "longitude": 6.9001,
    "verification": "FIELD_VERIFIED",
    "category": "PLASTIC", "setting": "DRAIN", "risk": "elevated",
    "lga": "Obio-Akpor", "communityName": "Choba",
    "lastObservedAt": "2026-10-31T07:10:47.000Z",
    "latestObservation": {
      "volumeM3": 4,
      "provenance": { "volume": {
        "basis": "FIELD_ESTIMATE",
        "method": "Length times width times height, halved for the shape of a heap",
        "confidence": "LOW", "at": "2026-10-31T07:10:47.275Z" } }
    }
  }],
  "meta": { "page": 1, "limit": 20, "total": 1, "view": "public" }
}

Submitting returns an id and an upload token. Send each photo to POST /reports/{id}/evidence with the token in the X-Upload-Token header.

curl -X POST "https://YOUR-API-ADDRESS/api/v1/reports" \
  -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{ "setting": "DRAIN", "latitude": 4.8901, "longitude": 6.9001,
        "description": "Plastic bottles blocking the drain", "consentToUse": true }'

Sending data (collection operators and partners)

Operators can send their collection records and truck positions from their own systems with a partner key. Events with the same trip become one waste journey. Stages must move forward in time, and every stage after the first needs evidence, such as a weighbridge ticket number. Each row is accepted or rejected on its own, with the reason.

Give every event your own unique reference. A reference already received is skipped, so a request that failed halfway can be sent again in full. Add ?dryRun=true to check a request without saving it. Up to 500 events or 2,000 positions a request.

curl -X POST "https://YOUR-API-ADDRESS/api/v1/feeds/collection-events?dryRun=true" \
  -H "X-API-Key: YOUR_PARTNER_KEY" -H "Content-Type: application/json" \
  -d '{ "events": [
    { "reference": "RIW-2026-11-07-0412-A", "trip": "TRIP-0412", "stage": "COLLECTION",
      "occurredAt": "2026-11-07T07:00:00+01:00", "latitude": 4.84, "longitude": 6.97,
      "placeName": "Rumuokoro market", "quantityKg": 3200, "vehicle": "RV 123 PHC" },
    { "reference": "RIW-2026-11-07-0412-B", "trip": "TRIP-0412", "stage": "FINAL_DISPOSAL",
      "occurredAt": "2026-11-07T09:00:00+01:00", "placeName": "Eneka dumpsite",
      "quantityKg": 3150, "quantityBasis": "MEASURED", "evidence": "Weighbridge ticket 4471" }
  ] }'
{
  "received": 2, "accepted": 2, "duplicates": 0, "rejected": [],
  "journeys": [{ "trip": "TRIP-0412", "journeyId": "8f0c…", "created": true }],
  "note": "A journey shows the last known stage of the waste. It is not live tracking.",
  "dryRun": true
}

Truck positions go to POST /feeds/vehicle-positions as a list of vehicle (plate number), at, latitude and longitude. The map shows the last reported position. It is not live tracking.

Reading provenance

Each estimate has a basis: MEASURED, OFFICIAL, FIELD_ESTIMATE or AI_PREDICTION, a method, a confidence and a time. Do not treat a FIELD_ESTIMATE or AI_PREDICTION as a measurement. Records carry a verification of UNVERIFIED, CORROBORATED or FIELD_VERIFIED. Spatial figures show association, not cause.