Documentation
EN
Sign in
GRID-IN · Documentation · printed 03.12.2026

API

GRID-IN · 03.12.2026

Contents

API

A REST API for the distribution company’s systems: metering (AMI), billing, customer portal. Data are uploaded and collected without manual exports. Permissions are the same as in the workspace: an account sees only its own organisation’s projects.

Full description for developers (OpenAPI 3): /api/v1/openapi.yaml. Change log: /api/v1/changelog. Metering point registry template with an example: xlsx, csv — accepted by upload as is. Meter profile template: csv, xlsx. A one-substation sample that is accepted and calculated: registry, one week of profiles.

Connection

  • base URL: https://gridinspector.com/api/v1 (or https://gridinspector.ru/api/v1);
  • JSON in UTF-8; files as multipart/form-data;
  • sign-in with the login and password of an account issued by GRID-IN; the response contains a token, passed in the header Authorization: Bearer <token>;
  • for a program that runs unattended — a service key (POST /keys): no expiry, independent of the password, can be revoked at any time;
  • browser requests from a customer website — from origins agreed at connection;
  • API revision — the date of the latest change: header X-API-Revision in every response; when it changes, the change log has a new entry;
  • errors — a code in the error field and an HTTP status: 400 bad request, 401 not signed in, 404 not found, 405 wrong request method, 409 not possible now (e.g. no contract), 429 too many failed sign-ins; a readable text is in the message field;
  • after a dropped connection a request can be repeated safely: the Idempotency-Key header on project creation, upload and calculation start returns the first request’s response — no second upload, no second charge; your own request id — header X-Client-Request-Id, returned in the history;
  • when to ask about a task again — header Retry-After; times are also given with a time zone (…_tz fields).

Requests

RequestWhat it does
POST /sessionsign in: {"login", "password"} → {"token", "expires_in", "user"}
GET /methe signed-in account: login, name, role
GET /projectsthe organisation’s projects
POST /projectscreate a project: {"name", "name_en"}
GET /projects/{id}project: substations with data periods, number of the latest calculation
POST /projects/{id}/filesupload files (field file, several allowed) → an ingest task per file
GET /tasks/{id}task status: queued, running, done, failed; progress (progress, stage); what was recognised in the file and which substation it belongs to
GET /projects/{id}/uploadsuploads of the project: file, format, when received; DELETE …/uploads/{upload} — delete an upload (kept in GRID-IN deleted items, can be restored through the administrator)
POST /projects/{id}/runrun a calculation → a task. An empty body — all substations for the whole period, as before; optionally — selected substations (substations) and a period (period_from, period_to)
GET /projects/{id}/runsfinished calculations: period, what was requested, whether new data were uploaded afterwards
GET /projects/{id}/runs/{run}calculation summary per substation: supply, consumption, losses; with a network scheme — technical and non-technical
GET /projects/{id}/taskstask history of the project: uploads and calculations
GET /projects/{id}/runs/{run}/targetsfield targets in priority order
GET /projects/{id}/metersall metering points of the project: substation, meter number, supply or consumer, address, coordinates
GET /projects/{id}/meters/{meter}/readingsreadings of a metering point for a period (from, to): time and average power per interval, kW — as uploaded
GET /contractcontract: term, volume and remaining metering points; whether uploads and calculations are possible now
PUT /webhookaddress for task completion notifications (https only); GET, DELETE — view, switch off
POST /keys, GET /keys, DELETE /keys/{id}service keys: issue, list, revoke

Creating projects, uploading and deleting files, running calculations, issuing keys and setting notifications require the manager role; inspectors have read access. Lists are returned in full, readings — for the requested period.

Field target

FieldMeaning
priorityposition in the visit order
substation, possubstation
targettarget key
meter, labelmeter number and its name
address, lat, lonaddress and coordinates
kindtarget type: theft — unmetered consumption, extra — meter of another substation, fault — fault, past — irregularity in an earlier period, not repeated in the latest one
categoriesfinding codes for the target
probabilityprobability of confirmation, %, where measured
confidenceconfidence: high, medium, low
unaccounted_kwh, metered_kwhestimated unmetered and metered energy for the period, kWh

Notifications

  • when an upload or a calculation finishes, a POST is sent to the address set with PUT /webhook: {"event": "task_finished", "task", "kind", "project", "status", "run", "error", "at"};
  • signature — header X-GridIn-Signature: sha256=… (HMAC-SHA256 of the body with the secret issued when the address was set): it proves the notification came from GRID-IN;
  • one attempt, no retries; a missed one is visible in the project task history.

Coordinates and readings

  • coordinates — for metering points and targets; WGS84, fields lat (latitude) and lon (longitude);
  • source of coordinates — field precision: house — the meter point, address — by address, settlement — centre of the settlement; coordinates may be absent;
  • readings are returned as uploaded, nothing is calculated: average power per interval, kW; the time stamp is the end of the interval; the substation series is the readings of its supply meter (input: true).
  • no supply meter data — the calculation still runs: without the balance, with findings from billing, meter event logs and meter faults.

Typical sequence

  1. POST /session — get a token;
  2. POST /projects/{id}/files — send the export; wait for the tasks via GET /tasks/{id}: a result for every file, with the file id and the uploads it produced;
  3. GET /projects/{id}/readiness — check whether a calculation is possible: substation coverage by readings, how many metering points it would charge, data revision; calculates and charges nothing;
  4. POST /projects/{id}/run — run a calculation (with the data revision from the check); wait for the task (or the notification), the calculation number is in result.run;
  5. GET /projects/{id}/runs/{run} — balance and losses per substation;
  6. GET /projects/{id}/runs/{run}/targets — collect the targets;
  7. GET /projects/{id}/meters and …/readings — points for the map and charts.

API access is issued together with the organisation’s account.