// rest api v1
API DOCUMENTATION
The GreenLabCalc REST API supports authenticated operational-footprint, assessment, and Product Carbon Footprint integrations. All endpoints are documented below with examples. Download the OpenAPI 3.1 specification at /api/v1/openapi.json.
Discover lab types and activities
Call public GET /lab-types, then use an authorised key for GET /activities to explore the built-in catalog.
Create an API key
Generate an API key in the web app under 'API Keys'. Save it securely.
Run a calculation
POST /calculations with a lab type, occupants, evidence-graded entries, and optional maturity inputs. Receive carbon, water, waste, cost, Carbon Footprint Score, separate maturity score, evidence grade, and uncertainty.
Persist assessments
POST /assessments to save calculations for progress tracking and historical comparison.
Batch operations
POST /calculations/batch to evaluate multiple scenarios in a single request (up to 50).
Integrate securely
Use the API from an approved server-side application or agent with a user-issued key. Never expose a key in browser code or an untrusted prompt.