API Overview
The Verdantix REST API provides programmatic access to renewable energy monitoring, carbon footprint tracking, and IoT device management. All endpoints return JSON and follow RESTful conventions.
Base URL: https://api.verdantix.com/v2
Authentication
Verdantix API uses Bearer Token authentication. Include your API key in the `Authorization` header for every request.
curl -X GET https://api.verdantix.com/v2/sites \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
Generate keys from the Developer Dashboard. Keys are scoped to specific projects and can be rotated without downtime.
Sites Management
Retrieve a paginated list of all monitored renewable energy sites associated with your account.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results (1-100). Default: 20 |
offset | integer | Skips N results. Default: 0 |
status | string | Filter by: active, offline, maintenance |
{
"data": [
{
"id": "site_8x7k2",
"name": "Sonora Solar Farm",
"type": "solar_pv",
"capacity_mw": 4.2,
"status": "active",
"location": { "lat": 32.5421, "lon": -114.8932 }
}
],
"meta": { "total": 14, "limit": 20, "offset": 0 }
}
IoT Devices
Register a new IoT sensor or meter to the Verdantix telemetry network.
POST /v2/devices/register
{
"site_id": "site_8x7k2",
"device_type": "inverter_monitor",
"firmware_version": "2.1.4",
"metadata": {
"manufacturer": "SolisTech",
"serial_number": "SN-9928471"
}
}
Returns a unique `device_id` and temporary provisioning credentials for edge initialization.
Carbon Analytics
Fetch calculated carbon offset metrics, grid displacement data, and ESG compliance breakdowns for a specific site.
{
"site_id": "site_8x7k2",
"period": "2024-Q3",
"carbon_offset_tons": 1247.5,
"grid_displacement_mwh": 3890.2,
"equivalents": {
"trees_planted": 56.8,
"cars_off_road_years": 274.1
},
"verification": "ISO_14064_compliant"
}
Error Codes
| Code | Meaning |
|---|---|
400 | Bad Request - Malformed JSON or missing required parameters |
401 | Unauthorized - Invalid or expired API key |
403 | Forbidden - Insufficient permissions for this resource |
404 | Not Found - Resource does not exist |
429 | Too Many Requests - Rate limit exceeded (100 req/min) |
500 | Internal Server Error - Please contact support@verdantix.com |
Error responses include a JSON body with `error`, `message`, and `trace_id` for debugging.