NEA Billing Public API
Fetch NEA branches, monthly consumed units, bills and payment history from one Cloudflare-hosted service. No API key or login is required.
Base URL:
GET/api/v1/branches
Returns the current NEA branch directory. Use the branch’s string id in lookup requests. Damauli DC is 241.
POST/api/v1/readings
Send Content-Type: application/json with these five fields. Dates use Gregorian ISO format; statement period labels use Nepali BS.
| Field | Value |
|---|---|
consumerId | Consumer ID as a string |
scNo | Service connection number, including separators |
branch | NEA branch ID as a string |
from | Starting date: YYYY-MM-DD |
to | Ending date: YYYY-MM-DD |
Example identifiers below are placeholders. Replace them with details for a connection you are authorized to query.
JavaScript / browser
Reading the response
account: NEA account details checked against the requested ID and SC number.records: original statement rows, including bills, VAT, arrears, receipts and advance/balance information.summary.months: monthly consumed units and payable breakdowns.summary.consumption: total reported units, reporting coverage and first/last reported month.summary.statementGroups: each NEA section, its original subtotal and reconciliation result.summary.balanceRecords: advance/balance rows kept outside billed and paid totals.summary.totalsandsummary.sourceTotals: billing/payment totals reconciled with their matching section controls.fetchedAtandrange: lookup time and requested date range.
Missing consumed units remain null, not zero. Amounts are NPR. Preserve recorded VAT and payable amounts rather than calculating a universal 13% addition. Payment receipts are counted once; shared receipts are not assigned arbitrarily to monthly bills. Previous/current cumulative meter readings are not exposed by the upstream portal.
Limits and errors
Data endpoints allow approximately 30 requests per minute per client IP per Cloudflare location. The web app and public API share the limit. Clients behind the same network share capacity. Health, documentation, specification and CORS preflight requests do not count. No customer statements are saved or cached.
Lookup bodies are limited to 4 KB, date ranges to approximately three years, and NEA requests time out after 25 seconds. Browser cross-origin requests are supported without cookies.
| Status | Meaning |
|---|---|
| 400 | Invalid JSON or account/date input |
| 404 / 405 | Unknown endpoint / wrong method |
| 413 / 415 | Body too large / JSON Content-Type required |
| 429 | Rate limit reached; wait the Retry-After seconds |
| 502 | NEA failed, account could not be verified, or statement totals changed |
| 503 | Request limiting temporarily unavailable |
Public errors include error, code and requestId. The X-Request-ID response header identifies the request. A successful health response checks this API, not NEA’s availability.