GreenLedger API
Push activity data from your ERP, utility bills or scripts, and read your verified carbon position. Every record is calculated with the factor valid on its activity date and anchored on-chain.
Authentication
Create a token under Profile → API Tokens and send it as a bearer header.
Tokens carry read or read + write access,
scoped to your company. Requests are rate-limited to 60/minute.
curl https://greenledger.zincirx.com/api/v1/summary \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Accept: application/json"
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/me | Token owner + company profile. |
| GET | /api/v1/summary | Carbon position: gross/net, Scope 1–3, dual Scope 2 (location + market YTD), projection, data quality. |
| GET | /api/v1/activities | Accepted activity types with units, factors, GWP basis. |
| GET | /api/v1/emissions | Paginated entries. Filters: from, to, scope, activity_type, status, per_page. |
| GET | /api/v1/emissions/{id} | One entry, incl. record hash, tx hash and explorer URL. |
| POST | /api/v1/emissions | Record activity data (write tokens). CO₂e is computed server-side and the record is queued for on-chain anchoring. |
| POST | /api/v1/emissions/bulk | Batch write, up to 500 entries per call as {"entries": [...]} — all-or-nothing with per-row validation errors. |
Webhooks
Configure endpoints under Profile → Webhooks to receive HMAC-signed POSTs on
entry.verified, report.ready and report.anchored. Verify each delivery by
recomputing sha256 HMAC(raw body, your signing secret) and comparing it to the
X-GreenLedger-Signature header. Endpoints auto-disable after 20 consecutive failures.
Recording an emission
curl -X POST https://greenledger.zincirx.com/api/v1/emissions \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"activity_type": "electricity",
"quantity": 12500,
"occurred_on": "2026-07-31",
"description": "July grid consumption"
}'
The response includes the computed co2e_kg (using your country's grid factor when available),
the canonical record_hash, and — once anchored — the transaction hash you can check on the
public verification page.