API reference

Nine endpoints. One header.

Every requesthttp
Authorization: Bearer <your-api-key>
Content-Type: application/json
EnvironmentBase URL
Productionhttps://api.getelectric.ng/api/v2
Staginghttps://stagingapi.getelectric.ng/api/v2

Live and test are not separate hosts. Your key decides which mode you are in.

The endpoints

EndpointWhat for
GET/reseller/meWho the key belongs to, and its mode
POST/reseller/meters/verifyCheck an electricity meter
POST/reseller/targets/verifyCheck a cable TV smartcard
POST/reseller/ordersBuy something
GET/reseller/ordersYour recent orders
GET/reseller/orders/{reference}One order
GET/reseller/catalogue/servicesWhat you can sell
GET/reseller/catalogue/services/{service}/providersWho sells it
GET/reseller/catalogue/providers/{provider}/plansTheir plans and prices

Plus one webhook we send you, order.settled.

Everything shares one envelope

Every responsejson
{
  "success": true,
  "status": "success",
  "code": 200,
  "message": "OK",
  "data": { }
}

code is the HTTP status repeated, not an error code. There are no error codes. Errors explains what that means for your error handling.

Every response carries X-Request-Id. Log it.

Only one call spends money

Place an order. Everything else is a read.

That endpoint is also the only one with idempotency to understand, the only one that can return a failure with a body, and the only one allowed your whole in-flight budget. If you read one reference page properly, read that one.

This reference is generated

These pages come from the same contract the service is tested against, and a test fails the build if the two disagree: an endpoint cannot ship undocumented, and a documented endpoint cannot vanish. So if a page here disagrees with what the API did, that is a bug worth reporting rather than a stale page.

Every page is also available as markdown, at the same address with .md on the end, and the index lists them all. Point your own tools at those.