Overview
The Analytics API provides comprehensive insights into event performance, sustainability metrics, carbon footprint tracking, and trend analysis. Use these endpoints to monitor environmental impact and optimize future events.Authentication
All API requests require an API key to be included in the header:Get Sustainability Metrics
GET /api/analytics/sustainability
Retrieve comprehensive sustainability metrics across all events or filtered by date range.
Query Parameters
Start date for metrics calculation (ISO 8601 format)
End date for metrics calculation (ISO 8601 format)
Comma-separated list of event IDs to include in metrics
Data granularity (“total”, “daily”, “weekly”, “monthly”)
Response
Total carbon footprint metrics
Waste reduction and recycling metrics
Energy usage metrics
Adoption of sustainable practices
Sustainability certifications achieved
Historical trend data (if granularity is not “total”)
Summary statistics
Example
Response Example
Get Event Analytics
GET /api/analytics/events/:id
Retrieve detailed analytics for a specific event.
Path Parameters
The unique identifier of the event
Response
Event identifier
Event name
Attendance metrics
Attendee demographics
Event-specific sustainability metrics
Engagement metrics
Financial metrics
Attendee feedback summary
Example
Get Trend Data
GET /api/analytics/trends
Retrieve trend analysis and comparative metrics across events.
Query Parameters
Metric to analyze (“carbon_emissions”, “attendance”, “waste_reduction”, “energy_usage”, “offset_participation”)
Start date for trend analysis (ISO 8601 format)
End date for trend analysis (ISO 8601 format)
Time granularity (“daily”, “weekly”, “monthly”, “quarterly”)
Filter by event category
Include industry benchmark comparison
Response
The metric being analyzed
Date range of analysis
Time series data points
Statistical analysis
Industry benchmark comparison (if requested)
AI-generated insights and recommendations
Example
Response Example
Error Responses
All endpoints may return the following error responses:Error details
Common Error Codes
| Status Code | Error Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid request parameters |
| 400 | INVALID_DATE_RANGE | Invalid or unsupported date range |
| 400 | INSUFFICIENT_DATA | Not enough data for requested analysis |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | NOT_FOUND | Event not found |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |