Skip to main content

Employees API

The Employees API allows you to create, retrieve, update, and delete employee records for tracking commuting patterns and calculating Scope 3 Category 7 (Employee Commuting) emissions. Each employee can have multiple commuting periods with detailed transport information for accurate CO2e calculations.
GHG Protocol Scope 3 Category 7Employee commuting covers emissions from transportation of employees between their homes and worksites. This API helps you collect and manage the data needed for accurate Category 7 reporting.

Key Features

  • Employee Management: Create and manage employee records with contact information
  • Commuting Periods: Track multiple commuting patterns per employee over time
  • Transport Modes: Support for cars, public transit, cycling, walking, and remote work
  • CO2e Calculation: Automatic emissions calculation based on distance, transport mode, and frequency
  • Survey Integration: Send surveys to employees to collect commuting data
  • Bulk Upload: Import employee data via CSV for large organizations
  • Pagination Support: Efficiently retrieve large employee lists

Authentication

All endpoints require authentication using an API key included in the x-api-key header.

Headers

All requests must include:
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef

Available Endpoints

Employees

List Employees

Retrieve all employees with filtering and pagination

Get Employee

Get a specific employee by ID

Create Employee

Add a new employee to your organization

Update Employee

Modify employee details

Delete Employee

Remove an employee from your organization

Survey Templates

List Templates

Get all survey templates for your organization

Create Template

Create a customizable survey template

Clone Template

Duplicate an existing template

Set Default

Set a template as the organization default

Commuting Periods

List Commuting Periods

Get commuting periods for an employee

Create Commuting Period

Add a new commuting period

Update Commuting Period

Modify commuting period details

Delete Commuting Period

Remove a commuting period

Data Model

Employee Object

The employee object contains basic employee information:

Employee Attributes

Commuting Period Object

Commuting periods track how an employee commutes during a specific time range:

Transport Types

Fuel Types

Vehicle Sizes (Cars Only)

Weekly Travels

The weekly_travels field is an array of integers representing which days the employee commutes: Examples:
  • [0, 1, 2, 3, 4] - Monday to Friday (5-day week)
  • [1, 3] - Tuesday and Thursday only (hybrid)
  • [] - Fully remote (telecommuting)

CO2e Calculation

Emissions are calculated using the formula:
  • Distance: One-way distance from home to work (total_km)
  • Working Days: Calculated from weekly_travels and date range
  • Daily Trips: Number of round trips per day
  • Emission Factor: Based on transport type, fuel, and vehicle size (from Ecoinvent database)
  • Carpool Factor: If carpool: true, emissions are divided by 3

Workflow

Tracking Employee Commuting

  1. Create Employee: Add employee with name or email
  2. Create Commuting Period: Define the commuting pattern for a date range
  3. Query Emissions: Retrieve employee with periods to see calculated CO2e

Using Surveys

  1. Upload Employees via CSV: Bulk create employees with email addresses
  2. Send Survey: Use the resend-survey endpoint to collect commuting data
  3. Review Results: Employees fill in the survey, creating commuting periods automatically

Error Handling

Common HTTP Status Codes

Error Response Format

Use Cases

Track Office Commuting

Monitor CO2e emissions for employees commuting to the office:

Calculate Category 7 Totals

Sum up all employee commuting emissions:

Employee Commuting Guide

Complete tutorial for tracking Scope 3 Category 7 emissions

GHG Protocol Tutorial

Learn about GHG Protocol and emissions tracking

Authentication Guide

Learn how to authenticate API requests

Vehicles API

Track company fleet emissions (Scope 1)

MCP Tools

Query employee data from AI assistants via MCP