Export API
The Smart Tech App provides a RESTful API for programmatic access to meter data export functionality.
Base URL
https://app.smart-tech.live/api/v1
Authentication
The API supports two authentication methods:
API Token Authentication
Authorization: Token YOUR_API_TOKEN
Session Authentication
For browser-based testing, you can login via the web interface and access the API directly.
API Reference
For complete API documentation with interactive testing, visit: https://app.smart-tech.live/api/docs
Export Endpoints
Monthly Export API
Simple API for programmatic export of monthly meter readings.
Endpoint: POST /export/monthly/
Request Body:
{
"uuids": ["meter-uuid-1", "meter-uuid-2"],
"month": "2024-01"
}
Response:
{
"month": "2024-01",
"timestamp": "2024-01-15T14:30:22.123456Z",
"data": [
{
"uuid": "meter-uuid-1",
"name": "Main Building Electricity",
"media": "electricity",
"values": {
"active": {
"value": 1500.25,
"timestamp": "2024-01-31T23:45:00Z",
"status": "ok",
"days_before_period": 0
},
"reactive": {
"value": 125.5,
"timestamp": "2024-01-31T23:45:00Z",
"status": "ok",
"days_before_period": 0
}
},
"status": "ok"
},
{
"uuid": "meter-uuid-2",
"name": "Main Building Water",
"media": "water",
"values": {
"volume": {
"value": 2500.75,
"timestamp": "2024-01-29T10:30:00Z",
"status": "early",
"days_before_period": 2
}
},
"status": "early"
}
],
"summary": {
"total_requested": 2,
"successful": 2,
"missing": 0,
"unauthorized": 0
}
}
Key Features:
- Automatic Value Export: All available values for each meter type are exported
- Media-Specific Values:
- Electricity:
active,reactive - Heat:
heat_kwh,heat_gj(both units automatically included) - Water:
volume - Permission-Aware: Respects user/token concentrator permissions
- Bulk Processing: Efficient processing for large UUID lists
Error Responses
All endpoints return standard HTTP status codes with error details:
{
"error": {
"code": "INVALID_DATE_RANGE",
"message": "Date range cannot exceed 90 days",
"details": {
"maxDays": 90,
"requestedDays": 120
}
}
}
Common error codes:
INVALID_API_TOKEN: Authentication failedINVALID_MONTH_FORMAT: Month format validation errorMETER_NOT_FOUND: Specified meter UUID not foundINSUFFICIENT_PERMISSIONS: User lacks required permissions
Examples
For practical implementation examples, see:
- Python Examples - Complete Python integration examples
- Node.js Examples - JavaScript/Node.js implementation examples
- cURL Examples - Command line examples for testing and automation