API Overview
The Verdantix REST API provides programmatic access to your sustainability data, energy metrics, and installation management. Use it to integrate green tech analytics into your applications, automate reporting, and build custom dashboards.
Quick Example
# Fetch latest energy metrics for your account
curl -X GET "https://api.verdantix.com/v1/energy-metrics" \
-H "Authorization: Bearer $VERDANTIX_API_KEY" \
-H "Content-Type: application/json"Authentication
Verdantix uses Bearer Token authentication to authorize API requests. You can generate and manage API keys from your dashboard settings.
Include your API key in the Authorization header of every request:
Authorization: Bearer <your_api_key>
Energy Metrics
Retrieve real-time and historical energy generation and consumption data for your installations.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
installation_id | string | Optional. Filter by specific installation. |
start_date | string | Optional. ISO 8601 date format. |
end_date | string | Optional. ISO 8601 date format. |
interval | string | Optional. hour, day, or month. |
Response
{
"status": "success",
"data": {
"total_generation_kwh": 4528.32,
"total_consumption_kwh": 3102.15,
"net_savings_usd": 682.40,
"renewable_percentage": 76.8,
"timestamp": "2025-01-15T14:30:00Z"
}
}Carbon Reports
Generate a comprehensive carbon footprint report for a specified period. Reports are processed asynchronously and delivered via webhook.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
scope | string | Yes | Scope 1, 2, or 3. Comma-separated allowed. |
period_start | string | Yes | ISO 8601 date. |
period_end | string | Yes | ISO 8601 date. |
format | string | No | Default: json. Options: pdf, csv. |
{
"scope": "1,2",
"period_start": "2024-01-01",
"period_end": "2024-12-31",
"format": "pdf"
}Installations
List all solar, wind, and storage installations registered under your account.
Register a new renewable energy installation.
Remove an installation from your account. This action cannot be undone.
Rate Limiting
API requests are limited to 1,000 requests per hour per API key. Rate limit headers are included in every response:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 847 X-RateLimit-Reset: 1706000000
Error Codes
Verdantix uses standard HTTP status codes to indicate success or failure. Error responses include a JSON body with details:
| Code | Description |
|---|---|
400 | Bad Request - Invalid parameters or malformed JSON |
401 | Unauthorized - Missing or invalid API key |
403 | Forbidden - Insufficient permissions for requested action |
404 | Not Found - Resource does not exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on our end |
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid or has expired.",
"documentation_url": "https://docs.verdantix.com/errors/invalid_api_key"
}
}SDKs & Tools
Official client libraries are available to simplify integration. Community packages are also welcome.
pip install verdantix-pythonNode.js:
npm install @verdantix/sdkOpenAPI Spec: /openapi.json