// 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.

1

Discover lab types and activities

Call public GET /lab-types, then use an authorised key for GET /activities to explore the built-in catalog.

2

Create an API key

Generate an API key in the web app under 'API Keys'. Save it securely.

3

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.

4

Persist assessments

POST /assessments to save calculations for progress tracking and historical comparison.

5

Batch operations

POST /calculations/batch to evaluate multiple scenarios in a single request (up to 50).

6

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.

Ready to integrate?

Create an API key in the web app to start making authenticated requests.