# Audit mode (/docs/audits/auditable-reporting) In audit mode, SQUAKE creates an immutable audit log for every calculated item. You can link the audit logs to a legal entity with `audit_for`, using the ID of an [auditable entity](/docs/audits/create-auditable-entity). ## When to use audit mode [#when-to-use-audit-mode] Use audit mode for numbers that are final, and leave it off for anything that can still change. | Use audit mode | Don't use audit mode | | --- | --- | | Flown flights, completed stays and completed trips | Shopping and quotes | | Historical backfills | Draft itineraries | | Invoice reconciliation and true-ups | Forecasts and scenario planning | | Corrections after issuance | Values shown at the point of sale | Calculate a booking without audit mode while it can still change, and calculate it again in audit mode when it's final. Don't carry values calculated before the booking was final into your post-booking reporting. > **Audit logs are immutable** > SQUAKE never changes an audit log after creating it. Audit logs are meant for compliance and verification, so only send final calculations in audit mode. ## Before you start [#before-you-start] Audit logging must be enabled for your account. Contact SQUAKE to enable it. Authenticate with your API key as a Bearer token. ## Step 1: Create an auditable entity (optional) [#step-1-create-an-auditable-entity-optional] An auditable entity is a legal entity you report for, such as a subsidiary. Create one for each legal entity and keep its `id`. See [Create an auditable entity](/docs/audits/create-auditable-entity). ## Step 2: Calculate in audit mode [#step-2-calculate-in-audit-mode] Set `audit: true` on every item you want audited. To link the audit logs to an entity, set `audit_for` at the root of the request body. ```json { "expand": ["items"], "carbon_unit": "kilogram", "distance_unit": "kilometer", "audit_for": "d3427e0d-5a3c-40ce-842e-5552e77caa4f", "items": [ { "audit": true, "type": "flight", "methodology": "DEFRA", "external_reference": "INV-2025-0211-A", "origin": "BER", "destination": "CDG", "booking_class": "economy", "number_of_travelers": 1, "aircraft_type": "7M7", "radiative_forcing_index": true, "sustainable_fuels": { "carbon_reduction_percentage_of_total": 0.25 } } ] } ``` Save the request as `audited-calculation.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/calculations" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @audited-calculation.json ``` About the fields in this example: - `expand: ["items"]` returns the emissions of each item next to the total, including the `audit_id` of each audited item. - `audit_for` links every audit log the request creates to the auditable entity. - Location fields accept IATA or ICAO airport codes, UN/LOCODE, addresses, or latitude and longitude. If you pass `distance_in_km`, it overrides the distance SQUAKE resolves from `origin` and `destination`. - `radiative_forcing_index` applies a multiplier for the effect of emissions at altitude. It defaults to `true` where the methodology supports it. - `sustainable_fuels.carbon_reduction_percentage_of_total` lowers the computed emissions to reflect sustainable fuel use. This reduction isn't part of the current official frameworks. - `energy_scope` isn't set, so it defaults to `wtw` (well-to-wheel). Send `ttw` for tank-to-wheel only. For the fields each methodology accepts, see the [flight methodology guides](/docs/calculations/travel/flight). ### Response (condensed) [#response-condensed] Response 200 OK (application/json): ```json { "carbon_quantity": 81.089, "carbon_unit": "kilogram", "items": [ { "carbon_quantity": 81.089, "carbon_unit": "kilogram", "type": "flight", "methodology": "DEFRA", "external_reference": "INV-2025-0211-A", "audit_id": "0194d6b5-2c41-7d3a-9f10-5b2e8a7c4d61" } ] } ``` `audit_id` is only present on items that were audited. Store it next to the item in your system to find the audit log later. ## Step 3: Read the audit logs [#step-3-read-the-audit-logs] Pass the `audit_id` to [Retrieve an audit log](/docs/audits/specific-audit-log), or read all audit logs of your account with [List audit logs](/docs/audits/list-audit-logs): ```bash curl "https://api.sandbox.squake.earth/v2/audits/0194d6b5-2c41-7d3a-9f10-5b2e8a7c4d61" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Errors [#errors] | Status | Endpoint | Meaning | | --- | --- | --- | | `400` | `POST /v2/calculations` | The request is malformed or misses a required field. | | `401` | `POST /v2/calculations` | The API key is missing or invalid. | | `403` | Audit endpoints | Authentication or authorization failed. Check that audit logging is enabled for your account. | | `404` | `GET /v2/audits/{id}` | No audit log has this ID. | ## Related [#related] - [Audits](/docs/audits) - [Perform a Calculation](/reference/squake/calculations/post-calculations) in the API reference # Create an auditable entity (/docs/audits/create-auditable-entity) An auditable entity is a legal entity you report for, such as a subsidiary. After you create it, pass its `id` as `audit_for` in a calculation request, and every audit log the request creates is linked to the entity. See [Audit mode](/docs/audits/auditable-reporting). Audit logging must be enabled for your account. ## Request [#request] `POST /v2/audits/entities` - `legal_name` (string): The legal name of the entity. - `email` (string): The email address associated with the entity. - `vat_id` (string): The entity's VAT identification number. - `external_id` (string): Your own identifier for the entity, to link it to a record in your system. - `address` (object): The entity's address. Some legal documents, such as invoices, need a full address. If you send an address, `line1`, `city`, `postal_code` and `country_alpha2` are required. ### Address fields [#address-fields] - `line1` (string, required): Street name and number, P.O. box or c/o. - `line2` (string): Additional address information, such as building or floor. - `city` (string, required): City, town or village. - `postal_code` (string, required): ZIP or postal code. - `state` (string): County, province, region or state. - `country_alpha2` (string, required): ISO 3166-1 alpha-2 country code, such as `DE`. Three-letter alpha-3 codes, such as `DEU`, are accepted too. - `email` (string): Email address associated with this address. Example request body: ```json { "legal_name": "Example Company GmbH", "email": "accounting@example.com", "vat_id": "DE123456789", "external_id": "ENTITY-001", "address": { "line1": "Example Street 1", "line2": "Building A", "city": "Berlin", "postal_code": "10115", "state": "BE", "country_alpha2": "DE", "email": "accounting@example.com" } } ``` Save it as `entity.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/audits/entities" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @entity.json ``` ## Response [#response] SQUAKE responds with `201 Created`. The body is an array that holds the created entity: Response 201 Created (application/json): ```json [ { "id": "d3427e0d-5a3c-40ce-842e-5552e77caa4f", "legal_name": "Example Company GmbH", "email": "accounting@example.com", "vat_id": "DE123456789", "external_id": "ENTITY-001", "address": { "line1": "Example Street 1", "line2": "Building A", "city": "Berlin", "postal_code": "10115", "state": "BE", "country_alpha2": "DE", "email": "accounting@example.com" } } ] ``` Store the `id`. It's the value you pass as `audit_for` when you calculate for this entity. The API has no endpoint to update or delete an auditable entity. To link future calculations to corrected details, create a new entity and use its `id`. Audit logs are immutable, so logs that are already linked to the old entity keep that link. ## Errors [#errors] | Status | Meaning | | --- | --- | | `403` | Authentication or authorization failed. Check that audit logging is enabled for your account. | ## Related [#related] - [List auditable entities](/docs/audits/list-auditable-entities) - [Audit mode](/docs/audits/auditable-reporting) - [Create a new Auditable entity](/reference/squake/audits/post-v2-audits-entities) in the API reference # Audits (/docs/audits) In audit mode, SQUAKE stores an immutable audit log for each calculated item. The log records the request item, the result, and the methodology with its version and source. If the feature is enabled for your account, it also records the distances and emission factors behind the result. An auditor can then trace every reported figure back to its inputs. Audit logging must be enabled for your account. Contact SQUAKE to enable it. ## How it fits together [#how-it-fits-together] 1. Optionally, create an auditable entity for each legal entity you report for, such as a subsidiary. 2. Send your final calculations with `audit: true` on each item, and link them to an entity with `audit_for`. 3. Read the audit logs back, one by one or as a list. ## Guides [#guides] | Task | Guide | | --- | --- | | Decide when to use audit mode and send audited calculations | [Audit mode](/docs/audits/auditable-reporting) | | Register a legal entity to link audit logs to | [Create an auditable entity](/docs/audits/create-auditable-entity) | | List your auditable entities | [List auditable entities](/docs/audits/list-auditable-entities) | | Read one auditable entity | [Retrieve an auditable entity](/docs/audits/retrieve-auditable-entity) | | List your audit logs | [List audit logs](/docs/audits/list-audit-logs) | | Read one audit log with all its details | [Retrieve an audit log](/docs/audits/specific-audit-log) | ## Audit logs of travel data [#audit-logs-of-travel-data] Activities ingested with the [Travel Data API](/docs/travel-data) can have audit logs too. Each stored calculation carries the ID of its audit log in `audit`, or `null` when no audit log was created. See [List the activities of a trip](/docs/travel-data/list-trip-activities). Deleting a trip doesn't delete its audit logs. # List audit logs (/docs/audits/list-audit-logs) Returns the audit logs of the authenticated client. Each entry is one calculated item that SQUAKE logged in [audit mode](/docs/audits/auditable-reporting). Audit logging must be enabled for your account. ## Request [#request] `GET /v2/audits` The endpoint takes no parameters. ```bash curl "https://api.sandbox.squake.earth/v2/audits" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The body is a JSON array of audit logs. In this example, `calculation` is shortened. [Retrieve an audit log](/docs/audits/specific-audit-log) shows it in full. Response 200 OK (application/json): ```json [ { "id": "0194d6b5-2c41-7d3a-9f10-5b2e8a7c4d61", "calculated_at": "2026-02-27T10:18:58Z", "request": { "type": "flight", "audit": true, "methodology": "DEFRA", "external_reference": "INV-2025-0211-A", "origin": "BER", "destination": "CDG", "booking_class": "economy", "number_of_travelers": 1, "aircraft_type": "7M7", "radiative_forcing_index": true, "sustainable_fuels": { "carbon_reduction_percentage_of_total": 0.25 } }, "response": { "carbon_quantity": 81.089, "carbon_unit": "kilogram", "distance": 928.8, "distance_unit": "kilometer" }, "calculation": { "...": "..." }, "methodology": { "name": "DEFRA", "version": "1.1_2025", "source": "https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2025" }, "audit_for": "d3427e0d-5a3c-40ce-842e-5552e77caa4f" }, { "id": "0194d6b4-8711-7873-899d-c8133cd742f8", "calculated_at": "2026-03-13T08:02:41Z", "request": { "type": "flight", "methodology": "TIM", "external_reference": "ACTIVITY-FLIGHT-OUTBOUND", "origin": "BER", "destination": "LHR", "departure_date": "2026-03-10", "airline": "LH", "flight_number": "LH2472", "booking_class": "economy", "number_of_travelers": 1 }, "response": { "carbon_quantity": 142.6, "carbon_unit": "kilogram", "distance": 930.0, "distance_unit": "kilometer" }, "calculation": { "...": "..." }, "methodology": { "name": "TIM", "version": "3.0.0", "source": "https://github.com/google/travel-impact-model" }, "audit_for": null } ] ``` The first log comes from the calculation in [Audit mode](/docs/audits/auditable-reporting) and is linked to an auditable entity. The second belongs to a flight ingested with the Travel Data API and has no entity, so `audit_for` is `null`. | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | Identifier of the audit log. | | `calculated_at` | string (date-time) | When SQUAKE performed the calculation. | | `request` | object | The item from the request body that was calculated. Its structure depends on the activity type and the methodology. | | `response` | object | The result SQUAKE returned, such as `carbon_quantity` and `carbon_unit`. | | `calculation` | object | The distances and emission factors behind the result. Contact SQUAKE support to enable it. | | `methodology` | object | The methodology's `name`, `version` and `source`, a link to its official documentation. | | `audit_for` | string \| null | ID of the [auditable entity](/docs/audits/list-auditable-entities) the log is linked to. | ## Errors [#errors] | Status | Meaning | | --- | --- | | `403` | Authentication or authorization failed. Check that audit logging is enabled for your account. | ## Related [#related] - [Retrieve an audit log](/docs/audits/specific-audit-log) - [Retrieve the list of Audit logs](/reference/squake/audits/get-v2-audits) in the API reference # List auditable entities (/docs/audits/list-auditable-entities) Returns every auditable entity of the authenticated client. Use it to find the `id` to pass as `audit_for` when you calculate for one of your legal entities. ## Request [#request] `GET /v2/audits/entities` The endpoint takes no parameters. ```bash curl "https://api.sandbox.squake.earth/v2/audits/entities" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The body is a JSON array of entities: Response 200 OK (application/json): ```json [ { "id": "d3427e0d-5a3c-40ce-842e-5552e77caa4f", "legal_name": "Example Company GmbH", "email": "accounting@example.com", "vat_id": "DE123456789", "external_id": "ENTITY-001", "address": { "line1": "Example Street 1", "line2": "Building A", "city": "Berlin", "postal_code": "10115", "state": "BE", "country_alpha2": "DE", "email": "accounting@example.com" } }, { "id": "7b1f3e92-04c6-4d8a-b5e3-2a9c6f1d8e47", "legal_name": "Example Company Ltd", "email": "finance@example.co.uk", "vat_id": "GB123456789", "external_id": "ENTITY-002", "address": { "line1": "1 Example Road", "city": "London", "postal_code": "EC1A 1BB", "country_alpha2": "GB" } } ] ``` | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | Identifier of the entity. Pass it as `audit_for` in calculation requests. | | `legal_name` | string | The legal name of the entity. | | `email` | string | The email address associated with the entity. | | `vat_id` | string | The entity's VAT identification number. | | `external_id` | string | Your own identifier for the entity. | | `address` | object | The entity's address. See [Address fields](/docs/audits/create-auditable-entity#address-fields). | ## Errors [#errors] | Status | Meaning | | --- | --- | | `403` | Authentication or authorization failed. Check that audit logging is enabled for your account. | ## Related [#related] - [Create an auditable entity](/docs/audits/create-auditable-entity) - [Retrieve an auditable entity](/docs/audits/retrieve-auditable-entity) - [Retrieve the list of Auditable entities](/reference/squake/audits/get-v2-audits-entities) in the API reference # Retrieve an auditable entity (/docs/audits/retrieve-auditable-entity) Returns one auditable entity of the authenticated client. The `audit_for` value of an audit log is the ID of an entity, so use this endpoint to see which legal entity an audit log belongs to. ## Request [#request] `GET /v2/audits/entities/{id}` - `id` (string (UUID), required): The ID of the auditable entity. ```bash curl "https://api.sandbox.squake.earth/v2/audits/entities/d3427e0d-5a3c-40ce-842e-5552e77caa4f" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] Response 200 OK (application/json): ```json { "id": "d3427e0d-5a3c-40ce-842e-5552e77caa4f", "legal_name": "Example Company GmbH", "email": "accounting@example.com", "vat_id": "DE123456789", "external_id": "ENTITY-001", "address": { "line1": "Example Street 1", "line2": "Building A", "city": "Berlin", "postal_code": "10115", "state": "BE", "country_alpha2": "DE", "email": "accounting@example.com" } } ``` For the meaning of each field, see [List auditable entities](/docs/audits/list-auditable-entities#response). ## Errors [#errors] | Status | Meaning | | --- | --- | | `403` | Authentication or authorization failed. Check that audit logging is enabled for your account. | ## Related [#related] - [List audit logs](/docs/audits/list-audit-logs) - [Retrieve a specific Auditable entity](/reference/squake/audits/get-v2-audits-entities-id) in the API reference # Retrieve an audit log (/docs/audits/specific-audit-log) Returns one audit log with everything SQUAKE recorded for the calculated item. Take the ID from the `audit_id` of a calculation response, from the `audit` of a stored travel data calculation, or from [List audit logs](/docs/audits/list-audit-logs). Audit logging must be enabled for your account. ## Request [#request] `GET /v2/audits/{id}` - `id` (string (UUID), required): The ID of the audit log. ```bash curl "https://api.sandbox.squake.earth/v2/audits/0194d6b5-2c41-7d3a-9f10-5b2e8a7c4d61" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] This audit log belongs to the DEFRA flight calculated in [Audit mode](/docs/audits/auditable-reporting): Response 200 OK (application/json): ```json { "id": "0194d6b5-2c41-7d3a-9f10-5b2e8a7c4d61", "calculated_at": "2026-02-27T10:18:58Z", "request": { "type": "flight", "audit": true, "methodology": "DEFRA", "external_reference": "INV-2025-0211-A", "origin": "BER", "destination": "CDG", "booking_class": "economy", "number_of_travelers": 1, "aircraft_type": "7M7", "radiative_forcing_index": true, "sustainable_fuels": { "carbon_reduction_percentage_of_total": 0.25 } }, "response": { "carbon_quantity": 81.089, "carbon_unit": "kilogram", "distance": 928.8, "distance_unit": "kilometer" }, "calculation": { "distance": { "original": { "distance": 859.976, "distance_unit": "kilometer" }, "corrected": { "distance": 928.8, "distance_unit": "kilometer" } }, "emission_factors": { "geo_scope": "international", "flight_type": "international", "booking_class": "economy", "aircraft_type": "7M7", "energy_scope": "wtw", "rfi_factor": "1.7", "uplift_factor": "1.0", "co2_per_passenger_grams": "125.72" } }, "methodology": { "name": "DEFRA", "version": "1.1_2025", "source": "https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2025" }, "audit_for": "d3427e0d-5a3c-40ce-842e-5552e77caa4f" } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | Identifier of the audit log. | | `calculated_at` | string (date-time) | When SQUAKE performed the calculation. | | `request` | object | The item from the request body that was calculated. Its structure depends on the activity type and the methodology. | | `response` | object | The result SQUAKE returned, such as `carbon_quantity` and `carbon_unit`. | | `calculation` | object | The distances and emission factors behind the result. Contact SQUAKE support to enable it. | | `methodology` | object | The methodology's `name`, `version` and `source`, a link to its official documentation. | | `audit_for` | string \| null | ID of the [auditable entity](/docs/audits/retrieve-auditable-entity) the log is linked to. | ### Calculation details [#calculation-details] `calculation.distance` holds two distances. `original` is the distance SQUAKE resolved from the route, and `corrected` is the distance the methodology calculated with. In this example, `corrected` is 8% longer than `original` because DEFRA adds an 8% uplift to great-circle distances. `calculation.emission_factors` lists the factors the methodology applied, and its keys differ from methodology to methodology. For this DEFRA flight, they include the radiative forcing factor (`rfi_factor`) and the emission factor per passenger (`co2_per_passenger_grams`). ## Errors [#errors] | Status | Meaning | | --- | --- | | `403` | Authentication or authorization failed. Check that audit logging is enabled for your account. | | `404` | No audit log has this ID. | ## Related [#related] - [List audit logs](/docs/audits/list-audit-logs) - [Audit mode](/docs/audits/auditable-reporting) - [Retrieve a specific Audit log](/reference/squake/audits/get-v2-audits-id) in the API reference # Calculation API Examples (/docs/calculations) Find out which request fields each activity and methodology needs, and what to expect in the response. Each activity and methodology has its own parameters, so the required request items can be confusing. These pages break them down activity by activity and methodology by methodology, for both travel and logistics activities, so you know exactly what data to include in your request and how to read the response for accurate, reliable carbon calculations. > **Multi-leg flights** > For multi-leg passenger flights sent as a single item with a `routing` chain instead of `origin` and `destination`, see [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing) under Travel. # Air Freight: DIN EN 16258 (/docs/calculations/logistics/air-freight/air-freight-din-en-16258) Calculate air freight energy use and greenhouse gas emissions with the DIN EN 16258 standard from the European Committee for Standardization, which considers aircraft type, fuel consumption, flight altitude and cargo type. Type: `air_freight` · Methodology: `DIN-EN-16258` · Source: DIN EN 16258, Mar 2013 · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "air_freight", "external_reference": "test_1", "origin": "MIL", "destination": "HAM", "weight_in_tonnes": 5, "plane_type": "freighter", "energy_scope": "wtw", "methodology": "DIN-EN-16258" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "air_freight", "external_reference": "test_1", "origin": "MIL", "destination": "HAM", "weight_in_tonnes": 5, "plane_type": "freighter", "energy_scope": "wtw", "methodology": "DIN-EN-16258" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `plane_type` | `belly_freighter` | No `plane_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `air_freight` - `methodology` (string, required): `DIN-EN-16258` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for other locations used in trade and transportation (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `plane_type` (enum): `belly_freighter` or `freighter`. Defaults to `belly_freighter`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 2040166, "carbon_unit": "gram", "items": [{ "carbon_quantity": 2040166, "carbon_unit": "gram", "external_reference": "test_1", "type": "air_freight", "methodology": "DIN-EN-16258", "distance": 981.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "DIN-EN-16258", "data": { "energy_factor_ttw_in_MJ": 24, "energy_factor_wtw_in_MJ": 28, "ghg_emissions_ttw_in_g": 1672095, "ghg_emissions_wtw_in_g": 2040166 } } }] } ``` ## Bibliography [#bibliography] - IATA Carbon Offset Program: Frequently Asked Questions. IATA, 19 April 2022. [Read the PDF](https://www.iata.org/contentassets/922ebc4cbcd24c4d9fd55933e7070947/icop_faq_general-for-airline-participants.pdf). - IATA Recommended Practice RP 1726. IATA. [iata.org](https://www.iata.org/en/programs/environment/passenger-emissions-methodology/#:~:text=IATA's%20Recommended%20Practice%20Per%2DPassenger%20CO2%20Calculation%20Methodology%20is%20a,or%20industry%20voluntary%20offset%20program.) - IATA Recommended Practice 1678. IATA, 9 March 2014. [Read the PDF](https://www.iata.org/contentassets/34f5341668f14157ac55896f364e3451/rp-carbon-calculation.pdf). - Method for Calculating and Declaring Energy Consumption. DIN EN 16258, March 2013. [doi:10.31030/1894795](https://dx.doi.org/10.31030/1894795) # Air Freight: GLEC (/docs/calculations/logistics/air-freight/air-freight-glec) Calculate air freight emissions with the Global Logistics Emissions Council (GLEC) framework, which factors in fleet composition, load efficiency and routes. Type: `air_freight` · Methodology: `GLEC` · Source: GLEC Framework v3.2, 2025 · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "air_freight", "external_reference": "test_1", "origin": "LHR", "destination": "HAM", "weight_in_tonnes": 2, "plane_type": "belly_freighter", "energy_scope": "ttw", "methodology": "GLEC" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "air_freight", "external_reference": "test_1", "origin": "LHR", "destination": "HAM", "weight_in_tonnes": 2, "plane_type": "belly_freighter", "energy_scope": "ttw", "methodology": "GLEC" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `plane_type` | `average` | No `plane_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `air_freight` - `methodology` (string, required): `GLEC` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for other locations used in trade and transportation (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `plane_type` (enum): `belly_freighter`, `freighter` or `average`. Default is `average`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 1654776, "carbon_unit": "gram", "items": [{ "carbon_quantity": 1654776, "carbon_unit": "gram", "external_reference": "test_1", "type": "air_freight", "methodology": "GLEC", "distance": 846.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 1654776, "co2e_emissions_wtw_in_g": 2093004, "co2e_per_tonne_km_in_g": 978, "tonne_km": 1692, "reporting_year": 2024, "transportation_mode": "air_transportation" } } }] } ``` ## Bibliography [#bibliography] Smart Freight Centre helped us fine-tune our calculations of all freight and logistics operations in line with the GLEC framework. - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Towards efficient and zero emissions. Smart Freight Centre. [smartfreightcentre.org](https://www.smartfreightcentre.org/en/) # Air freight (/docs/calculations/logistics/air-freight) Calculate the emissions of air freight shipments from the route or distance, the cargo weight and the type of aircraft. SQUAKE supports two methodologies for air freight. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [DIN EN 16258](/docs/calculations/logistics/air-freight/air-freight-din-en-16258) | Not stated | DIN EN 16258 (March 2013) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `plane_type`, `energy_scope` | `plane_type` is `belly_freighter` or `freighter` and defaults to `belly_freighter`. | | [GLEC](/docs/calculations/logistics/air-freight/air-freight-glec) | Not stated | GLEC Framework v3.2 (2025) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `plane_type`, `energy_scope` | Adds an `average` `plane_type`, used by default when you don't know how the cargo flies. | Both methodologies support audit records with `audit`. ## How to decide [#how-to-decide] - Use GLEC when you don't know whether the cargo travels in a passenger aircraft's hold or on a dedicated freighter: it has an `average` option. - Both methodologies take the same inputs, so if you know the aircraft type, pick the one your reporting framework names. - GLEC v3.2 aligns with ISO 14083 and the GHG Protocol for Scope 3 categories 4 and 9, according to the [GLEC v3.2 update](/changelog/calculation-changes/glec-v3.2-jul). # Logistics (/docs/calculations/logistics) Calculate the carbon emissions of logistics activities, such as road, sea and air freight and logistics sites, in a single request. Transporting and delivering goods often comes with a significant carbon footprint, whether by road freight, shipping or air cargo. Calculating it means considering factors such as the type of transportation, the distance traveled and the fuel type. Accurate measurement helps businesses find carbon reduction opportunities, optimize their supply chain and make informed decisions to reduce their environmental impact. ## Perform a calculation [#perform-a-calculation] `POST /v2/calculations` uses bearer authentication. It calculates carbon emissions for one or more activities: pass all relevant activities in the `items` array to compute the footprint of your logistics operations, such as multiple freight journeys or combined land and sea shipments, at once. Include `"items"` in the `expand` array to get the values for each item in addition to the total carbon quantity. > **No calculation IDs** > This is a low-latency endpoint. SQUAKE doesn't return a unique identifier for calculation results. To buy compensation for your carbon emissions, quote a price on the pricing endpoint. Some data sets are extensive and are documented separately. ## Request body [#request-body] The body is `application/json`. - `expand` (array[string]): `items`. With `items`, SQUAKE returns emissions for each item separately, in addition to a total value. - `carbon_unit` (string): `tonne`, `kilogram` or `gram`. SQUAKE uses the International System of Units (SI), commonly called the metric system. - `distance_unit` (string): `meter`, `kilometer`, `feet`, `mile` or `nautical_mile`. Defaults to `kilometer`. ## Sample request [#sample-request] ```json { "expand": ["items"], "carbon_unit": "tonne", "distance_unit": "kilometer", "items": [ { "type": "road_freight", "external_reference": "Truck", "origin": "Magdeburg, Germany", "destination": "DEHAM", "weight_in_tonnes": 0.75, "fuel_type": "diesel", "energy_scope": "wtw", "truck_type": "rigid_truck_under_26_gvw", "temperature_controlled_freight": true, "methodology": "GLEC" }, { "type": "logistics_site", "external_reference": "Hub", "weight_in_tonnes": 0.75, "logistics_site_type": "transhipment_site", "methodology": "GLEC" }, { "type": "sea_freight", "external_reference": "Sea", "origin": "DEHAM", "destination": "NLAMS", "weight_in_tonnes": 0.75, "cargo_type": "dry", "energy_scope": "wtw", "methodology": "CLEAN-CARGO" }, { "type": "logistics_site", "external_reference": "Hub", "weight_in_tonnes": 0.75, "logistics_site_type": "storage_and_transhipment", "methodology": "GLEC" }, { "type": "air_freight", "external_reference": "Air", "origin": "AMS", "destination": "JFK", "weight_in_tonnes": 0.75, "plane_type": "belly_freighter", "energy_scope": "wtw", "methodology": "GLEC" }, { "type": "logistics_site", "external_reference": "Hub", "weight_in_tonnes": 0.75, "logistics_site_type": "warehouse", "methodology": "GLEC" }, { "type": "road_freight", "external_reference": "Truck", "origin": "JFK", "destination": "Scranton, United States", "weight_in_tonnes": 0.75, "fuel_type": "diesel", "energy_scope": "wtw", "truck_type": "van_under_3.5_t", "temperature_controlled_freight": true, "methodology": "GLEC" } ] } ``` ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 4.570352, "carbon_unit": "tonne", "items": [ { "carbon_quantity": 0.026645, "carbon_unit": "tonne", "external_reference": "Truck", "type": "road_freight", "methodology": "GLEC", "distance": 244.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 26645, "co2e_emissions_wtw_in_g": 26645, "co2e_per_tonne_km_in_g": 130, "tonne_km": 183, "reporting_year": 2024, "transportation_mode": "road_transportation" } } }, { "carbon_quantity": 0.00165, "carbon_unit": "tonne", "external_reference": "Hub", "type": "logistics_site", "methodology": "GLEC", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 1650.0, "co2e_per_tonne_in_g": 2200, "reporting_year": 2024, "transportation_mode": "logistics_site" } } }, { "carbon_quantity": 0.004885, "carbon_unit": "tonne", "external_reference": "Sea", "type": "sea_freight", "methodology": "CLEAN-CARGO", "distance": 368.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "clean_cargo", "data": { "co2e_in_g": 4885, "co2e_emissions_wtw_in_g": 4885, "co2e_per_tonne_km_in_g": 17.7, "tonne_km": 276, "reporting_year": 2024, "transportation_mode": "sea_transportation" } } }, { "carbon_quantity": 0.003, "carbon_unit": "tonne", "external_reference": "Hub", "type": "logistics_site", "methodology": "GLEC", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 3000.0, "co2e_per_tonne_in_g": 4000, "reporting_year": 2024, "transportation_mode": "logistics_site" } } }, { "carbon_quantity": 4.353479, "carbon_unit": "tonne", "external_reference": "Air", "type": "air_freight", "methodology": "GLEC", "distance": 5978.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 4353479, "co2e_emissions_wtw_in_g": 4353479, "co2e_per_tonne_km_in_g": 971, "tonne_km": 4484, "reporting_year": 2024, "transportation_mode": "air_transportation" } } }, { "carbon_quantity": 0.02475, "carbon_unit": "tonne", "external_reference": "Hub", "type": "logistics_site", "methodology": "GLEC", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 24750.0, "co2e_per_tonne_in_g": 33000, "reporting_year": 2024, "transportation_mode": "logistics_site" } } }, { "carbon_quantity": 0.155943, "carbon_unit": "tonne", "external_reference": "Truck", "type": "road_freight", "methodology": "GLEC", "distance": 228.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 155943, "co2e_emissions_wtw_in_g": 155943, "co2e_per_tonne_km_in_g": 793, "tonne_km": 171, "reporting_year": 2024, "transportation_mode": "road_transportation" } } } ] } ``` # Inland waterways (/docs/calculations/logistics/inland-waterways) Calculate the emissions of freight carried on rivers and canals from the route or distance, the cargo weight and the vessel, with the GLEC methodology. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [GLEC](/docs/calculations/logistics/inland-waterways/inland-waterways-glec) | Not stated | GLEC Framework v3.2 (2025) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `vessel_type`, `energy_scope` | Vessel types cover motor vessels by length, container vessels, pushed convoys, coupled convoys, and tankers. Supports audit records. | ## When to use it [#when-to-use-it] - Use GLEC for any inland waterway shipment. It's the only methodology SQUAKE offers here. - Send `vessel_type` when you know it. Otherwise SQUAKE uses `motor_vessels_under_50_m`. # Inland Waterways: GLEC (/docs/calculations/logistics/inland-waterways/inland-waterways-glec) Calculate emissions of freight on inland waterways with the GLEC Framework, based on vessel type, distance, weight and energy scope. Type: `inland_waterways` · Methodology: `GLEC` · Source: GLEC Framework v3.2, 2025 · Supports audit mode ## About the methodology [#about-the-methodology] The Global Logistics Emissions Council (GLEC) shapes how carbon footprints in logistics are calculated and reduced, including for inland waterways. Its globally recognised framework covers logistics from road freight to aviation and inland waterways. For inland waterways, the GLEC methodology focuses on how vessels operate, such as engine types, fuel consumption and loading efficiency. It also includes emissions from the wider logistics chain, such as cargo handling and transport to and from port facilities, so that all carbon sources linked to inland waterway transport are captured. ## Sample requests [#sample-requests] Send a quote before the shipment is booked, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "inland_waterways", "external_reference": "test_1", "origin": "DEBER", "destination": "DEFRA", "weight_in_tonnes": 20, "vessel_type": "pushed_convoy_push_boat_2_barges", "energy_scope": "ttw", "methodology": "GLEC" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "inland_waterways", "external_reference": "test_1", "origin": "DEBER", "destination": "DEFRA", "weight_in_tonnes": 20, "vessel_type": "pushed_convoy_push_boat_2_barges", "energy_scope": "ttw", "methodology": "GLEC" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `vessel_type` | `motor_vessels_under_50_m` | No `vessel_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `inland_waterways` - `methodology` (string, required): `GLEC` - `origin` (string): SQUAKE tries to resolve the location whatever its format. Ideally, use the Post standard for addresses, an IATA/ICAO code for airports (format `^[A-Z]{3,4}$`, for example `"MUC"`), and a UN/LOCODE for other locations used in trade and transportation (format `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). You can also pass latitude and longitude (format `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. If you send both, SQUAKE uses `distance_in_km`. - `weight_in_tonnes` (number): Weight of the freight in tonnes. - `vessel_type` (enum): `container_vessel_110_m`, `container_vessel_135_m`, `container_vessel_coupled_convoys`, `coupled_convoys`, `motor_vessels_under_50_m`, `motor_vessels_under_80_m`, `motor_vessel_under_110_m`, `motor_vessel_135_m`, `pushed_convoy_push_boat_2_barges`, `pushed_convoy_push_boat_4_5_barges`, `pushed_convoy_push_boat_6_barges` or `tanker_vessel`. Default value is `motor_vessels_under_50_m`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 143256, "carbon_unit": "gram", "items": [{ "carbon_quantity": 143256, "carbon_unit": "gram", "external_reference": "test_1", "type": "inland_waterways", "methodology": "GLEC", "distance": 508.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 143256, "co2e_emissions_wtw_in_g": 185928, "co2e_per_tonne_km_in_g": 14, "tonne_km": 10160, "reporting_year": 2024, "transportation_mode": "inland_waterways_transportation" } } }] } ``` Smart Freight Centre helped us fine-tune our calculations of all freight and logistics operations in accordance with the GLEC Framework. ## Bibliography [#bibliography] - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Smart Freight Centre. Towards efficient and zero emissions. [https://www.smartfreightcentre.org/en/](https://www.smartfreightcentre.org/en/) # Logistics site (/docs/calculations/logistics/logistics-site) Calculate the emissions of goods handled at logistics sites, such as warehouses and terminals, with the GLEC methodology. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [GLEC](/docs/calculations/logistics/logistics-site/logistics-site-glec) | Warehouses, transhipment sites, and maritime container and liquid bulk terminals | GLEC Framework v3.2 (2025) | `weight_in_tonnes`; optional `logistics_site_type`, `condition_type` | No route needed: emissions depend on the weight handled. Send `type` as `logistics_hub`; `logistics_site` still works. Supports audit records. | ## When to use it [#when-to-use-it] - Use GLEC for emissions from storing and handling goods at a site, separate from the transport legs to and from it. - Send `logistics_site_type` and `condition_type` when you know them. Otherwise SQUAKE uses `warehouse` and `mixed`. - `temperature_controlled` only applies to the `maritime_container_terminal` site type. # Logistics Hub: GLEC (/docs/calculations/logistics/logistics-site/logistics-site-glec) Calculate the emissions of goods handled at a logistics site, such as a warehouse or terminal, with the GLEC Framework, based on site type, condition type and weight. Type: `logistics_hub` · Methodology: `GLEC` · Source: GLEC Framework v3.2, 2025 · Supports audit mode ## About the methodology [#about-the-methodology] The Global Logistics Emissions Council (GLEC) frames standardised approaches for calculating greenhouse gas emissions in logistics. This includes logistics sites: the hubs where goods are stored, managed and dispatched. These sites consume a lot of energy, so accurate calculation matters. GLEC's methodology takes an integrated approach to logistics emissions accounting and covers all activities within a logistics site, from storage cooling systems to material handling equipment. As a consistent, globally recognised standard, GLEC lets logistics sites worldwide measure, manage and reduce their carbon footprint on a level playing field. The framework includes both direct and indirect emission sources, which gives a full picture of a logistics site's environmental impact and supports effective mitigation. ## Sample requests [#sample-requests] Send a quote before the shipment is booked, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "logistics_hub", "external_reference": "test_1", "weight_in_tonnes": 8, "methodology": "GLEC", "logistics_site_type": "storage_and_transhipment", "condition_type": "ambient" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "logistics_hub", "external_reference": "test_1", "weight_in_tonnes": 8, "methodology": "GLEC", "logistics_site_type": "storage_and_transhipment", "condition_type": "ambient" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `logistics_site_type` | `warehouse` | No `logistics_site_type` is sent | | `condition_type` | `mixed` | No `condition_type` is sent | ## Request fields [#request-fields] - `type` (string, required): `logistics_hub`. As of GLEC v3.2, `logistics_hub` is the preferred value; `logistics_site` is still accepted for backward compatibility. - `methodology` (string, required): `GLEC` - `weight_in_tonnes` (number): Weight of the goods in tonnes. - `logistics_site_type` (enum): `transhipment_site`, `storage_and_transhipment`, `warehouse`, `maritime_container_terminal` or `liquid_bulk_terminal`. Default value is `warehouse`. - `condition_type` (enum): `ambient`, `mixed` or `temperature_controlled`. `temperature_controlled` is only relevant for the `maritime_container_terminal` site type. Defaults to `mixed`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 16800, "carbon_unit": "gram", "items": [{ "carbon_quantity": 16800, "carbon_unit": "gram", "external_reference": "test_1", "type": "logistics_hub", "methodology": "GLEC", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 16800, "co2e_per_tonne_in_g": 2100, "reporting_year": 2024, "transportation_mode": "logistics_site" } } }] } ``` Smart Freight Centre helped us fine-tune our calculations of all freight and logistics operations in accordance with the GLEC Framework. ## Bibliography [#bibliography] - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Smart Freight Centre. Towards efficient and zero emissions. [https://www.smartfreightcentre.org/en/](https://www.smartfreightcentre.org/en/) # Rail freight (/docs/calculations/logistics/rail-freight) Calculate the emissions of rail freight shipments from the route or distance, the cargo weight and the train. SQUAKE supports three methodologies for rail freight. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [DIN EN 16258](/docs/calculations/logistics/rail-freight/rail-freight-din-en-16258) | Not stated | DIN EN 16258 (March 2013) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `train_type`, `fuel_type`, `energy_scope` | `train_type` is the train's weight (`500t` to `2000t`). `fuel_type` is `electricity` or `diesel`. | | [ECTA](/docs/calculations/logistics/rail-freight/rail-freight-ecta) | Not stated | ECTA guidelines (March 2011), now part of GLEC | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `train_type`, `fuel_type` | Adds `train_type` values `container_train_intermodal`, `blocktrain_rtc` and `single_wagon_train_rtc`. No `energy_scope` field. | | [GLEC](/docs/calculations/logistics/rail-freight/rail-freight-glec) | Not stated | GLEC Framework v3.2 (2025) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `fuel_type`, `load_characteristic`, `energy_scope` | `load_characteristic` describes the cargo, such as `container`, `cars` or `chemicals`. Fuels include `us_diesel` and `indian_average`. | All three methodologies support audit records with `audit`. ## How to decide [#how-to-decide] - Use GLEC when you know what the train carries (`load_characteristic`), or the train runs on US diesel or Indian average traction. - Use ECTA when you know the train's operating type: a container, block, or single-wagon train. - Use DIN EN 16258 when you know the train's gross weight and whether it is electric or diesel. - ECTA is now part of GLEC and follows the same update and certification policy, according to the [November 2023 update](/changelog/calculation-changes/glec-november-2023). # Rail Freight: DIN EN 16258 (/docs/calculations/logistics/rail-freight/rail-freight-din-en-16258) Calculate rail freight energy use and greenhouse gas emissions with the DIN EN 16258 standard, which considers the fuel used, the weight and type of goods, the distance covered and the rail infrastructure. Type: `rail_freight` · Methodology: `DIN-EN-16258` · Source: DIN EN 16258, Mar 2013 · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "rail_freight", "external_reference": "test_1", "origin": "HAM", "destination": "BER", "weight_in_tonnes": 41, "methodology": "DIN-EN-16258", "energy_scope": "wtw" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "rail_freight", "external_reference": "test_1", "origin": "HAM", "destination": "BER", "weight_in_tonnes": 41, "methodology": "DIN-EN-16258", "energy_scope": "wtw" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `train_type` | `1000t` | No `train_type` is sent | | `fuel_type` | `diesel` | No `fuel_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `rail_freight` - `methodology` (string, required): `DIN-EN-16258` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for other locations used in trade and transportation (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `train_type` (enum): `500t`, `1000t`, `1500t` or `2000t`. Defaults to `1000t`. - `fuel_type` (enum): `electricity` or `diesel`. Defaults to `diesel`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 256789, "carbon_unit": "gram", "items": [{ "carbon_quantity": 256789, "carbon_unit": "gram", "external_reference": "test_1", "type": "rail_freight", "methodology": "DIN-EN-16258", "distance": 292.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "DIN-EN-16258", "data": { "fuel_consumption_per_tonne_km": 1.5, "fuel_to_co2": 3.14, "train_type": "1000t", "reporting_year": 2024, "transportation_mode": "rail_transportation" } } }] } ``` ## Bibliography [#bibliography] Method for Calculating and Declaring Energy Consumption. DIN EN 16258, March 2013. [doi:10.31030/1894795](https://dx.doi.org/10.31030/1894795) # Rail Freight: ECTA (/docs/calculations/logistics/rail-freight/rail-freight-ecta) Calculate rail freight emissions with the guidelines of the European Chemical Transportation Association (ECTA), which take into account the fuel used, the cargo, the train length and route efficiency. Type: `rail_freight` · Methodology: `ECTA` · Source: ECTA guidelines, Mar 2011 · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "rail_freight", "external_reference": "test_1", "distance_in_km": 100, "weight_in_tonnes": 10, "train_type": "container_train_intermodal", "fuel_type": "diesel", "methodology": "ECTA" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "rail_freight", "external_reference": "test_1", "distance_in_km": 100, "weight_in_tonnes": 10, "train_type": "container_train_intermodal", "fuel_type": "diesel", "methodology": "ECTA" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `train_type` | `average` | No `train_type` is sent | | `fuel_type` | `average` | No `fuel_type` is sent | ## Request fields [#request-fields] - `type` (string, required): `rail_freight` - `methodology` (string, required): `ECTA` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for other locations used in trade and transportation (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `train_type` (enum): `average`, `container_train_intermodal`, `blocktrain_rtc` or `single_wagon_train_rtc`. Defaults to `average`. - `fuel_type` (enum): `electricity`, `average` or `diesel`. Defaults to `average`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 28000, "carbon_unit": "gram", "items": [{ "carbon_quantity": 28000, "carbon_unit": "gram", "external_reference": "test_1", "type": "rail_freight", "methodology": "ECTA", "distance": 100.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - Guidelines for Measuring and Managing CO Emission. ECTA, March 2011. [Read the PDF](https://www.ecta.com/wp-content/uploads/2021/03/ECTA-CEFIC-GUIDELINE-FOR-MEASURING-AND-MANAGING-CO2-ISSUE-1.pdf). - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. # Rail Freight: GLEC (/docs/calculations/logistics/rail-freight/rail-freight-glec) Calculate rail freight emissions with the Global Logistics Emissions Council (GLEC) framework, which considers train type, fuel consumption, distance covered and cargo weight. Type: `rail_freight` · Methodology: `GLEC` · Source: GLEC Framework v3.2, 2025 · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "rail_freight", "external_reference": "test_1", "origin": "OSL", "destination": "HEL", "weight_in_tonnes": 86, "fuel_type": "diesel", "load_characteristic": "coal_steel", "methodology": "GLEC" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "rail_freight", "external_reference": "test_1", "origin": "OSL", "destination": "HEL", "weight_in_tonnes": 86, "fuel_type": "diesel", "load_characteristic": "coal_steel", "methodology": "GLEC" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | `diesel` | No `fuel_type` is sent | | `load_characteristic` | `average` | No `load_characteristic` is sent | ## Request fields [#request-fields] - `type` (string, required): `rail_freight` - `methodology` (string, required): `GLEC` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for other locations used in trade and transportation (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `fuel_type` (enum): `electricity`, `us_diesel`, `indian_average`, `average` or `diesel`. Defaults to `diesel`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `load_characteristic` (enum): `average`, `container`, `cars`, `chemicals`, `coal_steel`, `building_materials`, `manufactured_products`, `cereals`, `truck_trailer_on_train` or `trailer_only_on_train`. Defaults to `average`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 1334170, "carbon_unit": "gram", "items": [{ "carbon_quantity": 1334170, "carbon_unit": "gram", "external_reference": "test_1", "type": "rail_freight", "methodology": "GLEC", "distance": 768.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 1334170, "co2e_emissions_wtw_in_g": 1334170, "co2e_per_tonne_km_in_g": 20, "tonne_km": 66048, "reporting_year": 2024, "transportation_mode": "rail_transportation" } } }] } ``` ## Bibliography [#bibliography] Smart Freight Centre helped us fine-tune our calculations of all freight and logistics operations in line with the GLEC framework. - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Towards efficient and zero emissions. Smart Freight Centre. [smartfreightcentre.org](https://www.smartfreightcentre.org/en/) # Road freight (/docs/calculations/logistics/road-freight) Calculate the emissions of road freight shipments from the route or distance, the cargo weight and the vehicle. SQUAKE supports two methodologies for road freight. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [DIN EN 16258](/docs/calculations/logistics/road-freight/road-freight-din-en-16258) | Not stated | DIN EN 16258 (March 2013), the European standard for transport services | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `truck_type`, `energy_scope` | Four truck size classes (`under_7.5_t` to `under_40_t`). The response includes tank-to-wheel and well-to-wheel energy (MJ) and emissions. | | [GLEC](/docs/calculations/logistics/road-freight/road-freight-glec) | Regional factors, including dedicated ones for China and India and North American truck types | GLEC Framework v3.2 (2025) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `truck_type`, `fuel_type`, `load_characteristic`, `energy_scope` | Applies uplifts for some regions and for temperature-controlled freight. Fuels include `electricity`, `hydrogen`, `lng` and `bio-lng`. | Both methodologies support audit records with `audit`. ## How to decide [#how-to-decide] - Use GLEC when you know the fuel or energy type, or the cargo is temperature-controlled: DIN EN 16258 has no `fuel_type` field and no temperature uplift. - Use GLEC for trucks in North America or China, which have their own `truck_type` values. - Use DIN EN 16258 when you only know the truck's weight class and want energy consumption in MJ alongside emissions. - GLEC v3.2 aligns with ISO 14083 and the GHG Protocol for Scope 3 categories 4 and 9, according to the [GLEC v3.2 update](/changelog/calculation-changes/glec-v3.2-jul). # Road Freight: DIN EN 16258 (/docs/calculations/logistics/road-freight/road-freight-din-en-16258) Calculate road freight emissions with the DIN EN 16258 methodology, the European standard for calculating and declaring energy consumption and greenhouse gas emissions of transport services. Type: `road_freight` · Methodology: `DIN-EN-16258` · Source: DIN EN 16258, Mar 2013 · Supports audit mode ## About the methodology [#about-the-methodology] DIN EN 16258 is a European standard for calculating and declaring energy consumption and greenhouse gas emissions in transport services. It gives road freight operators a structured way to quantify their emissions, based on factors such as fuel type, vehicle efficiency and load optimisation. The standard applies to different modes of transport, and is particularly relevant for road freight. It covers operational emissions, which come directly from fuel combustion, and embedded emissions, such as those from vehicle production, maintenance and end of life. This level of detail accounts for every emission source in the road freight journey and supports transparent reporting and benchmarking. ## Sample requests [#sample-requests] Send a quote before the shipment is booked, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "road_freight", "external_reference": "test_1", "origin": "BER", "destination": "FRA", "weight_in_tonnes": 0.5, "truck_type": "under_7.5_t", "energy_scope": "ttw", "methodology": "DIN-EN-16258" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "road_freight", "external_reference": "test_1", "origin": "BER", "destination": "FRA", "weight_in_tonnes": 0.5, "truck_type": "under_7.5_t", "energy_scope": "ttw", "methodology": "DIN-EN-16258" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `truck_type` | `under_7.5_t` | No `truck_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `road_freight` - `methodology` (string, required): `DIN-EN-16258` - `origin` (string): SQUAKE tries to resolve the location whatever its format. Ideally, use the Post standard for addresses, an IATA/ICAO code for airports (format `^[A-Z]{3,4}$`, for example `"MUC"`), and a UN/LOCODE for other locations used in trade and transportation (format `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). You can also pass latitude and longitude (format `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. If you send both, SQUAKE uses `distance_in_km`. - `weight_in_tonnes` (number): Weight of the freight in tonnes. - `truck_type` (enum): `under_7.5_t`, `under_12_t`, `under_24_t` or `under_40_t`. Defaults to `under_7.5_t`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 68994, "carbon_unit": "gram", "items": [{ "carbon_quantity": 68994, "carbon_unit": "gram", "external_reference": "test_1", "type": "road_freight", "methodology": "DIN-EN-16258", "distance": 552.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "DIN-EN-16258", "data": { "energy_factor_ttw_in_MJ": 926, "energy_factor_wtw_in_MJ": 1103, "ghg_emissions_ttw_in_g": 68994, "ghg_emissions_wtw_in_g": 83825 } } }] } ``` ## Bibliography [#bibliography] Method for Calculating and Declaring Energy Consumption. DIN EN 16258, March 2013. [https://dx.doi.org/10.31030/1894795](https://dx.doi.org/10.31030/1894795). # Road Freight: GLEC (/docs/calculations/logistics/road-freight/road-freight-glec) Calculate road freight emissions with the GLEC Framework, the Global Logistics Emissions Council's harmonised well-to-wheel method that accounts for vehicle types, load factors and specific routes. Type: `road_freight` · Methodology: `GLEC` · Source: GLEC Framework v3.2, 2025 · Supports audit mode ## About the methodology [#about-the-methodology] The Global Logistics Emissions Council (GLEC) works to drive emission reduction in logistics and has produced the GLEC Framework for measuring carbon footprints. For road freight, the framework is a harmonised method that integrates existing methods and fills gaps where necessary. The GLEC Framework for road freight takes a well-to-wheel approach, which covers the emissions from producing fuel as well as from consuming it. By accounting for vehicle types, load factors and specific routes, it gives detailed carbon assessments. The methodology suits companies that want to improve their carbon footprint and align with global sustainability standards. ## Sample requests [#sample-requests] Send a quote before the shipment is booked, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "road_freight", "external_reference": "test_1", "origin": "BER", "destination": "ORY", "weight_in_tonnes": 0.75, "fuel_type": "diesel", "energy_scope": "wtw", "truck_type": "rigid_truck_under_26_gvw", "temperature_controlled_freight": true, "methodology": "GLEC" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "road_freight", "external_reference": "test_1", "origin": "BER", "destination": "ORY", "weight_in_tonnes": 0.75, "fuel_type": "diesel", "energy_scope": "wtw", "truck_type": "rigid_truck_under_26_gvw", "temperature_controlled_freight": true, "methodology": "GLEC" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `truck_type` | `van_under_3.5_t` | No `truck_type` is sent | | `fuel_type` | `average` | No `fuel_type` is sent | | `load_characteristic` | `average` | No `load_characteristic` is sent | ## How it's calculated [#how-its-calculated] Regional values are adjusted with uplift factors for some regions and for temperature-controlled freight. | Vehicle | Region | Uplift | | --- | --- | --- | | Vans (up to 3.5 t GVW) | Asia (excluding China and India) and Africa | 13% on the regional values for Europe and South America | | Heavier vehicles (over 3.5 t GVW) | Asia (excluding China and India) and Africa | 22% on the regional values for Europe and South America | | Temperature-controlled vans (up to 3.5 t GVW) | Europe, South America, Asia and Africa | 15% on the regional values | | Temperature-controlled heavier vehicles (over 3.5 t GVW) | Europe, South America, Asia and Africa | 12% on the regional values | The uplift factors are based on GLEC Framework v3.1, page 104, and reflect extrapolated or validated regional adjustments as noted by NTM and TK'Blue. > **India and China in GLEC v3.2** > As of GLEC v3.2 (2025), India has its own dedicated regional factors, in the same way China already did, and is no longer covered by the Asia uplift above. China's factors are unchanged in this update. The USA, EU and South America datasets were refreshed with updated fuel-mix factors. ## Request fields [#request-fields] - `type` (string, required): `road_freight` - `methodology` (string, required): `GLEC` - `origin` (string): SQUAKE tries to resolve the location whatever its format. Ideally, use the Post standard for addresses, an IATA/ICAO code for airports (format `^[A-Z]{3,4}$`, for example `"MUC"`), and a UN/LOCODE for other locations used in trade and transportation (format `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). You can also pass latitude and longitude (format `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. If you send both, SQUAKE uses `distance_in_km`. - `weight_in_tonnes` (number): Weight of the freight in tonnes. - `truck_type` (enum): Default value is `van_under_3.5_t`. For a more detailed mapping of load characteristics, fuel and truck types, refer to the GLEC database. North American truck types: `van_under_3.5_t`, `general`, `auto_carrier`, `dray`, `expedited`, `flatbed`, `heavy_bulk`, `ltl_dry_van`, `mixed`, `moving`, `package`, `refrigerated`, `specialized`, `tanker`, `tl_dry_van`. Chinese truck types: `articulated_truck_hdv_above_49_t_gvw`, `articulated_truck_hdv_under_18_t_gvw`, `articulated_truck_hdv_under_27_t_gvw`, `articulated_truck_hdv_under_35_t_gvw`, `articulated_truck_hdv_under_40_t_gvw`, `articulated_truck_hdv_under_43_t_gvw`, `articulated_truck_hdv_under_46_t_gvw`, `articulated_truck_hdv_under_49_t_gvw`, `articulated_truck_under_24_t_gvw`, `articulated_truck_under_25_t_gvw`, `articulated_truck_under_29_t_gvw`, `articulated_truck_under_31_t_gvw`, `articulated_truck_under_60_t_gvw`, `dump_truck_hdv_above_31_t_gvw`, `dump_truck_hdv_under_16_t_gvw`, `dump_truck_hdv_under_20_t_gvw`, `dump_truck_hdv_under_25_t_gvw`, `dump_truck_hdv_under_31_t_gvw`, `dump_truck_ldt_under_4.5_t_gvw`, `dump_truck_mdt_under_10.5_t_gvw`, `dump_truck_mdt_under_12.5_t_gvw`, `dump_truck_mdt_under_5.5_t_gvw`, `dump_truck_mdt_under_7_t_gvw`, `dump_truck_mdt_under_8.5_t_gvw`, `dump_truck_under_24_t_gvw`, `dump_truck_under_25_t_gvw`, `dump_truck_under_29_t_gvw`, `dump_truck_under_31_t_gvw`, `dump_truck_under_60_t_gvw`, `rigid_truck_hdv_above_31_t_gvw`, `rigid_truck_ldt_under_4.5_t_gvw`, `rigid_truck_mdt_under_10.5_t_gvw`, `rigid_truck_mdt_under_12.5_t_gvw`, `rigid_truck_mdt_under_16_t_gvw`, `rigid_truck_mdt_under_20_t_gvw`, `rigid_truck_mdt_under_25_t_gvw`, `rigid_truck_mdt_under_31_t_gvw`, `rigid_truck_mdt_under_5.5_t_gvw`, `rigid_truck_mdt_under_7_t_gvw`, `rigid_truck_mdt_under_8.5_t_gvw`, `rigid_truck_under_24_t_gvw`, `rigid_truck_under_25_t_gvw`, `rigid_truck_under_29_t_gvw`, `rigid_truck_under_31_t_gvw`, `rigid_truck_under_60_t_gvw`, `truck__hdv_above_12_t_gvw`, `truck__ldv_under_4.5_t_gvw`, `truck__mdv_under_12_t_gvw`. Other values: `artic_truck_40_gvw_lightweight_trailer`, `artic_truck_under_34_gvw`, `artic_truck_under_40_gvw_si_engine`, `artic_truck_under_40_gvw`, `artic_truck_under_44_gvw`, `artic_truck_under_60_gvw`, `artic_truck_under_72_gvw`, `auto_carrier`, `dray`, `expedited`, `flatbed`, `general`, `heavy_bulk`, `ltl_dry_van`, `mixed`, `moving`, `package`, `refrigerated`, `rigid_truck_under_12_gvw`, `rigid_truck_under_20_gvw`, `rigid_truck_under_26_gvw`, `rigid_truck_under_32_gvw`, `rigid_truck_under_7.5_gvw`, `specialized`, `tanker`, `tl_dry_van`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `load_characteristic` (enum): `average`, `heavy`, `light` or `container`. Defaults to `average`. - `fuel_type` (enum): `average`, `diesel`, `petrol`, `lng`, `lpg`, `bio-lng`, `hydrogen`, `electricity` or `cng`. Defaults to `average`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 123068, "carbon_unit": "gram", "items": [{ "carbon_quantity": 123068, "carbon_unit": "gram", "external_reference": "test_1", "type": "road_freight", "methodology": "GLEC", "distance": 1127.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 123068, "co2e_emissions_wtw_in_g": 123068, "co2e_per_tonne_km_in_g": 130, "tonne_km": 845, "reporting_year": 2024, "transportation_mode": "road_transportation" } } }] } ``` Smart Freight Centre helped us fine-tune our calculations of all freight and logistics operations in accordance with the GLEC Framework. ## Bibliography [#bibliography] - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Smart Freight Centre. Towards efficient and zero emissions. [https://www.smartfreightcentre.org/en/](https://www.smartfreightcentre.org/en/) # Sea freight (/docs/calculations/logistics/sea-freight) Calculate the emissions of sea freight shipments from the route or distance, the cargo weight and the vessel. SQUAKE supports four methodologies for sea freight. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [Clean Cargo](/docs/calculations/logistics/sea-freight/sea-freight-clean-cargo) | Trade lanes: `panama`, `trans_atlantic`, `trans_suez`, `trans_pacific`, `other` | Clean Cargo datasets (2025), harmonised with GLEC Framework v3.2 | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `trade_lane`, `cargo_type`, `energy_scope` | Only methodology that uses `trade_lane`. `cargo_type` is `dry` or `reefer` and defaults to `reefer`. | | [DIN EN 16258](/docs/calculations/logistics/sea-freight/sea-freight-din-en-16258) | Not stated | DIN EN 16258 (March 2013) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `vessel_type`, `energy_scope` | Only `tanker` and `container` vessels. The response includes energy (MJ) as well as emissions. | | [EMSA](/docs/calculations/logistics/sea-freight/sea-freight-emsa) 🇪🇺 | Ships listed in the vessel database | EMSA CO2 emission reports, based on ships' operational data | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `vessel_model`, `vessel_type`, `verifier_name`, `verifier_accreditation_number` | Uses a specific ship's data. Without `vessel_model` or `vessel_type`, SQUAKE falls back to a default emission factor. | | [GLEC](/docs/calculations/logistics/sea-freight/sea-freight-glec) | Not stated | GLEC Framework v3.2 (2025) | `origin` and `destination` or `distance_in_km`, `weight_in_tonnes`; optional `vessel_type`, `fuel_type`, `energy_scope` | Vessel types by ship category and size in DWT. `fuel_type` is `hfo`, `vlsfo` or `mdo`. | All four methodologies support audit records with `audit`. ## How to decide [#how-to-decide] - Use EMSA when you know the actual ship (`vessel_model`): it calculates from that ship's operational data rather than an average. - Use Clean Cargo for container shipments on a known trade lane, especially when you need to separate `dry` from `reefer` cargo. - Use GLEC when you know the vessel category and size, or the fuel, but not the specific ship. - Use DIN EN 16258 for tanker or container vessels when you want energy consumption in MJ alongside emissions. # Sea Freight: Clean Cargo (/docs/calculations/logistics/sea-freight/sea-freight-clean-cargo) Calculate sea freight emissions with the Clean Cargo methodology, the industry framework that factors in ship types, fuel consumption, operational profiles, cargo types and trade lanes. Type: `sea_freight` · Methodology: `CLEAN-CARGO` · Source: GLEC Framework v3.2, 2025 · Supports audit mode > **Updated for GLEC v3.2 (2025)** > The Clean Cargo average, trade-lane and combined datasets were refreshed for 2025 and harmonized with GLEC's global sea freight dataset. Vessel type and distance-tier logic are unchanged. ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "sea_freight", "external_reference": "test_1", "origin": "LON", "destination": "NYC", "weight_in_tonnes": 5.5, "cargo_type": "dry", "energy_scope": "wtw", "trade_lane": "trans_atlantic", "methodology": "CLEAN-CARGO" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "sea_freight", "external_reference": "test_1", "origin": "LON", "destination": "NYC", "weight_in_tonnes": 5.5, "cargo_type": "dry", "energy_scope": "wtw", "trade_lane": "trans_atlantic", "methodology": "CLEAN-CARGO" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `cargo_type` | `reefer` | No `cargo_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `sea_freight` - `methodology` (string, required): `CLEAN-CARGO` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, UN/LOCODE for ports (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `cargo_type` (enum): `dry` or `reefer`. Defaults to `reefer`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `trade_lane` (enum): `panama`, `trans_atlantic`, `trans_suez`, `trans_pacific` or `other`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 8312600, "carbon_unit": "gram", "items": [{ "carbon_quantity": 8312600, "carbon_unit": "gram", "external_reference": "test_1", "type": "sea_freight", "methodology": "CLEAN-CARGO", "distance": 934.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "clean_cargo", "data": { "co2e_in_g": 8312600, "co2e_emissions_wtw_in_g": 8312600, "co2e_per_tonne_km_in_g": 8.9, "tonne_km": 934000, "reporting_year": 2024, "transportation_mode": "sea_transportation" } } }] } ``` ## Bibliography [#bibliography] - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Towards efficient and zero emissions. Smart Freight Centre. [smartfreightcentre.org](https://www.smartfreightcentre.org/en/) # Sea Freight: DIN EN 16258 (/docs/calculations/logistics/sea-freight/sea-freight-din-en-16258) Calculate sea freight energy use and greenhouse gas emissions with the DIN EN 16258 standard from the European Committee for Standardization (CEN), which accounts for ship type, fuel consumed, distance traveled and cargo tonnage. Type: `sea_freight` · Methodology: `DIN-EN-16258` · Source: DIN EN 16258, Mar 2013 · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "sea_freight", "external_reference": "test_1", "origin": "BRA", "destination": "LAX", "weight_in_tonnes": 98, "methodology": "DIN-EN-16258", "energy_scope": "wtw" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "sea_freight", "external_reference": "test_1", "origin": "BRA", "destination": "LAX", "weight_in_tonnes": 98, "methodology": "DIN-EN-16258", "energy_scope": "wtw" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `vessel_type` | `container` | No `vessel_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## How it's calculated [#how-its-calculated] Emissions are first calculated for the whole VOS from its fuel consumption. **Well-to-wheels GHG emissions of the VOS:** `G_w(VOS) = F(VOS) × g_w` - **F(VOS)**: Total fuel consumption used for the VOS. - **g_w**: Well-to-wheels GHG emission factor for the fuel used. **Tank-to-wheels GHG emissions of the VOS:** `G_t(VOS) = F(VOS) × g_t` - **g_t**: Tank-to-wheels GHG emission factor for the fuel used. A share of the VOS's energy and emissions is then allocated to the transport service for the leg, based on the relative transport activity of the leg and of the associated VOS. **Share of the leg:** `S(leg) = T(leg) ÷ T(VOS)` - **S(leg)**: Share of the VOS's energy and emissions allocated to a transport service for the leg. - **T(leg)**: The transport service's transport activity for the leg. - **T(VOS)**: Transport activity of the VOS that is related to the leg. **GHG emissions of the leg:** `G_w(leg) = G_w(VOS) × S(leg); G_t(leg) = G_t(VOS) × S(leg)` - **G_w(leg)**: Well-to-wheels GHG emissions allocated to the leg. - **G_t(leg)**: Tank-to-wheels GHG emissions allocated to the leg. ## Request fields [#request-fields] - `type` (string, required): `sea_freight` - `methodology` (string, required): `DIN-EN-16258` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, UN/LOCODE for ports (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `vessel_type` (enum): DIN EN 16258 only considers `tanker` and `container`. Defaults to `container`. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 17646134, "carbon_unit": "gram", "items": [{ "carbon_quantity": 17646134, "carbon_unit": "gram", "external_reference": "test_1", "type": "sea_freight", "methodology": "DIN-EN-16258", "distance": 10674.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "DIN-EN-16258", "data": { "energy_factor_ttw_in_MJ": 209580, "energy_factor_wtw_in_MJ": 228210, "ghg_emissions_ttw_in_g": 16300681, "ghg_emissions_wtw_in_g": 17646134 } } }] } ``` ## Bibliography [#bibliography] Method for Calculating and Declaring Energy Consumption. DIN EN 16258, March 2013. [doi:10.31030/1894795](https://dx.doi.org/10.31030/1894795) # Sea Freight: EMSA 🇪🇺 (/docs/calculations/logistics/sea-freight/sea-freight-emsa) Calculate sea freight emissions with the methodology of the European Maritime Safety Agency (EMSA), which is based on ships' operational data: fuel consumption records, monitoring system data and voyage specifics. Type: `sea_freight` · Methodology: `EU-EMSA` · Supports audit mode ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "sea_freight", "external_reference": "test_1", "origin": "USNYC", "destination": "DEBER", "weight_in_tonnes": 24, "vessel_model": "lita", "vessel_type": "bulk_carrier", "verifier_name": "verifavia_sarl", "methodology": "EU-EMSA" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "sea_freight", "external_reference": "test_1", "origin": "USNYC", "destination": "DEBER", "weight_in_tonnes": 24, "vessel_model": "lita", "vessel_type": "bulk_carrier", "verifier_name": "verifavia_sarl", "methodology": "EU-EMSA" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] `vessel_type` has no default. If you send neither `vessel_type` nor `vessel_model`, SQUAKE uses a default emission factor instead of a specific vessel's. ## Request fields [#request-fields] - `type` (string, required): `sea_freight` - `methodology` (string, required): `EU-EMSA` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, UN/LOCODE for ports (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `vessel_model` (string): See [the database](https://squake.notion.site/6fe9340b62a840a6b840111ab2e8e1bf?v=40597c33c6334de889fe34466f6f8dee&pvs=4) for values. - `verifier_name` (string): See [the database](https://squake.notion.site/6fe9340b62a840a6b840111ab2e8e1bf?v=40597c33c6334de889fe34466f6f8dee&pvs=4) for values. - `verifier_accreditation_number` (string): See [the database](https://squake.notion.site/6fe9340b62a840a6b840111ab2e8e1bf?v=40597c33c6334de889fe34466f6f8dee&pvs=4) for values. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 2119391, "carbon_unit": "gram", "items": [{ "carbon_quantity": 2119391, "carbon_unit": "gram", "external_reference": "test_1", "type": "sea_freight", "methodology": "EU-EMSA", "distance": 7356.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] CO2 Emission Report. EMSA. [mrv.emsa.europa.eu](https://mrv.emsa.europa.eu/#public/emission-report) # Sea Freight: GLEC (/docs/calculations/logistics/sea-freight/sea-freight-glec) Calculate sea freight emissions with the Global Logistics Emissions Council (GLEC) framework, which factors in fuel consumption, ship operational practices and auxiliary activities at ports. Type: `sea_freight` · Methodology: `GLEC` · Source: GLEC Framework v3.2, 2025 · Supports audit mode > **Updated for GLEC v3.2 (2025)** > One emission factor was revised (international container vessels, energy scope calculation). Vessel categories, distance tiers and well-to-wheel multipliers are unchanged. ## Sample requests [#sample-requests] Send the first body for a quote before booking. Once the booking is final, send it again with `audit` set to `true`. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "sea_freight", "external_reference": "test_2", "origin": "OSL", "destination": "HEL", "weight_in_tonnes": 86, "fuel_type": "vlsfo", "vessel_type": "liquefied_gas_tanker_under_199999_dwt", "load_characteristic": "heavy", "energy_scope": "ttw", "methodology": "GLEC" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "sea_freight", "external_reference": "test_2", "origin": "OSL", "destination": "HEL", "weight_in_tonnes": 86, "fuel_type": "vlsfo", "vessel_type": "liquefied_gas_tanker_under_199999_dwt", "load_characteristic": "heavy", "energy_scope": "ttw", "methodology": "GLEC" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `vessel_type` | `general_cargo_under_4999_dwt` | No `vessel_type` is sent | | `fuel_type` | `hfo` | No `fuel_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `sea_freight` - `methodology` (string, required): `GLEC` - `origin` (string): SQUAKE tries to resolve any format. Ideally, use the Post standard for addresses, UN/LOCODE for ports (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. - `weight_in_tonnes` (number): Cargo weight in tonnes. - `vessel_type` (enum): GLEC defaults to `general_cargo_under_4999_dwt`. Values are `bulk_carrier_under_9999_dwt`, `bulk_carrier_under_34999_dwt`, `bulk_carrier_under_59999_dwt`, `bulk_carrier_under_99999_dwt`, `bulk_carrier_under_199999_dwt`, `bulk_carrier_above_200000_dwt`, `chemical_tanker_under_4999_dwt`, `chemical_tanker_under_9999_dwt`, `chemical_tanker_under_19999_dwt`, `chemical_tanker_under_39999_dwt`, `chemical_tanker_above_40000_dwt`, `general_cargo_under_4999_dwt`, `general_cargo_under_9999_dwt`, `general_cargo_under_19999_dwt`, `general_cargo_above_20000_dwt`, `liquefied_gas_tanker_under_49999_dwt`, `liquefied_gas_tanker_under_99999_dwt`, `liquefied_gas_tanker_under_199999_dwt`, `liquefied_gas_tanker_above_200000_dwt`, `oil_tanker_under_4999_dwt`, `oil_tanker_under_9999_dwt`, `oil_tanker_under_19999_dwt`, `oil_tanker_under_59999_dwt`, `oil_tanker_under_79999_dwt`, `oil_tanker_under_119999_dwt`, `oil_tanker_under_199999_dwt`, `oil_tanker_above_200000_dwt`, `other_liquids_tankers_under_999_dwt`, `other_liquids_tankers_above_1000_dwt`, `ferry_ropax_under_1999_dwt`, `ferry_ropax_under_4999_dwt`, `ferry_ropax_under_9999_dwt`, `ferry_ropax_under_19999_dwt`, `ferry_ropax_above_20000_dwt`, `refrigerated_bulk_under_1999_dwt`, `refrigerated_bulk_under_5999_dwt`, `refrigerated_bulk_under_9999_dwt` or `refrigerated_bulk_above_10000_dwt`. See the [mapping of `vessel_type` to `fuel_type`](https://squake.notion.site/Sea-Freight-GLEC-f1ab939702824e78b1b2ec4c702d328e?pvs=4). - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `fuel_type` (enum): `hfo`, `vlsfo` or `mdo`. Defaults to `hfo`. See the [mapping of `vessel_type` to `fuel_type`](https://squake.notion.site/Sea-Freight-GLEC-f1ab939702824e78b1b2ec4c702d328e?pvs=4). - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 713817, "carbon_unit": "gram", "items": [{ "carbon_quantity": 713817, "carbon_unit": "gram", "external_reference": "test_2", "type": "sea_freight", "methodology": "GLEC", "distance": 883.0, "distance_unit": "kilometer", "algorithm_specifics": { "algorithm_type": "glec", "data": { "co2e_in_g": 713817, "co2e_emissions_wtw_in_g": 835318, "co2e_per_tonne_km_in_g": 9, "tonne_km": 75938, "reporting_year": 2024, "transportation_mode": "sea_transportation" } } }] } ``` ## Bibliography [#bibliography] Smart Freight Centre helped us fine-tune our calculations of all freight and logistics operations in line with the GLEC framework. - Smart Freight Centre (2025). Global Logistics Emissions Council Framework V3.2. - Towards efficient and zero emissions. Smart Freight Centre. [smartfreightcentre.org](https://www.smartfreightcentre.org/en/) # Van (/docs/calculations/logistics/van) Calculate the emissions of van journeys from the route or distance and the van itself, with the EEA methodology. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [EEA](/docs/calculations/logistics/van/van-eea) 🇪🇺 | Vans listed in the van database | EEA monitoring of CO2 emissions from vans (June 2021) | `origin` and `destination` or `distance_in_km`; optional `manufacturer`, `model`, `fuel_type`, `engine_size_in_cubic_cm` | Calculates per vehicle, not per tonne of cargo, so no weight field. Supports audit records. | ## When to use it [#when-to-use-it] - Use EEA to calculate a van journey per vehicle rather than per tonne of cargo. - Take `manufacturer`, `model`, `fuel_type` and `engine_size_in_cubic_cm` values from the [van database](https://squake.notion.site/d520ba8c8e7d46d2a5e92ad953ca1705?v=d3fdc860265f449eb32b3c5e23855b0a&pvs=4) linked from the methodology page. - For freight measured by weight in a light truck, see [Road freight](/docs/calculations/logistics/road-freight): its GLEC methodology accepts `van_under_3.5_t`. # Van: EEA 🇪🇺 (/docs/calculations/logistics/van/van-eea) Calculate van journey emissions with the European Environment Agency (EEA) methodology, based on the van's manufacturer, model, fuel type and engine size. Type: `van` · Methodology: `EU-EEA` · Source: EEA, Jun 2021 · Supports audit mode ## About the methodology [#about-the-methodology] The European Environment Agency (EEA) guides European nations toward sustainable futures. For vans, the EEA's methodology focuses on emissions from vehicle operation, taking into account fuel type, engine efficiency and the age of the vehicle. It covers both direct emissions from combustion and indirect emissions from producing and distributing fuel. The methodology gives member states a consistent approach when they report their emissions against European Union climate objectives. As a standardised metric system, it offers a harmonised view of the van sector's carbon footprint and supports informed decisions on policy adjustments and green transition strategies. ## Sample requests [#sample-requests] Send a quote before the trip is booked, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "van", "external_reference": "test_1", "origin": "LON", "destination": "MIL", "manufacturer": "citroen", "model": "berlingo_4x4", "fuel_type": "diesel", "engine_size_in_cubic_cm": 1560, "methodology": "EU-EEA" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "van", "external_reference": "test_1", "origin": "LON", "destination": "MIL", "manufacturer": "citroen", "model": "berlingo_4x4", "fuel_type": "diesel", "engine_size_in_cubic_cm": 1560, "methodology": "EU-EEA" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Request fields [#request-fields] The accepted values for `manufacturer`, `model`, `fuel_type` and `engine_size_in_cubic_cm` are listed in the [van database](https://squake.notion.site/d520ba8c8e7d46d2a5e92ad953ca1705?v=d3fdc860265f449eb32b3c5e23855b0a&pvs=4). - `type` (string, required): `van` - `methodology` (string, required): `EU-EEA` - `origin` (string): SQUAKE tries to resolve the location whatever its format. Ideally, use the Post standard for addresses, an IATA/ICAO code for airports (format `^[A-Z]{3,4}$`, for example `"MUC"`), and a UN/LOCODE for other locations used in trade and transportation (format `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). You can also pass latitude and longitude (format `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. If you send both, SQUAKE uses `distance_in_km`. - `manufacturer` (string): Van manufacturer, as listed in the [van database](https://squake.notion.site/d520ba8c8e7d46d2a5e92ad953ca1705?v=d3fdc860265f449eb32b3c5e23855b0a&pvs=4). - `model` (string): Van model, as listed in the [van database](https://squake.notion.site/d520ba8c8e7d46d2a5e92ad953ca1705?v=d3fdc860265f449eb32b3c5e23855b0a&pvs=4). - `fuel_type` (string): Fuel type, as listed in the [van database](https://squake.notion.site/d520ba8c8e7d46d2a5e92ad953ca1705?v=d3fdc860265f449eb32b3c5e23855b0a&pvs=4). - `engine_size_in_cubic_cm` (number): Engine size in cubic centimetres, as listed in the [van database](https://squake.notion.site/d520ba8c8e7d46d2a5e92ad953ca1705?v=d3fdc860265f449eb32b3c5e23855b0a&pvs=4). - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 132660, "carbon_unit": "gram", "items": [{ "carbon_quantity": 132660, "carbon_unit": "gram", "external_reference": "test_1", "type": "van", "methodology": "EU-EEA", "distance": 1206.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] Monitoring of CO2 emissions from vans. European Environment Agency, 29 June 2021. [https://www.eea.europa.eu/data-and-maps/data/vans-18](https://www.eea.europa.eu/data-and-maps/data/vans-18). # Vacation Rental: SQUAKE (/docs/calculations/travel/accommodation/accommodation-squake) Calculate the emissions of a vacation rental stay from heating, electricity and water use plus amenities such as a sauna, swimming pool or air conditioner, with SQUAKE's own methodology. Type: `accommodation` · Methodology: `SQUAKE` · Supports audit mode ## Overview [#overview] The vacation rental industry has grown rapidly, which brings both opportunities and challenges for its environmental impact. SQUAKE developed a methodology dedicated to vacation rentals. Rooted in research and data analysis, it looks closely at heating, electricity and water consumption, and at amenities. The methodology is certified by GUTcert following the "GHG Protocol - Product Life Cycle Accounting & Reporting Standard". By examining these elements, it gives a holistic view of the climate impact of vacation rentals. The resulting metrics give property owners and guests insights that encourage sustainable practices. ## How it's calculated [#how-its-calculated] **CO₂ in grams:** `nights × (floor area × heating per m² per day + visitors × (electricity per person per day + water per person per day) + sauna per day + swimming pool per day + air conditioner per day)` - **Nights**: `number_of_nights`: number of nights of the stay. - **Floor area**: `square_meters`: floor area of the rental. - **Heating per m² per day**: `co2_for_heating_per_day_per_sqm_in_g`: grams of CO₂ for heating per square meter per day. - **Visitors**: `number_of_visitors`: number of people staying. - **Electricity per person per day**: `co2_for_electricity_per_day_per_person_in_g`: grams of CO₂ for electricity per person per day. - **Water per person per day**: `co2_for_water_per_day_per_person_in_g`: grams of CO₂ for water per person per day. - **Sauna per day**: `co2_for_sauna_per_day_in_g`, added only if `sauna` is `true`. - **Swimming pool per day**: `co2_for_swimming_pool_per_day_in_g`, added only if `swimming_pool` is `true`. - **Air conditioner per day**: `co2_for_air_conditioner_per_day_in_g`, added only if `air_conditioner` is `true`. ### Calculation background [#calculation-background] 1. Carbon emissions per **person** are estimated from: 1. Average **water consumption** per day, converted to carbon emissions per day (sources: Global Water Use (n.d.). Worldometer.; Review of Emission Factors 2021 (2021). Climate Neutral Group.; etc.) 2. Average **electricity consumption** per day, converted to carbon emissions per day (sources: Greenhouse gas emission intensity of electricity (2022, July 14). European Environment Agency.; Carbon intensity of electricity (n.d.). Our World in Data.; Electric power consumption (2014). The World Bank.; etc.) 2. Carbon emissions per **square meter**: 1. Average **heat consumption** per day, converted to carbon emissions per day (sources: Average CO2 emission factor (n.d.). Enerdata.; Common Carbon Metric (2009). UNEP-SBCI.; CO2 emissions per m2 for space heating (2011, August 8). European Environment Agency.; Dorothy L.Robinson. (2011, July). Australian wood heaters currently increase global warming and health costs. Atmospheric Pollution Research, Volume 2, Issue 3, July 2011, Pages 267-274.) 3. Carbon emissions for **additional factors**: 1. Sauna emissions are estimated from its average usage (source: Tissari, J., et al. (2019, December 4). Fine Particle Emissions from Sauna Stoves: Effects of Combustion Appliance and Fuel, and Implications for the Finnish Emission Inventory. Atmosphere, 10 (12).) 2. Emissions from **parking** and **garage** (underground parking) are estimated from a research paper that accounts for emissions from car parking (source: Andrzejewski, M., et al. (2021, September 1). Analysis of pollutant emissions and fuel consumption for the use of a multi-storey car park. Combustion Engines, 187(4), 46-51.) 3. Emissions from **cooling** or **air conditioning** are estimated from the average usage per day across the whole year (source: Dean, B., et al. (2018, May). The Future of Cooling: Opportunities for energy-efficient air conditioning. International Energy Agency.; etc.) 4. Emissions from a **swimming pool** are estimated per day (sources: Gallion, T., et al. (2014, May 23). Estimating Water, Energy, and Carbon Footprints of Residential Swimming Pools. Water Reclamation and Sustainability, 343-359.; Guide to Low Carbon Swimming Pools (n.d.). Environmental Protection Department.; Jordaan, N., Narayanan, R. (2019, March 12). A numerical study on various heating options applied to swimming pool for energy saving. Energy Procedia, 160, 131-138.; etc.) 4. Seasonal logic: 1. Heating and cooling seasons are defined from the average country temperature (sources: "Worlddata: The World in Numbers." Worlddata.info; World Bank Climate Change Knowledge Portal.; The Weather Year Round Anywhere on Earth - Weather Spark.) 2. During the cooling season, the air conditioner is assumed to be used every day, and heating is neglected. 3. During the heating season, the air conditioner is assumed not to be used, and the heating factor is extrapolated from the average heating consumption for the whole season. 4. Outside both seasons, energy consumption for heating and cooling is assumed to be averaged. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "external_reference": "test_1", "type": "accommodation", "number_of_nights": 10, "starts_on": "2023-10-10", "ends_on": "2023-10-21", "sauna": false, "country": "DE", "number_of_travelers": 2, "square_meters": 60, "parking": true, "garage": false, "swimming_pool": false, "air_conditioner": true, "methodology": "SQUAKE" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "external_reference": "test_1", "type": "accommodation", "number_of_nights": 10, "starts_on": "2023-10-10", "ends_on": "2023-10-21", "sauna": false, "country": "DE", "number_of_travelers": 2, "square_meters": 60, "parking": true, "garage": false, "swimming_pool": false, "air_conditioner": true, "methodology": "SQUAKE" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | | `square_meters` | Depends on the country | No `square_meters` is sent | | `sauna` | `false` | No `sauna` is sent | | `parking` | `true` | No `parking` is sent | | `swimming_pool` | `false` | No `swimming_pool` is sent | | `air_conditioner` | `false` | No `air_conditioner` is sent | | `garage` | `false` | No `garage` is sent | ## Request fields [#request-fields] - `type` (string, required): `accommodation` - `methodology` (string, required): `SQUAKE` - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `number_of_nights` (integer): Required if you leave out the start and end dates; ignored otherwise. Minimum `1`. - `starts_on` (string): ISO 8601 date, `YYYY-MM-DD`. Required for the season-specific methodology, or if you leave out `number_of_nights`. - `ends_on` (string): ISO 8601 date, `YYYY-MM-DD`. Required for the season-specific methodology, or if you leave out `number_of_nights`. - `country` (string): ISO 3166-1 alpha-2 or alpha-3 code, 2 to 3 characters, matching `^[A-Z]{2,3}$`. - `square_meters` (number): Minimum `1`. The default depends on the country. - `sauna` (boolean): Defaults to `false`. - `parking` (boolean): Defaults to `true`. - `swimming_pool` (boolean): Defaults to `false`. - `air_conditioner` (boolean): Defaults to `false`. - `garage` (boolean): Defaults to `false`. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 248687, "carbon_unit": "gram", "items": [{ "carbon_quantity": 248687, "carbon_unit": "gram", "external_reference": "test_1", "type": "accommodation", "methodology": "SQUAKE" }] } ``` ## Bibliography [#bibliography] - Andrzejewski, M., et al. (2021, September 1). Analysis of pollutant emissions and fuel consumption for the use of a multi-storey car park. Combustion Engines, 187(4), 46-51. [DOI: https://doi.org/10.19206/CE-141740](https://doi.org/10.19206/CE-141740) - Average CO2 emission factor (n.d.). Enerdata. Retrieved from https://yearbook.enerdata.net/co2/toe-emissions-co2.html - Carbon intensity of electricity (n.d.). Our World in Data. Retrieved from https://ourworldindata.org/grapher/carbon-intensity-electricity?time=latest - Charting the Progress of Populations (n.d.). The United Nations. Retrieved from https://www.un.org/en/development/desa/population/publications/pdf/trends/ProgressOfPopulations/14.pdf - Common Carbon Metric (2009). UNEP-SBCI. Retrieved from https://wedocs.unep.org/handle/20.500.11822/7922 - CO2 intensity (n.d.) The World Bank. Retrieved from https://data.worldbank.org/indicator/EN.ATM.CO2E.EG.ZS - CO2 emissions per m2 for space heating (2011, August 8). European Environment Agency. Retrieved from https://www.eea.europa.eu/data-and-maps/figures/co2-emissions-per-m2-for-1 - Databank (n.d.) The World Bank. Retrieved from https://databank.worldbank.org/source/world-development-indicators - Dean, B., et al. (2018, May). The Future of Cooling: Opportunities for energy-efficient air conditioning. *International Energy Agency.* Retrieved from https://iea.blob.core.windows.net/assets/0bb45525-277f-4c9c-8d0c-9c0cb5e7d525/The_Future_of_Cooling.pdf - Dorothy L.Robinson. (2011, July). Australian wood heaters currently increase global warming and health costs. Atmospheric Pollution Research, Volume 2, Issue 3, July 2011, Pages 267-274. [doi.org/10.5094/APR.2011.033](https://doi.org/10.5094/APR.2011.033) - Electric power consumption (2014). The World Bank. Retrieved from https://data.worldbank.org/indicator/EG.USE.ELEC.KH.PC - Gallion, T., et al. (2014, May 23). Estimating Water, Energy, and Carbon Footprints of Residential Swimming Pools. Water Reclamation and Sustainability, 343-359. https://doi.org/10.1016/B978-0-12-411645-0.00014-6 - Global Water Use (n.d.). Worldometer. Retrieved from https://www.worldometers.info/water/ - Green Facts (n.d.). University of Michigan. Retrieved from https://hr.umich.edu/sites/default/files/green-facts-%202015.pdf - Greenhouse gas emission intensity of electricity (2022, July 14). European Environment Agency. Retrieved from https://www.eea.europa.eu/ims/greenhouse-gas-emission-intensity-of-1 - Greenhouse gas emissions by source sector (2022, June 10). eurostat. Retrieved from https://appsso.eurostat.ec.europa.eu/nui/show.do?dataset=env_air_gge&lang=en - Guide to Low Carbon Swimming Pools (n.d.). Environmental Protection Department. Retrieved from https://www.carbon-footprint.hk/PDF/EPD_CA_Guidebook_Swimming_Pools_Eng.pdf - Heckman L. (2009, September 10). Can lifts be energy-efficient, or should I take the stairs? *The Guardian.* Retrieved from https://www.theguardian.com/environment/blog/2009/sep/04/lifts-energy-take-the-stairs - How much power does a computer use? And how much CO2 does that represent? (2022) [energuide.be](https://www.energuide.be). Retrieved from [https://www.energuide.be/en/questions-answers/how-much-power-does-a-computer-use-and-how-much-co2-does-that-represent/54/#:~:text=The power consumption of a,of CO2 per year](https://www.energuide.be/en/questions-answers/how-much-power-does-a-computer-use-and-how-much-co2-does-that-represent/54/#:~:text=The%20power%20consumption%20of%20a,of%20CO2%20per%20year). - Jordaan, N., Narayanan, R. (2019, March 12). A numerical study on various heating options applied to swimming pool for energy saving. Energy Procedia, 160, 131-138. https://doi.org/10.1016/j.egypro.2015.12.053 - Juhrich, K. (2016, June 28). Co2 Emission Factors for Fossil Fuels. German Environment Agency. Retrieved from https://www.umweltbundesamt.de/sites/default/files/medien/1968/publikationen/co2_emission_factors_for_fossil_fuels_correction.pdf - Kaza, S., et al. (2018). What a Waste 2.0: A Global Snapshot of Solid Waste Management to 2050. *World Bank Group*. Retrieved from https://openknowledge.worldbank.org/handle/10986/30317 - Knago-Reynoso, M., et al. (2018, February 9). Estimation of Co2 emissions produced by commercial grills in Veracruz, Mexico. *Sustainability*, *10... # Accommodation (/docs/calculations/travel/accommodation) Calculate vacation rental stay emissions on the Calculation API from heating, electricity and water use plus amenities. SQUAKE's own vacation rental methodology is the one supported. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [Vacation Rental: SQUAKE](/docs/calculations/travel/accommodation/accommodation-squake) | Not stated | SQUAKE methodology, certified by GUTcert against the GHG Protocol Product Life Cycle Standard | `number_of_nights`, or `starts_on` and `ends_on`; optional `country`, `number_of_travelers`, `square_meters`, `sauna`, `parking`, `swimming_pool`, `air_conditioner`, `garage` | Send `starts_on` and `ends_on` for the season-specific calculation | ## How to decide [#how-to-decide] - **You know the stay dates**: send `starts_on` and `ends_on` instead of `number_of_nights`. The season-specific calculation, which applies heating and cooling seasons, needs them. - **You know the property**: send `square_meters` and the amenities. Without `square_meters`, the default depends on the country, and `parking` defaults to `true`. # Bus: DEFRA 🇬🇧 (/docs/calculations/travel/bus/bus-defra) Calculate bus and coach travel emissions with the UK government's DEFRA conversion factors, by bus category and energy scope, pinned to a Conversion Factors year if you need to. Type: `bus` · Methodology: `DEFRA` · Supports audit mode ## About the methodology [#about-the-methodology] DEFRA's methodology for the carbon footprint of bus travel is based on standardised emission factors published by the UK government. These factors are derived from extensive national data sources and give a reliable basis for estimating greenhouse gas emissions from different types of bus transport. The methodology covers several bus categories, including local buses inside and outside London and long-distance coaches. Emissions are calculated from factors such as fuel consumption, average occupancy and energy efficiency. DEFRA supports two energy scopes: tank-to-wheel (TTW) and well-to-wheel (WTW). WTW is the default, for a more comprehensive lifecycle assessment. Building on DEFRA's established reporting framework, businesses and policymakers get consistent, transparent carbon accounting for bus travel, aligned with UK environmental reporting regulations and sustainability strategies. ## Versions [#versions] Use `methodology_version` to pin the DEFRA Conversion Factors year (for example `"2024"`). If you omit it, SQUAKE automatically applies the latest supported year. Pin a specific year for reproducibility and auditability. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "bus", "external_reference": "test_1", "origin": "London", "destination": "Bristol", "bus_type": "coach", "number_of_travelers": 3, "energy_scope": "wtw", "methodology": "DEFRA", "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "bus", "external_reference": "test_1", "origin": "London", "destination": "Bristol", "bus_type": "coach", "number_of_travelers": 3, "energy_scope": "wtw", "methodology": "DEFRA", "methodology_version": "2024" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `bus_type` | `average_local_bus` | No `bus_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | | `methodology_version` | Latest supported DEFRA year | No `methodology_version` is sent | ## Request fields [#request-fields] - `type` (string, required): `bus` - `methodology` (string, required): `DEFRA` - `methodology_version` (string): DEFRA Conversion Factors year, for example `2024`. If omitted, SQUAKE uses the latest supported year. - `external_reference` (string): Correlates the response to the request, up to 128 characters. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `origin` (string): Postal, IATA/ICAO, UN/LOCODE or `lat,lon`. See [Origin and destination formats](#origin-and-destination-formats). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): If present, overrides `origin` and `destination`. - `bus_type` (enum): `local_bus_not_london`, `local_bus_london`, `average_local_bus` (default) or `coach`. - `energy_scope` (enum): `wtw` (default), well-to-wheel, or `ttw`, tank-to-wheel. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `MUC`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `DEHAM`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `+40.712,-74.006`). ### Provider and stop codes for buses [#provider-and-stop-codes-for-buses] You can also reference bus stops or stations with provider-prefixed stop IDs, in the format `:` (for example `flixbus:2006`). Common provider prefixes: `flixbus`, `distribusion`, `busbud`. > **Fallback** > If a value can't be resolved, SQUAKE falls back to generic (non-journey-specific) DEFRA bus factors. ```jsonc title="Provider stop codes" { "type": "bus", "methodology": "DEFRA", "origin": "flixbus:london_victoria", "destination": "flixbus:bristol_bond_st", "bus_type": "coach", "number_of_travelers": 1, "energy_scope": "wtw", "methodology_version": "2024" } ``` ```jsonc title="UN/LOCODE" { "type": "bus", "methodology": "DEFRA", "origin": "GBLON", "destination": "GBBRS", "bus_type": "coach", "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "bus", "methodology": "DEFRA", "origin": "+51.495,-0.144", "destination": "+51.455,-2.597", "bus_type": "coach", "number_of_travelers": 1 } ``` ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 15240, "carbon_unit": "gram", "items": [{ "carbon_quantity": 15240, "carbon_unit": "gram", "external_reference": "test_1", "type": "bus", "methodology": "DEFRA", "methodology_version": "2024", "bus_type": "coach", "energy_scope": "wtw", "distance": 190.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] UK Government: [Greenhouse Gas Emissions: Research & Statistics](https://www.gov.uk/environment/greenhouse-gas-emissions#research_and_statistics). # Bus: SQUAKE (/docs/calculations/travel/bus/bus-squake) Calculate bus travel emissions with the SQUAKE methodology, which can use operator-specific data and fuel type for a more accurate result. Type: `bus` · Methodology: `SQUAKE` · Supports audit mode ## About the methodology [#about-the-methodology] SQUAKE's approach to bus carbon calculation stands out for integrating operator-specific data. Buses can vary widely in environmental impact depending on many variables: bus age, fuel type, maintenance schedules, route frequencies and driver habits can all play a role in the carbon footprint of a single journey. SQUAKE aggregates broad industry metrics and also narrows down to individual bus operators. This lets transportation authorities and companies gain precise insights and target their carbon reduction strategies. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "bus", "external_reference": "test_1", "origin": "Berlin", "destination": "Frankfurt am Main", "number_of_travelers": 1, "methodology": "SQUAKE", "fuel_type": "diesel", "operator_name": "flixbus" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "bus", "external_reference": "test_1", "origin": "Berlin", "destination": "Frankfurt am Main", "number_of_travelers": 1, "methodology": "SQUAKE", "fuel_type": "diesel", "operator_name": "flixbus" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | `average` | No `fuel_type` is sent | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | ## Request fields [#request-fields] - `type` (string, required): `bus` - `methodology` (string, required): `SQUAKE` - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can link the resulting emissions to the requested item. Especially useful when you request multiple items, because SQUAKE doesn't guarantee to keep the same order. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `origin` (string): SQUAKE tries to resolve it whatever its format. See [Origin and destination formats](#origin-and-destination-formats). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from `origin` and `destination`. If you send both, SQUAKE uses `distance_in_km`. - `fuel_type` (enum): `lng`, `diesel`, `lpg`, `phev`, `hydrogen`, `electricity`. Defaults to `average`. - `operator_name` (string): Pass the operator's name to get a more accurate result. See the [list of supported operators](https://squake.notion.site/31f83752e3bd4cf2ba314ceb8fa2acc6?v=5190873dd753431187b735a8fe40038f). - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `"MUC"`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). ### Provider and stop codes for buses [#provider-and-stop-codes-for-buses] You can also reference bus stops or stations with provider-prefixed stop IDs, in the format `:` (for example `flixbus:2006`). Common provider prefixes: `flixbus`, `distribusion`, `busbud`. > **Fallback** > If a value can't be resolved, SQUAKE falls back to generic (non-journey-specific) bus factors under the SQUAKE methodology. ```jsonc title="Provider stop codes" { "type": "bus", "methodology": "SQUAKE", "origin": "flixbus:berlin_zob", "destination": "flixbus:frankfurt_sued", "operator_name": "flixbus", "number_of_travelers": 1 } ``` ```jsonc title="UN/LOCODE" // For multimodal contexts { "type": "bus", "methodology": "SQUAKE", "origin": "DEBER", "destination": "DEFRA", "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "bus", "methodology": "SQUAKE", "origin": "+52.501,13.281", "destination": "+50.094,8.662", "number_of_travelers": 1 } ``` ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 12374, "carbon_unit": "gram", "items": [{ "carbon_quantity": 12374, "carbon_unit": "gram", "external_reference": "test_1", "type": "bus", "methodology": "SQUAKE", "distance": 538.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - Chang, Ching-Chih, et al. "Life Cycle Assessment of Carbon Footprint in Public Transportation - a Case Study of Bus Route NO. 2 in Tainan City, Taiwan." *Procedia Manufacturing*, vol. 30, Elsevier BV, 2019, pp. 388–95. [doi:10.1016/j.promfg.2019.02.054](https://doi.org/10.1016/j.promfg.2019.02.054). - Logan, Kathryn G., et al. "Electric and Hydrogen Buses: Shifting From Conventionally Fuelled Cars in the UK." *Transportation Research Part D: Transport and Environment*, vol. 85, Elsevier BV, Aug. 2020, p. 102350. [doi:10.1016/j.trd.2020.102350](https://doi.org/10.1016/j.trd.2020.102350). - "Which form of transport has the smallest carbon footprint?" *Our World in Data*, [ourworldindata.org/travel-carbon-footprint](https://ourworldindata.org/travel-carbon-footprint). # Bus (/docs/calculations/travel/bus) Calculate bus and coach travel emissions on the Calculation API with one of the bus methodologies below. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [DEFRA 🇬🇧](/docs/calculations/travel/bus/bus-defra) | Local buses inside and outside London, and coaches | UK government DEFRA Conversion Factors | `origin` and `destination` or `distance_in_km`; optional `bus_type`, `energy_scope`, `methodology_version` | Pin a factor year with `methodology_version` | | [SQUAKE](/docs/calculations/travel/bus/bus-squake) | Not stated | SQUAKE methodology with operator-specific data | `origin` and `destination` or `distance_in_km`; optional `operator_name`, `fuel_type` | Operator-specific factors for supported operators | Both methodologies support audit mode and accept provider-prefixed stop IDs such as `flixbus:2006` as `origin` and `destination`. ## How to decide [#how-to-decide] - **You know the bus operator**: SQUAKE uses `operator_name` for a more accurate result when the operator is on its supported list. - **You know the vehicle's fuel**: SQUAKE takes a `fuel_type`, such as `electricity` or `hydrogen`. - **You need DEFRA's bus categories, a factor year or an energy scope**: DEFRA takes `bus_type`, `methodology_version` and `energy_scope`. # Car: ACRISS (/docs/calculations/travel/car/car-acriss) Calculate car emissions with the ACRISS methodology, which differentiates emissions by vehicle class, fuel or energy type and usage patterns such as distance and trip context. Type: `car` · Methodology: `ACRISS` · Supports audit mode ACRISS (Association of Car Rental Industry Systems Standards) is known for its rental car coding standards and, increasingly, for methodologies that address the environmental impact of car travel. The methodology recognises that a compact city car differs markedly from a large SUV. It estimates emissions from vehicle specifications, driving behaviour assumptions and maintenance practices, reflects the market shift toward EVs, HEVs and PHEVs, and is updated periodically to stay aligned with industry standards and technology advances. ## Sample requests [#sample-requests] Send a route-based quote with `origin` and `destination` (or an explicit `distance_in_km`), then repeat the call with `audit` set to `true` once the booking is final. If you don't know the distance, send `number_of_days` instead. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "ACRISS", "external_reference": "string", "origin": "Frankfurt am Main, Germany", "destination": "Berlin, Germany", "fuel_type": "diesel", "acriss_car_type": "C" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "car", "methodology": "ACRISS", "external_reference": "string", "origin": "Frankfurt am Main, Germany", "destination": "Berlin, Germany", "fuel_type": "diesel", "acriss_car_type": "C" }] } ``` ```json title="Duration-based" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "ACRISS", "external_reference": "string", "fuel_type": "diesel", "acriss_car_type": "C", "number_of_days": 5 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. > **Distance precedence** > `distance_in_km` takes priority over both `origin`/`destination` and `number_of_days`. The order is `distance_in_km` > `origin`/`destination` > `number_of_days`. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | petrol | No `fuel_type` is sent | | `acriss_car_type` | E | No `acriss_car_type` is sent | ## How it's calculated [#how-its-calculated] ### Distance from trip duration [#distance-from-trip-duration] When the trip distance is unknown, SQUAKE estimates it from `number_of_days`. **Estimated distance in km:** `number_of_days × 60` - **number_of_days**: Trip duration in days, an integer of at least 1. - **60**: Kilometres assumed per day. If you send neither `distance_in_km` nor `origin` and `destination`, SQUAKE uses `number_of_days` (if provided) to estimate the distance. Otherwise, the request may not contain enough to calculate trip emissions. > **Send the real distance when you can** > The actual `distance_in_km` gives the most accurate result. `number_of_days` is a convenience fallback and a coarse approximation. ## Request fields [#request-fields] - `type` (string, required): `car` - `methodology` (string, required): `ACRISS` - `origin` (string): SQUAKE tries to resolve `origin` and `destination` in any format. Prefer postal-standard addresses, IATA/ICAO airport codes (`MUC`), UN/LOCODE for trade and transport locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats and rules as `origin`. - `distance_in_km` (number): Takes priority over `origin`/`destination` and `number_of_days`. If you send both `distance_in_km` and `origin`/`destination`, SQUAKE uses `distance_in_km`. - `number_of_days` (integer): At least `1`. Use it when the trip distance is unknown: SQUAKE estimates the distance as `number_of_days * 60`. It's the fallback after `distance_in_km` and `origin`/`destination`. - `fuel_type` (enum): One of `petrol`, `diesel`, `hev`, `phev`, `electricity`. Defaults to `petrol`. - `acriss_car_type` (enum): Car class: `C` (Compact), `D` (Compact Elite), `E` (Economy), `F` (Fullsize), `G` (Fullsize Elite), `H` (Economy Elite), `I` (Intermediate), `J` (Intermediate Elite), `L` (Luxury), `M` (Mini), `N` (Mini Elite), `P` (Premium), `R` (Standard Elite), `S` (Standard), `U` (Premium Elite), `W` (Luxury Elite), `X` (Special). Defaults to `E`. - `sipp_car_type` (string): If you don't send `acriss_car_type`, SQUAKE resolves the class from the SIPP code. Mutually exclusive with `pseudo_car_type`; send only one. - `pseudo_car_type` (enum): If you send neither `acriss_car_type` nor `sipp_car_type`, SQUAKE resolves the class from the pseudo code. Mutually exclusive with `sipp_car_type`. Allowed values: `ACAR`, `ACGO`, `ACNV`, `ACPG`, `ACPR`, `ACRS`, `ADSL`, `AEIG`, `AELC`, `AELT`, `AETH`, `AFWD`, `AGRN`, `AHYB`, `AHYD`, `ALLB`, `ALLC`, `ALLD`, `ALMO`, `AMAN`, `AMCY`, `AMFP`, `AMNO`, `AMTO`, `ANIN`, `AOFR`, `APET`, `APUP`, `AREC`, `ASEV`, `ASIX`, `ASPC`, `ASPT`, `ASUV`, `ATRV`, `AUTO`, `AVAN`, `AWGN`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 65636, "carbon_unit": "gram", "items": [{ "carbon_quantity": 65636, "carbon_unit": "gram", "external_reference": "string", "type": "car", "methodology": "ACRISS", "distance": 538.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] Environmental Responsibility & CO2 Emissions Guidelines (n.d.). ACRISS. [Read the guidelines](https://acriss.org/car-codes/environmental/). # Car: BASIC (/docs/calculations/travel/car/car-basic) Calculate car emissions from data you already have: the vehicle's emission rate in gCO₂/km, or its energy or fuel consumption together with the fuel type. Type: `car` · Methodology: `BASIC` · Supports audit mode BASIC is a transparent, input-driven calculator for simple, traceable calculations where the data comes from your own measurements, OEM specs or a trusted dataset. It doesn't infer vehicle classes or apply default factors. It relies on the intensity you supply in g/km, or on the consumption you supply with an explicit fuel type, from which it derives gCO₂/km using fuel-specific factors. ## Sample requests [#sample-requests] Choose one intensity path: send `co2_grams_per_km` directly (preferred when you know it), or send `consumption_per_100_km` with `fuel_type`. Repeat the call with `audit` set to `true` once the booking is final. If you have no distance and no `origin`/`destination`, send `number_of_days` instead. ```json title="Direct intensity" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "BASIC", "external_reference": "TRIP-001", "distance_in_km": 245.6, "co2_grams_per_km": 120 }] } ``` ```json title="Consumption-based" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "BASIC", "external_reference": "TRIP-002", "origin": "Munich, Germany", "destination": "Prague, Czechia", "consumption_per_100_km": 6.2, "fuel_type": "petrol" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "car", "methodology": "BASIC", "external_reference": "TRIP-004", "distance_in_km": 245.6, "co2_grams_per_km": 120 }] } ``` ```json title="Duration-based" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "BASIC", "external_reference": "TRIP-003", "number_of_days": 4, "co2_grams_per_km": 95 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. > **Precedence rules** > - Distance source: `distance_in_km` > `origin`/`destination` > `number_of_days`. > - Intensity source: `co2_grams_per_km` > `consumption_per_100_km` with `fuel_type`. ## Defaults [#defaults] BASIC has no defaults for the intensity inputs: you must send one of the two intensity paths. | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | None | Required only when you use `consumption_per_100_km` | | `co2_grams_per_km` | None | Send this or `consumption_per_100_km` | | `consumption_per_100_km` | None | Send this or `co2_grams_per_km` | | Distance per day | 60 km | The distance is estimated from `number_of_days` | ## How it's calculated [#how-its-calculated] ### Distance from trip duration [#distance-from-trip-duration] When you have neither a distance nor `origin`/`destination`, SQUAKE estimates the distance from `number_of_days`. **Estimated distance in km:** `number_of_days × 60` - **number_of_days**: Trip duration in days, an integer of at least 1. - **60**: Kilometres assumed per day. ### Tips [#tips] - Use `co2_grams_per_km` directly whenever it's available (OEM data, in-vehicle telemetry or lab data) for maximum fidelity. - When you use consumption, make sure the unit matches what your integration expects, for example L/100 km for liquid fuels and kWh/100 km for BEVs. - BASIC doesn't infer vehicle classes or apply regional defaults; it uses exactly what you supply. - For electric vehicles, send either `co2_grams_per_km` (preferred if you have grid-mix allocation) or `consumption_per_100_km` with `"fuel_type": "electricity"`, which uses the configured electricity factors. ## Request fields [#request-fields] - `type` (string, required): `car` - `methodology` (string, required): `BASIC` - `distance_in_km` (number): One of the distance inputs. Overrides the other distance inputs. - `origin` (string): Together with `destination`, one of the distance inputs. Postal text, UN/LOCODE, IATA/ICAO, or `"lat,lon"`. - `destination` (string): Same formats as `origin`. - `number_of_days` (integer): One of the distance inputs, at least `1`. A fallback that estimates the distance as `days * 60`. - `co2_grams_per_km` (number): Direct intensity in gCO₂/km, at least `0`. One of the two intensity paths. `fuel_type` isn't required on this path. - `consumption_per_100_km` (number): Consumption per 100 km, from `0` to `1000`. The other intensity path, together with `fuel_type`. - `fuel_type` (enum): One of `diesel`, `petrol`, `electricity`, `ethanol`, `bio_diesel`, `lpg`, `hydrogen`, `hvo`. Mandatory when you use `consumption_per_100_km`. - `external_reference` (string): Optional correlation ID, up to 128 characters. - `audit` (boolean): Set to `true` to create immutable audit records. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 29472, "carbon_unit": "gram", "items": [{ "carbon_quantity": 29472, "carbon_unit": "gram", "external_reference": "TRIP-001", "type": "car", "methodology": "BASIC", "distance": 245.6, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - Smart Freight Centre (SFC). *Global Logistics Emissions Council (GLEC) Framework for Logistics Emissions Accounting*, latest edition. - SFC. *GLEC Framework Guidance & Technical Documentation*, which supports the fuel and energy factors and calculation principles. # Car: DEFRA 🇬🇧 (/docs/calculations/travel/car/car-defra) Calculate car emissions with the UK DEFRA methodology, across vehicle types from compact cars to SUVs, and pin the Conversion Factors year you report against. Type: `car` · Methodology: `DEFRA` · Supports audit mode The UK Department for Environment, Food & Rural Affairs (DEFRA) publishes carbon metrics for the car sector that cover the diverse range of vehicles on UK roads. The methodology accounts for direct emissions from fuel combustion and also considers the broader life-cycle emissions of vehicles, including manufacturing, maintenance and disposal. It's backed by research and consultation with automotive industry experts and underpins UK policy-making. > **Versioning** > Use `methodology_version` to pin a specific Conversion Factors year, such as `"2024"`. If you leave it out, SQUAKE uses the latest supported year. ## Sample requests [#sample-requests] Send a route-based quote with `origin` and `destination` (or an explicit `distance_in_km`), then repeat the call with `audit` set to `true` once the booking is final. If you don't know the distance, send `number_of_days` instead. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "DEFRA", "external_reference": "string", "origin": "Frankfurt am Main, Germany", "destination": "Berlin, Germany", "fuel_type": "hev", "car_type": "dual_purpose_4x4", "energy_scope": "ttw", "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "car", "methodology": "DEFRA", "external_reference": "string", "origin": "Frankfurt am Main, Germany", "destination": "Berlin, Germany", "fuel_type": "hev", "car_type": "dual_purpose_4x4", "energy_scope": "ttw", "methodology_version": "2024" }] } ``` ```json title="Duration-based" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "methodology": "DEFRA", "external_reference": "string", "fuel_type": "hev", "car_type": "dual_purpose_4x4", "energy_scope": "ttw", "methodology_version": "2024", "number_of_days": 5 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. > **Distance precedence** > `distance_in_km` takes priority over both `origin`/`destination` and `number_of_days`. The order is `distance_in_km` > `origin`/`destination` > `number_of_days`. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | average | No `fuel_type` is sent | | `car_type` | average | No `car_type` is sent | | `energy_scope` | wtw | No `energy_scope` is sent | | `methodology_version` | Latest supported DEFRA year | No `methodology_version` is sent | ## How it's calculated [#how-its-calculated] ### Distance from trip duration [#distance-from-trip-duration] When the trip distance is unknown, SQUAKE estimates it from `number_of_days`. **Estimated distance in km:** `number_of_days × 60` - **number_of_days**: Trip duration in days, an integer of at least 1. - **60**: Kilometres assumed per day. If you send neither `distance_in_km` nor `origin` and `destination`, SQUAKE uses `number_of_days` (if provided) to estimate the distance. Otherwise, the request may not contain enough to calculate trip emissions. ### Tips [#tips] - The actual `distance_in_km` gives the most accurate result. `number_of_days` is a convenience fallback and a coarse approximation. - Pin `methodology_version` for reproducibility and auditability in long-lived reports. ## Request fields [#request-fields] - `type` (string, required): `car` - `methodology` (string, required): `DEFRA` - `methodology_version` (string): DEFRA Conversion Factors year, such as `"2024"`. If you leave it out, SQUAKE uses the latest supported year. - `origin` (string): Postal address, IATA/ICAO code, UN/LOCODE, or `"lat,lon"`. SQUAKE resolves the distance. - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Overrides `origin`/`destination` resolution and `number_of_days`. - `number_of_days` (integer): At least `1`. Use it when the trip distance is unknown: SQUAKE estimates the distance as `number_of_days * 60`. It's the fallback after `distance_in_km` and `origin`/`destination`. - `fuel_type` (enum): One of `petrol`, `diesel`, `hev`, `phev`, `electricity`, `average`. Defaults to `average`. - `acriss_car_type` (enum): ACRISS segment letter, such as `C`, `D`, `E`, `F`, `G`, `H`, `I`, `J`, `L`, `M`, `N`, `P`, `R`, `S`, `U`, `W`, `X`. Mutually exclusive with `car_type`. - `sipp_car_type` (string): If you don't send `acriss_car_type`, SQUAKE can use it to infer the class. Mutually exclusive with `car_type`. - `car_type` (enum): One of `mini`, `supermini`, `lower_medium`, `upper_medium`, `executive`, `luxury`, `sports`, `dual_purpose_4x4`, `mpv`, `small`, `medium`, `large`, `average`. Defaults to `average`. - `energy_scope` (enum): `wtw` (default) or `ttw`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 10764, "carbon_unit": "gram", "items": [{ "carbon_quantity": 10764, "carbon_unit": "gram", "external_reference": "string", "type": "car", "methodology": "DEFRA", "methodology_version": "2024", "distance": 110.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - UK Government. Greenhouse gas emissions: research and statistics. [Read on GOV.UK](https://www.gov.uk/environment/greenhouse-gas-emissions#research_and_statistics). - Bramwell, R., et al. (2024). *Government Greenhouse Gas Conversion Factors for Company Reporting: Methodology*. Methodology paper (PDF). # Car: EEA 🇪🇺 (/docs/calculations/travel/car/car-eea) Calculate car emissions with the European Environment Agency (EEA) methodology, using the vehicle's manufacturer, model, model year, fuel type and engine data. Type: `car` · Methodology: `EU-EEA` · Supports audit mode The European Environment Agency (EEA) provides insights into environmental concerns, including carbon emissions across sectors. Transport is one of the chief contributors to greenhouse gas emissions, and cars are a particular focus for the EEA. Its methodology standardises how car emissions are measured and reported, and considers vehicle type, fuel consumption patterns and the impact of new technologies. The EEA uses it to support policy decisions at European level and to provide data for sustainable advances in the automotive industry. ## Sample requests [#sample-requests] Send a route-based quote with `origin` and `destination` (or an explicit `distance_in_km`), then repeat the call with `audit` set to `true` once the booking is final. If you don't know the distance, send `number_of_days` instead. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "external_reference": "test_3", "origin": "Menton, France", "destination": "Paris, France", "manufacturer": "VOLVO", "model": "V40", "model_year": 2017, "fuel_type": "diesel", "engine_capacity_in_cubic_cm": 1969, "electric_energy_consumption_in_kw": 88, "country": "PT", "methodology": "EU-EEA" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "car", "external_reference": "test_3", "origin": "Menton, France", "destination": "Paris, France", "manufacturer": "VOLVO", "model": "V40", "model_year": 2017, "fuel_type": "diesel", "engine_capacity_in_cubic_cm": 1969, "electric_energy_consumption_in_kw": 88, "country": "PT", "methodology": "EU-EEA" }] } ``` ```json title="Duration-based" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "external_reference": "test_3", "manufacturer": "VOLVO", "model": "V40", "model_year": 2017, "fuel_type": "diesel", "engine_capacity_in_cubic_cm": 1969, "electric_energy_consumption_in_kw": 88, "country": "PT", "methodology": "EU-EEA", "number_of_days": 5 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. > **Distance precedence** > `distance_in_km` takes priority over both `origin`/`destination` and `number_of_days`. The order is `distance_in_km` > `origin`/`destination` > `number_of_days`. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | petrol | No `fuel_type` is sent | ## How it's calculated [#how-its-calculated] ### Distance from trip duration [#distance-from-trip-duration] When the trip distance is unknown, SQUAKE estimates it from `number_of_days`. **Estimated distance in km:** `number_of_days × 60` - **number_of_days**: Trip duration in days, an integer of at least 1. - **60**: Kilometres assumed per day. > **Send the real distance when you can** > The actual `distance_in_km` gives the most accurate result. `number_of_days` is a convenience fallback and a coarse approximation. ## Request fields [#request-fields] Look up valid vehicle values in the [Car: EU-EEA database](https://squake.notion.site/Car-EU-EEA-ab71fdacedb64b5184a62761b29c15a4?pvs=4). - `type` (string, required): `car` - `methodology` (string, required): `EU-EEA` - `origin` (string): SQUAKE tries to resolve `origin` and `destination` in any format. Ideally, use the postal standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for trade and transport locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. If you send both, SQUAKE uses `distance_in_km`. - `number_of_days` (integer): At least `1`. Use it when the trip distance is unknown: SQUAKE estimates the distance as `number_of_days * 60`. It's the fallback after `distance_in_km` and `origin`/`destination`. - `fuel_type` (enum): One of `diesel`, `petrol`, `hybrid`, `electricity`, `midgrade_gasoline`, `natural_gas`, `premium_gasoline`, `regular_gasoline`, `propane`. Defaults to `petrol`. - `manufacturer` (string): See the [database](https://squake.notion.site/Car-EU-EEA-ab71fdacedb64b5184a62761b29c15a4?pvs=4). - `model` (string): See the [database](https://squake.notion.site/Car-EU-EEA-ab71fdacedb64b5184a62761b29c15a4?pvs=4). - `model_year` (integer): See the [database](https://squake.notion.site/Car-EU-EEA-ab71fdacedb64b5184a62761b29c15a4?pvs=4). - `country` (string): ISO 3166-1 alpha-2 or alpha-3 code: 2 to 3 uppercase letters (`^[A-Z]{2,3}$`). - `electric_energy_consumption_in_kw` (number): See the [database](https://squake.notion.site/Car-EU-EEA-ab71fdacedb64b5184a62761b29c15a4?pvs=4). - `engine_capacity_in_cubic_cm` (number): See the [database](https://squake.notion.site/Car-EU-EEA-ab71fdacedb64b5184a62761b29c15a4?pvs=4). - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 213823, "carbon_unit": "gram", "items": [{ "carbon_quantity": 213823, "carbon_unit": "gram", "external_reference": "test_3", "type": "car", "methodology": "EU-EEA", "distance": 876.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - EEA (2019). *Trends and projections in Europe 2019: tracking progress towards Europe's climate and energy targets*. EEA Report 15/2019, European Environment Agency. - EU (2019). Regulation (EU) 2019/631 of the European Parliament and of the Council of 17 April 2019 setting CO2 emission performance standards for new passenger cars and for new light commercial vehicles, and repealing Regulations (EC) No 443/2009 and (EU) No 510/2011. OJ L 111, 25.4.2019, p. 13-53. - *Monitoring of CO2 Emissions From Passenger Cars*. co2cars.apps.eea.europa.eu. - *CO2 Performance of New Passenger Cars in Europe*. 26 Sept. 2022, www.eea.europa.eu/ims/co2-performance-of-new-passenger. # Car: EPA 🇺🇸 (/docs/calculations/travel/car/car-epa) Calculate car emissions with the US Environmental Protection Agency (EPA) methodology, using the vehicle's manufacturer, model, model year, fuel type, size class and engine data. Type: `car` · Methodology: `US-EPA` · Supports audit mode The US Environmental Protection Agency (EPA) oversees the environmental impact of many industrial sectors, and cars stand out in transport because of their reach and emissions. The EPA's methodology estimates and monitors CO₂ emissions from cars. It considers vehicle design, fuel type, driving conditions and emission-control technology, and aims both to measure emissions and to encourage cleaner, more efficient car technology through policy and regulation. ## Sample requests [#sample-requests] Send a route-based quote with `origin` and `destination` (or an explicit `distance_in_km`), then repeat the call with `audit` set to `true` once the booking is final. If you don't know the distance, send `number_of_days` instead. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "external_reference": "test_3", "origin": "Menton, France", "destination": "Paris, France", "manufacturer": "mercedes_benz", "model": "500sel", "model_year": 1985, "fuel_type": "regular_gasoline", "epa_vehicle_size_class": "midsize_cars", "specific_transmission": "automatic_4_spd", "engine_displacement_in_liters": 5.0, "epa_model_type_index": 27914, "engine_cylinders": 8, "methodology": "US-EPA" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "car", "external_reference": "test_3", "origin": "Menton, France", "destination": "Paris, France", "manufacturer": "mercedes_benz", "model": "500sel", "model_year": 1985, "fuel_type": "regular_gasoline", "epa_vehicle_size_class": "midsize_cars", "specific_transmission": "automatic_4_spd", "engine_displacement_in_liters": 5.0, "epa_model_type_index": 27914, "engine_cylinders": 8, "methodology": "US-EPA" }] } ``` ```json title="Duration-based" { "expand": ["items"], "items": [{ "audit": false, "type": "car", "external_reference": "test_3", "manufacturer": "mercedes_benz", "model": "500sel", "model_year": 1985, "fuel_type": "regular_gasoline", "epa_vehicle_size_class": "midsize_cars", "specific_transmission": "automatic_4_spd", "engine_displacement_in_liters": 5.0, "epa_model_type_index": 27914, "engine_cylinders": 8, "methodology": "US-EPA", "number_of_days": 5 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. > **Distance precedence** > `distance_in_km` takes priority over both `origin`/`destination` and `number_of_days`. The order is `distance_in_km` > `origin`/`destination` > `number_of_days`. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | `regular_gasoline` | No `fuel_type` is sent | ## How it's calculated [#how-its-calculated] ### Distance from trip duration [#distance-from-trip-duration] When the trip distance is unknown, SQUAKE estimates it from `number_of_days`. **Estimated distance in km:** `number_of_days × 60` - **number_of_days**: Trip duration in days, an integer of at least 1. - **60**: Kilometres assumed per day. > **Send the real distance when you can** > The actual `distance_in_km` gives the most accurate result. `number_of_days` is a convenience fallback and a coarse approximation. ## Request fields [#request-fields] Look up valid vehicle values in the [Car: US-EPA database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `type` (string, required): `car` - `methodology` (string, required): `US-EPA` - `origin` (string): SQUAKE tries to resolve `origin` and `destination` in any format. Ideally, use the postal standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for trade and transport locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats and rules as `origin`. - `distance_in_km` (number): Overrides `origin`/`destination` resolution and `number_of_days`. - `number_of_days` (integer): At least `1`. Use it when the trip distance is unknown: SQUAKE estimates the distance as `number_of_days * 60`. It's the fallback after `distance_in_km` and `origin`/`destination`. - `fuel_type` (enum): One of `electricity`, `premium_gasoline`, `regular_gasoline`, `diesel`, `natural_gas`, `midgrade_gasoline`, `propane`. Defaults to `regular_gasoline`. - `manufacturer` (string): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `model` (string): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `model_year` (integer): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `country` (string): ISO 3166-1 alpha-2 or alpha-3 code: 2 to 3 uppercase letters (`^[A-Z]{2,3}$`). - `electric_energy_consumption_in_kw` (number): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `engine_capacity_in_cubic_cm` (number): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `engine_cylinders` (integer): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `epa_model_type_index` (integer): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `engine_displacement_in_liters` (number): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `specific_transmission` (string): See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `epa_vehicle_size_class` (string): The car size division defined by `US-EPA`. See the [database](https://squake.notion.site/863b63e1ae124f6e8fdf5cf09e96bd70?v=34c22d8966fa48fc80bb660e8c4fd6d7&pvs=4). - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 345527, "carbon_unit": "gram", "items": [{ "carbon_quantity": 345527, "carbon_unit": "gram", "external_reference": "test_3", "type": "car", "methodology": "US-EPA", "distance": 876.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - FuelEconomy.gov Web Services (n.d.). FuelEconomy. [fueleconomy.gov/feg/ws](https://www.fueleconomy.gov/feg/ws/index.shtml#vehicle). - Greenhouse Gas Emissions from a Typical Passenger Vehicle (n.d.). United States Environmental Protection Agency. Retrieved from https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger vehicle#:~:text=typical%20passenger%20vehicle%3F-,A%20typical%20passenger%20vehicle%20emits%20about%204.6%20metric%20tons%20of,around%2011%2C500%20miles%20per%20year - Tiseo, I. (2021, December 14). Passenger car carbon dioxide emissions worldwide 2010-2020. [statista.com](https://www.statista.com/statistics/1107970/carbon-dioxide-emissions-passenger-transport/#:~:text=Passenger%20cars%20produced%20approximately%20three,of%203.2%20million%20metric%20tons). - Emission Factors for Greenhouse Gas Inventories (2025, Jan). EPA. [epa.gov](https://www.epa.gov/climateleadership/ghg-emission-factors-hub). # Car (/docs/calculations/travel/car) Calculate car travel emissions on the Calculation API with one of the car methodologies below. They differ mainly in how you describe the vehicle: a rental car class, a vehicle model, or your own emission figure. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [ACRISS](/docs/calculations/travel/car/car-acriss) | Not stated | ACRISS Environmental Responsibility & CO2 Emissions Guidelines | `origin` and `destination`, `distance_in_km` or `number_of_days`; optional `acriss_car_type` (or `sipp_car_type` or `pseudo_car_type`), `fuel_type` | Rental car classes; covers EVs, HEVs and PHEVs | | [BASIC](/docs/calculations/travel/car/car-basic) | Not stated | Your own intensity; fuel factors from the GLEC Framework | `origin` and `destination`, `distance_in_km` or `number_of_days`; plus `co2_grams_per_km`, or `consumption_per_100_km` with `fuel_type` | No defaults or inferred vehicle classes: it uses exactly what you send | | [DEFRA 🇬🇧](/docs/calculations/travel/car/car-defra) | Not stated | UK government DEFRA Conversion Factors | `origin` and `destination`, `distance_in_km` or `number_of_days`; optional `car_type` (or `acriss_car_type` or `sipp_car_type`), `fuel_type`, `energy_scope`, `methodology_version` | Pin a factor year with `methodology_version` | | [EEA 🇪🇺](/docs/calculations/travel/car/car-eea) | Not stated | European Environment Agency passenger car CO₂ monitoring | `origin` and `destination`, `distance_in_km` or `number_of_days`; optional `manufacturer`, `model`, `model_year`, `fuel_type`, engine data | Look up valid vehicle values in the EU-EEA database | | [EPA 🇺🇸](/docs/calculations/travel/car/car-epa) | Not stated | US EPA (FuelEconomy.gov, GHG Emission Factors Hub) | `origin` and `destination`, `distance_in_km` or `number_of_days`; optional `manufacturer`, `model`, `model_year`, `fuel_type`, `epa_vehicle_size_class`, engine data | Look up valid vehicle values in the US-EPA database | Every methodology above supports audit mode. All of them take the distance from `distance_in_km` first, then `origin` and `destination`, then estimate it as 60 km per day from `number_of_days`. ## How to decide [#how-to-decide] - **You know the vehicle's emission rate or fuel consumption**, from OEM specs, telemetry or your own data: BASIC uses your figure directly. - **You have a rental car code**: ACRISS takes `acriss_car_type`, a SIPP code or a pseudo code. DEFRA also accepts `acriss_car_type` and `sipp_car_type`. - **You know the make, model and model year**: EEA and EPA take `manufacturer`, `model` and `model_year`, with valid values listed in each methodology's vehicle database. - **You need to reproduce a published factor year or choose an energy scope**: DEFRA takes `methodology_version` and `energy_scope`. - **You know the route or distance**: send it. `number_of_days` is a coarse fallback. # Events: HCMI & CHSB (/docs/calculations/travel/event/event-hcmi) Calculate event emissions by floor area and number of days with the Hotel Carbon Measurement Initiative (HCMI) and Cornell Hotel Sustainability Benchmarking Index (CHSB) datasets. Type: `event` · Methodology: `HCMI` · Supports audit mode ## Overview [#overview] The events sector, with its wide scope and large carbon footprint, has long been under scrutiny for its environmental impact. Two methodologies, HCMI (Hotel Carbon Measurement Initiative) and CHSB (Cornell Hotel Sustainability Benchmarking Index), were introduced for the hotel industry and were soon recognized as applicable to measuring sustainability in the broader events sector. HCMI, developed with leading hoteliers, offers a unified approach to measuring and communicating the carbon footprint of hotel stays and meetings. Because the hotel and event industries are closely related, event organizers naturally adopted HCMI's carbon measurement tools. CHSB, developed by Cornell University, is a benchmarking tool that lets event managers compare their sustainability performance against global standards. As more event planners prioritize sustainability, both HCMI and CHSB have become key tools for the event industry. ### Hotel Carbon Measurement Initiative [#hotel-carbon-measurement-initiative] HCMI is a free methodology and tool for hotels to calculate the carbon footprint of hotel stays and meetings in their properties. The hospitality industry developed it to give all hotels a consistent way to measure and communicate their carbon impact. More than 25,000 hotels use HCMI globally. The ambition is that widespread use of HCMI improves understanding, transparency and accuracy across the industry. ### Cornell Hotel Sustainability Benchmarking Index [#cornell-hotel-sustainability-benchmarking-index] CHSB is an industry-led global data collection and benchmarking initiative, with data on energy, water and carbon emissions from more than 20,000 hotels around the world. Participants include major hotel brands, operators and owners from all regions of the world. Cornell's Center for Hospitality Research publishes the public dataset free of charge. It contains average hotel performance for different types of hotels in different geographies. Hotels that take part directly receive a confidential, bespoke benchmarking report that shows how they perform against their competitive set. Governments, corporate customers, travel management companies and many other organizations use CHSB data to set benchmarks and estimates for energy and water usage, and carbon footprints. ### GHG Protocol [#ghg-protocol] GHG Protocol sets comprehensive global standardized frameworks to measure and manage greenhouse gas (GHG) emissions from private and public sector operations, value chains and mitigation actions. Building on a 20-year partnership between the World Resources Institute (WRI) and the World Business Council for Sustainable Development (WBCSD), GHG Protocol works with governments, industry associations, NGOs, businesses and other organizations. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "event", "methodology": "HCMI", "methodology_version": "2024", "external_reference": "string", "stars": 4, "country": "FR", "city": "Paris", "state": "Ile-de-France", "square_meters": 120, "number_of_days": 2 }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "event", "methodology": "HCMI", "methodology_version": "2024", "external_reference": "string", "stars": 4, "country": "FR", "city": "Paris", "state": "Ile-de-France", "square_meters": 120, "number_of_days": 2 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `hotel_type` | `hotel_average` | No `hotel_type` is sent | | `methodology_version` | Latest stable year (`2026`) | No `methodology_version` is sent, or it is `latest` | ## Request fields [#request-fields] - `type` (string, required): `event` - `methodology` (string, required): `HCMI` - `methodology_version` (string): HCMI/CHSB dataset year. Supported: `2015` to `2021`, `2023`, `2024` and `2026`. Leave it out or send `latest` for the latest stable year (`2026`). - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `stars` (integer): From `1` to `5`. Mutually exclusive with `hotel_type`; `stars` takes priority over `hotel_type`. - `country` (string): ISO 3166-1 alpha-2 or alpha-3 code, 2 to 3 characters. - `city` (string): - `state` (string): - `square_meters` (number): Minimum `1`. - `number_of_days` (integer): Minimum `1`. - `hotel_type` (enum): Mutually exclusive with `stars`; `stars` takes priority over `hotel_type`. Values include `airport_location`, `convention_hotel`, `extended_stay`, `full_service_nonresort`, `full_service_resort` and `hotel_average`, among others. Defaults to `hotel_average`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 3497, "carbon_unit": "gram", "items": [{ "carbon_quantity": 3497, "carbon_unit": "gram", "external_reference": "string", "type": "event", "methodology": "HCMI" }] } ``` ## Bibliography [#bibliography] Ricaurte, Eric. *Hotel Sustainability Benchmarking Index 2024: Carbon, Energy, and Water*. 2024. # Event (/docs/calculations/travel/event) Calculate event emissions on the Calculation API by floor area and number of days. HCMI & CHSB is the event methodology SQUAKE supports. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [HCMI & CHSB](/docs/calculations/travel/event/event-hcmi) | Not stated | HCMI and Cornell Hotel Sustainability Benchmarking Index datasets; years 2015 to 2026 | `square_meters`, `number_of_days`; optional `country`, `state`, `city`, `stars` or `hotel_type`, `methodology_version` | Latest stable year is `2026` | ## How to decide [#how-to-decide] - **You know the hotel's star rating or type**: send `stars` or `hotel_type`. `stars` takes priority, and `hotel_type` defaults to `hotel_average`. - **You need to reproduce a dataset year**: pin it with `methodology_version`. # Ferry: ADEME 🇫🇷 (/docs/calculations/travel/ferry/ferry-ademe) Calculate ferry emissions with the methodology of ADEME, the French Agency for Ecological Transition, which accounts for fuel type, operational patterns and vessel capacity. Type: `ferry` · Methodology: `ADEME` · Source: GHG information for transport services, Jun 2019 · Supports audit mode ADEME is known for its methodologies on environmental issues, including the carbon impact of many sectors. Its ferry methodology reflects the role of maritime transport in global travel and lets you measure, and eventually reduce, greenhouse gas emissions specific to ferries. It takes into account the dynamics of maritime travel, such as fuel type, operational patterns and varying capacities. Ferry operators and policymakers use it to make informed decisions and to work toward international emission reduction targets in the maritime sector. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a crossing, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "ferry", "methodology": "ademe", "external_reference": "test_1", "number_of_travelers": 3, "origin": "Amsterdam, the Netherlands", "destination": "Rotterdam, the Netherlands", "number_of_cars": 1, "vessel_type": "night_ferry" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "ferry", "methodology": "ademe", "external_reference": "test_1", "number_of_travelers": 3, "origin": "Amsterdam, the Netherlands", "destination": "Rotterdam, the Netherlands", "number_of_cars": 1, "vessel_type": "night_ferry" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `vessel_type` | `day_ferry` | No `vessel_type` is sent | | `number_of_travelers` | 1 | No `number_of_travelers` is sent | ## Request fields [#request-fields] - `type` (string, required): `ferry` - `methodology` (string, required): `ADEME` - `origin` (string): SQUAKE tries to resolve `origin` and `destination` in any format. Ideally, use the postal standard for addresses, IATA/ICAO codes for airports (`MUC`), UN/LOCODE for trade and transport locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. If you send both, SQUAKE uses `distance_in_km`. - `vessel_type` (enum): One of `night_ferry`, `day_ferry`, `ro_pax`, `river_vessel`. Defaults to `day_ferry`. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 12015, "carbon_unit": "gram", "items": [{ "carbon_quantity": 12015, "carbon_unit": "gram", "external_reference": "test_1", "type": "ferry", "methodology": "ADEME", "distance": 680.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] GHG information for transport services (2019, June). Ministère de La Transition Écologique et Solidaire. [Read the PDF](https://www.ecologie.gouv.fr/sites/default/files/Information_GES%20-%202019.pdf). # Ferry (/docs/calculations/travel/ferry) Calculate ferry passenger emissions on the Calculation API. ADEME is the ferry methodology SQUAKE supports. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [ADEME 🇫🇷](/docs/calculations/travel/ferry/ferry-ademe) | Not stated | GHG information for transport services (French ministry, June 2019) | `origin` and `destination` or `distance_in_km`; optional `vessel_type`, `number_of_travelers` | `vessel_type` defaults to `day_ferry` | ## How to decide [#how-to-decide] - **You know the vessel**: set `vessel_type` to `night_ferry`, `day_ferry`, `ro_pax` or `river_vessel`. Otherwise SQUAKE uses `day_ferry`. - **You know the crossing distance**: send `distance_in_km`. It takes priority over `origin` and `destination`. # Flight: ADEME 🇫🇷 (/docs/calculations/travel/flight/flight-ademe) Calculate passenger flight emissions with the methodology of ADEME, the French Agency for Ecological Transition, which accounts for aircraft type, fuel consumption, flight duration, occupancy rates and radiative forcing. Type: `flight` · Methodology: `ADEME` · Source: GHG information for transport services, Jun 2019 · Supports audit mode ADEME (Agence de la transition écologique) is a French public institution under the authority of the French Ministries of Ecology and Research. Its flight methodology includes radiative forcing, which addresses the increased impact of emissions at higher altitudes. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "ADEME", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "JFK", "aircraft_size": "under_180_seats", "aircraft_type": "737", "airline": "LH" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "ADEME", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "JFK", "aircraft_size": "under_180_seats", "aircraft_type": "737", "airline": "LH" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `ADEME` - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. With `routing`, per-leg distances apply. - `aircraft_size` (enum): Estimated aircraft size by number of seats: `under_50_seats`, `under_100_seats`, `under_180_seats`, `under_250_seats` or `over_250_seats`. - `aircraft_type` (string): Aircraft type as an IATA or ICAO code. - `airline` (string): IATA designator such as `LH`; airline names are resolved too. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `sustainable_fuels` (boolean): Marks the use of sustainable fuels. This lowers the emissions SQUAKE calculates, but isn't part of the current official frameworks. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by sustainable fuel, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 632000, "carbon_unit": "gram", "items": [{ "carbon_quantity": 632000, "carbon_unit": "gram", "external_reference": "test_1", "type": "flight", "methodology": "ADEME", "distance": 6320.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] GHG information for transport services. Ministère de la Transition Écologique et Solidaire, June 2019. [Read the PDF](https://www.ecologie.gouv.fr/sites/default/files/Information_GES%20-%202019.pdf). # Flight: Base Empreinte 🇫🇷 (/docs/calculations/travel/flight/flight-base-empreinte) Calculate passenger flight emissions with ADEME's Base Empreinte data, which reflects aircraft size, fuel type and the radiative forcing index (RFI). Type: `flight` · Methodology: `BASE-EMPREINTE` · Source: ADEME Base Empreinte, 2025 · Supports audit mode Base Empreinte, managed by ADEME, is an environmental impact database that combines data from Base Carbone and Base IMPACTS. Its flight data reflects aircraft size, fuel type and other parameters needed for carbon footprint assessments. The methodology applies the RFI to account for the climate impact of aviation emissions beyond CO₂. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "BASE-EMPREINTE", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "JFK", "aircraft_size": "under_220_seats", "radiative_forcing_index": true }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "BASE-EMPREINTE", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "JFK", "aircraft_size": "under_220_seats", "radiative_forcing_index": true }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `radiative_forcing_index` | `true` | No `radiative_forcing_index` is sent | | `aircraft_size` | average | No `aircraft_size` is sent | ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `BASE-EMPREINTE` - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. With `routing`, per-leg distances apply. - `aircraft_size` (enum): Values such as `under_220_seats`, `under_50_seats` or `under_50_seats_jet`. Defaults to the average if you leave it out. - `radiative_forcing_index` (boolean): Defaults to `true`. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `sustainable_fuels` (boolean): Marks the use of sustainable fuels. This lowers the emissions SQUAKE calculates, but isn't part of the current official frameworks. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by sustainable fuel, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 632000, "carbon_unit": "gram", "items": [{ "carbon_quantity": 632000, "carbon_unit": "gram", "external_reference": "test_1", "type": "flight", "methodology": "BASE-EMPREINTE", "distance": 6320.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - ADEME (2025). Base Empreinte - Données d’impacts environnementaux. [ademe.fr/base-empreinte](https://www.ademe.fr/base-empreinte) - ADEME (2024). Base Carbone Methodological Guide. [ademe.fr/base-carbone](https://www.ademe.fr/base-carbone) - ADEME (2023). Documentation on aviation emission factors. Available through official ADEME publications. - Eurocontrol (2022). Aircraft performance and fuel consumption statistics. # Flight: CO2 emissiefactoren 🇳🇱 (/docs/calculations/travel/flight/flight-co2-emissiefactoren) Calculate passenger flight emissions with the Dutch CO2-emissiefactoren factors, pinned to a published factor year or picked from the departure date. Type: `flight` · Methodology: `CO2-EMISSIEFACTOREN-NL` · Source: Factor years 2020 and 2022 · Supports audit mode CO2-emissiefactoren is a methodology from the Netherlands that provides emission factors across sectors, including passenger aviation, and is widely adopted by European stakeholders. For flights, it considers factors such as aircraft type, engine specifications, distance travelled and fuel efficiency, and it is updated to reflect the latest research and technology. > **Versioning** > Use `methodology_version` to pin a published factor year: `"2020"` for flights in 2020 and 2021, `"2022"` for flights from 2022 onward. If you leave it out, SQUAKE picks the year from `departure_date`; if neither is given, the latest version is used. See [Versions](#versions). ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "CO2-EMISSIEFACTOREN-NL", "external_reference": "string", "origin": "MIL", "destination": "ORY", "booking_class": "first", "energy_scope": "wtw", "number_of_travelers": 1, "radiative_forcing_index": true }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "CO2-EMISSIEFACTOREN-NL", "external_reference": "string", "origin": "MIL", "destination": "ORY", "booking_class": "first", "energy_scope": "wtw", "number_of_travelers": 1, "radiative_forcing_index": true }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `booking_class` | average | No `booking_class` is sent | | `radiative_forcing_index` | `true` | No `radiative_forcing_index` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | | `methodology_version` | Year of `departure_date` | No `methodology_version` is sent | | `methodology_version` | Latest version | Neither `methodology_version` nor `departure_date` is sent | ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `CO2-EMISSIEFACTOREN-NL` - `methodology_version` (string): The published factor year: `2020` (flights in 2020 and 2021) or `2022` (flights from 2022 onward). Optional. If you leave it out, the year is taken from `departure_date`, falling back to the latest version. See [Versions](#versions). - `departure_date` (string): Departure date in `YYYY-MM-DD` format. Selects the factor year when `methodology_version` is left out. - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. With `routing`, per-leg distances apply. - `booking_class` (enum): `first`, `premium_economy`, `economy` or `business`. Optional, defaults to `average`. If you leave it out, sending `fare_class` and `airline` is highly recommended so SQUAKE can resolve it. - `fare_class` (string): A single letter such as `Y` or `J`. Together with `airline`, mutually exclusive with `booking_class`. - `airline` (string): IATA designator such as `LH`; airline names are resolved too. - `radiative_forcing_index` (boolean): Whether to apply a multiplier for the gases emitted at altitude. Defaults to `true`. See [Radiative Forcing Index](https://squake.notion.site/Radiative-Forcing-Index-1f8f0d7eb6e141a6ad7a3351bdc53f05?pvs=4). - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `sustainable_fuels` (boolean): Marks the use of sustainable fuels. This lowers the emissions SQUAKE calculates, but isn't part of the current official frameworks. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by sustainable fuel, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 633654, "carbon_unit": "gram", "items": [{ "carbon_quantity": 633654, "carbon_unit": "gram", "external_reference": "string", "type": "flight", "methodology": "CO2-EMISSIEFACTOREN-NL", "distance": 749.0, "distance_unit": "kilometer" }] } ``` ## Versions [#versions] CO2-emissiefactoren publishes flight factors per vintage. SQUAKE supports two: | Version | Applies to | Notes | | --- | --- | --- | | `2020` | Flights in 2020 and 2021 | Factors are published per haul band only, with no travel-class split | | `2022` | Flights from 2022 onward | Factors are published per travel class and haul band | SQUAKE picks the version in this order: 1. An explicit `methodology_version`, if you send one. This always wins, even when it disagrees with `departure_date`. 2. The year of `departure_date`, if no version was sent. A flight on `2020-05-01` or `2021-11-30` uses the `2020` factors; a flight on `2023-02-14` uses the `2022` factors. 3. The latest version, if neither is given. A year that has no factor set of its own resolves to the most recent earlier year: `2021` resolves to `2020`, and `2023` and later resolve to `2022`. Years before `2020` are rejected with an `invalid_methodology_version` error. The version actually used is returned as `methodology_version` on each item when you request `"expand": ["items"]`, so a calculation stays reproducible: ```json title="Request" { "expand": ["items"], "items": [{ "type": "flight", "methodology": "CO2-EMISSIEFACTOREN-NL", "origin": "MIL", "destination": "ORY", "departure_date": "2020-05-01", "number_of_travelers": 1 }] } ``` Response 200 OK (application/json): ```json { "carbon_quantity": 149800, "carbon_unit": "gram", "items": [{ "carbon_quantity": 149800, "carbon_unit": "gram", "type": "flight", "methodology": "CO2-EMISSIEFACTOREN-NL", "methodology_version": "2020", "distance": 749.0, "distance_unit": "kilometer" }] } ``` > **No travel class in the 2020 factors** > The `2020` factors have no travel-class dimension, so `booking_class` (and the `fare_class` and `airline` pair) doesn't change the result for flights priced with that version. Audit records for those calculations report the travel class actually priced, `average`. ## Bibliography [#bibliography] - Lijst emissiefactoren (2025). CO2 emissionfactoren. [co2emissiefactoren.nl](https://www.co2emissiefactoren.nl/) - Milieu Centraal (n.a.). [milieucentraal.nl](https://www.milieucentraal.nl/) - Emissiefactoren van vliegverkeer in meer detail (January 2022). Milieu Centraal. [Read the PDF](https://www.co2emissiefactoren.nl/wp-content/uploads/2022/01/37-MilieuCentraal-Emissiefactoren-van-vliegverkeer-in-meer-detail-2022-v1.1.pdf). Factors for `methodology_version` `2022`. - Emissiefactoren van vliegverkeer (2020). Milieu Centraal. [co2emissiefactoren.nl](https://www.co2emissiefactoren.nl/). Factors for `methodology_version` `2020`. # Flight: DEFRA 🇬🇧 (/docs/calculations/travel/flight/flight-defra) Calculate passenger flight emissions with the UK government's DEFRA Conversion Factors, pinned to a factor year or using the latest supported one. Type: `flight` · Methodology: `DEFRA` · Supports audit mode The UK Department for Environment, Food and Rural Affairs (DEFRA) provides a standardised way to evaluate the emissions of passenger air travel. Its methodology takes into account the aircraft's fuel consumption, flight distance, aircraft type and the indirect effects of high-altitude emissions. > **Versioning** > Add `methodology_version` to pin a specific Conversion Factors year (for example `"2024"`). If you leave it out, SQUAKE uses the latest supported year. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "DEFRA", "external_reference": "test_4", "number_of_travelers": 2, "origin": "LON", "destination": "LAX", "booking_class": "first", "aircraft_type": "737", "radiative_forcing_index": true, "energy_scope": "wtw", "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "DEFRA", "external_reference": "test_4", "number_of_travelers": 2, "origin": "LON", "destination": "LAX", "booking_class": "first", "aircraft_type": "737", "radiative_forcing_index": true, "energy_scope": "wtw", "methodology_version": "2024" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `booking_class` | average | No `booking_class` is sent and none can be resolved from `fare_class` and `airline` | | `energy_scope` | `wtw` | No `energy_scope` is sent | | `radiative_forcing_index` | `true` | No `radiative_forcing_index` is sent | | `methodology_version` | Latest supported DEFRA year | No `methodology_version` is sent | ## How it's calculated [#how-its-calculated] - An 8% uplift is applied to the great-circle distance (GCD) to account for indirect paths, delays and similar factors. - If you send both `distance_in_km` and `origin`/`destination`, `distance_in_km` takes precedence. ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `DEFRA` - `methodology_version` (string): DEFRA Conversion Factors year, for example `"2024"`. Optional. If you leave it out, SQUAKE uses the latest supported year. - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Overrides the distance resolved from `origin` and `destination`. With `routing`, it isn't used as the routed total. - `booking_class` (enum): If you leave it out, send `fare_class` and `airline` so SQUAKE can resolve it. Defaults to `average`. - `fare_class` (string): Together with `airline`, mutually exclusive with `booking_class`. - `airline` (string): Together with `fare_class`, mutually exclusive with `booking_class`. - `aircraft_type` (string): IATA/ICAO code. Applied only when at least one airport is in the UK. See [Aircraft type distribution](#aircraft-type-distribution). - `radiative_forcing_index` (boolean): Applies the high-altitude climate impact multiplier. Defaults to `true`. - `energy_scope` (enum): `wtw` or `ttw`. Defaults to `wtw`. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters. - `sustainable_fuels` (boolean): Marks the use of sustainable aviation fuel (SAF). This lowers the emissions SQUAKE calculates, but isn't part of the official DEFRA factors. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by SAF, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Aircraft type distribution [#aircraft-type-distribution] | Domestic | Short-haul | Long-haul | | --- | --- | --- | | 32N | 32N | 32N | | 32Q | 32Q | 32Q | | 319 | 318 | 320 | | 320 | 319 | 321 | | 321 | 320 | 332 | | AT4 | 321 | 333 | | AT5 | 332 | 339 | | AT7 | 333 | 343 | | 738 | 359 | 359 | | D38 | AT7 | 338 | | ER3 | 7M8 | 7M8 | | ER4 | 7M9 | 738 | | E70 | 733 | 752 | | E90 | 734 | 763 | | E95 | 735 | 764 | | J41 | 736 | 772 | | SF3 | 737 | 773 | | | 738 | 77F | | | 739 | 77W | | | 752 | 788 | | | 753 | 789 | | | 763 | 781 | | | 772 | | | | 77W | | | | 788 | | | | 789 | | | | 221 | | | | 223 | | | | CR9 | | | | DH8 | | | | E70 | | ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 15273823, "carbon_unit": "gram", "items": [{ "carbon_quantity": 15273823, "carbon_unit": "gram", "external_reference": "test_4", "type": "flight", "methodology": "DEFRA", "methodology_version": "2024", "distance": 8804.0, "distance_unit": "kilometer" }] } ``` ## Versions [#versions] If `methodology_version` is left out, SQUAKE applies the latest supported DEFRA Conversion Factors year. Pin a year for reproducibility and audit readiness. ## Bibliography [#bibliography] - UK Government. Greenhouse gas emissions: research and statistics. [gov.uk](https://www.gov.uk/environment/greenhouse-gas-emissions#research_and_statistics) - Bramwell, R., et al. (2024). *Government Greenhouse Gas Conversion Factors for Company Reporting: Methodology*. Methodology paper (PDF). # Flight: EPA 🇺🇸 (/docs/calculations/travel/flight/flight-epa) Calculate passenger flight emissions with the US EPA GHG Emission Factors Hub, pinned to a Hub year or using the latest supported one. Type: `flight` · Methodology: `US-EPA` · Supports audit mode The US Environmental Protection Agency (EPA) methodology for passenger flights covers direct emissions and takes into account elements such as plane type, flight distance, fuel efficiency and load factors. > **Versioning** > Include `methodology_version` to pin a specific Hub year (for example `"2024"`). If you leave it out, SQUAKE uses the latest supported year. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "US-EPA", "external_reference": "test_1", "number_of_travelers": 1, "origin": "JFK", "destination": "ORY", "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "US-EPA", "external_reference": "test_1", "number_of_travelers": 1, "origin": "JFK", "destination": "ORY", "methodology_version": "2024" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `US-EPA` - `methodology_version` (string): EPA Hub year, for example `"2024"`. Optional. If you leave it out, SQUAKE uses the latest supported year. - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Overrides the distance resolved from `origin` and `destination`. With `routing`, it isn't used as the routed total. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for matching requests to responses, up to 128 characters. - `sustainable_fuels` (boolean): Marks the use of sustainable aviation fuel (SAF). This lowers the emissions SQUAKE calculates, but isn't part of the EPA factors. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced when `sustainable_fuels` is used, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. > **Mode-level factors** > EPA provides mode-level factors. Aircraft-specific parameters (type, booking class, RFI) aren't part of the EPA Hub factors. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 625550, "carbon_unit": "gram", "items": [{ "carbon_quantity": 625550, "carbon_unit": "gram", "external_reference": "test_1", "type": "flight", "methodology": "US-EPA", "methodology_version": "2024", "distance": 5964.0, "distance_unit": "kilometer" }] } ``` ## Versions [#versions] If `methodology_version` is left out, SQUAKE applies the latest supported EPA Hub year. Pin a year for reproducibility and auditability. ## Bibliography [#bibliography] US EPA. GHG Emission Factors Hub. [epa.gov](https://www.epa.gov/climateleadership/ghg-emission-factors-hub) # Flight: GATE4 (/docs/calculations/travel/flight/flight-gate4) Calculate passenger flight emissions with the ISO-certified GATE4 methodology by Advito, resolved per flight from carrier, flight number, route and departure date. Type: `flight` · Methodology: `GATE4` · Supports audit mode GATE4 is a carbon emissions calculation methodology developed by Advito for the travel sector, with a particular focus on flights. For flights, it accounts for aircraft type, passenger-to-freight ratios, carbon intensity and the effect of radiative forcing. The methodology is ISO-certified. Through the GATE4 Insights dashboard, it also gives travel managers insights into hotel stays, rail journeys and car rentals. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "GATE4", "origin": "NBO", "destination": "ABJ", "number_of_travelers": 1, "booking_class": "business", "airline": "2J", "flight_number": "2J520", "external_reference": "test", "departure_date": "2024-10-01" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "GATE4", "origin": "NBO", "destination": "ABJ", "number_of_travelers": 1, "booking_class": "business", "airline": "2J", "flight_number": "2J520", "external_reference": "test", "departure_date": "2024-10-01" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `booking_class` | economy | No `booking_class` is sent and none can be resolved from `fare_class` and `airline` | ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `GATE4` - `origin` (string): Three-letter IATA airport code, such as `MUC`. For multi-leg trips, use `routing` instead. - `destination` (string): Same format as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `departure_date` (string): Departure date in `YYYY-MM-DD` format, aligned with [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). - `flight_number` (string): Include the airline designator, such as `"BA115"`. `"115"` also works when you send `airline` separately. - `booking_class` (enum): If you leave it out, sending `fare_class` and `airline` is highly recommended so SQUAKE can resolve it. Defaults to `economy`. - `fare_class` (string): A single letter such as `Y` or `J`. Together with `airline`, mutually exclusive with `booking_class`. - `airline` (string): IATA designator such as `LH`; airline names are resolved too. Together with `fare_class`, mutually exclusive with `booking_class`. - `aircraft_type` (string): Aircraft type in IATA or ICAO format. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `sustainable_fuels` (boolean): Marks the use of sustainable fuels. This lowers the emissions SQUAKE calculates, but isn't part of the current official frameworks. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by sustainable fuel, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## How SQUAKE resolves the GATE4 record [#how-squake-resolves-the-gate4-record] GATE4 figures are flight-level: Advito publishes one record per operating carrier, flight number, route and departure date, and that record implies the aircraft configuration. SQUAKE resolves each flight in the following order, agreed with Advito, and stops at the first level that yields data: 1. `exact`: carrier, flight number, route and departure date all match. 2. `flight_nearest_date`: the same carrier and flight number on the route, on the closest available date. With a `booking_class`, SQUAKE prefers the closest date whose aircraft offers that cabin. 3. `carrier_route_date`: the average of the carrier's flights on the route on the departure date. 4. `route_date`: the average of all carriers' flights on the route on the departure date. 5. `carrier_route_nearest_date`: level 3 on the closest date with data. 6. `route_nearest_date`: level 4 on the closest date with data. A flight number is never matched against another carrier. Without a `departure_date`, "closest date" is measured from the day of the request. When no level yields data, the flight fails with `not_found`. SQUAKE keeps GATE4 records from 1 January 2019 onward. Up to July 2025 they're the historical figures Advito provided; from then on they're the monthly schedules Advito publishes, each kept as published closest to the departure date. A past departure therefore resolves at the level its record allows, most often `exact`. > **Always pass a departure date** > Read `match_level` in the response to decide whether to apply your own fallback, for example GATE4 Light. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 1078043, "carbon_unit": "gram", "items": [{ "carbon_quantity": 1078043, "carbon_unit": "gram", "external_reference": "test", "type": "flight", "methodology": "GATE4", "distance": 4700.0, "distance_unit": "kilometer", "algorithm_specifics": { "match_level": "exact", "matched_airline": "2J", "matched_flight_number": 520, "matched_departure_date": "2024-10-01", "matched_flights": 1, "booking_class_used": "business" } }] } ``` ## Algorithm specifics [#algorithm-specifics] The `algorithm_specifics` object in the response describes how the figure was resolved. - `match_level` (string): The resolution level that answered the flight. See [How SQUAKE resolves the GATE4 record](#how-squake-resolves-the-gate4-record). - `matched_airline` (string): Airline of the record the figure was taken from. Set only for carrier-level averages among the averaged levels. - `matched_flight_number` (integer): Flight number of the record the figure was taken from. `null` for averaged levels. - `matched_departure_date` (string): Departure date of the record the figure was taken from. - `matched_flights` (integer): How many records were averaged; `1` for an exact or nearest-date match. - `booking_class_used` (string): The cabin the figure belongs to. GATE4 has no figure for a cabin the matched aircraft doesn't offer, so SQUAKE falls back to the next lower cabin (`first` → `business` → `premium_economy` → `economy`) and reports it here. A `routing` item is resolved leg by leg, so these fields appear on each entry of `legs` (request `expand: ["legs"]`) rather than on the item itself. ## Bibliography [#bibliography] Accurately Measure Your Travel Emissions with GATE4. Advito, September 2024. [advito.com/gate4](https://www.advito.com/gate4/) # Flight: ICAO (/docs/calculations/travel/flight/flight-icao) Calculate passenger flight emissions with the ICAO Carbon Emissions Calculator methodology: route-level fuel burn, load factors and the passenger-to-freight split, applied the same way across all ICAO member states. Type: `flight` · Methodology: `ICAO` · Source: ICAO v13.1, Aug 2024 · Supports audit mode > **ICEC dataset not included** > SQUAKE applies the ICAO methodology described below, but not the ICAO Carbon Emissions Calculator (ICEC) dataset itself. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "ICAO", "external_reference": "test_7", "origin": "BER", "destination": "JFK", "aircraft_type": "737", "number_of_travelers": 1, "booking_class": "business", "airline": "AA", "fare_class": "Y" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "ICAO", "external_reference": "test_7", "origin": "BER", "destination": "JFK", "aircraft_type": "737", "number_of_travelers": 1, "booking_class": "business", "airline": "AA", "fare_class": "Y" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `booking_class` | economy | No `booking_class` is sent and none can be resolved from `fare_class` and `airline` | | `aircraft_type` | 737 | The flight is shorter than 550 km | | `aircraft_type` | 321 | The flight is between 550 km and 5,500 km | | `aircraft_type` | 320 | The flight is longer than 5,500 km | ## How it's calculated [#how-its-calculated] **CO₂ per passenger:** `3.16 × (total fuel × pax-to-freight factor) ÷ (Y-seats × pax load factor)` - **3.16**: Tonnes of CO₂ from burning one tonne of aviation fuel. - **Total fuel**: Fuel used by all flights from the origin to the destination airport, weighted by each equivalent aircraft type's share of departures. - **Pax-to-freight factor**: Ratio of passengers to mail and freight tonnage on the route group, from ICAO statistics. - **Y-seats**: Economy-equivalent seats on all flights serving the city pair. - **Pax load factor**: Ratio of passengers to available seats on the route group, from ICAO statistics. ### Distance correction [#distance-correction] Fuel is estimated from the great-circle distance (GCD) between the two airports, using coordinates from the ICAO Location Indicators database (ICAO Doc 7910). The GCD is then corrected for distance flown beyond it because of stacking, traffic and weather. According to EIG, the distance actually flown can be up to 11% longer than the GCD in Europe (ANCAT/EC2 1998). | Great-circle distance | Added to GCD | | --- | --- | | Under 550 km | + 50 km | | 550 km to 5,500 km | + 100 km | | Over 5,500 km | + 125 km | ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `ICAO` - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Takes priority over `origin` and `destination`. Without it, SQUAKE resolves the distance from them. With `routing`, per-leg distances apply. - `booking_class` (enum): If you leave it out, send `fare_class` and `airline` so SQUAKE can resolve it. Defaults to `economy`. - `fare_class` (string): A single letter such as `Y` or `J`. Together with `airline`, mutually exclusive with `booking_class`. - `airline` (string): IATA designator such as `LH`; airline names are resolved too. Together with `fare_class`, mutually exclusive with `booking_class`. - `aircraft_type` (string): Aircraft type in IATA or ICAO format. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `sustainable_fuels` (boolean): Marks the use of sustainable fuels. This lowers the emissions SQUAKE calculates, but isn't part of the current official frameworks. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by sustainable fuel, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 454070, "carbon_unit": "gram", "items": [{ "carbon_quantity": 454070, "carbon_unit": "gram", "external_reference": "test_7", "type": "flight", "methodology": "ICAO", "distance": 6522.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] ICAO Carbon Emissions Calculator Methodology, version 13.1. ICAO, August 2024. [Read the PDF](https://applications.icao.int/icec/Methodology%20ICAO%20Carbon%20Emissions%20Calculator_v13_Final.pdf). # Flight: Routing (multi-leg) (/docs/calculations/travel/flight/flight-routing) Send a multi-leg itinerary as one flight item with a hyphen-separated airport chain, and get carbon and distance calculated per leg and totalled on the item. Flight routing lets you send a single flight item with an ICAO-style hyphen-separated airport chain (for example `BER-FRA-JFK`) instead of `origin` and `destination`. SQUAKE expands the string into consecutive legs (BER→FRA, FRA→JFK), runs the same methodology once per leg, and aggregates carbon and distance on the parent item. > **Don't combine routing with origin or destination** > `routing` can't be combined with `origin` or `destination`. Sending both returns `invalid_params` with a detail such as: > > `'routing' cannot be used together with 'origin' or 'destination'.` ## Parsing rules [#parsing-rules] SQUAKE parses the routing string as follows: - It splits on `-`, then trims each segment and converts it to uppercase. - There must be at least two non-empty segments. - Consecutive segments must not be identical (for example, `BER-BER` is invalid). An invalid or empty routing fails validation with a clear error, for example: `'routing' must be a hyphen-separated list of at least two distinct airport codes (e.g. BER-FRA-JFK).` ## Per-leg parameters [#per-leg-parameters] Some attributes can vary per leg. The validated attributes are: `booking_class`, `fare_class`, `airline`, `aircraft_type`, `aircraft_size`, `plane_type`, `biofuel`, `flight_number`, `departure_date`. ### How values are applied [#how-values-are-applied] - **Single value:** repeated for every leg. - **Pipe-separated (`|`):** must have exactly as many parts as legs. The leg count is the number of consecutive airport pairs in the routing (`BER-FRA-JFK` has two legs). - **Hyphen-separated:** if the number of hyphen-separated segments equals the leg count, values map leg by leg. If the count doesn't match and the string isn't a single segment, validation fails with an ambiguous multi-segment string. > **departure_date is pipe-only** > `departure_date` is never split on hyphens, because ISO dates contain hyphens. Use a single value (applied to all legs) or a pipe list with one entry per leg. A count mismatch returns `invalid_params` with a detail like: `'booking_class' list has 2 value(s) but routing has 1 leg(s).` Validation failures and leg-count mismatches also emit internal metrics for monitoring. ## `distance_in_km` with routing [#distance_in_km-with-routing] When `routing` is present, `distance_in_km` isn't used in place of the computed distance. Routing drives the per-leg distance, and the parent item's distance aggregates those legs. Sending `distance_in_km` doesn't define the total for routed items. ## Response and expand [#response-and-expand] - Include `"legs"` in the request's `expand` array (together with `"items"` when you need per-item totals) to get a per-leg breakdown on the flight item. - When `legs` is expanded, the item typically includes `routing` (echoing the submitted chain) and a `legs` array. The parent `carbon_quantity` and `distance` aggregate the legs (for example, the parent `distance` matches the sum of the leg distances). - If `expand` includes only `items` and leaves out `legs`, the item may omit `routing` and `legs` even when the request used routing. With audit mode enabled, per-leg objects can include `audit` and `emission_factors` when `legs` is expanded. ## Example requests [#example-requests] A multi-leg DEFRA flight with items and legs expanded: ```json title="Multi-leg DEFRA flight" { "expand": ["items", "legs"], "carbon_unit": "tonne", "distance_unit": "kilometer", "items": [{ "type": "flight", "methodology": "DEFRA", "routing": "BER-FRA-JFK", "booking_class": "economy", "number_of_travelers": 1, "radiative_forcing_index": true, "external_reference": "multi_leg_1" }] } ``` Per-leg attributes, with a different booking class on each of the two legs: ```json title="Per-leg booking classes" { "routing": "BER-FRA-JFK", "booking_class": "economy|business" } ``` # Flight: TIM (/docs/calculations/travel/flight/flight-tim) Calculate passenger flight emissions with Google's Travel Impact Model (TIM), from flight-level data down to distance-based factors, with an optional contrail impact indicator and airport emissions. Type: `flight` · Methodology: `TIM` · Supports audit mode The Travel Impact Model was developed under the aegis of Google and its independent Advisory Committee, whose members come from industry, academia and policy. Drawing on public and licensable datasets, TIM calculates per-seat or per-passenger CO₂e emissions from flight details, aircraft specifics and load factors. Its methodology is validated against real-world data, aims to cover the complete climate impact of aviation, and is available through a freely accessible API. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "TIM", "origin": "SYD", "destination": "MEL", "number_of_travelers": 1, "booking_class": "economy", "airline": "QF", "flight_number": "QF0479", "aircraft_type": "73H", "external_reference": "test", "energy_scope": "wtw", "logistics_hub": true }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "TIM", "origin": "SYD", "destination": "MEL", "number_of_travelers": 1, "booking_class": "economy", "airline": "QF", "flight_number": "QF0479", "aircraft_type": "73H", "external_reference": "test", "energy_scope": "wtw", "logistics_hub": true }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `booking_class` | economy | No `booking_class` is sent and none can be resolved from `fare_class` and `airline` | | `energy_scope` | `wtw` | No `energy_scope` is sent | | `logistics_hub` | `false` | No `logistics_hub` is sent | ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `TIM` - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). Use IATA codes for higher accuracy (Tier 1 or 2). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. Use IATA codes for higher accuracy (Tier 1 or 2). - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `departure_date` (string): Departure date in `YYYY-MM-DD` format, aligned with [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). - `flight_number` (string): Include the airline designator, such as `"BA115"`. `"115"` also works when you send `airline` separately. - `booking_class` (enum): If you leave it out, sending `fare_class` and `airline` is highly recommended so SQUAKE can resolve it. Defaults to `economy`. - `fare_class` (string): A single letter such as `Y` or `J`. Together with `airline`, mutually exclusive with `booking_class`. - `airline` (string): IATA designator such as `LH`; airline names are resolved too. Together with `fare_class`, mutually exclusive with `booking_class`. - `aircraft_type` (string): Aircraft type in IATA or ICAO format. - `energy_scope` (enum): `ttw` or `wtw`. Defaults to `wtw`. - `logistics_hub` (boolean): Adds airport emissions of 1.71 kg CO₂e per airport, so 3.42 kg CO₂e per item. Use `true` for the full end-to-end journey per ISO 14083. Defaults to `false`. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `sustainable_fuels` (boolean): Marks the use of sustainable fuels. This lowers the emissions SQUAKE calculates, but isn't part of the current official frameworks. - `carbon_reduction_percentage_of_total` (number): Share of emissions reduced by sustainable fuel, from `0` to `1`. Defaults to `0`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 78418, "carbon_unit": "gram", "items": [{ "carbon_quantity": 78418, "carbon_unit": "gram", "external_reference": "test", "type": "flight", "methodology": "TIM", "distance": 706.0, "distance_unit": "kilometer", "algorithm_specifics": { "dataset_type": "google_tim", "contrails_impact_bucket": "MODERATE" } }] } ``` ## Algorithm specifics [#algorithm-specifics] The `algorithm_specifics` object in the response says which dataset produced the figure and how much contrail warming to expect. ### `dataset_type` [#dataset_type] | Value | Meaning | | --- | --- | | `google_tim` | The standard Travel Impact Model methodology. It uses current and modelled flight data to estimate emissions from flight-specific variables such as aircraft type, route and cabin class. It ensures high accuracy and is aligned with TIM's publicly documented methodology. | | `google_tim_fallback` | The input wasn't enough for a precise match, so SQUAKE applied fallback logic to estimate emissions. This can happen when essential data such as the flight number or airline is missing or can't be matched reliably. The result may be less accurate, but is still a reasoned approximation. | | `historical_google_tim` | TIM's historical emissions dataset, structured into three tiers by data availability and accuracy. See the tiers below. | ### Historical tiers [#historical-tiers] | Tier | Dataset | Requires | Use for | Accuracy | | --- | --- | --- | --- | --- | | 1 | `TIM past direct flight emissions` | Carrier, flight number, origin, destination, departure date, cabin class | Direct flights only | Highest | | 2 | `Typical flight emissions` | Origin, destination, cabin class | Direct or indirect flights | Medium | | 3 | `Distance-based emission factors` | Distance travelled, cabin class | Direct or indirect flights | Lowest | - **Tier 1** uses actual scheduled flight data from 2019, covering operating and codeshare flights. It gives the most accurate CO₂e estimate when the full flight details are known. - **Tier 2** uses typical emissions based on historical routes between two airports, averaged over several possible flight paths. Useful when flight numbers or dates are unknown. - **Tier 3** applies generalised emission factors per kilometre per seat, segmented by cabin class. Use it only when flight routing data is unavailable. ### `contrails_impact_bucket` [#contrails_impact_bucket] The estimated climate warming risk from contrails for the flight: `"UNSPECIFIED"`, `"NEGLIGIBLE"`, `"MODERATE"` or `"SEVERE"`, based on how the contrail impact compares to the flight's fuel burn emissions. > **Display only** > `contrails_impact_bucket` isn't converted into CO₂e or combined with fuel emissions. ## Bibliography [#bibliography] Travel Impact Model Emissions Data. TIM Team. [github.com/google/travel-impact-model](https://github.com/google/travel-impact-model) # Flight: TU-Chalmers 🇸🇪 (/docs/calculations/travel/flight/flight-tu-chalmers) Calculate passenger flight emissions with the TU-Chalmers methodology from Chalmers University of Technology, which accounts for booking class, scheduled or charter flights and the use of biofuels. Type: `flight` · Methodology: `TU-CHALMERS` · Source: Travel and Climate methodology report, version 4.1 · Supports audit mode The TU-Chalmers methodology comes from research at Chalmers University of Technology in Sweden and focuses on improving the precision of greenhouse gas (GHG) calculations for air travel. It considers class-specific emissions, reflecting differences in space usage and the associated fuel allocation, and supports assessments of flights that use biofuels. ## Sample requests [#sample-requests] Send a quote while the traveller is still choosing a flight, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "flight", "methodology": "TU-CHALMERS", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "JFK", "booking_class": "premium_economy", "plane_type": "scheduled", "biofuel": true }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "flight", "methodology": "TU-CHALMERS", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "JFK", "booking_class": "premium_economy", "plane_type": "scheduled", "biofuel": true }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] When a field is missing, SQUAKE fills it in before calculating. | Field | Default | Applies when | | --- | --- | --- | | `plane_type` | `scheduled` | No `plane_type` is sent | | `biofuel` | `false` | No `biofuel` is sent | ## Request fields [#request-fields] - `type` (string, required): `flight` - `methodology` (string, required): `TU-CHALMERS` - `origin` (string): IATA/ICAO airport code (`MUC`), UN/LOCODE for other locations (`DEHAM`), or latitude and longitude (`+40.712,-74.006`). For multi-leg trips, use `routing` instead. - `destination` (string): Same formats as `origin`. - `routing` (string): Hyphen-separated airports for multi-leg itineraries, instead of `origin` and `destination`. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `distance_in_km` (number): Overrides `origin` and `destination`. Without it, SQUAKE resolves the distance from them. With `routing`, it isn't used as the routed total. - `booking_class` (enum): `economy`, `premium_economy`, `business` or `first`. Affects emissions through the space and resources allocated per passenger. - `plane_type` (enum): `"scheduled"` or `"charter"`. Defaults to `"scheduled"`. - `biofuel` (boolean): Whether the flight used biofuel. Defaults to `false`. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can link results to requests when you send several items. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 632000, "carbon_unit": "gram", "items": [{ "carbon_quantity": 632000, "carbon_unit": "gram", "external_reference": "test_1", "type": "flight", "methodology": "TU-CHALMERS", "distance": 6320.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] Methodology Report for Travel and Climate, version 4.1. Chalmers University of Technology. [Read the PDF](https://travelandclimate.org/method/Methodology-Report-for-Travel-and-Climate-Version-4-1.pdf). # Flight (/docs/calculations/travel/flight) Calculate passenger flight emissions on the Calculation API with one of the flight methodologies below. They differ in the data they're built on and in how much you need to know about the flight. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [ADEME 🇫🇷](/docs/calculations/travel/flight/flight-ademe) | Not stated | GHG information for transport services (French ministry, June 2019) | `origin` and `destination`; optional `aircraft_size`, `aircraft_type`, `airline` | Includes radiative forcing | | [Base Empreinte 🇫🇷](/docs/calculations/travel/flight/flight-base-empreinte) | Not stated | ADEME Base Empreinte, 2025 | `origin` and `destination`; optional `aircraft_size`, `radiative_forcing_index` | Radiative forcing on by default; `aircraft_size` defaults to the average | | [CO2-emissiefactoren 🇳🇱](/docs/calculations/travel/flight/flight-co2-emissiefactoren) | Not stated | CO2-emissiefactoren (Milieu Centraal), factor years 2020 and 2022 | `origin` and `destination`; optional `departure_date` or `methodology_version`, `booking_class`, `radiative_forcing_index`, `energy_scope` | Factor year picked from `departure_date`; the 2020 factors have no travel-class split | | [DEFRA 🇬🇧](/docs/calculations/travel/flight/flight-defra) | Not stated; `aircraft_type` applies only when an airport is in the UK | UK government DEFRA Conversion Factors | `origin` and `destination`; optional `methodology_version`, `booking_class`, `aircraft_type`, `radiative_forcing_index`, `energy_scope` | Pin a factor year with `methodology_version`; 8% uplift on great-circle distance | | [EPA 🇺🇸](/docs/calculations/travel/flight/flight-epa) | Not stated | US EPA GHG Emission Factors Hub | `origin` and `destination`; optional `methodology_version` | Mode-level factors: no aircraft type, booking class or RFI | | [GATE4](/docs/calculations/travel/flight/flight-gate4) | Not stated; records from 1 January 2019 onward | GATE4 by Advito (ISO-certified) | IATA `origin` and `destination`; `departure_date`, `flight_number`, `airline`, `booking_class` | Flight-level records; `match_level` says how the record was resolved | | [ICAO](/docs/calculations/travel/flight/flight-icao) | All ICAO member states | ICAO Carbon Emissions Calculator methodology v13.1 (August 2024) | `origin` and `destination`; optional `aircraft_type`, `booking_class` (or `fare_class` and `airline`) | Uses the ICAO methodology, not the ICEC dataset | | [TIM](/docs/calculations/travel/flight/flight-tim) | Not stated | Google Travel Impact Model | IATA `origin` and `destination`; optional `departure_date`, `flight_number`, `airline`, `booking_class`, `logistics_hub` | Falls back from flight-level to distance-based data; `dataset_type` says which was used | | [TU-Chalmers 🇸🇪](/docs/calculations/travel/flight/flight-tu-chalmers) | Not stated | Travel and Climate methodology report v4.1 (Chalmers University of Technology) | `origin` and `destination`; optional `booking_class`, `plane_type`, `biofuel` | Supports charter flights and biofuel | Every methodology above supports audit mode, and all of them accept `routing` in place of `origin` and `destination`. ## How to decide [#how-to-decide] - **You know the exact flight** (carrier, flight number and departure date): GATE4 and TIM match flight-level records and report in the response whether they fell back to a broader match (`match_level` for GATE4, `dataset_type` for TIM). - **You need to reproduce a published factor year**: DEFRA, EPA and CO2-emissiefactoren take a `methodology_version`. CO2-emissiefactoren also picks the year from `departure_date` when you leave the version out. - **You want high-altitude effects included**: ADEME includes radiative forcing, and Base Empreinte, CO2-emissiefactoren and DEFRA apply it by default through `radiative_forcing_index`. EPA's mode-level factors don't include RFI. - **You only have the airports, or only a distance**: ADEME, Base Empreinte, CO2-emissiefactoren, DEFRA, EPA, ICAO and TU-Chalmers accept `distance_in_km`. GATE4 needs three-letter IATA airport codes. - **The flight is a charter or used biofuel**: TU-Chalmers is the only methodology with `plane_type` and `biofuel`. > **Multi-leg itineraries** > To describe an itinerary as a single hyphen-separated airport chain (for example `BER-FRA-JFK`) instead of an origin and a destination, see [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). SQUAKE calculates each leg with the methodology you choose and totals them on the item. # Hotel: DEFRA 🇬🇧 (/docs/calculations/travel/hotel/hotel-defra) Calculate hotel stay emissions with the UK Department for Environment, Food & Rural Affairs (DEFRA) Conversion Factors, pinned to a specific year or using the latest supported year. Type: `hotel` · Methodology: `DEFRA` · Supports audit mode ## Overview [#overview] DEFRA has pioneered carbon accounting standards across many sectors. For hotels, the DEFRA methodology emphasizes transparency and consistency. Its guidelines account for the different energy consumption patterns of hotel types, from luxury resorts to budget motels. They cover direct energy use, including heating, cooling and electricity, and also indirect emissions from supply chain activities, food and beverage services, waste disposal and guest transportation. The methodology also emphasizes adaptability and continuous improvement. Hotels are encouraged not only to measure and report their carbon footprint but also to act to reduce it. With specific guidance on reduction strategies, from energy-efficient appliances to waste reduction, DEFRA's approach helps the hotel sector contribute to broader sustainability goals. ## Versioning [#versioning] Add `methodology_version` to pin a specific Conversion Factors year, for example `"2024"`. If you leave it out, SQUAKE applies the latest supported year. Pin a specific year for reproducibility and auditability. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "hotel", "methodology": "DEFRA", "external_reference": "string", "country": "GB", "city": "London", "number_of_nights": 2, "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "hotel", "methodology": "DEFRA", "external_reference": "string", "country": "GB", "city": "London", "number_of_nights": 2, "methodology_version": "2024" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `country` | `GB` | No `country` is sent | | `methodology_version` | Latest supported DEFRA year | No `methodology_version` is sent | ## Request fields [#request-fields] - `type` (string, required): `hotel` - `methodology` (string, required): `DEFRA` - `methodology_version` (string): DEFRA Conversion Factors year, such as `"2024"`. If you leave it out, SQUAKE uses the latest supported year. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match the response to the request. - `country` (string): ISO 3166-1 alpha-2 or alpha-3 code, 2 to 3 characters. - `city` (string): Only `"London"` within `"GB"` is supported. - `number_of_nights` (integer): Minimum `1`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 23000, "carbon_unit": "gram", "items": [{ "carbon_quantity": 23000, "carbon_unit": "gram", "external_reference": "string", "type": "hotel", "methodology": "DEFRA", "methodology_version": "2024" }] } ``` ## Bibliography [#bibliography] - UK Government, Greenhouse gas emissions: research and statistics. [Read on GOV.UK](https://www.gov.uk/environment/greenhouse-gas-emissions#research_and_statistics). - *Government Greenhouse Gas Conversion Factors for Company Reporting: Methodology* (latest year). # Hotel: Greenview HFT (/docs/calculations/travel/hotel/hotel-greenview) Calculate hotel stay emissions with the Greenview Hotel Footprinting Tool (HFT), using coefficients by location and hotel star rating. Type: `hotel` · Methodology: `GREENVIEW` · Supports audit mode ## Overview [#overview] The Greenview Hotel Footprinting Tool (HFT) is an industry-recognized dataset of carbon footprint coefficients for hotel stays and meeting spaces worldwide. It is based on the Cornell Hotel Sustainability Benchmarking Index (CHSB) data, with more granularity and updated figures. The Greenview HFT dataset: - Covers about 200 countries, 100 sub-national regions and 450 market areas. - Includes coefficients by hotel star rating (2 to 5 stars) and a hotel average. - Is updated annually and adapted from the latest CHSB dataset. - Is intended for hotel emissions calculations and sustainability reporting. With Greenview HFT, online booking tools (OBTs), travel management companies (TMCs), online travel agencies (OTAs) and other stakeholders can calculate and communicate hotel emissions with improved accuracy and transparency. ## Versioning [#versioning] Add `methodology_version` to pin a specific Greenview HFT dataset year, for example `"2024"`. Supported years are `2021` to `2026`. If you leave it out, SQUAKE applies the latest supported year. Pin a specific year for reproducibility and auditability. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "hotel", "methodology": "GREENVIEW", "external_reference": "string", "country": "AU", "city": "Sydney", "stars": 4, "number_of_nights": 1, "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "hotel", "methodology": "GREENVIEW", "external_reference": "string", "country": "AU", "city": "Sydney", "stars": 4, "number_of_nights": 1, "methodology_version": "2024" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `methodology_version` | Latest supported Greenview year | No `methodology_version` is sent | ### Location fallback [#location-fallback] When SQUAKE has no data for the location you send, it falls back one level at a time: 1. No data for `city`: falls back to `state`. 2. No data for `state`: falls back to `country`. 3. No data for `country`: falls back to `continent`. ### Stars fallback [#stars-fallback] 1. No data for the `stars` you send: falls back to `hotel_average`. 2. No `stars` sent: uses `hotel_average`. 3. No known location: defaults to `32.69` kgCO₂e per night. ## Request fields [#request-fields] - `type` (string, required): `hotel` - `methodology` (string, required): `GREENVIEW` - `methodology_version` (string): Greenview HFT dataset year, `"2021"` to `"2026"`. If you leave it out, SQUAKE uses the latest supported year. - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. - `country` (string): ISO 2- or 3-letter country code. - `city` (string): Full city name. See the [full list of supported cities](https://squake.notion.site/237754e0050481838a1deea7dc0a7ba0?v=237754e00504812aba8d000c4b480cf4&source=copy_link). - `state` (string): Full state name. See the [full list of supported states](https://squake.notion.site/237754e005048191a59ef561244c09b0?v=237754e0050481758081000c23e8e4dd&source=copy_link). - `stars` (integer): Hotel star rating from 1 to 5. If it's unavailable or unsupported for a location, SQUAKE falls back to the hotel average. - `number_of_nights` (integer): Number of nights. Minimum `1`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 16193, "carbon_unit": "gram", "items": [{ "carbon_quantity": 16193, "carbon_unit": "gram", "external_reference": "string", "type": "hotel", "methodology": "GREENVIEW", "methodology_version": "2024" }] } ``` ## Citation [#citation] > **Cite the dataset** > When you use the dataset, cite it as: *Greenview Hotel Footprinting Tool Version 2024v1.1 (adapted from CHSB2024 data set of 2022 calendar year data).* If you modify or adjust the data, include a clear note in the citation. ## Bibliography [#bibliography] - Greenview. *Hotel Footprinting Tool Version 2024*. Greenview Hospitality Pte. Ltd., adapted from CHSB 2024. - Ricaurte, Eric. *Hotel Sustainability Benchmarking Index 2024: Carbon, Energy, and Water*. Cornell University, 2024. # Hotel: HCMI & CHSB (/docs/calculations/travel/hotel/hotel-hcmi) Calculate hotel stay emissions with the Hotel Carbon Measurement Initiative (HCMI) and Cornell Hotel Sustainability Benchmarking Index (CHSB) datasets, per occupied room or by floor area. Type: `hotel` · Methodology: `HCMI` · Supports audit mode ## Overview [#overview] HCMI and CHSB are two prominent methodologies in the hotel industry, built to measure carbon footprints and promote sustainable practices. HCMI, a global standard introduced by leading hotel chains and organizations, gives a consistent way to calculate and communicate the carbon footprint of hotel stays and meetings. It considers variables such as energy and water usage, waste production and outsourced services. CHSB, created by Cornell University's School of Hotel Administration, is an index that lets hotels worldwide benchmark their energy and water usage, greenhouse gas emissions and other sustainability metrics against peers. By collecting data across regions and hotel sizes, CHSB gives hoteliers insights to improve their environmental efficiency and sustainability credentials and stay competitive in an increasingly eco-conscious market. ### Hotel Carbon Measurement Initiative [#hotel-carbon-measurement-initiative] HCMI is a free methodology and tool for hotels to calculate the carbon footprint of hotel stays and meetings in their properties. The hospitality industry developed it to give all hotels a consistent way to measure and communicate their carbon impact. More than 25,000 hotels use HCMI globally. The ambition is that widespread use of HCMI improves understanding, transparency and accuracy across the industry. ### Cornell Hotel Sustainability Benchmarking Index [#cornell-hotel-sustainability-benchmarking-index] CHSB is an industry-led global data collection and benchmarking initiative, with data on energy, water and carbon emissions from more than 20,000 hotels around the world. Participants include major hotel brands, operators and owners from all regions of the world. Cornell's Center for Hospitality Research publishes the public dataset free of charge. It contains average hotel performance for different types of hotels in different geographies. Hotels that take part directly receive a confidential, bespoke benchmarking report that shows how they perform against their competitive set. Governments, corporate customers, travel management companies and many other organizations use CHSB data to set benchmarks and estimates for energy and water usage, and carbon footprints. ### GHG Protocol [#ghg-protocol] GHG Protocol sets comprehensive global standardized frameworks to measure and manage greenhouse gas (GHG) emissions from private and public sector operations, value chains and mitigation actions. Building on a 20-year partnership between the World Resources Institute (WRI) and the World Business Council for Sustainable Development (WBCSD), GHG Protocol works with governments, industry associations, NGOs, businesses and other organizations. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "hotel", "methodology": "HCMI", "methodology_version": "2024", "external_reference": "string", "country": "AU", "city": "Villa La Angostura", "hotel_type": "urban_location", "stars": 4, "hcmi_member": false, "number_of_nights": 1 }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "hotel", "methodology": "HCMI", "methodology_version": "2024", "external_reference": "string", "country": "AU", "city": "Villa La Angostura", "hotel_type": "urban_location", "stars": 4, "hcmi_member": false, "number_of_nights": 1 }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ### By floor area [#by-floor-area] Send `square_meters` to calculate by floor area instead of per occupied room. `square_meters` takes precedence over `number_of_nights`. ```json title="By floor area" { "expand": ["items"], "items": [{ "type": "hotel", "methodology": "HCMI", "methodology_version": "2024", "country": "FR", "city": "Paris", "stars": 4, "square_meters": 120 }] } ``` ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `hotel_type` | `hotel_average` | No `hotel_type` is sent | | `methodology_version` | Latest stable year (`2024`) | No `methodology_version` is sent, or it is `latest` | | `account_for_total` | `false` | No `account_for_total` is sent | ## Request fields [#request-fields] - `type` (string, required): `hotel` - `methodology` (string, required): `HCMI` - `external_reference` (string): Your identifier for the item, up to 128 characters, so you can match results to requests. SQUAKE doesn't guarantee the order of items. - `stars` (integer): From `1` to `5`. Mutually exclusive with `hotel_type`; `stars` takes priority over `hotel_type`. - `country` (string): ISO 3166-1 alpha-2 or alpha-3 code, 2 to 3 characters. - `city` (string): See [the database](https://squake.notion.site/173c4b5d045a4e5dbea2b72d5c6a385f?v=0c94e9d12afb4cdd92be1d751797cd99&pvs=4). - `state` (string): See [the database](https://squake.notion.site/9b5019f84a71458bb62d87864bdb9e39?v=32f49ed805504bf7ab419e90fb743b68&pvs=4). - `hcmi_member` (boolean): `true` or `false`. - `number_of_nights` (integer): Minimum `1`. - `methodology_version` (string): HCMI/CHSB dataset year. Supported: `2015` to `2021`, `2023`, `2024` and `2026`. Leave it out or send `latest` for the latest stable year (`2024`). Years without a dataset (`2022`, `2025`) resolve to the nearest earlier year. - `square_meters` (number): Calculates the hotel by floor area using the per-square-metre dataset, and takes precedence over `number_of_nights`. Minimum `1`. - `account_for_total` (boolean): `false` uses the HCMI Rooms Footprint per occupied room; `true` uses the whole-property Hotel Carbon Footprint per occupied room. Defaults to `false`. Applies to the per-occupied-room calculation only, and is ignored when you send `square_meters`. - `hotel_type` (enum): Mutually exclusive with `stars`; `stars` takes priority over `hotel_type`. Values include `airport_location`, `convention_hotel`, `extended_stay`, `full_service_nonresort`, `full_service_resort` and `hotel_average`, among others. Defaults to `hotel_average`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 44475, "carbon_unit": "gram", "items": [{ "carbon_quantity": 44475, "carbon_unit": "gram", "external_reference": "string", "type": "hotel", "methodology": "HCMI" }] } ``` ## Bibliography [#bibliography] Ricaurte, Eric. *Hotel Sustainability Benchmarking Index 2024: Carbon, Energy, and Water*. 2024. # Hotel: NOS-GESTES-CLIMAT (/docs/calculations/travel/hotel/hotel-nos-gestes-climat) Calculate hotel stay emissions with the fixed per-night footprint from Nos Gestes Climat, using only the number of nights. Type: `hotel` · Methodology: `NOS-GESTES-CLIMAT` · Supports audit mode ## How it's calculated [#how-its-calculated] NOS-GESTES-CLIMAT uses a fixed hotel footprint per night from Nos Gestes Climat. SQUAKE multiplies it by the number of nights. **Hotel CO₂e in kg:** `6.94 × nights` - **6.94**: Hotel footprint per night in kg CO₂e, from Nos Gestes Climat. - **Nights**: `number_of_nights`: number of nights of the stay. The method doesn't need location, hotel class, room type or methodology version inputs. ## Sample request [#sample-request] ```json { "expand": ["items"], "items": [{ "audit": false, "type": "hotel", "methodology": "NOS-GESTES-CLIMAT", "external_reference": "hotel-ngc-1", "number_of_nights": 2 }] } ``` ## Request fields [#request-fields] - `type` (string, required): `hotel` - `methodology` (string, required): `NOS-GESTES-CLIMAT` - `number_of_nights` (number, required): Number of nights. Numeric, minimum `1`. - `external_reference` (string): A reference ID that links the resulting emissions to the request. Up to 128 characters. - `audit` (boolean): Set to `true` when you create immutable audit records for final calculations. Your account must have audit mode enabled. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 13880, "carbon_unit": "gram", "items": [{ "carbon_quantity": 13880, "carbon_unit": "gram", "external_reference": "hotel-ngc-1", "type": "hotel", "methodology": "NOS-GESTES-CLIMAT", "algorithm_specifics": { "factor_kg_co2e_per_night": 6.94, "factor_g_co2e_per_night": 6940, "number_of_nights": 2 } }] } ``` ## Bibliography [#bibliography] - [Nos Gestes Climat documentation](https://nosgestesclimat.fr/en/documentation) - [Nos Gestes Climat model](https://nosgestesclimat.fr/en/modele) - [Nos Gestes Climat GitHub model repository](https://github.com/incubateur-ademe/nosgestesclimat) # Hotel (/docs/calculations/travel/hotel) Calculate hotel stay emissions on the Calculation API with one of the hotel methodologies below. They range from a fixed per-night figure to location- and star-rating-specific benchmarks. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [DEFRA 🇬🇧](/docs/calculations/travel/hotel/hotel-defra) | `country` defaults to `GB`; `city` supports only London | UK government DEFRA Conversion Factors | `number_of_nights`; optional `country`, `city`, `methodology_version` | Pin a factor year with `methodology_version` | | [Greenview HFT](/docs/calculations/travel/hotel/hotel-greenview) | About 200 countries, 100 sub-national regions and 450 market areas | Greenview Hotel Footprinting Tool, adapted from CHSB; years 2021 to 2026 | `number_of_nights`, plus `country`, `state` or `city`; optional `stars`, `methodology_version` | Falls back from city to state, country and continent, and from `stars` to the hotel average | | [HCMI & CHSB](/docs/calculations/travel/hotel/hotel-hcmi) | Not stated | HCMI and Cornell Hotel Sustainability Benchmarking Index datasets; years 2015 to 2026 | `number_of_nights` or `square_meters`; optional `country`, `state`, `city`, `stars` or `hotel_type`, `hcmi_member`, `account_for_total`, `methodology_version` | Per occupied room or by floor area; rooms-only or whole-property footprint | | [NOS-GESTES-CLIMAT](/docs/calculations/travel/hotel/hotel-nos-gestes-climat) | Not stated | Nos Gestes Climat fixed footprint, 6.94 kg CO₂e per night | `number_of_nights` | No location, hotel class or version inputs | Every methodology above supports audit mode. ## How to decide [#how-to-decide] - **You know the hotel's location and star rating**: Greenview and HCMI & CHSB both use location and `stars`. Greenview falls back step by step when it has no data for the exact city or star rating. - **You calculate by floor area**: HCMI & CHSB accepts `square_meters` instead of `number_of_nights`. - **You only know the number of nights**: NOS-GESTES-CLIMAT multiplies a fixed per-night figure by `number_of_nights` and needs nothing else. - **You need to reproduce a published dataset year**: DEFRA, Greenview and HCMI & CHSB all take a `methodology_version`. # Travel (/docs/calculations/travel) Calculate the carbon emissions of a whole journey, such as flights, car rides and hotel stays, in a single request. From flights and car rentals to accommodation, each step of a journey leaves an environmental footprint. SQUAKE calculates carbon emissions across travel-related activities, whether you fly internationally, rent a car, stay at a hotel or take a ferry. Knowing the emissions of each activity brings transparency and encourages travelers to offset their emissions or choose greener alternatives. ## Perform a calculation [#perform-a-calculation] `POST /v2/calculations` requires bearer authentication. It calculates carbon emissions for one or more activities. For example, to compute the footprint of a journey with a return flight, two cab rides and a hotel stay, pass all activities in the `items` array. Include `"items"` in the `expand` array to get the emissions for each item in addition to the total carbon quantity. For multi-leg flight items that use `routing` instead of `origin` and `destination`, you can also include `"legs"` in `expand` to get per-leg emissions and distances on the flight item. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). > **No calculation IDs** > This is a low-latency endpoint. SQUAKE doesn't return a unique identifier for calculation results through it. To buy compensation for your carbon emissions, quote a price on the pricing endpoint. Some data sets are extensive and are documented separately. ## Request body [#request-body] The body is `application/json`. - `expand` (array[string]): `items`, `legs`, or both. With `items`, SQUAKE returns emissions for each item separately, in addition to a total value. `legs` adds a per-leg breakdown for flight items that use `routing` (multi-leg itineraries); use it with routed flights when you need leg-level detail. See [Flight: Routing (multi-leg)](/docs/calculations/travel/flight/flight-routing). - `carbon_unit` (string): `tonne`, `kilogram` or `gram`. SQUAKE uses the International System of Units (SI), commonly called the metric system. - `distance_unit` (string): `meter`, `kilometer`, `feet`, `mile` or `nautical_mile`. Defaults to `kilometer`. ## Sample request [#sample-request] ```json { "expand": ["items"], "carbon_unit": "tonne", "distance_unit": "kilometer", "items": [ { "type": "car", "methodology": "ACRISS", "external_reference": "Taxi", "origin": "Alexanderplatz, Berlin, Germany", "destination": "Berlin Brandenburg Airport, Schönefeld, Brandenburg, Germany", "fuel_type": "diesel", "acriss_car_type": "C" }, { "type": "flight", "methodology": "TIM", "origin": "BER", "destination": "LHR", "number_of_travelers": 1, "booking_class": "business", "airline": "BA", "flight_number": "BA995", "external_reference": "Flight" }, { "type": "car", "methodology": "ACRISS", "external_reference": "Taxi", "origin": "Hounslow TW6 1QG, United Kingdom", "destination": "150 Piccadilly, St. James's, London W1J 9BR, United Kingdom", "fuel_type": "petrol", "acriss_car_type": "S" }, { "type": "hotel", "methodology": "HCMI", "external_reference": "Hotel", "country": "GB", "city": "London", "stars": 5, "hcmi_member": false, "number_of_nights": 3 }, { "type": "car", "methodology": "ACRISS", "external_reference": "Taxi", "origin": "150 Piccadilly, St. James's, London W1J 9BR, United Kingdom", "destination": "Horley, Gatwick RH6 0NP, United Kingdom", "fuel_type": "hev", "acriss_car_type": "D" }, { "type": "flight", "methodology": "TIM", "origin": "LGW", "destination": "BER", "number_of_travelers": 1, "booking_class": "business", "airline": "U2", "flight_number": "U28629", "external_reference": "Flight" }, { "type": "car", "methodology": "ACRISS", "external_reference": "Taxi", "origin": "Berlin Brandenburg Airport, Schönefeld, Brandenburg, Germany", "destination": "Alexanderplatz, Berlin, Germany", "fuel_type": "EV", "acriss_car_type": "G" } ] } ``` ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 0.525911, "carbon_unit": "tonne", "items": [ { "carbon_quantity": 0.002928, "carbon_unit": "tonne", "external_reference": "Taxi", "type": "car", "methodology": "ACRISS", "distance": 24.0, "distance_unit": "kilometer" }, { "carbon_quantity": 0.181885, "carbon_unit": "tonne", "external_reference": "Flight", "type": "flight", "methodology": "TIM", "distance": 1065.0, "distance_unit": "kilometer" }, { "carbon_quantity": 0.004396, "carbon_unit": "tonne", "external_reference": "Taxi", "type": "car", "methodology": "ACRISS", "distance": 28.0, "distance_unit": "kilometer" }, { "carbon_quantity": 0.175022, "carbon_unit": "tonne", "external_reference": "Hotel", "type": "hotel", "methodology": "HCMI" }, { "carbon_quantity": 0.005292, "carbon_unit": "tonne", "external_reference": "Taxi", "type": "car", "methodology": "ACRISS", "distance": 49.0, "distance_unit": "kilometer" }, { "carbon_quantity": 0.156388, "carbon_unit": "tonne", "external_reference": "Flight", "type": "flight", "methodology": "TIM", "distance": 1054.0, "distance_unit": "kilometer" }, { "carbon_quantity": 0.0, "carbon_unit": "tonne", "external_reference": "Taxi", "type": "car", "methodology": "ACRISS", "distance": 24.0, "distance_unit": "kilometer" } ] } ``` # Train (/docs/calculations/travel/train) Calculate train travel emissions on the Calculation API with one of the train methodologies below. The REM page recommends `"methodology": "REM"`, the operator- and country-aware rail methodology, for all new integrations. ## Choose a methodology [#choose-a-methodology] | Methodology | Coverage | Basis | Inputs you need | Notes | | --- | --- | --- | --- | --- | | [REM](/docs/calculations/travel/train/train-rem) | Operator and country factors, with global averages as the last tier | Rail Emissions Model, five-tier factor resolver | `origin` and `destination`, `distance_in_km` or `route_coords`; optional `operator_name`, `origin_country`, `destination_country`, `departure_date`, `train_type`, `fuel_type`, `energy_scope` | `algorithm_specifics` reports the tier used; `route_coords` gives a border-aware distance | | [ADEME 🇫🇷](/docs/calculations/travel/train/train-ademe) | Not stated | GHG information for transport services (French ministry, June 2019) | `origin` and `destination` or `distance_in_km`; optional `train_type`, `fuel_type` | Full lifecycle, including infrastructure; `fuel_type` defaults to `diesel` | | [Base Empreinte 🇫🇷](/docs/calculations/travel/train/train-base-empreinte) | France by default, with Corsica and Île-de-France options | ADEME Base Empreinte, 2025 | `origin` and `destination` or `distance_in_km`; optional `train_type`, `state`, `country`, `city_type`, `year` | Factor `year` defaults to the latest available | | [CO2-emissiefactoren 🇳🇱](/docs/calculations/travel/train/train-co2-emissiefactoren) | Not stated | CO2-emissiefactoren, yearly sets 2020, 2021, 2023, 2025 and 2026 | `origin` and `destination` or `distance_in_km`; optional `methodology_version`, `train_type`, `fuel_type`, `energy_scope` | `train_type` is only `average` or `international`; year isn't inferred on this endpoint | | [DEFRA 🇬🇧](/docs/calculations/travel/train/train-defra) | Not stated | UK government DEFRA Conversion Factors | `origin` and `destination` or `distance_in_km`; optional `methodology_version`, `train_type`, `energy_scope` | Train types: national, international, light rail, tram, underground | | [Green Travel Data 🇬🇧](/docs/calculations/travel/train/train-green-travel-data) | GB National Rail | Rail Delivery Group Green Travel Data 2.0 and 3.1 | `origin` and `destination` as CRS station codes; optional `seat_type`, `departure_date`, `distance_in_km` | Station-to-station figures per timetable release; `distance_in_km` needed for the fallback | | [US-EPA 🇺🇸](/docs/calculations/travel/train/train-us-epa) | US passenger rail: intercity, commuter and transit | US EPA GHG Emission Factors Hub | `distance_in_km` (preferred) or `origin` and `destination`; optional `train_type`, `methodology_version` | Tank-to-wheel only, no upstream emissions | Every methodology above supports audit mode. If you leave `methodology` out on a train item, the API uses your client's configured train default. ## How to decide [#how-to-decide] - **You know the operator or the countries travelled**: REM uses `operator_name` for operator-reported factors and the country fields for country-level factors, and reports which tier answered. - **The journey is on GB National Rail and you have CRS codes**: Green Travel Data uses the Rail Delivery Group's per-journey figure for the timetable that covers `departure_date`. - **The journey is US passenger rail**: US-EPA has factors by US service class, such as `intercity_northeast_corridor` and `commuter_rail`. - **You need to reproduce a published factor year**: DEFRA, CO2-emissiefactoren and US-EPA take a `methodology_version`, and Base Empreinte takes a `year`. - **You need tank-to-wheel or well-to-wheel figures**: REM, DEFRA and CO2-emissiefactoren accept `energy_scope`. US-EPA is tank-to-wheel only. # Train: ADEME 🇫🇷 (/docs/calculations/travel/train/train-ademe) Calculate train travel emissions with the ADEME methodology, which reflects train type, traction (electricity or diesel), grid mix and infrastructure allocation across the full lifecycle. Type: `train` · Methodology: `ADEME` · Source: GHG information for transport services, Jun 2019 · Supports audit mode ## About the methodology [#about-the-methodology] ADEME (the French Agency for Ecological Transition) provides a comprehensive methodology to assess the environmental impact of train travel. - Coverage spans the full lifecycle: vehicle and infrastructure production, operations, maintenance and end of life. - Key drivers include train type (high-speed, mainline, local/express), traction or fuel (electricity or diesel), grid mix and infrastructure allocation. - It's intended for railway operators, policymakers, aggregators and product teams who need transparent, audit-ready train CO₂e estimates. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "train", "external_reference": "test_2", "origin": "BER", "destination": "FRA", "number_of_travelers": 3, "train_type": "mainline", "fuel_type": "diesel", "methodology": "ADEME" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "external_reference": "test_2", "origin": "BER", "destination": "FRA", "number_of_travelers": 3, "train_type": "mainline", "fuel_type": "diesel", "methodology": "ADEME" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `fuel_type` | `diesel` | No `fuel_type` is sent | | `train_type` | `local_express` | No `train_type` is sent | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string, required): `ADEME` - `external_reference` (string): A unique identifier that links results to the requested item. Up to 128 characters. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `origin` (string): Origin location. See [Origin and destination formats](#origin-and-destination-formats). - `destination` (string): Destination location. Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. If you send both, SQUAKE uses `distance_in_km`. - `train_type` (enum): One of `high_speed`, `mainline`, `local_express`. Defaults to `local_express`. - `fuel_type` (enum): One of `diesel`, `electricity`. Defaults to `diesel`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `"MUC"`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). ### UIC and provider codes [#uic-and-provider-codes] A UIC code is also a valid format for trains. If the value isn't valid, the system falls back to general, non-journey-specific emission data. To use a UIC or provider code, send `:`, for example `sncf:FRAAA`. Possible provider prefixes: `uic`, `uic8_sncf`, `sncf`, `sncf_tvs`, `entur`, `db`, `busbud`, `distribusion`, `flixbus`, `cff`, `leoexpress`, `obb`, `trenitalia`, `trenitalia_rtvt`, `trenord`, `ntv_rtiv`, `ntv`, `hkx`, `renfe`, `atoc`, `benerail`, `westbahn`. ```jsonc title="UIC or provider code" { "type": "train", "methodology": "ADEME", "origin": "db:8011160", // Berlin Hbf (example code structure) "destination": "db:8000105", // Frankfurt (Main) Hbf (example code structure) "number_of_travelers": 2 } ``` ```jsonc title="UN/LOCODE" // For multimodal contexts { "type": "train", "methodology": "ADEME", "origin": "DEBER", // Berlin (city code example) "destination": "DEFRA", // Frankfurt (city code example) "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "train", "methodology": "ADEME", "origin": "+52.525,13.369", "destination": "+50.110,8.682", "number_of_travelers": 1 } ``` > **Distance and fallback** > - If you send both `origin`/`destination` and `distance_in_km`, SQUAKE uses `distance_in_km` for emissions. > - Invalid, unsupported or unresolvable location codes trigger a fallback to generic (non-journey-specific) factors consistent with ADEME. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 6669, "carbon_unit": "gram", "items": [{ "carbon_quantity": 6669, "carbon_unit": "gram", "external_reference": "test_2", "type": "train", "methodology": "ADEME", "distance": 435.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] *GHG information for transport services* (June 2019). Ministère de la Transition Écologique et Solidaire. [Read the PDF](https://www.ecologie.gouv.fr/sites/default/files/Information_GES%20-%202019.pdf). # Train: Base Empreinte 🇫🇷 (/docs/calculations/travel/train/train-base-empreinte) Calculate train travel emissions with ADEME's Base Empreinte factors, which take train type, regional context, grid or fuel, and factor year into account. Type: `train` · Methodology: `BASE-EMPREINTE` · Source: ADEME Base Empreinte, 2025 · Supports audit mode ## About the methodology [#about-the-methodology] Base Empreinte, managed by ADEME, is a comprehensive environmental impact database that combines data from Base Carbone and Base IMPACTS. It supports environmental evaluations with multi-criteria data, including greenhouse gas (GHG) emissions and other environmental impacts. For train travel, Base Empreinte factors in train type, location context (for example Corsica and Île-de-France), grid or fuel, and the year of the factor, so stakeholders get accurate, audit-ready emission calculations. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "train", "methodology": "BASE-EMPREINTE", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "NCE", "train_type": "tram", "state": "Ile-de-France", "country": "FR", "year": "2021" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "methodology": "BASE-EMPREINTE", "external_reference": "test_1", "number_of_travelers": 1, "origin": "FRA", "destination": "NCE", "train_type": "tram", "state": "Ile-de-France", "country": "FR", "year": "2021" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `city_type` | `population_under_250000` | No `city_type` is sent; `city_type` is used when `state` isn't provided | | `state` | `Ile-de-France` | No `state` is sent | | `country` | `FR` | No `country` is sent | | `year` | Latest available | No `year` is sent | | `train_type` | `main_line` | Only train type is passed | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string, required): `BASE-EMPREINTE` - `external_reference` (string): A unique identifier that links results to the requested item. Up to 128 characters. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `origin` (string): Origin location. See [Origin and destination formats](#origin-and-destination-formats). - `destination` (string): Destination location. Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. If you send both, SQUAKE uses `distance_in_km`. - `train_type` (enum): One of `ter`, `tgv`, `intercity`, `metro`, `tram`, `trolleybus`, `main_line`. Defaults to `main_line` when only train type is passed. - `state` (enum): Supported regional specificity: `"Corsica"` or `"Ile-de-France"`. Defaults to `"Ile-de-France"`. - `country` (string): ISO 3166-1 alpha-2 country code. Defaults to `"FR"`. - `year` (string): Year of the factor. Defaults to the latest available year. - `city_type` (enum): Used when `state` isn't provided. One of `population_under_250000` (default) or `population_above_250000`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `"MUC"`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). ### UIC and provider codes [#uic-and-provider-codes] A UIC code is also a valid format for trains. If the value isn't valid, the system falls back to general, non-journey-specific emission data. To use a UIC or provider code, send `:`, for example `sncf:FRAAA`. Possible provider prefixes: `uic`, `uic8_sncf`, `sncf`, `sncf_tvs`, `entur`, `db`, `busbud`, `distribusion`, `flixbus`, `cff`, `leoexpress`, `obb`, `trenitalia`, `trenitalia_rtvt`, `trenord`, `ntv_rtiv`, `ntv`, `hkx`, `renfe`, `atoc`, `benerail`, `westbahn`. ```jsonc title="UIC or provider code" { "type": "train", "methodology": "BASE-EMPREINTE", "origin": "db:8011160", // Berlin Hbf (example code structure) "destination": "db:8000105", // Frankfurt (Main) Hbf (example code structure) "number_of_travelers": 2 } ``` ```jsonc title="UN/LOCODE" // For multimodal contexts { "type": "train", "methodology": "BASE-EMPREINTE", "origin": "DEBER", // Berlin (city code example) "destination": "DEFRA", // Frankfurt (city code example) "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "train", "methodology": "BASE-EMPREINTE", "origin": "+52.525,13.369", "destination": "+50.110,8.682", "number_of_travelers": 1 } ``` > **Distance and fallback** > - If you send both `origin`/`destination` and `distance_in_km`, SQUAKE uses `distance_in_km` for emissions. > - Invalid, unsupported or unresolvable location codes trigger a fallback to generic (non-journey-specific) factors consistent with Base Empreinte/ADEME practice. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 4890, "carbon_unit": "gram", "items": [{ "carbon_quantity": 4890, "carbon_unit": "gram", "external_reference": "test_1", "type": "train", "methodology": "BASE-EMPREINTE", "distance": 685.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - ADEME (2025). [Base Empreinte - Données d’impacts environnementaux](https://www.ademe.fr/base-empreinte). - ADEME (2024). [Base Carbone Methodological Guide](https://www.ademe.fr/base-carbone). - ADEME (2023). Base IMPACTS & Rail emission factors — official ADEME documentation. # Train: CO2-emissiefactoren 🇳🇱 (/docs/calculations/travel/train/train-co2-emissiefactoren) Calculate train travel emissions with the Dutch CO2-emissiefactoren factor set, pinned to a published year and to a tank-to-wheel or well-to-wheel energy scope. Type: `train` · Methodology: `CO2-EMISSIEFACTOREN-NL` · Source: Yearly sets 2020, 2021, 2023, 2025, 2026 · Supports audit mode ## About the methodology [#about-the-methodology] CO2-emissiefactoren is a leading European reference for robust, harmonised CO₂ emission values across sectors, including rail. For train travel, it reflects operational energy, electricity mix, traction efficiency and, where applicable, infrastructure impacts, so results are consistent, comparable and useful for decisions. ## Versions [#versions] The factor set is published per year. Set `methodology_version` (a 4-digit year) to pin a version for reproducible results. - **Omitted on this endpoint:** SQUAKE uses the latest supported year. Train items carry no date, so the year is never inferred here. On the [Travel Data API](/docs/travel-data), where activities do carry dates, an omitted `methodology_version` is derived from the trip or activity start date instead. - **A year without its own published set:** resolves to the most recent prior year (for example `2024` → `2023`). - **A year before the earliest supported set (`2020`):** returns a validation error. Supported years: **2020, 2021, 2023, 2025, 2026**. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "train", "methodology": "CO2-EMISSIEFACTOREN-NL", "external_reference": "test", "train_type": "international", "fuel_type": "average", "origin": "AMS", "destination": "BER", "number_of_travelers": 1, "energy_scope": "ttw" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "methodology": "CO2-EMISSIEFACTOREN-NL", "external_reference": "test", "train_type": "international", "fuel_type": "average", "origin": "AMS", "destination": "BER", "number_of_travelers": 1, "energy_scope": "ttw" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `train_type` | `average` | No `train_type` is sent | | `fuel_type` | `average` | No `fuel_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | | `methodology_version` | `latest` | No `methodology_version` is sent | > **Mapping intercity** > If your integration assumes `train_type: intercity` as a product-level alias, map it to the dataset's available categories (`average` or `international`) according to your business rules. ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string, required): `CO2-EMISSIEFACTOREN-NL` - `methodology_version` (string): Factor year, one of `2020`, `2021`, `2023`, `2025`, `2026`, or `latest`. If omitted, the year is derived from the trip or activity start date, and defaults to the latest supported year when no date is available. See [Versions](#versions). - `external_reference` (string): A unique identifier that links results to the requested item. Up to 128 characters. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `origin` (string): Origin location. See [Origin and destination formats](#origin-and-destination-formats). - `destination` (string): Destination location. Same formats as `origin`. - `distance_in_km` (number): Takes priority over `origin` and `destination`. If you send both, SQUAKE uses `distance_in_km`. - `train_type` (enum): One of `average`, `international`. Defaults to `average`. - `fuel_type` (enum): One of `diesel`, `electricity`, `average`. Defaults to `average`. - `energy_scope` (enum): Well-to-wheel scope selector, `ttw` or `wtw`. Defaults to `wtw`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `"MUC"`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). ### UIC and provider codes [#uic-and-provider-codes] A UIC code is also a valid format for trains. If the value isn't valid, the system falls back to general, non-journey-specific emission data. To use a UIC or provider code, send `:`, for example `sncf:FRAAA`. Possible provider prefixes: `uic`, `uic8_sncf`, `sncf`, `sncf_tvs`, `entur`, `db`, `busbud`, `distribusion`, `flixbus`, `cff`, `leoexpress`, `obb`, `trenitalia`, `trenitalia_rtvt`, `trenord`, `ntv_rtiv`, `ntv`, `hkx`, `renfe`, `atoc`, `benerail`, `westbahn`. ```jsonc title="UIC or provider code" { "type": "train", "methodology": "CO2-EMISSIEFACTOREN-NL", "origin": "db:8011160", // Berlin Hbf (example code structure) "destination": "db:8000105", // Frankfurt (Main) Hbf (example code structure) "number_of_travelers": 1, "energy_scope": "wtw" } ``` ```jsonc title="UN/LOCODE" // For multimodal contexts { "type": "train", "methodology": "CO2-EMISSIEFACTOREN-NL", "origin": "NLAMS", // Amsterdam (city/port code example) "destination": "DEBER", // Berlin (city code example) "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "train", "methodology": "CO2-EMISSIEFACTOREN-NL", "origin": "+52.379,4.900", // Amsterdam "destination": "+52.525,13.369",// Berlin "number_of_travelers": 1 } ``` > **Distance and fallback** > - If you send both `origin`/`destination` and `distance_in_km`, SQUAKE uses `distance_in_km` for emissions. > - Invalid, unsupported or unresolvable location codes trigger a fallback to generic (non-journey-specific) factors consistent with the CO2-emissiefactoren methodology. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 10132, "carbon_unit": "gram", "items": [{ "carbon_quantity": 10132, "carbon_unit": "gram", "external_reference": "test", "type": "train", "methodology": "CO2-EMISSIEFACTOREN-NL", "distance": 596.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - Lijst emissiefactoren (2025). [CO₂-emissiefactoren](https://www.co2emissiefactoren.nl/). - Milieu Centraal (n.a.). [milieucentraal.nl](https://www.milieucentraal.nl/). # Train: DEFRA 🇬🇧 (/docs/calculations/travel/train/train-defra) Calculate passenger rail emissions with the UK government's DEFRA conversion factors, by train type and energy scope, pinned to a Conversion Factors year if you need to. Type: `train` · Methodology: `DEFRA` · Supports audit mode ## About the methodology [#about-the-methodology] DEFRA (Department for Environment, Food & Rural Affairs) provides conversion factors and guidelines for calculating greenhouse gas (GHG) emissions across sectors, including passenger rail. As one of the main references for emissions reporting in the UK, DEFRA's methodology keeps assessments of train travel consistent, transparent and accurate. The methodology covers direct emissions from train fuel combustion and indirect emissions from electricity consumption. DEFRA distinguishes between electric and diesel trains, and emissions vary with fuel type, train type (for example national, international, light rail) and distance travelled. The framework is widely used in corporate GHG reporting. ## Versions [#versions] Add `methodology_version` to pin a DEFRA Conversion Factors year (for example `"2024"`). If you omit it, SQUAKE automatically applies the latest supported year. Pin a year for reproducibility and audit readiness. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "train", "external_reference": "test_1", "origin": "BER", "destination": "FRA", "number_of_travelers": 3, "train_type": "national", "methodology": "DEFRA", "energy_scope": "ttw", "methodology_version": "2024" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "external_reference": "test_1", "origin": "BER", "destination": "FRA", "number_of_travelers": 3, "train_type": "national", "methodology": "DEFRA", "energy_scope": "ttw", "methodology_version": "2024" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `train_type` | `national` | No `train_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | | `methodology_version` | Latest supported DEFRA year | No `methodology_version` is sent | ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string, required): `DEFRA` - `methodology_version` (string): DEFRA Conversion Factors year, for example `"2024"`. If omitted, SQUAKE uses the latest supported year. - `external_reference` (string): A unique identifier to link the result, up to 128 characters. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `origin` (string): Flexible formats: postal, IATA/ICAO (`^[A-Z]{3,4}$`), UN/LOCODE (`^[A-Z]{2}\W?[A-Z2-9]{3}$`) or `"lat,lon"`. SQUAKE resolves the distance automatically. See [Origin and destination formats](#origin-and-destination-formats). - `destination` (string): Same formats as `origin`. - `distance_in_km` (number): If provided, overrides `origin` and `destination`. - `train_type` (enum): Supported categories (per DEFRA): `"national"`, `"international"`, `"light"`, `"tram"`, `"underground"`. - `energy_scope` (enum): `"wtw"` (default) or `"ttw"`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `"MUC"`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). ### UIC and provider codes [#uic-and-provider-codes] A UIC code is also a valid format for trains. If the value isn't valid, the system falls back to general, non-journey-specific emission data. To use a UIC or provider code, send `:`, for example `sncf:FRAAA`. Possible provider prefixes: `uic`, `uic8_sncf`, `sncf`, `sncf_tvs`, `entur`, `db`, `busbud`, `distribusion`, `flixbus`, `cff`, `leoexpress`, `obb`, `trenitalia`, `trenitalia_rtvt`, `trenord`, `ntv_rtiv`, `ntv`, `hkx`, `renfe`, `atoc`, `benerail`, `westbahn`. ```jsonc title="UIC or provider code" { "type": "train", "methodology": "DEFRA", "origin": "atoc:1072", // Example UK station code structure "destination": "atoc:5935", "number_of_travelers": 1, "energy_scope": "wtw", "methodology_version": "2024" } ``` ```jsonc title="UN/LOCODE" // For multimodal contexts { "type": "train", "methodology": "DEFRA", "origin": "GBLON", // London "destination": "GBMAN", // Manchester "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "train", "methodology": "DEFRA", "origin": "+51.503,-0.125", // London "destination": "+53.480,-2.242",// Manchester "number_of_travelers": 1 } ``` > **Distance and fallback** > - If you send both `origin`/`destination` and `distance_in_km`, SQUAKE uses `distance_in_km` for emissions. > - Invalid, unsupported or unresolvable location codes trigger a fallback to generic (non-journey-specific) factors consistent with the DEFRA methodology. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 6669, "carbon_unit": "gram", "items": [{ "carbon_quantity": 6669, "carbon_unit": "gram", "external_reference": "test_2", "type": "train", "methodology": "DEFRA", "methodology_version": "2024", "distance": 435.0, "distance_unit": "kilometer" }] } ``` ## Bibliography [#bibliography] - UK Government: [Greenhouse gas emissions: Research & statistics](https://www.gov.uk/environment/greenhouse-gas-emissions#research_and_statistics). - DEFRA (2024). Government Greenhouse Gas Conversion Factors for Company Reporting (Rail factors). - UK Office of Rail and Road. National Rail Trends. - Eurostar. GHG Methodology Report. # Train: GREEN-TRAVEL-DATA 🇬🇧 (/docs/calculations/travel/train/train-green-travel-data) Calculate GB National Rail journey emissions with the Rail Delivery Group's Green Travel Data figures, using the release whose timetable covers the departure date. Type: `train` · Methodology: `GREEN-TRAVEL-DATA` · Source: Green Travel Data 2.0 and 3.1 · Supports audit mode Use `"methodology": "GREEN-TRAVEL-DATA"` for the Rail Delivery Group's Green Travel Data (GTD), formerly Green Travel Pledge. The former name `GREEN-TRAVEL-PLEDGE` is still accepted and calculates the same way. ## Overview [#overview] Green Travel Data is the GB rail industry's figure for the emissions of a National Rail journey: kilograms of CO₂e per passenger for the whole journey between two stations. It comes for first class, for standard class, and for all passengers together. The Rail Delivery Group (RDG) calculates it from the planned timetable, the traction and length of each train, and forecast passenger numbers. RDG publishes it for each timetable period (a release). From the timetable starting 14 December 2025, a release covers every pair of National Rail stations, whether the journey is direct or has changes. The earlier releases covered direct journeys only. SQUAKE keeps every release and calculates each journey with the figures of its own timetable. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "type": "train", "methodology": "GREEN-TRAVEL-DATA", "external_reference": "test_1", "origin": "KGX", "destination": "EDB", "number_of_travelers": 2, "seat_type": "second_class", "departure_date": "2026-03-01" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "methodology": "GREEN-TRAVEL-DATA", "external_reference": "test_1", "origin": "KGX", "destination": "EDB", "number_of_travelers": 2, "seat_type": "second_class", "departure_date": "2026-03-01" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string, required): `GREEN-TRAVEL-DATA`. `GREEN-TRAVEL-PLEDGE` is accepted as the former name. - `origin` (string, required): The CRS code of a GB National Rail station, for example `KGX` for London Kings Cross. SQUAKE doesn't resolve station names, UN/LOCODEs, addresses or coordinates for this methodology. - `destination` (string, required): The CRS code of a GB National Rail station, for example `EDB` for Edinburgh. Same rules as `origin`. - `seat_type` (enum): `first_class`, `second_class` or `average`. Defaults to `first_class`. See [Seat types](#seat-types). - `departure_date` (string): ISO date `YYYY-MM-DD`. It picks the release whose timetable covers the date. When no release covers it (before the first release, between two releases, or after the latest one), the latest release is used. Defaults to today. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `distance_in_km` (number): Only used to calculate when the release has no figure for the station pair, see [Calculation](#calculation). When sent, it's also the distance in the response; without it, the response has no distance. - `external_reference` (string): Correlates request and response, up to 128 characters. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Seat types [#seat-types] | `seat_type` | Green Travel Data figure | When the release has no such figure for the pair | | --- | --- | --- | | `first_class` | First class | Standard class, then all passengers | | `second_class` | Standard class | All passengers | | `average` | All passengers | — | The releases before 14 December 2025 have no first-class figure on routes without first class. ## Calculation [#calculation] ### Journey figure [#journey-figure] SQUAKE takes the kilograms of CO₂e per passenger for the station pair and seat type, in the release picked by `departure_date`, and multiplies by `number_of_travelers`. **Journey emissions (grams):** `kg per passenger × travellers × 1000` - **kg per passenger**: Kilograms of CO₂e per passenger for the station pair and seat type, in the release picked by `departure_date`. - **Travellers**: `number_of_travelers` from the request. ### When the release has no figure for the pair [#when-the-release-has-no-figure-for-the-pair] This happens for a station the release doesn't list or, in the releases before 14 December 2025, a journey with changes. SQUAKE then uses RDG's GB-wide figure per passenger-kilometre for the seat type, which RDG publishes for journeys that have no station-to-station figure, and multiplies it by `distance_in_km`. **Fallback emissions (grams):** `kg per passenger-km × distance × travellers × 1000` - **kg per passenger-km**: RDG's GB-wide figure per passenger-kilometre for the seat type. - **Distance**: `distance_in_km` from the request. - **Travellers**: `number_of_travelers` from the request. > **distance_in_km is needed for the fallback** > Without `distance_in_km` the calculation fails with `green_travel_data_emission_not_found`. A calculation made this way carries `"figure": "passenger_km"` and, in audits, `"fallback_data_used": true`. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 27581, "carbon_unit": "gram", "items": [{ "carbon_quantity": 27581, "carbon_unit": "gram", "external_reference": "test_1", "type": "train", "methodology": "GREEN-TRAVEL-DATA", "methodology_version": "3.1", "algorithm_specifics": { "timetable_start": "2025-12-14", "timetable_end": "2026-05-16", "timetable_covers_departure_date": true, "figure": "journey", "seat_type_used": "second_class" } }] } ``` `algorithm_specifics` names the release used (`timetable_start`, `timetable_end`, and whether its timetable covers the departure date), whether the figure is the journey's or the per-passenger-kilometre one (`figure`), and the seat type whose figure the calculation uses (`seat_type_used`). `methodology_version` is the Green Travel Data version of that release: `2.0` for timetables before 14 December 2025 and `3.1` from then on. Audits record the same version. ## Audit mode [#audit-mode] The audit's emission factors record `co2_per_passenger_grams` (the journey's grams per passenger), `fallback_data_used`, and, for a per-passenger-kilometre figure, `co2_per_km_grams`. ## Errors [#errors] | Code | When | | --- | --- | | `green_travel_data_emission_not_found` | `origin` or `destination` isn't a CRS code of a GB National Rail station, or the release has no figure for the pair and no GB-wide figure can stand in (no `distance_in_km`, or no per-passenger-kilometre figure in the release). | | `invalid_date_format` | `departure_date` isn't a `YYYY-MM-DD` date. | | `invalid_params` | `seat_type` isn't one of the three seat types, or `distance_in_km` isn't a positive number. | | `request_failed` | Green Travel Data is temporarily unavailable. Retry later. | ## Bibliography [#bibliography] Rail Delivery Group: [Sustainability and Green Travel Data](https://www.raildeliverygroup.com/our-services/building-a-better-railway/sustainability.html). # Train: REM (Rail Emissions Model) (/docs/calculations/travel/train/train-rem) Calculate train emissions with REM, an operator- and country-aware rail methodology that resolves an emission factor per passenger-kilometre through a tiered resolver and multiplies it by distance and passenger count. Type: `train` · Methodology: `REM` · Supports audit mode This page is aligned to the REM methodology (integration and Calculation API payloads). Use `"methodology": "REM"` in all new integrations. If you omit `methodology` on a train item, the API uses your client's configured train default. ## Overview [#overview] REM selects an emission factor (grams CO₂e per passenger-kilometre) with a deterministic tiered resolver, then multiplies it by distance and passenger count. Send `operator_name`, ISO country codes, `departure_date` and `energy_scope` when you have them: they improve tier matching and make results easier to audit. ## Factor resolution (tiers) [#factor-resolution-tiers] REM applies this order: 1. **Tier 1, operator-reported:** used when `operator_name` matches operator-specific factors for the requested `energy_scope`, `train_type` and, when needed, `fuel_type` and year. 2. **Tier 2, operator-reported mix:** used when `operator_name` matches an operator-specific energy mix for the requested `energy_scope`, `train_type` and, when needed, `fuel_type` and year. 3. **Tier 3, country-published:** uses country-level methodology data when Tier 1 and Tier 2 don't apply and a country context is available (see [Country context](#country-context)). 4. **Tier 4, activity-based:** uses fuel, traction mix and electricity carbon intensity data for the country or region when Tier 3 doesn't yield a factor. 5. **Tier 5, global constant:** well-to-wheel global rail averages (IEA-based constants), with a pre/post cut-off driven by `departure_date` when present. ### Country context [#country-context] For Tiers 3 and 4, the resolver uses `origin_country` if set, otherwise `destination_country` (both optional). Values should be ISO 3166-1 alpha-2 (for example `DE`, `SE`). The API accepts other resolvable country inputs and normalizes them to alpha-2 where possible (for example `UK` → `GB`). If neither country field is available, Tier 1 and Tier 2 may still apply; otherwise resolution falls through toward Tier 5. ## Distance handling [#distance-handling] After validation, you must provide one of: - `origin` and `destination`, resolved to a route distance; - `distance_in_km`, a positive number; - `route_coords`, an array of at least two `[longitude, latitude]` pairs (WGS84). Longitude must be in [-180, 180], latitude in [-90, 90]. **Precedence:** if `distance_in_km` is set together with `origin` and `destination`, `distance_in_km` is used for the calculation distance. **Corrections:** - If you send `route_coords`, the API computes a border-aware path distance (per-country segments, train-type detour factor from REM data). That total becomes the distance used for emissions; no additional "air distance" correction is applied on top. - If you send `distance_in_km` without `route_coords`, REM uses it exactly as sent and applies no detour factor. - If you send only `origin` and `destination`, REM estimates the rail route distance from the straight-line distance between them and the train-type detour factor from REM data. - For audit and debugging, expanded item metadata may include a `border_distance_breakdown` when `route_coords` were used (sequential segments and totals per ISO alpha-3 country). If some segments can't be attributed to a country, a warning may be present. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. The third example uses `route_coords` instead of `origin` and `destination`: when `route_coords` is valid, `origin` and `destination` aren't required for distance validation. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "train", "external_reference": "test_1", "origin": "Stockholm", "destination": "Malmo", "number_of_travelers": 1, "train_type": "high_speed", "seat_type": "second_class", "fuel_type": "electricity", "operator_name": "sj", "methodology": "REM", "departure_date": "2025-06-15", "origin_country": "SE", "destination_country": "SE", "energy_scope": "wtw" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "external_reference": "test_1", "origin": "Stockholm", "destination": "Malmo", "number_of_travelers": 1, "train_type": "high_speed", "seat_type": "second_class", "fuel_type": "electricity", "operator_name": "sj", "methodology": "REM", "departure_date": "2025-06-15", "origin_country": "SE", "destination_country": "SE", "energy_scope": "wtw" }] } ``` ```json title="Route path (route_coords)" { "expand": ["items"], "items": [{ "type": "train", "methodology": "REM", "external_reference": "route_coords_1", "number_of_travelers": 1, "train_type": "high_speed", "route_coords": [ [13.405, 52.52], [10.0, 51.0], [8.682, 50.11] ], "operator_name": "db", "energy_scope": "wtw" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `methodology` | Your client's configured train default | No `methodology` is sent on a train item | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | | `train_type` | `average` | No `train_type` is sent | | `fuel_type` | `diesel` | No `fuel_type` is sent | | `seat_type` | `average` | No `seat_type` is sent | | `energy_scope` | `wtw` | No `energy_scope` is sent | ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string): `REM`. If omitted, the API uses your client's configured train default. - `external_reference` (string): Unique ID for the item in the request, to map results to inputs. Up to 128 characters. - `number_of_travelers` (integer): Integer ≥ `1`. Defaults to `1`. - `origin` (string): Location string as in other train methodologies: addresses, IATA/ICAO, UN/LOCODE, coordinates, UIC/provider codes. See [Origin and destination formats](#origin-and-destination-formats). Required unless you send `distance_in_km` or valid `route_coords`. - `destination` (string): Same formats and rules as `origin`. - `distance_in_km` (number): If provided together with `origin` and `destination`, this value wins. REM uses it exactly as sent, with no detour factor. - `route_coords` (array): Array of `[lon, lat]` pairs, minimum 2 points. Each pair must have exactly two numbers. Used for border-aware distance and the detour factor. - `train_type` (enum): One of `average`, `high_speed`, `intercity`, `regional`, `long_distance`, `commuter`, `tram`, `metro`, `light_rail`, `urban_rail`. Defaults to `average`. - `fuel_type` (enum): `diesel`, `electricity`, `hvo`, `hydrogen`. Defaults to `diesel`. Used for Tier 1 and Tier 2 disambiguation when an operator has multiple fuel rows, and for Tier 3 and Tier 4 modelling where applicable. - `seat_type` (enum): `average`, `first_class` or `second_class`. Defaults to `average`. - `operator_name` (string): Enables Tier 1 or Tier 2 when the operator exists in the REM operator database. Contact [product@squake.earth](mailto:product@squake.earth) for the full list of currently supported operators. - `departure_date` (string): ISO 8601 calendar date only, `YYYY-MM-DD` (not a full timestamp). Used to select year-matched factors. If invalid, the API returns: `Departure date '' is not a valid ISO-8601 date.` - `origin_country` (string): ISO 3166-1 alpha-2 recommended (for example `DE`, `FR`). Other resolvable country strings may be accepted and normalised to alpha-2. Invalid codes return a parameter error. For country-based tiers, `origin_country` is preferred over `destination_country` when both are set. - `destination_country` (string): Same formats and rules as `origin_country`. - `energy_scope` (enum): `wtw` (well-to-wheel, default) or `ttw` (tank-to-wheel). Invalid values return an error listing allowed scopes. - `audit` (boolean): Set to `true` to create immutable audit records. The feature must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** Post/standard postal format. - **Airports:** IATA/ICAO (`^[A-Z]{3,4}$`, for example `MUC`). - **Ports and trade locations:** UN/LOCODE (`^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `DEHAM`). - **Coordinates:** `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$` (for example `"+40.712,-74.006"`). ### UIC and provider codes [#uic-and-provider-codes] Invalid or unsupported codes may trigger a fallback to more generic (non-journey-specific) factors. Send `:`, for example `sncf:FRAAA`. Possible provider prefixes: `uic`, `uic8_sncf`, `sncf`, `sncf_tvs`, `entur`, `db`, `busbud`, `distribusion`, `flixbus`, `cff`, `leoexpress`, `obb`, `trenitalia`, `trenitalia_rtvt`, `trenord`, `ntv_rtiv`, `ntv`, `hkx`, `renfe`, `atoc`, `benerail`, `westbahn`. ```jsonc title="UIC or provider code" // Illustrative { "type": "train", "methodology": "REM", "origin": "entur:7400001", "destination": "entur:7400046", "operator_name": "sj", "number_of_travelers": 1 } ``` ```jsonc title="UN/LOCODE" { "type": "train", "methodology": "REM", "origin": "SESTO", "destination": "SEMMA", "number_of_travelers": 1 } ``` ```jsonc title="Coordinates" { "type": "train", "methodology": "REM", "origin": "+59.330,18.058", "destination": "+55.605,13.003", "number_of_travelers": 1 } ``` > **Distance and fallback** > - If you send both `origin`/`destination` and `distance_in_km`, SQUAKE uses `distance_in_km`. > - Unresolvable locations produce validation errors or methodology fallbacks as described for train generally. ## Sample response [#sample-response] When you expand `items`, each train item may include `algorithm_specifics` describing the resolved REM tier and matched metadata (for example `tier`, `energy_scope`, `gco2e_per_pax_km`, `year_matched`, `country_matched`, `operator_matched`, `source_links` and resolver `details`). The exact shape follows the live API. Response 200 OK (application/json): ```json { "carbon_quantity": 261, "carbon_unit": "gram", "items": [{ "carbon_quantity": 261, "carbon_unit": "gram", "external_reference": "test_1", "type": "train", "methodology": "REM", "distance": 616.0, "distance_unit": "kilometer", "algorithm_specifics": { "tier": 1, "energy_scope": "wtw", "gco2e_per_pax_km": "0.42", "year_matched": 2024, "country_matched": "se", "operator_matched": "sj", "source_links": [], "methodology": "operator_reported" } }] } ``` > **Field formatting** > The numeric and string formatting of `algorithm_specifics` fields matches the production API. Treat `gco2e_per_pax_km` as a decimal string or number per the response schema. ## White paper [#white-paper] - SQUAKE: [Rail Emissions Model Whitepaper](https://www.squake.earth/resources/rail-emission-model-whitepaper). - REM: [Rail Emissions Model](https://railemissionsmodel.com/). # Train: US-EPA 🇺🇸 (/docs/calculations/travel/train/train-us-epa) Calculate US passenger rail emissions with factors from the US EPA GHG Emission Factors Hub, by US service class, in grams of CO₂e per passenger-kilometre. Type: `train` · Methodology: `US-EPA` · Supports audit mode ## About the methodology [#about-the-methodology] The US EPA GHG Emission Factors Hub provides passenger-rail emission factors used for corporate greenhouse gas (GHG) accounting in the United States. For trains, factors are expressed in gCO₂e per passenger-kilometre and include CO₂, CH₄ and N₂O, aggregated with the EPA's 100-year GWPs for the given Hub year. In this implementation: - **Units:** gCO₂e/pax-km. - **Scope:** tank-to-wheel (TTW). EPA's factors cover combustion emissions only, without upstream (well-to-tank) emissions. - **Coverage:** intercity (national average and route-specific), commuter rail and transit rail. > **Versions** > If `methodology_version` is omitted, SQUAKE always uses the latest supported EPA Hub year. Pinning a year is recommended for reproducibility. ## Sample requests [#sample-requests] Send a quote before booking, then repeat the call with `audit` set to `true` once the booking is final. The body is otherwise identical. ```json title="Pre-booking quote" { "expand": ["items"], "items": [{ "audit": false, "type": "train", "external_reference": "test_1", "distance_in_km": 500, "number_of_travelers": 1, "methodology": "US-EPA", "train_type": "intercity_national_average" }] } ``` ```json title="Post-booking audit" { "expand": ["items"], "audit_for": "", "items": [{ "audit": true, "type": "train", "external_reference": "test_1", "distance_in_km": 500, "number_of_travelers": 1, "methodology": "US-EPA", "train_type": "intercity_national_average" }] } ``` > **audit_for is optional** > Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out. ## Defaults [#defaults] | Field | Default | Applies when | | --- | --- | --- | | `train_type` | `intercity_national_average` | No `train_type` is sent | | `number_of_travelers` | `1` | No `number_of_travelers` is sent | | `methodology_version` | Latest supported EPA Hub year | No `methodology_version` is sent | ## How it's calculated [#how-its-calculated] **Total emissions (gCO₂e):** `EF × distance × travellers` - **EF**: The factor in gCO₂e/pax-km for the chosen `train_type` and `methodology_version` (or the latest year if omitted). - **Distance**: `distance_in_km`, the trip distance in kilometres. - **Travellers**: `number_of_travelers`. All outputs are returned in grams by default. ## Request fields [#request-fields] - `type` (string, required): `train` - `methodology` (string, required): `US-EPA` - `methodology_version` (string): EPA Hub year, for example `"2023"`. If omitted, the calculation defaults to the latest supported year. - `external_reference` (string): Your unique identifier for correlating responses. Up to 128 characters. - `number_of_travelers` (integer): Minimum `1`. Defaults to `1`. - `distance_in_km` (number): The preferred distance input. If you send both `distance_in_km` and `origin`/`destination`, SQUAKE uses `distance_in_km`. - `origin` (string): If provided, SQUAKE resolves the rail distance. Accepts IATA/ICAO, UN/LOCODE or postal formats, or `"lat,lon"` (for example `"+40.712,-74.006"`). See [Origin and destination formats](#origin-and-destination-formats). For EPA factors, the train type should match US service classes. - `destination` (string): Same formats as `origin`. - `train_type` (enum): Supported: `"intercity_northeast_corridor"`, `"intercity_other_routes"`, `"intercity_national_average"`, `"commuter_rail"`, `"transit_rail"`. - `audit` (boolean): Set to `true` to create immutable audit records for finalised calculations. Must be enabled for your account. ## Origin and destination formats [#origin-and-destination-formats] SQUAKE tries to resolve `origin` and `destination` whatever their format. Ideally, use: - **Addresses:** the Post standard. - **Airports:** an IATA/ICAO code (regex `^[A-Z]{3,4}$`, for example `"MUC"`). - **Ports and trade locations:** a UN/LOCODE (regex `^[A-Z]{2}\W?[A-Z2-9]{3}$`, for example `"DEHAM"`). - **Coordinates:** latitude and longitude (regex `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, for example `"+40.712,-74.006"`). ### UIC and provider codes [#uic-and-provider-codes] A UIC code is also a valid format for trains. If the value isn't valid, the system falls back to general, non-journey-specific emission data. To use a UIC or provider code, send `:`, for example `atoc:1072` or `amtrak:NYP` as illustrative code styles. Possible provider prefixes: `uic`, `uic8_sncf`, `sncf`, `sncf_tvs`, `entur`, `db`, `busbud`, `distribusion`, `flixbus`, `cff`, `leoexpress`, `obb`, `trenitalia`, `trenitalia_rtvt`, `trenord`, `ntv_rtiv`, `ntv`, `hkx`, `renfe`, `atoc`, `benerail`, `westbahn`. ```jsonc title="Provider code" // Illustrative; US context { "type": "train", "methodology": "US-EPA", "origin": "atoc:1072", // Example code structure "destination": "atoc:5935", "number_of_travelers": 1, "train_type": "intercity_national_average" } ``` ```jsonc title="UN/LOCODE" // For multimodal contexts { "type": "train", "methodology": "US-EPA", "origin": "USNYC", // New York City "destination": "USWAS", // Washington, DC "number_of_travelers": 1, "train_type": "intercity_northeast_corridor" } ``` ```jsonc title="Coordinates" { "type": "train", "methodology": "US-EPA", "origin": "+40.750,-73.993", // Near NYC Penn Station "destination": "+38.897,-77.007",// Washington, DC "number_of_travelers": 1, "train_type": "intercity_northeast_corridor" } ``` > **Distance and fallback** > - If you send both `origin`/`destination` and `distance_in_km`, SQUAKE uses `distance_in_km` for emissions. > - Invalid, unsupported or unresolvable location codes trigger a fallback to generic (non-journey-specific) factors consistent with the US-EPA methodology. ## Sample response [#sample-response] Response 200 OK (application/json): ```json { "carbon_quantity": 18127.337, "carbon_unit": "gram", "items": [{ "carbon_quantity": 18127.337, "carbon_unit": "gram", "external_reference": "test_case_1", "type": "train", "methodology": "US-EPA", "distance": 500.0, "distance_unit": "kilometer", "train_type": "intercity_northeast_corridor" }] } ``` ## Bibliography [#bibliography] US EPA. [GHG Emission Factors Hub](https://www.epa.gov/climateleadership/ghg-emission-factors-hub) (Passenger Rail). # Carbon comparison (/docs/carbon-comparison) Compares a carbon quantity to things people know, such as cars, light bulbs or kettles. Use it to make an emissions figure tangible, for example next to the footprint on a booking confirmation. ## Request [#request] `POST /v2/carbon-comparison` - `carbon_quantity` (integer, required): The carbon quantity to compare. A whole number of at least `1`. - `carbon_unit` (string, required): Unit of `carbon_quantity`: `tonne`, `kilogram` or `gram`. - `items` (array, required): One or more comparisons, each with a `metric` and an optional `comparison_unit`. Without a `comparison_unit`, SQUAKE picks the best match for the quantity you send. `carbon_quantity` takes whole numbers only. To compare 142.6 kilograms, send `142600` with the unit `gram`. This request compares one tonne to the yearly use of a car, to Google searches, and to a distance whose comparison unit SQUAKE picks: ```json { "carbon_quantity": 1, "carbon_unit": "tonne", "items": [ { "metric": "annual_usage", "comparison_unit": "cars" }, { "metric": "per_use", "comparison_unit": "google_search" }, { "metric": "distance_in_km_traveled" } ] } ``` Save it as `comparison.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/carbon-comparison" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @comparison.json ``` ## Response [#response] The amounts in this example are illustrative. Send the request to get SQUAKE's values. Response 200 OK (application/json): ```json { "carbon_quantity": 1, "carbon_unit": "tonne", "items": [ { "comparison_unit": "cars", "metric": "annual_usage", "amount": 0.5 }, { "comparison_unit": "google_search", "metric": "per_use", "amount": 5000000.0 }, { "comparison_unit": "by_petrol_car", "metric": "distance_in_km_traveled", "amount": 5900.0 } ] } ``` Each item returns the `metric`, the `comparison_unit` (the one you sent, or the one SQUAKE picked) and the `amount`. The amount is expressed in the unit of the metric. For `annual_usage`, `0.5` means half a year of use. For `distance_in_km_traveled`, the amount is a distance in kilometers. ## Metrics and comparison units [#metrics-and-comparison-units] Each comparison unit belongs to one metric: | `metric` | `comparison_unit` values | | --- | --- | | `amount_compensated` | `average_tree`, `whale` | | `amount_produced` | `plastic_straws` | | `annual_consumption` | `coffee_to_go`, `food`, `water` | | `annual_usage` | `cars`, `central_heating_systems`, `dishwashers`, `electric_hobs`, `electric_ovens`, `electric_tumble_dryers`, `fridges`, `gas_hobs`, `gas_ovens`, `kettles`, `light_bulbs`, `low_energy_light_bulbs`, `microwave_ovens`, `stationary_computers`, `washing_machines` | | `carbon_captured` | `cookstove_usage` | | `distance_in_km_per_passenger` | `by_bus`, `by_coach`, `by_eurostar`, `by_ferry`, `by_national_rail`, `by_tram` | | `distance_in_km_traveled` | `by_diesel_car`, `by_electric_car`, `by_motorcycle`, `by_petrol_car`, `by_taxi` | | `hourly_usage` | `streaming`, `videoconferencing` | | `number_of_days` | `cruise` | | `number_of_travels` | `amsterdam_to_paris_by_car`, `amsterdam_to_rome_by_plane`, `frankfurt_to_new_york_by_plane`, `london_to_berlin_by_train`, `london_to_china_by_bus`, `turkey_to_south_korea_by_electric_car` | | `per_use` | `bar_of_chocolate`, `cheeseburger`, `dyson_airblade_hand_dryer`, `electric_hand_dryer`, `email`, `google_search`, `lightweight_plastic_bag`, `paper_towel`, `pint_of_tap_water`, `spam_email`, `supermarket_plastic_bag`, `text_message` | SQUAKE also keeps this list in its [list of accepted combinations](https://squake.notion.site/96b220031e8e4d64aec4f0e46a5bde97?v=8c67ffdcf91c4477acf0640688beea11&pvs=4). ## Errors [#errors] | Status | Meaning | | --- | --- | | `400` | The request is invalid, for example because `carbon_quantity` isn't a whole number of at least `1`. | ## Related [#related] - [Calculations](/docs/calculations) - [Compare Carbon Usage](/reference/squake/carbon-comparison/post-v2-carbon-comparison) in the API reference # Create a child client (/docs/clients/create-child-client) Creates a child client under the authenticated client, or under one of its descendants when you pass `parent_id`. The child exists for travel data ingestion: it inherits its address, tax, currency and methodology defaults from its parent, and it has no credentials, no billing or purchasing, and no access to products or projects. See [Clients](/docs/clients#the-client-hierarchy). The Clients API must be enabled for your account. Until it is, this endpoint responds with `404`. ## Request [#request] `POST /v2/clients` - `name` (string, required): The child client's display name. - `external_reference` (string): Your own reference for the client. It must be unique among the children of the same parent. SQUAKE generates one from the name when you omit it. - `parent_id` (string (UUID)): The parent to create the child under. Defaults to the authenticated client. It must be the authenticated client or one of its descendants. - `metadata` (object): Your own key-value pairs, such as the ID of the customer in your own systems. - `methodology_configuration` (object): The methodologies the child calculates with, as `{ "methodology_options": [...] }`. Omit the whole object to give the child a copy of its parent's current options. This request creates a child that calculates trains with REM instead of its parent's DEFRA default: ```json { "name": "Example Travel Germany", "external_reference": "example-de", "metadata": { "crm_id": "ACC-1042" }, "methodology_configuration": { "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "REM", "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } } ``` Save it as `client.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/clients" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @client.json ``` ## Response [#response] SQUAKE responds with `201 Created` and the new client: Response 201 Created (application/json): ```json { "id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "name": "Example Travel Germany", "external_reference": "example-de", "parent_id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "status": "active", "metadata": { "crm_id": "ACC-1042" }, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "REM", "version": null, "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } ``` The REM option comes back with `version: null`, because the request didn't set a version. The child is usable on the next request: pass its `id` as `client_id` to `POST /v2/travel-data` to [submit travel data for it](/docs/travel-data/create-travel-data-items#submitting-on-behalf-of-another-client). ## Methodology configuration [#methodology-configuration] - Omit `methodology_configuration` and the child gets a copy of its parent's current options. It's a copy, not a link: later changes to the parent never reach the child. - Send `methodology_configuration` and its `methodology_options` replace the inherited options outright. Include every option the child should have. An empty array configures no methodology at all. - An empty `methodology_configuration` object, without `methodology_options`, is rejected with `400`. Every option must follow the rules in [Methodology options](/docs/clients#methodology-options): at most three options per activity type, exactly one `default: true` per activity type, and a methodology that's available for the type. ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `400` | `invalid_parent_client` | The `parent_id` isn't the authenticated client or one of its descendants. | | `400` | `invalid_methodology_options` | `methodology_options` isn't an array, an entry isn't an object, or an entry has no boolean `default`. | | `401` | | The API key is missing or invalid. | | `404` | | The Clients API isn't enabled for your account. | | `422` | `invalid_methodology_options` | An option has an unknown `activity_type` or `methodology`, an activity type has two defaults, or an activity type has more than three options. | If the request fails, SQUAKE creates no client. ## Related [#related] - [Update a client](/docs/clients/update-client) - [Invite a user](/docs/invitations/invite-user) to the new client - [Create Child Client](/reference/squake/clients/post-v2-clients) in the API reference # Delete a client (/docs/clients/delete-client) Soft-deletes a descendant client and removes it from your hierarchy. Only clients without children of their own can be deleted. The Clients API must be enabled for your account. Until it is, this endpoint responds with `404`. ## Request [#request] `DELETE /v2/clients/{id}` - `id` (string (UUID), required): The ID of the client to delete. ```bash curl --request DELETE "https://api.sandbox.squake.earth/v2/clients/9a7c2e15-6b3d-4f80-a1c4-7e2d5b9f0c38" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] A successful delete returns `204 No Content` with an empty body. From then on, the client is no longer listed and reads of it return `404`. ## Rules [#rules] - Only leaf clients can be deleted. If the client still has children, SQUAKE responds with `422` and error code `client_has_children`. Delete its descendants first, from the bottom of the hierarchy upwards. - The authenticated client can't delete itself. - The authenticated client, an unknown or already deleted client, and a client outside your hierarchy all return `404` with error code `client_not_found`. ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `client_not_found` | The client is the authenticated client, doesn't exist, was already deleted, or is outside your hierarchy. | | `422` | `client_has_children` | The client still has child clients. | ## Related [#related] - [List clients](/docs/clients/list-clients) - [Delete a Client](/reference/squake/clients/delete-v2-clients-id) in the API reference # Clients (/docs/clients) The Clients API manages the clients below your own account. You can create child clients, set the methodologies each of them calculates with, and submit travel data on their behalf with your own credentials. A travel management company, for example, can keep one child client per corporate customer and push each customer's trips under its own client. The Clients API must be enabled for your account. Contact SQUAKE to enable it. Until then, every `/v2/clients` endpoint responds with `404`. ## The client hierarchy [#the-client-hierarchy] Your authenticated client is the root of the hierarchy you see. Every client has one parent, and `parent_id` is `null` only for the root. The API only returns clients you can act for: the authenticated client and its descendants, never a parent, a sibling or an unrelated client. A client outside your hierarchy looks exactly like one that doesn't exist, and both return `404` with error code `client_not_found`. Child clients exist for travel data ingestion: - A child inherits its address, tax, currency and methodology defaults from its parent. - A child has no credentials of its own, no billing or purchasing, and no access to products or projects. - A child is usable on the next request after you create it. Submit travel data for it by passing its `id` as `client_id` to `POST /v2/travel-data`. See [Submitting on behalf of another client](/docs/travel-data/create-travel-data-items#submitting-on-behalf-of-another-client). - To give people access to a child client's data in the SQUAKE Dashboard, invite them with the [Invitations API](/docs/invitations). Sandbox and production hierarchies are separate, so a client ID from one environment is never valid in the other. ## Methodology options [#methodology-options] `methodology_options` lists the methodologies a client calculates with, one entry per activity type and methodology: | Field | Description | | --- | --- | | `activity_type` | `flight`, `train`, `car` or `hotel`. | | `methodology` | A methodology available for the activity type. See the table below. | | `version` | `AT_TIME_OF_TRAVEL` uses the factor set that was valid on the travel date. `null` or no value uses the methodology's current version. Only CO2-EMISSIEFACTOREN-NL, DEFRA, GREENVIEW, HCMI and US-EPA publish selectable versions. For the others, the value is informational. | | `default` | Whether this is the methodology reported for the activity type. Required on every entry. | SQUAKE enforces three rules for each activity type: - At most three options for the same `activity_type`. - Exactly one option with `default: true`. - The `methodology` must be available for the `activity_type`: | `activity_type` | Available methodologies | | --- | --- | | `flight` | ADEME, BASE-EMPREINTE, CO2-EMISSIEFACTOREN-NL, DEFRA, GATE4, ICAO, TIM, TU-CHALMERS, US-EPA | | `train` | ADEME, BASE-EMPREINTE, CO2-EMISSIEFACTOREN-NL, DEFRA, GREEN-TRAVEL-DATA, REM, US-EPA | | `car` | ACRISS, DEFRA, EU-EEA, US-EPA | | `hotel` | DEFRA, GREENVIEW, HCMI, NOS-GESTES-CLIMAT | A client that has never been configured reports the SQUAKE defaults: TIM and DEFRA for flights with TIM as the default, DEFRA for trains and cars, and GREENVIEW for hotels, all with `AT_TIME_OF_TRAVEL`. The default methodology is the one the `items` array of a travel data submission reports. SQUAKE also calculates every other configured methodology and stores the results, which you can read with [List the activities of a trip](/docs/travel-data/list-trip-activities). ## Guides [#guides] | Task | Endpoint | Guide | | --- | --- | --- | | Find your own client ID | `GET /v2/clients/me` | [Retrieve the authenticated client](/docs/clients/retrieve-authenticated-client) | | List your clients | `GET /v2/clients` | [List clients](/docs/clients/list-clients) | | Read one client | `GET /v2/clients/{id}` | [Retrieve a client](/docs/clients/retrieve-client) | | Create a child client | `POST /v2/clients` | [Create a child client](/docs/clients/create-child-client) | | Rename a client or change its methodologies | `PATCH /v2/clients/{id}` | [Update a client](/docs/clients/update-client) | | Remove a client | `DELETE /v2/clients/{id}` | [Delete a client](/docs/clients/delete-client) | ## Error codes [#error-codes] | Status | Code | Meaning | | --- | --- | --- | | `400` | `invalid_parent_client` | The `parent_id` isn't the authenticated client or one of its descendants. | | `400` | `invalid_methodology_options` | `methodology_options` can't be read as a list of options, for example because an entry has no boolean `default`. | | `400` | `parent_id_immutable` | The update would move the client to another parent. | | `404` | `client_not_found` | The client doesn't exist, was deleted, or is outside your hierarchy. | | `422` | `invalid_methodology_options` | The options break a rule: an unknown `activity_type` or `methodology`, two defaults for one activity type, or more than three options for one type. | | `422` | `client_has_children` | The client you want to delete still has child clients. | A request that fails with one of these errors writes nothing. # List clients (/docs/clients/list-clients) Returns the authenticated client together with all of its descendants. A parent, a sibling or an unrelated client never appears. The Clients API must be enabled for your account. Until it is, this endpoint responds with `404`. ## Request [#request] `GET /v2/clients` - `parent_id` (string (UUID)): Return only the direct children of this client. It must be the authenticated client or one of its descendants. Any other value returns `404` with error code `client_not_found`. - `external_reference` (string): Return only the client with this exact `external_reference`. - `query` (string): Case-insensitive search across client names and `external_reference`. - `page` (integer): Page number, starting at `1`. - `per_page` (integer): Clients per page. SQUAKE uses its default page size when you omit the value or send an invalid one. ```bash curl "https://api.sandbox.squake.earth/v2/clients?page=1&per_page=50" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` To list only the direct children of the authenticated client, filter by its ID: ```bash curl "https://api.sandbox.squake.earth/v2/clients?parent_id=0f1f3d3b-2775-4cc0-885e-8d51db6d6de1" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` To look up one of your customers by your own reference, filter by `external_reference`: ```bash curl "https://api.sandbox.squake.earth/v2/clients?external_reference=example-de" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The body is a JSON array of clients. Pagination metadata comes back in the response headers. Response 200 OK (application/json): ```json [ { "id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "name": "Example Travel Group", "external_reference": null, "parent_id": null, "status": "active", "metadata": {}, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] }, { "id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "name": "Example Travel Germany", "external_reference": "example-de", "parent_id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "status": "active", "metadata": { "crm_id": "ACC-1042" }, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "REM", "version": null, "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] }, { "id": "9a7c2e15-6b3d-4f80-a1c4-7e2d5b9f0c38", "name": "Example Travel France", "external_reference": "example-fr", "parent_id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "status": "active", "metadata": {}, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } ] ``` The first entry is the authenticated client, the root of the hierarchy. Example Travel Germany was created with its own methodology options. Example Travel France was created without them, so it got a copy of its parent's options. For every field, see [Retrieve the authenticated client](/docs/clients/retrieve-authenticated-client#response). ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `client_not_found` | The `parent_id` isn't the authenticated client or one of its descendants. | | `404` | | The Clients API isn't enabled for your account. | ## Related [#related] - [Retrieve a client](/docs/clients/retrieve-client) - [Create a child client](/docs/clients/create-child-client) - [List Clients](/reference/squake/clients/get-v2-clients) in the API reference # Retrieve the authenticated client (/docs/clients/retrieve-authenticated-client) Returns the client that your API key authenticates as. Use it to find your own client `id` before you create child clients or submit travel data on behalf of a descendant. The Clients API must be enabled for your account. Until it is, this endpoint responds with `404`. ## Request [#request] `GET /v2/clients/me` The endpoint takes no parameters. ```bash curl "https://api.sandbox.squake.earth/v2/clients/me" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] Response 200 OK (application/json): ```json { "id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "name": "Example Travel Group", "external_reference": null, "parent_id": null, "status": "active", "metadata": {}, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } ``` `parent_id` is `null` because the authenticated client is the root of the hierarchy you can see. This client has never been configured, so `methodology_options` shows the SQUAKE defaults. | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | The client's identifier. Use it as `parent_id` when you create a child, or as `client_id` when you submit travel data. | | `name` | string \| null | The client's display name. | | `external_reference` | string \| null | Your own reference for the client, unique among the children of one parent. Generated from the name when you omit it on creation. | | `parent_id` | string (UUID) \| null | The client's parent, or `null` for the authenticated client. | | `status` | string | The client's lifecycle status. Currently always `active`. | | `metadata` | object | Your own key-value pairs. | | `methodology_options` | array | The methodologies the client calculates with. See [Methodology options](/docs/clients#methodology-options). | ## Errors [#errors] | Status | Meaning | | --- | --- | | `401` | The API key is missing or invalid. | | `404` | The Clients API isn't enabled for your account. | ## Related [#related] - [List clients](/docs/clients/list-clients) - [Retrieve the Authenticated Client](/reference/squake/clients/get-v2-clients-me) in the API reference # Retrieve a client (/docs/clients/retrieve-client) Returns one client: the authenticated client or one of its descendants. The Clients API must be enabled for your account. Until it is, this endpoint responds with `404`. ## Request [#request] `GET /v2/clients/{id}` - `id` (string (UUID), required): The client's ID. ```bash curl "https://api.sandbox.squake.earth/v2/clients/4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` The endpoint takes the client's UUID only. To find a client by your own reference, use [List clients](/docs/clients/list-clients) with the `external_reference` filter. ## Response [#response] Response 200 OK (application/json): ```json { "id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "name": "Example Travel Germany", "external_reference": "example-de", "parent_id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "status": "active", "metadata": { "crm_id": "ACC-1042" }, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "REM", "version": null, "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "GREENVIEW", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } ``` For every field, see [Retrieve the authenticated client](/docs/clients/retrieve-authenticated-client#response). ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `client_not_found` | No client has this ID, or the client is outside your hierarchy. | A client outside your hierarchy returns the same response as one that doesn't exist. ## Related [#related] - [Update a client](/docs/clients/update-client) - [Retrieve a Client](/reference/squake/clients/get-v2-clients-id) in the API reference # Update a client (/docs/clients/update-client) Updates the editable fields of a client in your hierarchy: `name`, `external_reference`, `metadata` and `methodology_configuration`. Fields you don't send keep their current values. The Clients API must be enabled for your account. Until it is, this endpoint responds with `404`. ## Request [#request] `PATCH /v2/clients/{id}` - `id` (string (UUID), required): The client's ID, in the path. - `name` (string): The new display name. - `external_reference` (string): Your new reference for the client, unique among the children of its parent. - `metadata` (object): Your own key-value pairs. - `methodology_configuration` (object): The new methodology configuration, as `{ "methodology_options": [...] }`. Replaces all current options. Omit it to keep the current configuration. This request renames the client and switches its hotel methodology from Greenview to HCMI. It sends every option the client keeps, because `methodology_options` replaces the full list: ```json { "name": "Example Travel Deutschland", "methodology_configuration": { "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "REM", "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "HCMI", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } } ``` Save it as `client-update.json` and send it: ```bash curl --request PATCH "https://api.sandbox.squake.earth/v2/clients/4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @client-update.json ``` ## Response [#response] Response 200 OK (application/json): ```json { "id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "name": "Example Travel Deutschland", "external_reference": "example-de", "parent_id": "0f1f3d3b-2775-4cc0-885e-8d51db6d6de1", "status": "active", "metadata": { "crm_id": "ACC-1042" }, "methodology_options": [ { "activity_type": "flight", "methodology": "TIM", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "flight", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": false }, { "activity_type": "train", "methodology": "REM", "version": null, "default": true }, { "activity_type": "car", "methodology": "DEFRA", "version": "AT_TIME_OF_TRAVEL", "default": true }, { "activity_type": "hotel", "methodology": "HCMI", "version": "AT_TIME_OF_TRAVEL", "default": true } ] } ``` ## Changing methodologies [#changing-methodologies] - `methodology_options` replaces the client's options in full. Send every option the client should keep, not only the ones that change. An empty array clears all options. - When the new list differs from the current one, SQUAKE recalculates the activities already stored for the client with the new methodologies. The recalculation runs in the background, and the response returns as soon as the configuration is written. - The update is atomic. If the options are invalid, SQUAKE writes nothing, including the other fields in the same request. ## Changing the parent [#changing-the-parent] Moving a client to another parent isn't supported. A `parent_id` that would move the client, including `null`, is rejected with `400` and error code `parent_id_immutable`. Sending the client's current `parent_id` is accepted and ignored, so you can read a client, change a field and send the whole object back. ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `400` | `parent_id_immutable` | The `parent_id` would move the client to another parent. | | `400` | `invalid_methodology_options` | `methodology_options` can't be read as a list of options. | | `401` | | The API key is missing or invalid. | | `404` | `client_not_found` | No client has this ID, or the client is outside your hierarchy. | | `422` | `invalid_methodology_options` | The options break a rule. See [Methodology options](/docs/clients#methodology-options). | ## Related [#related] - [Retrieve a client](/docs/clients/retrieve-client) - [Update a Client](/reference/squake/clients/patch-v2-clients-id) in the API reference # Contact us (/docs/contact-tech-support/feedback-form) Share feedback about your experience with SQUAKE or get in touch through the Help Centre. We value your opinion and would love to hear about your experience with us. Your feedback helps us improve our services and processes. Share your thoughts using our [feedback form](https://squake.earth/support/request/feedback/). For questions or help with a problem, use the [support request form](https://squake.earth/support/request/). Thank you in advance for your time and insights. # Report an Incident (/docs/contact-tech-support/incident-form) Report an issue to SQUAKE's support team through the Help Centre. If you've run into an issue and need to report an incident, we're here to help. Describe in detail what went wrong, and our support team will get back to you as soon as possible. Submit your report with our [support request form](https://squake.earth/support/request/). For a suspected security incident, such as data loss, phishing or unauthorised access, use the [security incident form](https://squake.earth/support/request/security/) instead. Thank you in advance for helping us improve our services. # Contact tech support (/docs/contact-tech-support) Reach SQUAKE's support team with the [contact form](/docs/contact-tech-support/feedback-form) for feedback and general questions, or the [incident form](/docs/contact-tech-support/incident-form) to report an issue. # Sustainability FAQs (/docs/faq) Look up the sustainability, emissions reporting and carbon market terms that come up when you measure and report business travel emissions. ## General sustainability concepts [#general-sustainability-concepts] ### What is carbon neutrality? [#what-is-carbon-neutrality] Carbon neutrality means balancing emitted carbon with an equivalent amount of carbon removal or offsetting to achieve a net-zero carbon footprint. This is often achieved by reducing emissions and supporting carbon offset projects. ### What is net zero? [#what-is-net-zero] Net zero refers to reducing greenhouse gas emissions to as close to zero as possible, with any remaining emissions balanced by removals, such as through reforestation or carbon capture and storage. ### What is a carbon footprint? [#what-is-a-carbon-footprint] A carbon footprint is the total amount of greenhouse gases (GHGs) emitted directly or indirectly by an individual, organization, product or activity, typically measured in CO2 equivalents (CO2e). ### What is Scope 3? [#what-is-scope-3] Scope 3 includes all indirect emissions not covered in Scope 2 that occur in the value chain of the reporting company, including both upstream and downstream emissions. ### What is CO2e? [#what-is-co2e] CO2e (carbon dioxide equivalent) is a metric used to compare the emissions from various greenhouse gases based on their global warming potential (GWP), expressed as the amount of CO2 that would have the same warming effect. ### What is GWP (global warming potential)? [#what-is-gwp-global-warming-potential] GWP is a measure of how much heat a greenhouse gas traps in the atmosphere over a specific time period (typically 100 years), relative to carbon dioxide. CO2 has a GWP of 1 by definition. ### What is the greenhouse effect? [#what-is-the-greenhouse-effect] The greenhouse effect is a natural process where certain gases in Earth's atmosphere trap heat from the sun, keeping the planet warm enough to support life. Human activities have intensified this effect, leading to global warming. ### What is RFI (radiative forcing index)? [#what-is-rfi-radiative-forcing-index] RFI accounts for the total climate impact of aviation emissions, including effects beyond CO2 such as contrails and NOx. It is used to scale CO2 emissions to better reflect their overall warming effect. ## Scope 3.6: business travel [#scope-36-business-travel] ### What is Scope 3.6? [#what-is-scope-36] Scope 3.6 is short for Scope 3, Category 6 of the GHG Protocol. It covers emissions from business travel in vehicles that the reporting organization doesn't own or operate, including air, rail, road and other forms of transport. ### Why is Scope 3.6 important? [#why-is-scope-36-important] Business travel can be a significant contributor to an organization's total emissions. Measuring and reporting Scope 3.6 allows for better climate impact assessments and helps develop more sustainable travel policies. ### What types of travel are included? [#what-types-of-travel-are-included] - Air travel - Rail travel - Taxi and ride-hailing services - Rental cars - Hotel stays (an optional part of Category 6 under the GHG Protocol) ### What data is needed for Scope 3.6 reporting? [#what-data-is-needed-for-scope-36-reporting] - Distance traveled per mode of transport - Class of travel (economy, business, first class) - Vehicle type and fuel used - Number of trips or passengers ## Emissions calculations and reporting [#emissions-calculations-and-reporting] ### What are emission factors? [#what-are-emission-factors] Emission factors are coefficients that allow emissions to be estimated based on a unit of activity, such as kg CO2e per passenger-kilometer or per liter of fuel consumed. ### What is activity data? [#what-is-activity-data] Activity data refers to measurable data on business activities that result in GHG emissions, such as kilometers traveled, liters of fuel consumed or nights spent in hotels. ### What is the difference between primary and secondary data? [#what-is-the-difference-between-primary-and-secondary-data] | Data | Meaning | | --- | --- | | Primary data | Directly measured or collected from suppliers or operations | | Secondary data | Estimates or generic data from databases or literature | ### Which standards and frameworks are used for emissions reporting? [#which-standards-and-frameworks-are-used-for-emissions-reporting] - GHG Protocol - ISO 14064 - ISO 14083, for emissions from transport chains - SBTi (Science Based Targets initiative), for setting reduction targets - CDP (formerly the Carbon Disclosure Project) ### What are TTW, WTT and WTW? [#what-are-ttw-wtt-and-wtw] | Term | Meaning | | --- | --- | | TTW (tank-to-wheel) | Emissions from vehicle operation, that is from fuel combustion or electricity usage | | WTT (well-to-tank) | Emissions from extracting, refining and transporting fuels or electricity to the vehicle | | WTW (well-to-wheel) | The total emissions from fuel production through vehicle operation (WTT + TTW) | ## More sustainable travel strategies [#more-sustainable-travel-strategies] ### How can companies reduce emissions from travel? [#how-can-companies-reduce-emissions-from-travel] - Encouraging virtual meetings - Promoting rail travel over flights - Implementing travel policies prioritizing economy class Companies can compensate their remaining emissions with verified carbon credits. Offsetting doesn't reduce the emissions themselves, so it comes after reduction. ### What is sustainable aviation fuel (SAF)? [#what-is-sustainable-aviation-fuel-saf] SAF is an alternative to conventional jet fuel, produced from sustainable feedstocks like waste oils or biomass, which can significantly reduce life-cycle GHG emissions from aviation. ### What is modal shift in travel? [#what-is-modal-shift-in-travel] Modal shift involves switching from more carbon-intensive transport modes (like air or road) to more sustainable ones (like rail or electric vehicles) to reduce emissions. ### What is travel avoidance? [#what-is-travel-avoidance] Travel avoidance is reducing or eliminating the need for travel through digital alternatives like video conferencing, helping to cut emissions significantly. ## Offsetting and market instruments [#offsetting-and-market-instruments] ### What are carbon offsets? [#what-are-carbon-offsets] Carbon offsets are reductions in emissions of CO2e used to compensate for emissions made elsewhere. One carbon credit typically equals one tonne of CO2e reduced or removed. ### What is additionality? [#what-is-additionality] Additionality ensures that a carbon offset project results in emission reductions that would not have occurred without the offset funding. ### What is the difference between voluntary and compliance carbon markets? [#what-is-the-difference-between-voluntary-and-compliance-carbon-markets] | Market | Meaning | | --- | --- | | Voluntary markets | Organizations offset emissions voluntarily to meet sustainability goals | | Compliance markets | Entities are legally required to cover their emissions under regulatory frameworks, for example by surrendering allowances under the EU ETS | ## Metrics and units [#metrics-and-units] ### What is a passenger-kilometer (pkm)? [#what-is-a-passenger-kilometer-pkm] Passenger-kilometer is a unit representing the transport of one passenger over one kilometer. It is commonly used to calculate emissions from passenger transport. ### What is a tonne-kilometer (tkm)? [#what-is-a-tonne-kilometer-tkm] A tonne-kilometer represents transporting one tonne (metric ton) of goods over one kilometer. It is a key metric for logistics and freight emissions calculations. ### What is CO2e per FTE? [#what-is-co2e-per-fte] CO2e per full-time equivalent (FTE) is a metric to assess carbon emissions per employee, useful for benchmarking emissions efficiency across organizations. ## Regulatory and market frameworks [#regulatory-and-market-frameworks] ### What is CORSIA? [#what-is-corsia] CORSIA (Carbon Offsetting and Reduction Scheme for International Aviation) is a global scheme developed by ICAO to offset the growth of CO2 emissions from international aviation. Airlines offset emissions above a baseline: 2019 levels for 2021 to 2023, and 85% of 2019 levels from 2024. ### What is EU ETS? [#what-is-eu-ets] The EU Emissions Trading System (ETS) is a cap-and-trade system where companies buy and sell emission allowances to stay within a limited total cap of emissions. ### What are SBTs? [#what-are-sbts] Science-Based Targets are GHG reduction targets set by companies in line with climate science to meet the goals of the Paris Agreement. ## Data and tools [#data-and-tools] ### What is the role of APIs in emissions reporting? [#what-is-the-role-of-apis-in-emissions-reporting] APIs allow organizations to automate data collection and reporting of emissions by integrating with travel platforms, booking tools and internal systems. ### What are the challenges in data collection? [#what-are-the-challenges-in-data-collection] - Data availability and granularity - Estimations due to lack of travel detail - Harmonizing data from different suppliers and modes of transport # Health checks (/docs/health-checks) SQUAKE offers three health endpoints. They're the only endpoints that work without an API key, so you can use them to test your connection before you set up authentication. | Endpoint | What it checks | | --- | --- | | `GET /v2/healthz` | The SQUAKE server can be reached. | | `GET /v2/livez` | The server can be reached and its most critical dependencies, such as databases, work. | | `GET /v2/readyz` | The server and all of its dependencies work, and the recent error rate is normal. It returns an error when other clients see too many errors, even if the servers and their subsystems are reachable. | Each endpoint returns `200` when the check passes and `500` when it fails. ## Request [#request] ```bash curl --include "https://api.sandbox.squake.earth/v2/healthz" ``` The same paths work on production at `https://api.squake.earth`. ## Which check to use [#which-check-to-use] - Use `healthz` to test connectivity, for example from a new server, through a proxy, or before your first authenticated request. - Use `readyz` in monitoring, or before a large batch run, to check that SQUAKE is fully operational. For incidents and maintenance, see the [SQUAKE status page](https://status.squake.earth). You can subscribe to updates there. ## Related [#related] - [Quickstart](/docs/quickstart) - [`healthz`](/reference/squake/health-check/get-v2-healthz), [`livez`](/reference/squake/health-check/get-v2-livez) and [`readyz`](/reference/squake/health-check/get-v2-readyz) in the API reference # Overview (/docs) These guides show how to integrate SQUAKE's APIs: calculating emissions, ingesting travel data, buying carbon credits and keeping audit logs. For the full schema of every endpoint, see the [API reference](/reference/squake). For what changed and when, see the [Changelog](/changelog). New to SQUAKE? Start with the [quickstart](/docs/quickstart): get a sandbox API key and make your first calculation in a few minutes. ## Guides [#guides] | Section | What it covers | | --- | --- | | [Calculation API examples](/docs/calculations) | Request and response examples for every activity type and methodology. | | [Carbon comparison](/docs/carbon-comparison) | Express a carbon quantity in everyday terms. | | [Products](/docs/products) | The carbon credit products you can buy. | | [Pricing and purchases](/docs/purchases) | Quote prices, buy credits and track each purchase. | | [Travel Data API](/docs/travel-data) | Ingest trips for reporting, read them back and delete them. | | [Clients](/docs/clients) | Manage child clients and the methodologies they calculate with. | | [Invitations](/docs/invitations) | Invite users into your child clients. | | [Use cases](/docs/use-cases) | End-to-end integrations: fulfillment through the API or the checkout page, and webhooks. | | [Audits](/docs/audits) | Immutable audit logs for final calculations. | | [Migration guide](/docs/migration-guide/from-v1-to-v2) | Move an integration from API v1 to v2. | | [FAQ](/docs/faq) | Common questions about carbon accounting and SQUAKE. | | [Health checks](/docs/health-checks) | Check whether the API is reachable. | ## Get help [#get-help] For troubleshooting and more resources, visit the [Help Centre](https://squake.earth/support/). To reach the team directly: - Use the [contact form](/docs/contact-tech-support/feedback-form) to share feedback and suggestions, or to get in touch. - Use the [incident form](/docs/contact-tech-support/incident-form) to report an issue or incident. The support team responds as soon as possible. # Invitations (/docs/invitations) The Invitations API invites users into the [child clients](/docs/clients) of your account. SQUAKE emails each invited user a link to set a password and finish signing up, after which they can sign in to the SQUAKE Dashboard as a user of that client. Invitations only work for child clients. To manage the users of your own organization, use the SQUAKE Dashboard. ## How invitations work [#how-invitations-work] - Each invitation ties exactly one user to exactly one child client. - SQUAKE creates the user if they don't exist yet, or reuses the user if the email address already belongs to a user of that child client. - Inviting the same email address to the same child client again is safe. SQUAKE returns the existing invitation with an updated `sent_at` and sends the email again. The `id` and the `invitation_url` stay the same, so links in earlier emails keep working. - After a user accepts, `accepted_at` is set, and the user can't be invited to that client again. - The invitation email and the acceptance page are available in English, German and French. ## Guides [#guides] | Task | Endpoint | Guide | | --- | --- | --- | | Invite a user, or send the invitation again | `POST /v2/invitations` | [Invite a user](/docs/invitations/invite-user) | | Check whether a user accepted, or get the link again | `GET /v2/invitations/{id}` | [Retrieve an invitation](/docs/invitations/retrieve-invitation) | # Invite a user (/docs/invitations/invite-user) Invites a user into one of the authenticated client's child clients and queues the invitation email. Calling it again for the same email address and client resends the email. ## Request [#request] `POST /v2/invitations` - `client_id` (string (UUID), required): The child client to invite the user into. It must be a descendant of the authenticated client. The authenticated client itself is refused. - `user_email` (string, required): The invited user's email address. SQUAKE trims it and stores it in lowercase. - `role` (string, required): The role the user gets in the child client, a client-level role such as `admin` or `user`. SQUAKE-internal roles can't be assigned through the API. - `first_name` (string): The user's first name. Kept as it is on a resend that omits it. - `last_name` (string): The user's last name. Kept as it is on a resend that omits it. - `locale` (string): Language of the invitation email and the acceptance page: `en`, `de` or `fr`. Defaults to `en` for a new invitation. A resend that omits it keeps the earlier locale. ```json { "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "user_email": "Jane.Doe@example.com", "role": "user", "first_name": "Jane", "last_name": "Doe", "locale": "de" } ``` Save the request as `invitation.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/invitations" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @invitation.json ``` ## Response [#response] SQUAKE responds with `201 Created` and the invitation: Response 201 Created (application/json): ```json { "id": "8f6a1c9c-3f28-4b3e-9a1b-24a0f0c7f5b1", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "user_email": "jane.doe@example.com", "first_name": "Jane", "last_name": "Doe", "role": "user", "locale": "de", "sent_at": "2026-08-31T10:23:14Z", "accepted_at": null, "invitation_url": "https://app.squake.earth/accept-invite/6b3a2e1c-9e5d-4b7a-b0f8-2c8f6a4d1e11?token=eyJhbGciOi..." } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | The invitation's ID. Store it to check the invitation later. | | `client_id` | string (UUID) | The child client the user is invited into. | | `user_email` | string | The email address, trimmed and in lowercase. | | `first_name` | string \| null | The user's first name, if provided. | | `last_name` | string \| null | The user's last name, if provided. | | `role` | string | The role the user gets in the child client. | | `locale` | string | Language of the email and the acceptance page. | | `sent_at` | string (date-time) \| null | When the invitation email was last sent. Updated on every resend. | | `accepted_at` | string (date-time) \| null | When the user accepted, or `null` while the invitation is open. | | `invitation_url` | string \| null | The acceptance link from the email. The user follows it to set a password and finish signing up. Stays the same when you send the invitation again. | > **Treat the invitation link like a password reset link** > Whoever opens `invitation_url` can set the user's password. Only share it with the invited person. ## Resending an invitation [#resending-an-invitation] Send the same request again to resend the email. SQUAKE returns the existing invitation with a new `sent_at`, and the `id` and `invitation_url` stay the same. Fields you omit, such as `first_name` or `locale`, keep their earlier values. After the user accepts, the invitation can't be sent again. ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `400` | `invalid_role` | `role` is missing, unknown, or not a client-level role. | | `400` | `invalid_locale` | `locale` isn't `en`, `de` or `fr`. | | `401` | | The API key is missing or invalid. | | `403` | `client_not_invitable` | `client_id` is the authenticated client or was omitted. Invitations only go into child clients. | | `404` | | Not found. Check that `client_id` is a client in your hierarchy. | | `422` | `email_not_available` | The email address already belongs to a user outside this child client. | | `422` | `invitation_already_accepted` | The user with this email address has already accepted an invitation to this child client. | ## Related [#related] - [Retrieve an invitation](/docs/invitations/retrieve-invitation) - [Create a child client](/docs/clients/create-child-client) - [Invite a User](/reference/squake/invitations/post-v2-invitations) in the API reference # Retrieve an invitation (/docs/invitations/retrieve-invitation) Returns one invitation by its ID. Use it to check whether the user has accepted (`accepted_at`) or to read the `invitation_url` again. You can read the invitations of the authenticated client and all of its descendants. ## Request [#request] `GET /v2/invitations/{id}` - `id` (string (UUID), required): The invitation's ID, as returned by [Invite a user](/docs/invitations/invite-user). ```bash curl "https://api.sandbox.squake.earth/v2/invitations/8f6a1c9c-3f28-4b3e-9a1b-24a0f0c7f5b1" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] This user accepted the invitation two days after it was sent: Response 200 OK (application/json): ```json { "id": "8f6a1c9c-3f28-4b3e-9a1b-24a0f0c7f5b1", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "user_email": "jane.doe@example.com", "first_name": "Jane", "last_name": "Doe", "role": "user", "locale": "de", "sent_at": "2026-08-31T10:23:14Z", "accepted_at": "2026-09-02T14:07:52Z", "invitation_url": "https://app.squake.earth/accept-invite/6b3a2e1c-9e5d-4b7a-b0f8-2c8f6a4d1e11?token=eyJhbGciOi..." } ``` `accepted_at` is `null` while the invitation is open. For every field, see [Invite a user](/docs/invitations/invite-user#response). ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `not_found` | No invitation has this ID, or the invitation belongs to a client outside your hierarchy. | An invitation outside your hierarchy returns the same response as one that doesn't exist. ## Related [#related] - [Invite a user](/docs/invitations/invite-user) - [Retrieve an Invitation](/reference/squake/invitations/get-v2-invitations-id) in the API reference # From v1 to v2 (/docs/migration-guide/from-v1-to-v2) Migrate your integration from v1 to v2 of the SQUAKE API: what changed conceptually, side-by-side request examples, and every breaking change in keys and values. ## Conceptual changes [#conceptual-changes] ### Carbon activities become calculations, pricing and purchases [#carbon-activities-become-calculations-pricing-and-purchases] v1 had a single object and endpoint called "carbon activity" for creating, purchasing and refunding. One carbon activity had many "carbon activity items". A carbon activity item is a single item that is part of a carbon activity, for example a single flight from A to B. Another item could be a single train ride from C to D. The `/carbon_activities` endpoint mixes calculating emissions, getting pricing information, and handling purchases and refunds. Each emissions calculation is hard-linked to a unique ID. You use this ID to make a single purchase (or refund). If you want to offer compensations for the same activity to many end-users, you must make a separate calculation for each end-user, resulting in N+1 API calls, each with the exact same payload and same response (except for the unique ID). v2 has multiple objects and endpoints, each with its own purpose. The three major concepts are calculations, pricing and purchases. | Endpoint | Purpose | | --- | --- | | `/calculations` | Calculate emissions for one or multiple "items". These items are similar to the "carbon activity items" in v1. The "carbon activity" container is gone. | | `/pricing` | Get a price quote for either a fixed total (for example 25 USD) or a specific amount of carbon emissions (for example 150 kg CO2e). | | `/purchases` | Purchase carbon credits. You must request a price quote from `/pricing` first. | | `/refunds` | Refund a purchase. Within 14 days of a purchase, no refund is necessary: call `/purchases/:id/cancel` to cancel the purchase. | The `calculations` and `pricing` endpoints are now stateless. If you want to offer compensations for the same activity to many end-users, one calculation is enough: a single API call for, for example, a flight from A to B in economy class for one traveler. You can use the returned pricing information to make a purchase for every end-user who is interested in the same flight. Breaking down the single multi-purpose endpoint from v1 allows for a more flexible API, resulting in a simpler integration. It also lets us add functionality to the API more easily, without breaking changes and while keeping complexity low. ### Project splits and portfolios become products [#project-splits-and-portfolios-become-products] Initially, v1 let you choose one specific project to contribute to. Then we added multiple projects, and finally the option to split your purchase across multiple projects with a chosen percentage. This was complex and led to many errors, so we added "portfolios", which are collections of projects. You choose a portfolio, and we split your purchase across the projects in it. Then we added the option to split across multiple portfolios. To avoid a breaking change, combinations of all these options were possible. The payload options grew complex and became incomprehensible. It also made swapping projects more complex, which is necessary in rare instances due to the volatile and complex nature of the carbon market. v2 offers a single concept called "product" that you purchase. A product is a collection of projects (the same as a portfolio). During onboarding, we evaluate your needs and goals and custom-create one or several products for you. In the future, you may be able to create your own products, but for now, we create them for you. The v1 payload below is one of many possible ways to split a purchase; in v2, one key-value pair is all you need. ```json title="v1 project split" { "project_split": [ { "external_pricing_reference": "ps_1", "split": [ { "project_code": "project_0110", "percentage": 70 }, { "project_code": "project_0007", "percentage": 30 } ] }, { "portfolio_id": "portfolio_abc_123" } ] } ``` ```json title="v2 product" { "product": "product_abc123" } ``` ### Expand (new in v2) [#expand-new-in-v2] v1 returns huge responses. For example, the pricing information returns multiple keys, in different variations, some with more and some with less information. This led to confusion, convoluted logs, and a lot of unnecessary data transfer and complexity. v2 by default returns simplified payloads with only the information that any kind of integration requires. Further, optional objects are included as an ID only. To get full, nested objects, use the `expand` parameter. For example, to get the full product information with a pricing, use `expand[]=product`. This concept exists throughout the API and lets you customize the complexity and amount of information the API returns. For an MVP or simple testing, you most likely want to omit `expand` and get the simplest response. For a more sophisticated integration, use `expand` to cherry-pick all the information you need. For example, `pricing` without `expand` returns just an ID for the product, and with `expand` it includes more information: ```json title="Without expand" { "product": "product_5ea9f3", "id": "...", "carbon_quantity": 89257, "carbon_unit": "gram", "currency": "EUR", ... } ``` ```json title="With expand" { "product": { "id": "product_5ea9f3", "title": "CO2 reduction through SAF - Sustainable Aviation Fuel", "description": "SAF saves up to 80% of CO2 emissions compared to fossil fuel. SQUAKE partners with Compensaid, replacing fossil jet fuel with SAF. Your purchased SAF is put into circulation within the next 12 months. It is certified according to EU-ISCC and RED and feedstocks have not been derived from palm oil or acid distillates.", "locations": [ { "country": "DE", "sub_region": "155", "region": "150" } ], "certifications": [], "sdgs": [ 9, 13 ] }, "id": "...", "carbon_quantity": 89257, "carbon_unit": "gram", "currency": "EUR", ... } ``` ## Code examples [#code-examples] A few code examples to get you started. > **Get help with your payloads** > Send us a sample of your typical API call payloads, and we'll send you back the respective v2 payloads and responses. Or head over to the [API reference](/reference/squake) and [Postman collection](https://www.postman.com/orange-space-247411/workspace/squake-earth) and give it a try. Your v1 `client_secret` from the OAuth flow is migrated to v2, so you can use it as an API key. ### Calculation and pricing [#calculation-and-pricing] In v1, creating a carbon activity returns emissions, a price quote, and a unique ID for a one-time purchase. In v2, the calculation request returns only emission values ("carbon quantity & unit"): no ID, no price quote. ```json title="v1 carbon activity creation" { "items": [{ "carbon_activity_type": "flight", "parameters": { "origin": "TXL", "destination": "HAM", "booking_class": "economy", "number_of_travelers": 2, "aircraft_type": "320", "algorithm_type": "icao" } }], "project_split": [ { "project_code": "project_0110", "percentage": 100 } ] } ``` ```json title="v2 calculation" { "items": [{ "type": "flight", "methodology": "ICAO", "origin": "TXL", "destination": "HAM", "booking_class": "economy", "number_of_travelers": 2, "aircraft_type": "320" }] } ``` > **Flatter payloads, clearer names** > Payloads and responses are not deeply nested anymore, and the naming is more consistent and easier to understand. For example, `algorithm_type` is now `methodology`, and `carbon_activity_type` is now `type`. Methodologies have a consistent spelling and now express the underlying methodology that is applied. For example, "specific" is named "US-EPA", so you can research the US EPA methodology. Request a pricing with a `GET`: ```shell curl -G "https://api.squake.earth/v2/pricing" \ -H "Authorization: Bearer $SQUAKE_API_KEY" \ --data-urlencode "product=product_5ea9f3" \ --data-urlencode "carbon_quantity=1000000" \ --data-urlencode "carbon_unit=gram" \ --data-urlencode "currency=EUR" ``` It returns a price quote and an ID that you can use to make one or multiple purchases for the requested carbon quantity at the price we returned. We still offer a combined endpoint to get the calculation and pricing in one API call if needed. Use the same request body as for the calculation, and add a `product` and a `currency`: ```json { "product": "product_5ea9f3", "currency": "EUR", "items": [{ "type": "flight", "methodology": "ICAO", "origin": "TXL", "destination": "HAM", "booking_class": "economy", "number_of_travelers": 2, "aircraft_type": "320" }] } ``` It returns emissions, a price quote, and the ID for purchasing. ### Purchase [#purchase] In v2, the additional payload options to request a receipt via email, a PDF certificate and so on are the same as in v1. We have renamed a few keys and un-nested the payloads as far as possible. ```shell title="v1 purchase" curl \ -X POST https://api.squake.earth/carbon_activities/{id}/purchase ``` ```shell title="v2 purchase" curl -X POST "https://api.squake.earth/v2/purchases" \ -H "Authorization: Bearer $SQUAKE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "pricing": "" }' ``` > **Idempotency** > The v2 purchase endpoint accepts the `external_reference` parameter. It works as an idempotency key: the endpoint creates a purchase for this key only once and responds with 201 (created). If you call it again with the same payload and key, you get 200 (ok) and the same purchase object as before. ## List of all breaking changes [#list-of-all-breaking-changes] Besides the obvious structural changes, a few keys and values have been renamed. ### Counting human beings [#counting-human-beings] | v1 | v2 | | --- | --- | | `number_of_passengers` | `number_of_travelers` | | `number_of_travelers` | `number_of_travelers` | | `number_of_visitors` | `number_of_travelers` | ### Carbon activity types [#carbon-activity-types] | v1 | v2 | | --- | --- | | `ship_freight` | `sea_freight` | | `ship_freight_inland_waterway` | `inland_waterways` | | `train_freigth` | `rail_freight` | | `truck` | `road_freight` | | `parcel` | `logistics` | | `money_amount` | Removed: request a pricing for a fixed total | | `general` | Removed: this was just a fixed amount of carbon, so request a pricing straight for a specific amount of carbon | | `co2_amount` | Removed, same as `general` | ### Algorithm type to methodology [#algorithm-type-to-methodology] Besides renaming this property from `algorithm_type` to `methodology`, we also improved the naming of the values. All methodologies are consistently named using `ALL-CAPS-WITH-DASHES`. The v1 values `specific`, `simple`, `extend` and others are removed. The v2 methodologies are: | v2 methodology | Meaning | | --- | --- | | `US-EPA` | We use the methodology published by the "United States Environmental Protection Agency". This was formerly called "specific" or similar. | | `EU-EEA` | We use the methodology published by the "European Environment Agency". This was formerly called "simple" or similar. | | `SQUAKE` | Methodology developed by our in-house research team, based on the best available data and latest research. This was formerly called "extend" or similar. | | `BASIC` | Simple approximation, useful when you have sparse data. These are either public or in-house developed approximations, for example based on industry averages. This was formerly called "simple" or similar. | We still have all the others, for example `ACRISS`, `GLEC` and so on (and a few new ones). ### Authentication [#authentication] v1 used OAuth2, which proved complex to implement for many customers. Generated access tokens were short-lived, and you had to implement the rotation. In v2, API keys no longer expire automatically. You can still rotate them in the dashboard if you wish. | Method | How | | --- | --- | | API key auth | Send your API key in the header of each request. | | Basic auth | Send your API key as the username and leave the password empty, base64 encoded. | | mTLS | Contact us if you require mTLS. | ### Error messages [#error-messages] v1 errors were not consistent and usually contained the `code`/`message` or `schema_errors` object. v2 errors follow the [JSON API standard](https://jsonapi.org/format/#errors). If the request fails, the response contains an `errors` array like this: ```json { "errors": [ { "code": "invalid_params", "detail": "Positive number expected for 'number_of_nights', got '-1'.", "source": { "attribute": "number_of_nights", "model": "campingsite_parameters", "id": "my-test-booking" } }, { "code": "invalid_params", "detail": "Invalid country 'FR1'. Expected one of: DE, FR, FI, NO, SE, DK, IS, FO.", "source": { "attribute": "country", "model": "camping_site", "id": "my-test-booking" } }, { "code": "invalid_params", "detail": "Invalid camping_type: 'invalid'. Expected one of: caravan_mobile_home, semi-integrated_motorhome, integrated_motorhome, panel_van.", "source": { "attribute": "camping_type", "model": "camping_site", "id": "my-test-booking" } } ] } ``` ### Other name changes [#other-name-changes] | Area | v1 | v2 | Notes | | --- | --- | --- | --- | | Expenditure | `price_in_cents` | `total` | | | Hotel | `*_stars` options for `hotel_type` | Removed | We now infer this from `stars` if the hotel type is omitted. | | Hotel | `eco_label` | `eco_labels` | The key is pluralized, since it accepted an array of values. | | Response from calculations | `algorithm_specific` | `energy_and_emission_factors` | The content is the same. It is included in the `items` object returned from the calculations endpoint and contains the factors used for the calculation (as required by some of the methodologies). | | Sea freight (v1: "ShipFreight") | `freight_type` | `cargo_type` | Allowed values are `dry` and `reefer`. | # Migration guide (/docs/migration-guide) Move your integration from version 1 to version 2 of the SQUAKE API with the [v1 to v2 migration guide](/docs/migration-guide/from-v1-to-v2). # Products (/docs/products) A product is a compensation option you can buy from SQUAKE. In the simplest case, a product maps to a single climate project. SQUAKE also offers bundles of several projects, built around a goal such as carbon reduction, a location, a price point or a sustainability target. For a custom product, contact SQUAKE. You need a product's `id` to quote a price and to buy credits. See [Pricing and purchases](/docs/purchases). ## What a product contains [#what-a-product-contains] | Field | Type | Description | | --- | --- | --- | | `id` | string | The product's ID, such as `product_2rsg35sfsdf`. | | `title` | string | A short, human-readable summary. | | `description` | string | A human-readable description. Localized with `locale`. | | `locations` | array | Where the product's projects have impact: `country` (ISO 3166-1 code) with UN M49 `region` and `sub_region` codes. | | `certifications` | array of strings | The certifications the product's projects hold. | | `sdgs` | array of integers | The UN Sustainable Development Goals the projects contribute to, by number. | | `files` | array | Images attached to the product, with `purpose` `project_image`. | | `prices` | array | The product's prices. There can be more than one, for example when a future price change is already known. | | `categories` | array | The product's categories, each with a `code` and an English `title`. | | `impact_types` | array | The product's impact types, each with a `code` and an English `title`. | | `classes` | array | The product's project classes, each with a `code` and an English `title`. | A price has an `id`, the `product` it belongs to, a `unit_amount` in the smallest unit of the currency (`1234` is 12.34), the `carbon_unit` it's quoted per, and the `currency`. ## Languages [#languages] Product descriptions can be localized. Pass `locale` with one of `de`, `en`, `es`, `fr`, `hi`, `it`, `ja`, `pt`, `pt-BR` or `zh-CN`. ## Guides [#guides] | Task | Endpoint | Guide | | --- | --- | --- | | List and filter products | `GET /v2/products` | [List products](/docs/products/list-products) | | Read one product | `GET /v2/products/{id}` | [Retrieve a product](/docs/products/retrieve-product) | # List products (/docs/products/list-products) Returns the products you can buy, 25 per page by default. ## Request [#request] `GET /v2/products` - `locale` (string): Language of the product descriptions: `de`, `en`, `es`, `fr`, `hi`, `it`, `ja`, `pt`, `pt-BR` or `zh-CN`. - `page` (integer): Page number, starting at `1`. - `items` (integer): Products per page, from `1` to `25`. Defaults to `25`. - `category` (string): Return only products with this category `code`. - `class` (string): Return only products with this project class `code`. - `impact_type` (string): Return only products with this impact type `code`. ```bash curl "https://api.sandbox.squake.earth/v2/products?locale=en&items=10" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` The filters match the `code` of a category, class or impact type, as returned in a product's `categories`, `classes` and `impact_types`. List the products without filters first to see the codes available to your account. ## Response [#response] The body is a JSON array of products. The values in this example are illustrative. Response 200 OK (application/json): ```json [ { "id": "product_2rsg35sfsdf", "title": "Biochar carbon removal", "description": "Turns agricultural residues into biochar, which stores carbon in soil for centuries.", "locations": [ { "country": "DE", "region": "150", "sub_region": "155" } ], "certifications": [ "Puro.earth" ], "sdgs": [ 13, 15 ], "files": [ { "id": "file_asfg454s25", "filename": "biochar-project.jpg", "purpose": "project_image", "size": 482113, "type": "jpg", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/..." } ], "prices": [ { "id": "price_1MMroL2eZvKYlo2CxbxAACvb", "product": "product_2rsg35sfsdf", "unit_amount": 15000, "carbon_unit": "tonne", "currency": "EUR" } ], "categories": [ { "code": "Biochar", "title": "Biochar" } ], "impact_types": [ { "code": "Removal", "title": "Removal" } ], "classes": [ { "code": "Technology-based", "title": "Technology-based" } ] } ] ``` For the meaning of each field, see [Products](/docs/products#what-a-product-contains). ## Errors [#errors] | Status | Meaning | | --- | --- | | `401` | The API key is missing or invalid. | ## Related [#related] - [Retrieve a product](/docs/products/retrieve-product) - [Quote a price](/docs/purchases/quote-pricing) - [Retrieve Products](/reference/squake/products/get-products) in the API reference # Retrieve a product (/docs/products/retrieve-product) Returns one product with its projects' locations, certifications, files and prices. ## Request [#request] `GET /v2/products/{id}` - `id` (string, required): The product's ID, such as `product_2rsg35sfsdf`. - `locale` (string): Language of the description: `de`, `en`, `es`, `fr`, `hi`, `it`, `ja`, `pt`, `pt-BR` or `zh-CN`. ```bash curl "https://api.sandbox.squake.earth/v2/products/product_2rsg35sfsdf?locale=de" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The values in this example are illustrative. Response 200 OK (application/json): ```json { "id": "product_2rsg35sfsdf", "title": "Biochar carbon removal", "description": "Turns agricultural residues into biochar, which stores carbon in soil for centuries.", "locations": [ { "country": "DE", "region": "150", "sub_region": "155" } ], "certifications": [ "Puro.earth" ], "sdgs": [ 13, 15 ], "files": [ { "id": "file_asfg454s25", "filename": "biochar-project.jpg", "purpose": "project_image", "size": 482113, "type": "jpg", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/..." } ], "prices": [ { "id": "price_1MMroL2eZvKYlo2CxbxAACvb", "product": "product_2rsg35sfsdf", "unit_amount": 15000, "carbon_unit": "tonne", "currency": "EUR" } ], "categories": [ { "code": "Biochar", "title": "Biochar" } ], "impact_types": [ { "code": "Removal", "title": "Removal" } ], "classes": [ { "code": "Technology-based", "title": "Technology-based" } ] } ``` `unit_amount` is the price per `carbon_unit` in the smallest unit of the currency, so this product costs 150.00 EUR per tonne. For the meaning of each field, see [Products](/docs/products#what-a-product-contains). ## Errors [#errors] | Status | Meaning | | --- | --- | | `401` | The API key is missing or invalid. | | `404` | No product has this ID. | ## Related [#related] - [List products](/docs/products/list-products) - [Quote a price](/docs/purchases/quote-pricing) - [Retrieve a Product](/reference/squake/products/get-products-id) in the API reference # Calculate and price in one request (/docs/purchases/calculate-with-pricing) Calculates the emissions of the activities you send and quotes a price for compensating them, in one request. The response holds a pricing ID for [Create a purchase](/docs/purchases/create-purchase) and, with the payment method `stripe`, a `payment_link` to the SQUAKE checkout page. Every feature of `POST /v2/calculations` and `GET /v2/pricing` works here too. If you only need emissions or only a price, call the specific endpoint instead: it responds faster and is simpler to integrate. ## Request [#request] `POST /v2/calculations-with-pricing` - `items` (array, required): The activities to calculate, in the same format as `POST /v2/calculations`. See the [calculation guides](/docs/calculations). - `product` (string, required): The ID of the product to price, such as `product_2rsg35sfsdf`. - `currency` (string): Three-letter ISO 4217 currency code of the price. - `carbon_unit` (string): Unit of the returned carbon quantities: `tonne`, `kilogram` or `gram`. - `distance_unit` (string): Unit of the returned distances, such as `kilometer`. - `payment_method` (string): `batch_settlement` to buy through the API, or `stripe` to receive a `payment_link` to the checkout page. - `payment_link_return_url` (string): Where the checkout page sends your customer after a successful payment, if they're still in the browser. - `expand` (array): `items` for the emissions of each item, `legs` for the legs of routed flights (with `items`), `product` and `price` for full objects, and `items.pricing` for a pricing token per item. This request prices the outbound flight of a booking and asks for a payment link: ```json { "expand": ["items"], "product": "product_2rsg35sfsdf", "carbon_unit": "kilogram", "currency": "EUR", "payment_method": "stripe", "payment_link_return_url": "https://www.example.com/booking/BK-2026-0042/thank-you", "items": [ { "type": "flight", "methodology": "TIM", "external_reference": "BK-2026-0042-OUT", "origin": "BER", "destination": "LHR", "departure_date": "2026-03-10", "airline": "LH", "flight_number": "LH2472", "booking_class": "economy", "number_of_travelers": 1 } ] } ``` Save it as `calculation-with-pricing.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/calculations-with-pricing" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @calculation-with-pricing.json ``` ## Response [#response] Response 200 OK (application/json): ```json { "id": "eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "carbon_quantity": 142.6, "carbon_unit": "kilogram", "payment_link": "https://checkout.squake.earth/?t=eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "price": "price_1MMroL2eZvKYlo2CxbxAACvb", "product": "product_2rsg35sfsdf", "valid_until": "2026-11-24", "currency": "EUR", "total": 2139, "items": [ { "carbon_quantity": 142.6, "carbon_unit": "kilogram", "type": "flight", "methodology": "TIM", "external_reference": "BK-2026-0042-OUT", "distance": 930.0, "distance_unit": "kilometer" } ] } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | The pricing token. Pass it as `pricing` to create a purchase. | | `carbon_quantity` | number | Total emissions of all items, in `carbon_unit`. | | `carbon_unit` | string | Unit of the carbon quantities. | | `payment_link` | string | A link to the SQUAKE checkout page, returned with the payment method `stripe`. | | `price` | string or object | The price used, as an ID or as an object with `expand: ["price"]`. | | `product` | string or object | The product, as an ID or as an object with `expand: ["product"]`. | | `valid_until` | string (date) | The last day the pricing is valid. | | `currency` | string | Currency of `total`. | | `total` | integer | The total price in the smallest unit of the currency. `2139` is 21.39 EUR. | | `items` | array | The emissions of each item, returned with `expand: ["items"]`. | Calculations are stateless: SQUAKE returns no ID for the calculation itself. Store the carbon quantity, or the pricing ID, if you need it later. For the payment link parameters and the validity of a pricing, see [Quote a price](/docs/purchases/quote-pricing). ## Errors [#errors] | Status | Meaning | | --- | --- | | `400` | The request is malformed or misses a required field. | | `401` | The API key is missing or invalid. | ## Related [#related] - [Quote a price](/docs/purchases/quote-pricing) - [Fulfillment with self-checkout](/docs/use-cases/fulfillment-with-self-checkout) - [Perform a Calculation including a Price Quote](/reference/squake/combined-calculation-and-pricing/post-calc-and-pricing) in the API reference # Cancel a purchase (/docs/purchases/cancel-purchase) Cancels a purchase made through the API. A purchase can only be canceled while its state is `reserved`, which lasts 14 days, until `cancellable_until`. After that, it moves to `confirmed` and goes into the batch settlement, and the API can no longer cancel it. ## Request [#request] `POST /v2/purchases/{id}/cancel` - `id` (string, required): The purchase ID. The request has no body. ```bash curl --request POST "https://api.sandbox.squake.earth/v2/purchases/purchase_sd234asdfl23/cancel" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The response is the purchase, in the same shape as [Create a purchase](/docs/purchases/create-purchase#response). A canceled purchase has the state `canceled`, which is final. ## Errors [#errors] | Status | Meaning | | --- | --- | | `400` | The purchase can't be canceled, for example because it's no longer `reserved`. | | `401` | The API key is missing or invalid. | | `403` | The request is forbidden for your account. | | `404` | No purchase has this ID. | ## Related [#related] - [Purchase states](/docs/purchases#purchase-states) - [Cancel a Purchase](/reference/squake/purchases/post-purchases-id-cancel) in the API reference # Create a purchase (/docs/purchases/create-purchase) Registers a purchase of carbon credits. You need a pricing ID from [Quote a price](/docs/purchases/quote-pricing) or [Calculate and price in one request](/docs/purchases/calculate-with-pricing). With the payment method `batch_settlement`, SQUAKE invoices you regularly for a batch of purchases. ## Request [#request] `POST /v2/purchases` - `pricing` (string, required): The pricing ID, the `id` returned by the pricing endpoint. - `external_reference` (string): Your own unique reference for the purchase. A retry with the same reference doesn't register a second purchase. Use a value with enough entropy, such as a version 4 UUID. - `metadata` (object): Your own key-value pairs. Never shown to users. - `confirmation_document` (object): Request a compensation confirmation. See [Document fields](#document-fields). - `certificate_document` (object): Request a compensation certificate. See [Document fields](#document-fields). - `expand` (array): `["files"]` to receive the requested documents as file objects instead of IDs. ```json { "pricing": "eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "external_reference": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "metadata": { "booking_id": "BK-2026-0042" }, "confirmation_document": { "full_name": "Example Company GmbH", "email": "sustainability@example.com", "locale": "de", "address": { "line1": "Example Street 1", "city": "Berlin", "postal_code": "10115", "country": "DE" } }, "certificate_document": { "full_name": "Example Company GmbH", "flags": ["with_attribution"], "locale": "de", "address": { "line1": "Example Street 1", "city": "Berlin", "postal_code": "10115", "country": "DE" } } } ``` Save the request as `purchase.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/purchases" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @purchase.json ``` ## Response [#response] SQUAKE responds with `201 Created` and the purchase: Response 201 Created (application/json): ```json { "id": "purchase_sd234asdfl23", "files": [ "file_34sdfgJH9df4g35", "file_7hkLm2Qp9xZt4" ], "payment_method": "batch_settlement", "state": "reserved", "metadata": { "booking_id": "BK-2026-0042" }, "carbon_quantity": 0.123, "carbon_unit": "tonne", "total": 1845, "currency": "EUR", "external_reference": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "cancellable_until": "2026-11-24T10:15:00+00:00" } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | The purchase ID. | | `files` | array | The requested documents, as file IDs or, with `expand: ["files"]`, as file objects. | | `payment_method` | string | `batch_settlement` or `stripe`. | | `state` | string | Where the purchase stands. See [Purchase states](/docs/purchases#purchase-states). | | `metadata` | object | Your own key-value pairs. | | `checkout_page` | object | With the payment method `stripe`, the `url` of a checkout page bound to this purchase and the `return_url`. | | `carbon_quantity` | number | The carbon quantity bought. | | `carbon_unit` | string | Unit of `carbon_quantity`. | | `total` | integer | The price in the smallest unit of the currency. | | `currency` | string | Currency of `total`. | | `external_reference` | string | Your reference, echoed from the request. | | `cancellable_until` | string (date-time) | Until when you can [cancel the purchase](/docs/purchases/cancel-purchase). | A new purchase starts as `reserved`: SQUAKE registered it and reserved the carbon credits. You can cancel it for 14 days, until `cancellable_until`. ## Document fields [#document-fields] `confirmation_document` and `certificate_document` take the same fields: - `full_name` (string, required): Legal name of the company or person the document is issued to. If you can't disclose it, send a de-personalized identifier such as a UUID. - `address` (object, required): Address with `line1`, `city`, `postal_code` and `country` (ISO 3166-1 alpha-2 or alpha-3), all required, plus optional `line2` and `state`. - `email` (string): If set, SQUAKE emails the document to this address. Without it, no email is sent. Either way, a download link is available. - `locale` (string): Language of the document and the email: `de`, `en`, `es`, `fr`, `hi`, `it`, `ja`, `pt`, `pt-BR` or `zh-CN`. Defaults to `en`. `confirmation_document` also takes `on_behalf_of`, with a `full_name` and an optional `address`, when you compensate on behalf of another company or person. That name is printed on the document. `certificate_document` also takes `flags`: `["with_attribution"]` mentions your name on the certificate. ## Getting the documents [#getting-the-documents] The response lists the document IDs right away, but generating a document takes time. Fetch the files after the purchase with [Retrieve a file](/docs/purchases/retrieve-file) to keep the purchase call fast. A file's `download_url` is empty until the document exists. To avoid polling, register a `confirmation_document_available` or `certificate_document_available` [webhook](/docs/use-cases/webhooks). ## Retries and idempotency [#retries-and-idempotency] A pricing can back any number of purchases, so retrying a failed call without an `external_reference` can buy twice. Send a unique `external_reference` with every purchase. If the network fails, retry with the same reference: SQUAKE doesn't register a second purchase. You can also read the purchase by its `external_reference` with [Retrieve a purchase](/docs/purchases/retrieve-purchase). ## Errors [#errors] | Status | Meaning | | --- | --- | | `400` | The request is malformed or misses a required field. | | `401` | The API key is missing or invalid. | | `403` | The request is forbidden for your account. Contact SQUAKE if you think it shouldn't be. | ## Related [#related] - [Retrieve a purchase](/docs/purchases/retrieve-purchase) - [Cancel a purchase](/docs/purchases/cancel-purchase) - [Create a Purchase](/reference/squake/purchases/post-purchases) in the API reference # Pricing and purchases (/docs/purchases) These endpoints turn an emissions figure into a compensation: you quote a price for a product, buy it, and follow the purchase until the certificates are retired. ## How a purchase works [#how-a-purchase-works] 1. Know the emissions to compensate. Calculate them with the [Calculations API](/docs/calculations), or use any carbon quantity you have. 2. Pick a [product](/docs/products). 3. Quote a price with [Quote a price](/docs/purchases/quote-pricing), or calculate and quote in one request with [Calculate and price in one request](/docs/purchases/calculate-with-pricing). 4. Buy the credits, in one of two ways: - Through the API, with the payment method `batch_settlement`. You [create the purchase](/docs/purchases/create-purchase) with the pricing ID, and SQUAKE invoices you regularly for a batch of purchases. - Through the SQUAKE checkout page, with the payment method `stripe`. Your customer pays on the page behind the `payment_link`, and SQUAKE is the merchant of record. See [Fulfillment with self-checkout](/docs/use-cases/fulfillment-with-self-checkout). 5. Track the purchase with [Retrieve a purchase](/docs/purchases/retrieve-purchase), or let SQUAKE notify you with [webhooks](/docs/use-cases/webhooks). 6. Download the confirmation and certificate documents with [Retrieve a file](/docs/purchases/retrieve-file). ## Pricing tokens [#pricing-tokens] A pricing is a token that encodes a product, a carbon quantity or fixed amount, and a price. - A pricing is valid for two weeks from the moment you request it. An expired pricing still works as long as the underlying price hasn't changed. - You can use one pricing for many purchases. Requests for the same product and quantity can return the same pricing ID. - To make retries safe, send an `external_reference` with each purchase. A retried call with the same `external_reference` doesn't register a second purchase. ## Purchase states [#purchase-states] Purchases made through the API go through these states: | State | Meaning | | --- | --- | | `reserved` | SQUAKE registered the purchase and reserved the carbon credits. You can cancel it for 14 days. | | `canceled` | The purchase was canceled while it was reserved. Final state. | | `confirmed` | The cancellation period has passed. The API can no longer cancel the purchase. | | `invoiced` | SQUAKE invoiced the purchase after the grace period. | Purchases made on the checkout page go through these states: | State | Meaning | | --- | --- | | `payment_initiated` | The customer started the payment flow on the checkout page. | | `payment_aborted` | The payment failed for good, for example because the customer left the page and didn't come back before the pricing expired. Final state. | | `confirmed` | The payment provider reported a successful payment. The purchase moves on to `settled` right away. | Both kinds of purchase can reach these states: | State | Meaning | | --- | --- | | `settled` | SQUAKE received the payment. | | `refunded` | A refund was processed. Final state. | | `certificates_confirmed` | All project partners confirmed the certificates for the purchase's carbon credits. | | `certificates_retired` | All certificates were retired in their registries. Final state. | The `state` field can also be `voided`. ## Guides [#guides] | Task | Endpoint | Guide | | --- | --- | --- | | Quote a price for a quantity or an amount | `GET /v2/pricing` | [Quote a price](/docs/purchases/quote-pricing) | | Calculate emissions and quote a price together | `POST /v2/calculations-with-pricing` | [Calculate and price in one request](/docs/purchases/calculate-with-pricing) | | Buy credits | `POST /v2/purchases` | [Create a purchase](/docs/purchases/create-purchase) | | Check a purchase | `GET /v2/purchases/{id}` | [Retrieve a purchase](/docs/purchases/retrieve-purchase) | | Change document details or metadata | `PATCH /v2/purchases/{id}` | [Update a purchase](/docs/purchases/update-purchase) | | Cancel a reserved purchase | `POST /v2/purchases/{id}/cancel` | [Cancel a purchase](/docs/purchases/cancel-purchase) | | Download a confirmation or certificate | `GET /v2/files/{id}` | [Retrieve a file](/docs/purchases/retrieve-file) | # Quote a price (/docs/purchases/quote-pricing) Returns the price of a product for a carbon quantity, or the carbon quantity a fixed amount of money buys. The response holds a pricing ID that you pass to [Create a purchase](/docs/purchases/create-purchase). With the payment method `stripe`, it also holds a `payment_link` to the SQUAKE checkout page. This endpoint is fast and creates no obligation, so you can use it to show a price before anyone buys. ## Request [#request] `GET /v2/pricing` Send either `carbon_quantity` with `carbon_unit`, or `fixed_total`. - `product` (string): The ID of the product to price, such as `product_2rsg35sfsdf`. - `carbon_quantity` (number): The quantity of carbon to price. - `carbon_unit` (string): Unit of `carbon_quantity`: `tonne`, `kilogram` or `gram`. - `fixed_total` (integer): A fixed amount of money to spend, in the smallest unit of `currency`: `1234` with `EUR` means 12.34 EUR. - `currency` (string): Three-letter ISO 4217 currency code. - `expand[]` (array): `product` or `price` to receive the full object instead of its ID. - `payment_method` (string): `batch_settlement` to buy through the API, or `stripe` to receive a `payment_link` to the checkout page. - `payment_link_return_url` (string): Where the checkout page sends your customer after a successful payment, if they're still in the browser. ```shell title="By carbon quantity" curl -G "https://api.sandbox.squake.earth/v2/pricing" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --data-urlencode "product=product_2rsg35sfsdf" \ --data-urlencode "carbon_quantity=0.123" \ --data-urlencode "carbon_unit=tonne" \ --data-urlencode "expand[]=price" ``` ```shell title="By amount of money" curl -G "https://api.sandbox.squake.earth/v2/pricing" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --data-urlencode "product=product_2rsg35sfsdf" \ --data-urlencode "fixed_total=465" \ --data-urlencode "currency=EUR" \ --data-urlencode "expand[]=price" ``` ## Response [#response] The response to the carbon quantity request, with the price expanded: Response 200 OK (application/json): ```json { "id": "eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "price": { "id": "price_1MMroL2eZvKYlo2CxbxAACvb", "product": "product_2rsg35sfsdf", "unit_amount": 15000, "carbon_unit": "tonne", "currency": "EUR" }, "product": "product_2rsg35sfsdf", "valid_until": "2026-11-24", "carbon_quantity": 0.123, "carbon_unit": "tonne", "currency": "EUR", "total": 1845 } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | The pricing token. Pass it as `pricing` to create a purchase. | | `payment_link` | string | A link to the SQUAKE checkout page. Returned with the payment method `stripe`. | | `price` | string or object | The price used, as an ID or, with `expand[]=price`, as an object. | | `product` | string or object | The product, as an ID or, with `expand[]=product`, as an object. | | `valid_until` | string (date) | The last day the pricing is valid. | | `carbon_quantity` | number | The carbon quantity the pricing covers. | | `carbon_unit` | string | Unit of `carbon_quantity`. | | `currency` | string | Currency of `total`. | | `total` | integer | The total price in the smallest unit of the currency. `1845` is 18.45 EUR. | Here, 0.123 tonnes at 150.00 EUR per tonne cost 18.45 EUR. ## Payment links [#payment-links] With `payment_method=stripe`, the response includes a `payment_link`: Response 200 OK (application/json): ```json { "id": "eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "payment_link": "https://checkout.squake.earth/?t=eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "price": "price_1MMroL2eZvKYlo2CxbxAACvb", "product": "product_2rsg35sfsdf", "valid_until": "2026-11-24", "carbon_quantity": 0.123, "carbon_unit": "tonne", "currency": "EUR", "total": 1845 } ``` Send your customer to the link to pay on the SQUAKE checkout page. You can append parameters to it: - `locale`, a two-letter ISO 639-1 language code such as `&locale=de`, sets the language of the checkout page. - Any `utm_*` tracking parameter, such as `&utm_medium=email`. - `external_reference`, which SQUAKE sends back to you in the `order` webhook. See [Webhooks](/docs/use-cases/webhooks#order). The same link works for repeated purchases. ## Validity [#validity] A pricing is valid for two weeks from the moment you request it, until `valid_until`. After that, you can still use it as long as the underlying price hasn't changed. One pricing can back many purchases, so you can fetch one pricing per product and quantity and show it to every customer while it's valid. ## Errors [#errors] | Status | Meaning | | --- | --- | | `400` | The request is invalid, for example because it has neither `carbon_quantity` with `carbon_unit` nor `fixed_total`. | | `401` | The API key is missing or invalid. | ## Related [#related] - [Create a purchase](/docs/purchases/create-purchase) - [Calculate and price in one request](/docs/purchases/calculate-with-pricing) - [Quote a Pricing](/reference/squake/pricing/get-pricing) in the API reference # Retrieve a file (/docs/purchases/retrieve-file) Returns a file attached to a record, such as the compensation confirmation or certificate of a purchase, or an image of a product. Purchases list the IDs of their files in `files`. ## Request [#request] `GET /v2/files/{id}` - `id` (string, required): The file ID, such as `file_34sdfgJH9df4g35`. ```bash curl "https://api.sandbox.squake.earth/v2/files/file_34sdfgJH9df4g35" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] Response 200 OK (application/json): ```json { "id": "file_34sdfgJH9df4g35", "filename": "SQUAKE-CompensationConfirmation-euc1XXX.pdf", "purpose": "confirmation_document", "size": 48211, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/..." } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | The file ID. | | `filename` | string | The file name. | | `purpose` | string | `confirmation_document`, `certificate_document` or `project_image`. | | `size` | integer | Size in bytes. | | `type` | string | `csv`, `jpg`, `pdf`, `png` or `webp`. | | `download_url` | string | The link to download the file. It expires after one year. | | `notification` | string | Information about the file, such as when it will be available. | ## Waiting for a document [#waiting-for-a-document] SQUAKE generates documents after the purchase, so a file can exist before its content does. While `download_url` is empty, the document hasn't been created yet: poll until the link appears, and read `notification` for when to expect it. To avoid polling, register a `confirmation_document_available` or `certificate_document_available` [webhook](/docs/use-cases/webhooks). It sends you the file, including its `download_url`, as soon as the document is ready. ## Errors [#errors] | Status | Meaning | | --- | --- | | `401` | The API key is missing or invalid. | | `403` | The request is forbidden for your account. | | `404` | No file has this ID. | ## Related [#related] - [Retrieve a purchase](/docs/purchases/retrieve-purchase) - [Retrieve a File](/reference/squake/files/get-files-id) in the API reference # Retrieve a purchase (/docs/purchases/retrieve-purchase) Returns a purchase you made earlier. Use it to check the purchase's state and to read its documents. To avoid polling, register a [webhook](/docs/use-cases/webhooks) instead. ## Request [#request] `GET /v2/purchases/{id}` - `id` (string, required): The purchase ID, or the `external_reference` you sent when you created the purchase. - `expand[]` (string): `files` to receive the documents as file objects instead of IDs. ```bash curl -G "https://api.sandbox.squake.earth/v2/purchases/purchase_sd234asdfl23" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --data-urlencode "expand[]=files" ``` Because the endpoint also accepts your own reference, you can read a purchase without storing SQUAKE's ID: ```bash curl "https://api.sandbox.squake.earth/v2/purchases/1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The purchase from [Create a purchase](/docs/purchases/create-purchase), after the cancellation period, with its files expanded: Response 200 OK (application/json): ```json { "id": "purchase_sd234asdfl23", "files": [ { "id": "file_34sdfgJH9df4g35", "filename": "SQUAKE-CompensationConfirmation-euc1XXX.pdf", "purpose": "confirmation_document", "size": 48211, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/..." }, { "id": "file_7hkLm2Qp9xZt4", "filename": "SQUAKE-CompensationCertificate-project_XXX-euc1XXX.pdf", "purpose": "certificate_document", "size": 95120, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/..." } ], "payment_method": "batch_settlement", "state": "confirmed", "metadata": { "booking_id": "BK-2026-0042" }, "carbon_quantity": 0.123, "carbon_unit": "tonne", "total": 1845, "currency": "EUR", "external_reference": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "cancellable_until": "2026-11-24T10:15:00+00:00" } ``` For every field, see [Create a purchase](/docs/purchases/create-purchase#response). For what each state means, see [Purchase states](/docs/purchases#purchase-states). ## Errors [#errors] | Status | Meaning | | --- | --- | | `401` | The API key is missing or invalid. | | `403` | The request is forbidden for your account. | | `404` | No purchase has this ID or `external_reference`. | ## Related [#related] - [Update a purchase](/docs/purchases/update-purchase) - [Retrieve a file](/docs/purchases/retrieve-file) - [Retrieve a Purchase](/reference/squake/purchases/get-purchases-id) in the API reference # Update a purchase (/docs/purchases/update-purchase) Updates a purchase you made earlier. You can change `confirmation_document`, `certificate_document`, `metadata` and `external_reference`. Keys you omit keep their current values. To remove optional data, set it to `null` explicitly. ## Request [#request] `PATCH /v2/purchases/{id}` - `id` (string, required): The purchase ID, or the `external_reference` of the purchase. - `confirmation_document` (object): The details of the compensation confirmation. See [Document fields](/docs/purchases/create-purchase#document-fields). - `certificate_document` (object): The details of the compensation certificate. See [Document fields](/docs/purchases/create-purchase#document-fields). - `metadata` (object): Your own key-value pairs. Never shown to users. - `external_reference` (string): Your own unique reference for the purchase. - `expand` (array): `["files"]` to receive the documents as file objects instead of IDs. This request sets the purchase's metadata: ```bash curl --request PATCH "https://api.sandbox.squake.earth/v2/purchases/purchase_sd234asdfl23" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "metadata": { "booking_id": "BK-2026-0042", "cost_center": "Sales" } }' ``` ## Response [#response] The response is the updated purchase, in the same shape as [Create a purchase](/docs/purchases/create-purchase#response). ## Errors [#errors] | Status | Meaning | | --- | --- | | `400` | The request is malformed. | | `401` | The API key is missing or invalid. | | `403` | The request is forbidden for your account. | | `404` | No purchase has this ID or `external_reference`. | ## Related [#related] - [Retrieve a purchase](/docs/purchases/retrieve-purchase) - [Update a Purchase](/reference/squake/purchases/patch-purchases-id) in the API reference # Quickstart (/docs/quickstart) Make your first carbon calculation against the SQUAKE sandbox: get an API key, check that you can reach the API, send a request and read the result. ## 1. Get a sandbox API key [#1-get-a-sandbox-api-key] SQUAKE authenticates every request with an API key. You create and revoke keys in the [SQUAKE Dashboard](https://app.squake.earth/); to get access to the Dashboard, contact `product@squake.earth`. 1. In the Dashboard, switch to sandbox mode. 2. Create an API key. 3. Store it securely. The Dashboard shows each key only once. > **Sandbox and production are separate** > The sandbox at `https://api.sandbox.squake.earth` and production at `https://api.squake.earth` share no data, and each needs its own API key. Both run the same version of the API. The examples below read the key from an environment variable: ```shell export SQUAKE_API_KEY="" ``` ## 2. Check that you can reach the API [#2-check-that-you-can-reach-the-api] The [health checks](/docs/health-checks) are the only endpoints that need no authentication. A `200` response from `healthz` means the sandbox is reachable: ```shell curl -i https://api.sandbox.squake.earth/v2/healthz ``` ## 3. Make your first calculation [#3-make-your-first-calculation] Calculate the emissions of one business-class flight from Berlin to New York with the ICAO methodology. Pass the API key as a bearer token; all requests must use HTTPS. ```shell title="Bearer token" curl https://api.sandbox.squake.earth/v2/calculations \ -H "Authorization: Bearer $SQUAKE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "expand": ["items"], "items": [{ "type": "flight", "methodology": "ICAO", "external_reference": "test_7", "origin": "BER", "destination": "JFK", "aircraft_type": "737", "number_of_travelers": 1, "booking_class": "business" }] }' ``` ```shell title="HTTP Basic Auth" # The API key is the username; the password stays empty, but the colon is required. curl https://api.sandbox.squake.earth/v2/calculations \ -u "$SQUAKE_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "expand": ["items"], "items": [{ "type": "flight", "methodology": "ICAO", "external_reference": "test_7", "origin": "BER", "destination": "JFK", "aircraft_type": "737", "number_of_travelers": 1, "booking_class": "business" }] }' ``` ## 4. Read the response [#4-read-the-response] Response 200 OK (application/json): ```json { "carbon_quantity": 454070, "carbon_unit": "gram", "items": [{ "carbon_quantity": 454070, "carbon_unit": "gram", "external_reference": "test_7", "type": "flight", "methodology": "ICAO", "distance": 6522.0, "distance_unit": "kilometer" }] } ``` - `carbon_quantity` is the total for all items, in `carbon_unit`: here 454,070 g, about 454 kg of CO₂e. - `items` lists each item's result because the request asked for `"expand": ["items"]`. Use `external_reference` to match results to the items you sent; SQUAKE doesn't guarantee their order. - Every response carries a `SQUAKE-Request-Id` header. Include it when you [contact support](/docs/contact-tech-support/feedback-form) about a request. ## 5. Go live [#5-go-live] Create a production API key in the Dashboard's production mode and send the same request to `https://api.squake.earth`. Nothing else changes. ## Next steps [#next-steps] - [Choose a methodology](/docs/calculations) for each activity you calculate: flights, trains, hotels, freight and more. - [Price and purchase compensation](/docs/use-cases/fulfillment-with-api) for the emissions you calculated. - [Turn on audit mode](/docs/audits/auditable-reporting) for immutable records of finalized calculations. - [Send trips as travel data](/docs/travel-data) for reporting. - [Get notified with webhooks](/docs/use-cases/webhooks) when purchases change. - Follow the [API changelog](/changelog/api) for changes to requests and responses. # Create travel data items (/docs/travel-data/create-travel-data-items) Push one or more complete trip records into SQUAKE for emissions calculation, reporting and carbon accounting. ## Endpoint [#endpoint] `POST /v2/travel-data` Authenticate with your API key as a Bearer token, or as the username in HTTP Basic Auth with no password. Send the body as JSON with the header `Content-Type: application/json`. | Environment | Base URL | | --- | --- | | Sandbox | `https://api.sandbox.squake.earth` | | Production | `https://api.squake.earth` | ## Request envelope [#request-envelope] ```json { "trips": [ , ... ] } ``` A request can hold several trips. Each trip needs at least one activity and a `start_date_utc`. A request can hold up to 50 activities in total, across all of its trips. SQUAKE rejects a larger request with `400` before it stores anything, so split large data sets into batches of up to 50 activities and send each batch as its own request. ## Submitting on behalf of another client [#submitting-on-behalf-of-another-client] If your account is set up to manage several clients (contact SQUAKE to enable it), you can create child clients and push their travel data with your own credentials. You don't need a separate API key for each child. Add an optional root-level `client_id` to store the trips under a descendant client: ```json { "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "trips": [ , ... ] } ``` - `client_id` is the `id` (a UUID) of a client, as returned by the [Clients API](/docs/clients). - Omit `client_id` to ingest for the authenticated client. Existing integrations keep working unchanged. - Sending `client_id` requires the capability to be enabled for your account. A `client_id` outside your hierarchy returns `404` with error code `client_not_found`, and nothing is written. - All trips in one request are stored under the same target client, with that client's methodologies and configuration. Your credentials are recorded as the submitter. CSV imports (`/v2/travel-data/imports`) don't support `client_id`. Sandbox and production hierarchies are separate, so a `client_id` from one environment is never valid in the other. To create and list the clients you can act for, see [Clients](/docs/clients). ## Trip fields [#trip-fields] - `activities` (array, required): One or more activity objects. - `start_date_utc` (string (ISO 8601), required): Trip start date, as `YYYY-MM-DD`. - `end_date_utc` (string (ISO 8601)): Trip end date, as `YYYY-MM-DD`. - `trip_reference` (string): Your unique ID for the trip. Reusing a `trip_reference` appends activities to the existing trip instead of creating a new one. - `trip_name` (string): Human-readable label, such as `"Business trip to London"`. - `trip_purpose` (string): Purpose of the trip, such as `"Customer workshop"`. - `trip_status` (string): Status of the trip in your own wording, such as `"booked"`, `"TICKETED"` or `"past"`. SQUAKE maps it onto `planned`, `confirmed`, `in_progress`, `completed` or `canceled`, and reads return the mapped value. See [Trip status](/docs/travel-data/retrieve-travel-data#trip-status). - `booking_provider` (string): Name of the TMC or booking platform. - `pnr` (string): Passenger Name Record, common in flight bookings. - `amount_in_cents` (integer): Total trip cost in the smallest unit of `currency`. Must be a positive integer when `currency` is set. - `currency` (string): ISO 4217 currency code, such as `"EUR"`. - `cost_center` (object): The cost center the trip is booked against. See [Cost center fields](#cost-center-fields). - `audit_for` (string): UUID of an auditable entity. It associates the trip with that legal entity in audit logs. See [Audits](/docs/audits). - `metadata` (object): Key-value pairs for your own use. - `project_reference` (string): Internal project or campaign reference. - `booking_id` (string): ID of the booking in your booking system. - `external_source` (string): Name of the external system that created the trip. - `external_source_id` (string): ID of the trip in that external system. - `external_created_at` (string (ISO 8601)): Date the trip was created in that external system, as `YYYY-MM-DD`. > **Reusing a trip_reference** > If you send a `trip_reference` that already exists, SQUAKE appends the new activities to that trip instead of creating a duplicate. This suits incremental imports where segments are ticketed at different times. Without a `trip_reference`, every call creates a new trip. ### Cost center fields [#cost-center-fields] - `name` (string, required): Name of the cost center. - `email` (string): Contact email. - `purpose` (string): Description or purpose. - `department` (string): Department name. You can filter by it in the SQUAKE Dashboard. - `business_unit` (string): Business unit. - `city` (string): City. - `country_alpha2` (string): ISO 3166-1 alpha-2 country code, such as `"DE"`. ## Activity fields [#activity-fields] Every activity has the common fields below, plus the fields of its type. ### Common fields [#common-fields] - `type` (string, required): `flight`, `hotel`, `car` or `train`. - `methodology` (string): Methodology override for this activity. - `external_reference` (string): Your reference for the activity, echoed back in the response. - `amount_in_cents` (integer): Cost of the activity in the smallest unit of `currency`. Must be a positive integer when `currency` is set. - `currency` (string): ISO 4217 currency code of the activity's amount, such as `"EUR"`. - `start_date_utc` (string): Activity start date, as `YYYY-MM-DD`. - `end_date_utc` (string): Activity end date, as `YYYY-MM-DD`. - `traveler` (object): The traveler the activity was booked for. See [Traveler fields](#traveler-fields). If you omit `methodology`, SQUAKE uses your account's default methodology for that activity type. Pass `methodology` only to override the default for a specific activity. The fields a calculation needs depend on the methodology that SQUAKE resolves. Trip-level and activity-level amounts can be sent together, and they don't have to match. Use the trip amount for the overall booking and activity amounts to attribute spend to individual legs. In reporting that uses activity spend, an activity's `amount_in_cents` and `currency` take precedence over the trip's. Don't send `amount_base_currency`: the API neither accepts nor returns it. ### Traveler fields [#traveler-fields] All traveler fields are optional. - `name` (string): Full name. - `email` (string): Email address. SQUAKE stores it in lowercase and matches travelers on it within a client, so send it whenever you have it. - `traveler_type` (string): `employee`, `contractor` or `guest`. - `department` (string): The traveler's department. ### Flight-specific fields [#flight-specific-fields] The accepted fields depend on the methodology. These are the most common ones. For the full set, see the [flight methodology guides](/docs/calculations/travel/flight). | Field | Description | | --- | --- | | `origin` | IATA airport code, such as `"BER"`. | | `destination` | IATA airport code, such as `"LHR"`. | | `routing` | Hyphen-separated airport chain for a multi-leg itinerary, such as `"BER-FRA-JFK"`. Send either `routing` or `origin` and `destination`, not both. | | `airline` | IATA airline code, such as `"LH"`. | | `flight_number` | Flight number, such as `"LH2472"`. | | `booking_class` | `economy`, `premium_economy`, `business` or `first`. | | `departure_date` | Departure date, as `YYYY-MM-DD`. | | `number_of_travelers` | Number of passengers. | Methodology overrides: `ADEME`, `BASE-EMPREINTE`, `CO2-EMISSIEFACTOREN-NL`, `DEFRA`, `GATE4`, `ICAO`, `TIM`, `TU-CHALMERS`, `US-EPA`. ### Hotel-specific fields [#hotel-specific-fields] | Field | Description | | --- | --- | | `name` | Hotel name. Improves reporting drill-downs and supplier analytics in the SQUAKE Dashboard. | | `hotel_chain` | Name of the hotel chain, such as `"Marriott"`. Used for reporting and supplier analytics. | | `country` | ISO 3166-1 alpha-2 or alpha-3 country code, such as `"GB"`. | | `city` | City name. | | `number_of_nights` | Length of the stay. DEFRA, Greenview and HCMI require it. | | `number_of_travelers` | Number of guests. | | `stars` | Star rating, used by HCMI. | | `eco_labels` | Sustainability labels or certifications the hotel holds, such as `["eu_ecolabel", "green_key"]`. SQUAKE trims each label and drops blanks and duplicates. | Methodology overrides: `DEFRA`, `HCMI`, `GREENVIEW`. ### Car-specific fields [#car-specific-fields] | Field | Description | | --- | --- | | `origin` | Pickup location, such as the free-text address `"London Heathrow Airport, United Kingdom"`. | | `destination` | Drop-off location. | | `fuel_type` | Fuel, such as `diesel`, `petrol`, `hev` or `electricity`. Accepted values depend on the methodology. | | `car_type` | Car size, such as `average` or `executive`. Accepted values depend on the methodology. | | `usage_type` | `rental`, `taxi`, `company` or `personal_car`. Determines the GHG scope. | | `provider_company` | Rental or ride-hailing company, such as `"Hertz"` or `"Uber"`. Only applies to `rental` and `taxi`. | | `rental_contract_number` | Number of the rental contract. | | `number_of_days` | Rental duration in days. When the distance is unknown, SQUAKE estimates it from the number of days. | Methodology overrides: `ACRISS`, `BASIC`, `DEFRA`, `EU-EEA`, `US-EPA`. ### Train-specific fields [#train-specific-fields] | Field | Description | | --- | --- | | `origin` | Origin station or city. | | `destination` | Destination station or city. | | `number_of_travelers` | Number of passengers. | | `train_type` | Train category, such as `high_speed` or `international`. Accepted values depend on the methodology. | | `fare_class` | Fare class, such as `first_class` or `second_class`. Accepted values depend on the methodology. | | `fuel_type` | Fuel, where the methodology uses one. | | `operator_name` | Operator key, such as `"sncf"` or `"db"`. | Methodology overrides: `ADEME`, `BASE-EMPREINTE`, `CO2-EMISSIEFACTOREN-NL`, `DEFRA`, `GREEN-TRAVEL-DATA` (new name), `GREEN-TRAVEL-PLEDGE` (old name, still accepted), `REM`, `SQUAKE`, `US-EPA`. ## Request example [#request-example] A complete business trip: an outbound flight from BER to LHR, a hotel in London, a taxi from Heathrow, and the return flight. The taxi omits `methodology`, so SQUAKE uses the account's default car methodology. ```json { "trips": [ { "amount_in_cents": 248500, "currency": "EUR", "trip_name": "Example business trip to London", "trip_purpose": "Customer workshop", "trip_reference": "TRIP-EXAMPLE-002", "trip_status": "completed", "start_date_utc": "2026-03-10", "end_date_utc": "2026-03-12", "booking_provider": "Example TMC", "pnr": "ABC123", "activities": [ { "type": "flight", "methodology": "TIM", "external_reference": "ACTIVITY-FLIGHT-OUTBOUND", "amount_in_cents": 65000, "currency": "EUR", "origin": "BER", "destination": "LHR", "departure_date": "2026-03-10", "booking_class": "economy", "number_of_travelers": 1, "airline": "LH", "flight_number": "LH2472", "start_date_utc": "2026-03-10", "end_date_utc": "2026-03-10", "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" } }, { "type": "hotel", "methodology": "DEFRA", "external_reference": "ACTIVITY-HOTEL-001", "amount_in_cents": 98500, "currency": "EUR", "name": "Example City Hotel", "number_of_nights": 2, "country": "GB", "city": "London", "start_date_utc": "2026-03-10", "end_date_utc": "2026-03-12", "number_of_travelers": 1, "eco_labels": ["eu_ecolabel", "green_key"], "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" } }, { "type": "car", "external_reference": "ACTIVITY-CAR-001", "amount_in_cents": 20000, "currency": "EUR", "origin": "London Heathrow Airport, United Kingdom", "destination": "Canary Wharf, London, United Kingdom", "fuel_type": "hev", "car_type": "average", "usage_type": "taxi", "provider_company": "Example Ride Provider", "number_of_days": 1, "start_date_utc": "2026-03-11", "end_date_utc": "2026-03-11", "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" } }, { "type": "flight", "methodology": "TIM", "external_reference": "ACTIVITY-FLIGHT-RETURN", "amount_in_cents": 65000, "currency": "EUR", "origin": "LHR", "destination": "BER", "departure_date": "2026-03-12", "booking_class": "economy", "number_of_travelers": 1, "airline": "LH", "flight_number": "LH2473", "start_date_utc": "2026-03-12", "end_date_utc": "2026-03-12", "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" } } ], "cost_center": { "name": "Example Cost Center", "purpose": "Sales", "email": "cost-center@example.com" } } ] } ``` ## Response [#response] ### Example [#example] Response 200 OK (application/json): ```json { "carbon_quantity": 333.0, "carbon_unit": "kilogram", "items": [ { "carbon_quantity": 142.6, "carbon_unit": "kilogram", "external_reference": "ACTIVITY-FLIGHT-OUTBOUND", "trip_reference": "TRIP-EXAMPLE-002", "type": "flight", "distance": 930.0, "distance_unit": "kilometer", "methodology": { "carbon": { "quantity": 142.6, "unit": "kilogram" }, "distance": { "distance": 930.0, "unit": "kilometer" }, "emission_factors": { "energy_scope": "ttw" }, "meta": { "methodology": "TIM" } } }, { "carbon_quantity": 36.8, "carbon_unit": "kilogram", "external_reference": "ACTIVITY-HOTEL-001", "trip_reference": "TRIP-EXAMPLE-002", "type": "hotel", "methodology": { "carbon": { "quantity": 36.8, "unit": "kilogram" }, "meta": { "methodology": "DEFRA" } } }, { "carbon_quantity": 14.2, "carbon_unit": "kilogram", "external_reference": "ACTIVITY-CAR-001", "trip_reference": "TRIP-EXAMPLE-002", "type": "car", "distance": 32.0, "distance_unit": "kilometer", "methodology": { "carbon": { "quantity": 14.2, "unit": "kilogram" }, "distance": { "distance": 32.0, "unit": "kilometer" }, "emission_factors": { "energy_scope": "ttw" }, "meta": { "methodology": "DEFRA" } } }, { "carbon_quantity": 139.4, "carbon_unit": "kilogram", "external_reference": "ACTIVITY-FLIGHT-RETURN", "trip_reference": "TRIP-EXAMPLE-002", "type": "flight", "distance": 930.0, "distance_unit": "kilometer", "methodology": { "carbon": { "quantity": 139.4, "unit": "kilogram" }, "distance": { "distance": 930.0, "unit": "kilometer" }, "emission_factors": { "energy_scope": "ttw" }, "meta": { "methodology": "TIM" } } } ], "trips": [ { "id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "trip_reference": "TRIP-EXAMPLE-002", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "submitted_by_client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "activity_ids": [ "2b4d6f81-9c3e-4a57-b0d2-6e1f8a4c7b93", "5e1a9c34-7d62-4f08-b3a1-9c4e2d7f6b58", "c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03", "a1d3b5c7-2e94-4f68-9b0a-7c5d3e1f8a26" ] } ] } ``` ### Response fields [#response-fields] | Field | Description | | --- | --- | | `carbon_quantity` | Total emissions of all activities, in `carbon_unit`. | | `carbon_unit` | Unit of all carbon values, usually `kilogram`. | | `items` | One entry per activity in the request. | | `items[].external_reference` | Echoed from your request. Use it to match results to your input. | | `items[].trip_reference` | Reference of the trip the item belongs to, echoed from your request. `items` is flat across all trips, so use it to match each result to its trip. | | `items[].type` | Activity type: `flight`, `hotel`, `car` or `train`. | | `items[].carbon_quantity` | Emissions of the activity. | | `items[].distance` | Calculated or geocoded distance, where it applies. | | `items[].methodology` | Breakdown of carbon, distance, emission factors and methodology name. | | `items[].methodology.errors` | Present only if the activity couldn't be calculated. | | `trips` | The trips this request stored, one entry per trip, with the IDs you need to read the data back. | | `trips[].id` | SQUAKE's identifier for the trip. | | `trips[].trip_reference` | Echoed from your request. Usable in place of `id` when you address the trip. | | `trips[].client_id` | The client that owns the trip. When you submit with a root-level `client_id`, this is the target client. | | `trips[].submitted_by_client_id` | The client whose credentials submitted the trip. | | `trips[].activity_ids` | IDs of the activities this request wrote under the trip, in payload order. | A `trips` entry reports the trip's identity, not the content you sent. It doesn't echo `trip_name`, `trip_status`, the dates, the amount or the cost center. A trip read returns the identity fields plus everything SQUAKE stored. See [Trip fields](/docs/travel-data/retrieve-travel-data#trip-fields). ## Reading the data back [#reading-the-data-back] The `trips` array is your handle on the stored records. With those IDs, or with your own `trip_reference`, you can [retrieve the trip](/docs/travel-data/retrieve-trip), [list its activities](/docs/travel-data/list-trip-activities) with their calculations, find the audit log behind a calculation, or [delete the trip](/docs/travel-data/delete-trip). Some data is only available there, never in `items` or in the `trips` array: - Additional methodologies. `items` reports the primary methodology of each activity. If your account has more methodologies configured, the other calculations are readable through the activity. - Audit references: the ID of the audit log each calculation produced. - The trip as stored: its name, purpose, status, dates, booking provider, amount and cost center. Use it to check what SQUAKE kept of what you sent. - The activity as stored: its route (`origin` and `destination`), its `fuel_type` where the type has one, and the `traveler` it was booked for. `activity_ids` only lists what this request wrote. Reusing a `trip_reference` appends activities to an existing trip, so the trip can hold more activities than the response shows. Read the trip for the full list. For the model behind it, see [Stored travel data](/docs/travel-data/retrieve-travel-data). ## Errors [#errors] | Status | Meaning | | --- | --- | | `200` | Success. Check `methodology.errors` on each item for activities that couldn't be calculated. | | `400` | The request is malformed, misses a required field, or holds more than 50 activities. Nothing is stored. | | `401` | The API key is missing or invalid. | | `404` | `client_not_found`: the `client_id` is neither the authenticated client nor one of its descendants. Nothing is written. | | `404` | `travel_data_not_found`: ingesting travel data isn't enabled for your account yet. | | `500` | Internal server error. | ## cURL [#curl] Save the request example as `trip.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/travel-data" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @trip.json ``` ## Implementation notes [#implementation-notes] - Set `external_reference` on every activity. `items` is flat across all trips in the request, so `external_reference` identifies each activity and the echoed `trip_reference` tells you which trip it belongs to. Together they let you match every result to your input. - Dates use ISO 8601 (`YYYY-MM-DD`). The `_utc` suffix means SQUAKE stores and reads them as UTC. For a same-day leg, `start_date_utc` and `end_date_utc` can be the same date. - `trip_reference` is your key for trip identity. Reuse it to add activities to a trip as segments get ticketed, and omit it to always create a new trip. - Use activity-level amounts for per-leg spend. Keep the overall booking cost on the trip and add `amount_in_cents` and `currency` to each activity. Activity amounts take precedence in activity-based reporting. - `usage_type` sets the GHG scope of a car activity. `rental` and `taxi` count as Scope 3 category 6 (business travel in vehicles you don't own), `company` as Scope 1 (company fleet), and `personal_car` as Scope 3 category 6 (private cars reimbursed to employees). - A failed activity doesn't fail the request. An activity with a missing or unrecognized field returns `methodology.errors`, and the status is still `200`. Check each item in workflows where errors matter. # Delete a trip (/docs/travel-data/delete-trip) Deletes a trip and everything stored under it: its activities, including the legs of routed flights, and their calculations. Use it to remove test data, duplicates, or a trip you shouldn't have sent. ## Request [#request] `DELETE /v2/travel-data/trips/{id}` - `id` (string, required): The trip's SQUAKE `id` (a UUID) or your own `trip_reference`. ```bash curl --request DELETE "https://api.sandbox.squake.earth/v2/travel-data/trips/TRIP-EXAMPLE-002" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] A successful delete returns `204 No Content` with an empty body. From then on, the trip endpoints no longer return the trip or its activities. ## What a delete changes [#what-a-delete-changes] - Audit logs stay. They're an immutable record of what SQUAKE calculated, so the audit logs created by the trip's calculations remain readable. See [List audit logs](/docs/audits/list-audit-logs). - Reporting catches up later. Dashboards and reporting views refresh periodically, so the trip can still appear there until the next refresh. - A delete can't be undone. To restore the trip, submit it again to `POST /v2/travel-data`. SQUAKE recalculates its emissions, and the trip and its activities get new IDs. > **Check before you delete** > A `trip_reference` is easy to mistype, and a delete is permanent. If you're not sure which trip a reference points to, read it first with [Retrieve a trip](/docs/travel-data/retrieve-trip). ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `travel_data_not_found` | No trip has this ID or reference, or the trip belongs to a client you can't access. Nothing is deleted. | ## Related [#related] - [List trips](/docs/travel-data/list-trips) - [Create travel data items](/docs/travel-data/create-travel-data-items) - [Delete a Travel Data Trip](/reference/squake/travel-data/delete-v2-travel-data-trips-id) in the API reference # Travel Data API (/docs/travel-data) The Travel Data API ingests complete trip records into SQUAKE's reporting and analytics platform: flights, hotel stays, car rides and train journeys. Use it when you want SQUAKE to store, attribute and calculate emissions for travel data you already have. For an on-demand calculation at booking time, use the [Calculations API](/docs/calculations) instead. ## When to use which endpoint [#when-to-use-which-endpoint] | Scenario | Endpoint | | --- | --- | | Real-time emissions estimate at booking or point of sale | `POST /v2/calculations` | | Push completed or in-progress trip records for reporting | `POST /v2/travel-data` | | Batch-import historical travel data from a TMC or expense system | `POST /v2/travel-data` | | Read back or reconcile what SQUAKE stored | `GET /v2/travel-data/trips` | | Remove a trip you shouldn't have sent | `DELETE /v2/travel-data/trips/{id}` | `/v2/calculations` is a synchronous, low-latency calculation: you pass activities and get emissions back in one call. `/v2/travel-data` ingests data. It accepts trip records, calculates emissions per activity, stores everything in your SQUAKE account, and makes the results available for dashboards, reporting and carbon accounting. ## The data model [#the-data-model] Every request wraps one or more trips. A trip groups the activities of one business journey and carries metadata such as dates, cost, booking provider and cost center. The traveler is set on each activity. ```text trips[] ├── trip_reference (your unique ID; reusing it appends activities) ├── trip_name / trip_purpose / trip_status ├── start_date_utc / end_date_utc ├── booking_provider / pnr ├── amount_in_cents / currency ├── cost_center {} └── activities[] ├── type: flight | hotel | car | train ├── methodology (optional override) ├── amount_in_cents / currency (optional per-activity spend) ├── traveler {} └── [type-specific fields] ``` A trip can keep its overall booking cost while individual activities carry their own amounts. Activity-level amounts take precedence in activity-based spend reporting. ### Supported activity types [#supported-activity-types] If you omit `methodology`, SQUAKE uses your account's default methodology for that activity type. Pass `methodology` only to override the default for a specific activity. | Type | Available methodology overrides | | --- | --- | | `flight` | ADEME, BASE-EMPREINTE, CO2-EMISSIEFACTOREN-NL, DEFRA, GATE4, ICAO, TIM, TU-CHALMERS, US-EPA | | `hotel` | DEFRA, HCMI, GREENVIEW | | `car` | ACRISS, BASIC, DEFRA, EU-EEA, US-EPA | | `train` | ADEME, BASE-EMPREINTE, CO2-EMISSIEFACTOREN-NL, DEFRA, GREEN-TRAVEL-DATA (new name), GREEN-TRAVEL-PLEDGE (old name, still accepted), REM, SQUAKE, US-EPA | ## Environments and authentication [#environments-and-authentication] | Environment | Base URL | | --- | --- | | Sandbox | `https://api.sandbox.squake.earth` | | Production | `https://api.squake.earth` | Every request needs an API key. Pass it as a Bearer token, or as the username in HTTP Basic Auth with no password. The sandbox and production are fully isolated and use separate keys. Create keys in the [SQUAKE Dashboard](https://app.squake.earth/). > **Start in the sandbox** > Develop and test against the sandbox before you send production data. ## Request size [#request-size] A request can hold up to 50 activities in total, across all of its trips. SQUAKE rejects a larger request with `400` before it stores anything. Split larger data sets into batches of up to 50 activities and send each batch as its own request. ## What to expect from the response [#what-to-expect-from-the-response] A successful `200` response returns: - The total `carbon_quantity` of all activities in the request, in kilograms by default. - An `items` array with one entry per activity. Each entry echoes your `external_reference` and `type`, and adds the calculated `carbon_quantity`, the distance and the methodology details. - A `trips` array with the ID of every trip the request stored and the IDs of the activities written under it. Use these IDs to read the stored data back later. If one activity can't be calculated, for example because a required field is missing, its entry contains a `methodology.errors` array. The rest of the request still goes through. ## Reading data back [#reading-data-back] | Task | Guide | | --- | --- | | List your stored trips | [List trips](/docs/travel-data/list-trips) | | Read one trip by SQUAKE `id` or your own `trip_reference` | [Retrieve a trip](/docs/travel-data/retrieve-trip) | | Read a trip's activities, travelers and calculations | [List the activities of a trip](/docs/travel-data/list-trip-activities) | | Read one activity | [Retrieve an activity](/docs/travel-data/retrieve-trip-activity) | | Delete a trip with its activities and calculations | [Delete a trip](/docs/travel-data/delete-trip) | A trip read returns the trip as SQUAKE stored it, with the IDs of its activities instead of the activities themselves, so the response stays small however many activities the trip holds. The activities, their travelers, the calculations of additional methodologies and the audit references come from the activity endpoints. [Stored travel data](/docs/travel-data/retrieve-travel-data) explains the model and every field. ## Next steps [#next-steps] - [Create travel data items](/docs/travel-data/create-travel-data-items): request and response examples with field-by-field explanations. - [Stored travel data](/docs/travel-data/retrieve-travel-data): how SQUAKE stores trips, activities and calculations, and what the trip endpoints return. # List the activities of a trip (/docs/travel-data/list-trip-activities) Returns every activity of one trip in ingestion order. Each activity carries its traveler and one calculation per methodology configured for its type. This is where you read the results of additional methodologies, because the `items` array of a submission only reports the primary methodology of each activity. A trip is a single booking, so the list is short and comes back in full. The endpoint isn't paginated. ## Request [#request] `GET /v2/travel-data/trips/{trip_id}/activities` - `trip_id` (string, required): The trip's SQUAKE `id` (a UUID) or your own `trip_reference`. ```bash curl "https://api.sandbox.squake.earth/v2/travel-data/trips/TRIP-EXAMPLE-002/activities" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The body is a JSON array of activities. The example shows two of the trip's four activities. Response 200 OK (application/json): ```json [ { "id": "2b4d6f81-9c3e-4a57-b0d2-6e1f8a4c7b93", "type": "flight", "trip_id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "external_reference": "ACTIVITY-FLIGHT-OUTBOUND", "origin": "BER", "destination": "LHR", "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" }, "calculations": [ { "id": "3f2a1c8e-5d47-4b91-a0c3-1e8b7d6f4a20", "methodology": "TIM", "methodology_version": "3.0.0", "co2_in_grams": 142600.0, "audit": { "id": "0194d6b4-8711-7873-899d-c8133cd742f8" } } ] }, { "id": "5e1a9c34-7d62-4f08-b3a1-9c4e2d7f6b58", "type": "hotel", "trip_id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "external_reference": "ACTIVITY-HOTEL-001", "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" }, "calculations": [ { "id": "8b6d4f20-9a17-4c53-b8e1-3d7a5c2f9e14", "methodology": "DEFRA", "methodology_version": "2026", "co2_in_grams": 36800.0, "audit": null } ] } ] ``` The hotel stay has no `origin` or `destination` key. The next section explains why. ### Keys that depend on the activity type [#keys-that-depend-on-the-activity-type] SQUAKE only stores a route and a fuel for the activity types that have them. A key that a type can't have is left out of the response instead of being returned as `null`: | Type | `origin` and `destination` | `fuel_type` | | --- | --- | --- | | `flight` | Yes | No | | `car` | Yes | Yes | | `train` | Yes | Yes | | `hotel` | No | No | Read `type` before you read the route. `traveler` is present on every activity, and it's `null` when the activity was submitted without a traveler. That's common for rows from CSV imports and TMC integrations. ### Calculations [#calculations] Each entry in `calculations` is the result of one methodology, oldest first: - `co2_in_grams` is in grams of CO₂ equivalent. - `methodology_version` is `null` for methodologies that aren't versioned. - `audit` holds the ID of the audit log the calculation produced, or `null` when the activity was submitted without audit mode. To read the full log, see [Retrieve an audit log](/docs/audits/specific-audit-log). - An empty `calculations` array means SQUAKE stored no calculation for the activity. > **Note the unit** > `co2_in_grams` is in grams. The calculation endpoints and the `items` array of `POST /v2/travel-data` report kilograms by default. For every field of an activity, see [Activity fields](/docs/travel-data/retrieve-travel-data#activity-fields). ### Routed flights [#routed-flights] A flight submitted with `routing`, such as `BER-FRA-JFK`, is one activity that carries the total of the itinerary. Its legs aren't listed here, and they don't appear in the trip's `activity_ids` either. ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `travel_data_not_found` | No trip has this ID or reference, or the trip belongs to a client you can't access. | ## Related [#related] - [Retrieve an activity](/docs/travel-data/retrieve-trip-activity) - [Retrieve a trip](/docs/travel-data/retrieve-trip) - [List the Activities of a Travel Data Trip](/reference/squake/travel-data/get-v2-travel-data-trips-trip-id-activities) in the API reference # List trips (/docs/travel-data/list-trips) Returns the trips SQUAKE stored for you, from every source: API submissions, CSV imports and TMC integrations. Each trip carries its stored attributes and the IDs of its activities. To read the activities themselves, see [List the activities of a trip](/docs/travel-data/list-trip-activities). ## Request [#request] `GET /v2/travel-data/trips` - `page` (integer): Page number, starting at `1`. - `items` (integer): Trips per page, from `1` to `100`. Defaults to `20`. ```bash curl "https://api.sandbox.squake.earth/v2/travel-data/trips?page=1&items=20" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] The body is a JSON array, most recently ingested trip first. An account with no stored trips gets `200` and an empty array. Response 200 OK (application/json): ```json [ { "id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "trip_reference": "TRIP-EXAMPLE-002", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "submitted_by_client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "trip_name": "Example business trip to London", "trip_purpose": "Customer workshop", "trip_status": "completed", "booking_provider": "Example TMC", "start_date_utc": "2026-03-10T00:00:00Z", "end_date_utc": "2026-03-12T00:00:00Z", "amount_in_cents": 248500, "currency": "EUR", "cost_center": { "name": "Example Cost Center", "purpose": "Sales", "email": "cost-center@example.com" }, "activity_ids": [ "2b4d6f81-9c3e-4a57-b0d2-6e1f8a4c7b93", "5e1a9c34-7d62-4f08-b3a1-9c4e2d7f6b58", "c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03", "a1d3b5c7-2e94-4f68-9b0a-7c5d3e1f8a26" ] } ] ``` A list entry has the same fields as a [single trip](/docs/travel-data/retrieve-trip). A field the source didn't provide reads back as `null`, and the key is still there. For what each field means, including how SQUAKE maps `trip_status`, see [Trip fields](/docs/travel-data/retrieve-travel-data#trip-fields). ### Pagination headers [#pagination-headers] | Header | Meaning | | --- | --- | | `Current-Page` | The page returned. | | `Page-Items` | Trips per page. | | `Total-Pages` | Total number of pages. | | `Total-Count` | Total number of trips. | | `Link` | RFC 8288 links to the `first`, `prev`, `next` and `last` pages. | To read every trip, follow the `next` link until a response has none. ## Accounts that submit for other clients [#accounts-that-submit-for-other-clients] If submitting on behalf of other clients is enabled for your account, the list holds the trips of the authenticated client and all of its descendants. Read `client_id` on each trip to see which client owns it. The trips of a parent, a sibling or an unrelated client never appear. See [Clients](/docs/clients). ## Errors [#errors] | Status | Meaning | | --- | --- | | `401` | The API key is missing or invalid. | ## Related [#related] - [Retrieve a trip](/docs/travel-data/retrieve-trip) - [Delete a trip](/docs/travel-data/delete-trip) - [List Travel Data Trips](/reference/squake/travel-data/get-v2-travel-data-trips) in the API reference # Stored travel data (/docs/travel-data/retrieve-travel-data) After ingestion, SQUAKE keeps every trip with its activities, travelers and calculations. The trip endpoints read that data back and delete it. Use them to reconcile your system with SQUAKE, read the results of additional methodologies, find the audit log behind a calculation, or remove test and duplicate data. ## Endpoints [#endpoints] | Endpoint | Returns | Guide | | --- | --- | --- | | `GET /v2/travel-data/trips` | Your stored trips, most recently ingested first, paginated. | [List trips](/docs/travel-data/list-trips) | | `GET /v2/travel-data/trips/{id}` | One trip. | [Retrieve a trip](/docs/travel-data/retrieve-trip) | | `GET /v2/travel-data/trips/{trip_id}/activities` | All activities of a trip, each with its traveler and calculations. | [List the activities of a trip](/docs/travel-data/list-trip-activities) | | `GET /v2/travel-data/trips/{trip_id}/activities/{activity_id}` | One activity with its traveler and calculations. | [Retrieve an activity](/docs/travel-data/retrieve-trip-activity) | | `DELETE /v2/travel-data/trips/{id}` | An empty body. Deletes the trip, its activities and their calculations. | [Delete a trip](/docs/travel-data/delete-trip) | The endpoints take the same credentials as `POST /v2/travel-data`: your API key as a Bearer token, or as the username in HTTP Basic Auth with no password. Send requests to `https://api.sandbox.squake.earth` in the sandbox and to `https://api.squake.earth` in production. > **Ingestion must be enabled** > Ingesting travel data must be enabled for your account. Until it is, `POST /v2/travel-data` and the CSV imports respond with `404` and error code `travel_data_not_found`. The read endpoints serve whatever is stored for you, and a client with nothing stored gets an empty list. ## How a trip is shaped [#how-a-trip-is-shaped] A trip response carries the trip's own attributes and the IDs of its activities. The activities, with their travelers, calculations and audit references, are one request away: ```text GET /v2/travel-data/trips/{id} ├── trip_reference / client_id / submitted_by_client_id ├── trip_name / trip_purpose / trip_status ├── start_date_utc / end_date_utc ├── booking_provider / amount_in_cents / currency ├── cost_center { name, purpose, email } └── activity_ids[] ────────────┐ │ GET /v2/travel-data/trips/{id}/activities └── activities[] ←─────────────┘ ├── type / external_reference ├── origin / destination / fuel_type (depending on type) ├── traveler { name, email, traveler_type } └── calculations[] ├── methodology / methodology_version ├── co2_in_grams └── audit { id } ``` However many activities a trip holds, reading it costs one bounded response, and every endpoint that returns a trip returns the same fields. ## Addressing a trip by your own reference [#addressing-a-trip-by-your-own-reference] Wherever an endpoint takes a trip, you can pass SQUAKE's `id` (a UUID) or your own `trip_reference`. If `TRIP-EXAMPLE-002` is the reference of this trip, both requests return it: ```text GET /v2/travel-data/trips/7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47 GET /v2/travel-data/trips/TRIP-EXAMPLE-002 ``` If you set `trip_reference` on ingestion, you don't need to store SQUAKE's trip IDs. Activities are always addressed by their SQUAKE `id`, as listed in the trip's `activity_ids`. ## IDs from a submission [#ids-from-a-submission] `POST /v2/travel-data` returns a `trips` array next to the flat `items`. It holds the ID of every trip the request stored and the IDs of the activities written under it: Response 200 OK (application/json): ```json { "carbon_quantity": 333.0, "carbon_unit": "kilogram", "items": [ ... ], "trips": [ { "id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "trip_reference": "TRIP-EXAMPLE-002", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "submitted_by_client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "activity_ids": [ "2b4d6f81-9c3e-4a57-b0d2-6e1f8a4c7b93", "5e1a9c34-7d62-4f08-b3a1-9c4e2d7f6b58", "c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03", "a1d3b5c7-2e94-4f68-9b0a-7c5d3e1f8a26" ] } ] } ``` Three details to keep in mind: - Each trip has one entry, even when several payload entries share its `trip_reference`. - `activity_ids` lists what this request wrote. Reusing a `trip_reference` appends activities to an existing trip, so the trip can hold more activities than the submission lists. Read the trip for the full list. - A `trips` entry carries the trip's identity only: `id`, `trip_reference`, `client_id`, `submitted_by_client_id` and `activity_ids`. It doesn't repeat the name, dates, amount or cost center you sent. Read the trip to get those back as SQUAKE stored them. ## Trip fields [#trip-fields] | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | SQUAKE's identifier for the trip. | | `trip_reference` | string \| null | Your own reference, echoed from ingestion. Usable in place of `id`. | | `client_id` | string (UUID) | The client that owns the trip. | | `submitted_by_client_id` | string (UUID) \| null | The client whose credentials submitted the trip. `null` for trips that didn't arrive through `POST /v2/travel-data`, such as CSV imports and TMC integrations. | | `trip_name` | string \| null | The trip's name, echoed from ingestion. | | `trip_purpose` | string \| null | The trip's purpose, echoed from ingestion. | | `trip_status` | string \| null | One of `planned`, `confirmed`, `in_progress`, `completed`, `canceled`, or `null`. SQUAKE maps the status you sent onto these values. See [Trip status](#trip-status). | | `booking_provider` | string \| null | The provider the trip was booked through, echoed from ingestion. | | `start_date_utc` | string (date-time) \| null | Start of the trip in UTC. Ingestion takes a date (`2026-03-10`) and reads return a date-time (`2026-03-10T00:00:00Z`). | | `end_date_utc` | string (date-time) \| null | End of the trip in UTC, in the same format. | | `amount_in_cents` | integer \| null | The booking's amount in the minor unit of `currency`, so `10000` is 100.00 USD. | | `currency` | string \| null | Three-letter ISO 4217 code of `amount_in_cents`. | | `cost_center` | object \| null | The cost center the trip is booked against, as `{ "name", "purpose", "email" }`. The key is always present, and it's `null` for a trip booked against none. | | `activity_ids` | array of strings (UUID) | IDs of the trip's activities in ingestion order, across all activity types. | Reads return every field in the table. Fields are echoed as stored, so a field you didn't send on ingestion reads back as `null`. Two values SQUAKE keeps internally aren't returned: the amount converted into your base currency for reporting, and the cost center's department and internal ID. `client_id` and `submitted_by_client_id` differ when you submit on behalf of a descendant client. The target client owns the trip, and your credentials are recorded as the submitter. See [Submitting on behalf of another client](/docs/travel-data/create-travel-data-items#submitting-on-behalf-of-another-client). ### Trip status [#trip-status] `trip_status` is the one trip field that SQUAKE doesn't return as you sent it. Source systems each use their own words, such as `TICKETED`, `past`, `Zurückliegend` or `storno`, so SQUAKE maps the value onto a fixed set on ingestion. Reads only return these values: | Value | Meaning | | --- | --- | | `planned` | The booking exists, but nothing is held yet. | | `confirmed` | The booking is firm and the trip is still ahead. | | `in_progress` | The trip is under way. | | `completed` | The trip has finished. | | `canceled` | The trip was called off. | | `null` | The trip has neither a status nor dates, so there's nothing to report. | The dates usually decide. A trip whose `end_date_utc` has passed reads `completed`, and a trip that has started reads `in_progress`, whatever status you sent. Cancellation outranks the dates: a trip called off after its end date reads `canceled`, not `completed`. Your status only matters when the dates can't settle it. A trip you sent as firm then reads `confirmed`, and everything else reads `planned`. A trip without dates keeps the reading of the status you sent. SQUAKE re-evaluates date-dependent statuses daily, so a trip moves through `confirmed`, `in_progress` and `completed` without you sending anything. You can poll for that change, and you don't need to re-submit the trip to force it. Send your own wording when you submit a status. SQUAKE recognizes the common ones, such as `booked`, `ticketed`, `upcoming`, `checked_in`, `past`, `cancelled` and `void`, and ignores case, separators and accents. A wording it doesn't recognize doesn't fail the request. The trip's dates decide the status instead. ## Activity fields [#activity-fields] | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | Identifier of the activity, as listed in the trip's `activity_ids`. | | `type` | string | `flight`, `hotel`, `car` or `train`. | | `trip_id` | string (UUID) | The trip the activity belongs to. | | `client_id` | string (UUID) | The client that owns the activity, which is always the owner of its trip. | | `external_reference` | string \| null | Your own reference, echoed from ingestion. | | `origin` | string \| null | Where the activity started, in the format you sent: airport code, address, UN/LOCODE or latitude and longitude. Flights, cars and trains only. | | `destination` | string \| null | Where the activity ended, in the same format as `origin`. Flights, cars and trains only. | | `fuel_type` | string \| null | The fuel the activity was calculated with, echoed from ingestion. Accepted values depend on the methodology. Cars and trains only. | | `traveler` | object \| null | Who traveled, as `{ "name", "email", "traveler_type" }`. Always present, and `null` for an activity submitted without a traveler. | | `calculations` | array | One entry per methodology calculated for the activity, oldest first. | ### Keys that depend on the activity type [#keys-that-depend-on-the-activity-type] SQUAKE only stores a route and a fuel for the activity types that have them. A key that a type can't have is left out of the response instead of being returned as `null`: | Type | `origin` and `destination` | `fuel_type` | | --- | --- | --- | | `flight` | Yes | No | | `car` | Yes | Yes | | `train` | Yes | Yes | | `hotel` | No | No | Read `type` first, and treat a missing key as one that doesn't apply to the type. `traveler` is present on every activity. A `null` traveler means the activity was submitted without one, which is common for rows from CSV imports and TMC integrations. ### Traveler fields [#traveler-fields] | Field | Type | Description | | --- | --- | --- | | `name` | string \| null | Name of the traveler, echoed from ingestion. | | `email` | string \| null | Email of the traveler, echoed from ingestion in lowercase. SQUAKE matches travelers on it within a client, so two activities of the same person return the same traveler. | | `traveler_type` | string \| null | `employee`, `contractor` or `guest`. | The traveler's department, your employee ID and SQUAKE's internal traveler ID aren't part of the response. ### Calculation fields [#calculation-fields] | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | Identifier of the calculation. | | `methodology` | string | The methodology the calculation ran under, such as `TIM` or `DEFRA`. | | `methodology_version` | string \| null | The published version of that methodology for this activity type. `null` for methodologies that aren't versioned. | | `co2_in_grams` | number | Emissions in grams of CO₂ equivalent. | | `audit` | object \| null | The audit log the calculation produced, as `{ "id": "..." }`, or `null` for an activity submitted without audit mode. | > **Note the unit** > `co2_in_grams` is in grams. `POST /v2/travel-data` and the calculation endpoints report `carbon_quantity` in kilograms by default. `audit` only carries the ID. Pass it to [Retrieve an audit log](/docs/audits/specific-audit-log) for the stored record of the request, the response, and the distances and emission factors behind the calculation. Legs of routed flights aren't listed. A `flight` submitted with `routing`, such as `BER-FRA-JFK`, is one activity that carries the total of the itinerary. Its legs appear neither in `activity_ids` nor in the activity list, and requesting a leg's ID returns `404`. ## Additional methodologies [#additional-methodologies] If your account has more than one methodology configured for an activity type, SQUAKE stores one calculation per methodology. The `items` array of a submission only reports the primary methodology, so read the others through the activity endpoints. [Retrieve an activity](/docs/travel-data/retrieve-trip-activity) shows a car ride calculated with both DEFRA and US EPA. Which methodologies run is set by the client's methodology options. See [Clients](/docs/clients). ## Errors [#errors] | Status | Meaning | | --- | --- | | `204` | The delete succeeded. The body is empty. | | `401` | The API key is missing or invalid. | | `404` | `travel_data_not_found`. Nothing is deleted. | | `500` | Internal server error. | Every miss on these endpoints returns the same response: Response 404 (application/json): ```json { "errors": [ { "code": "travel_data_not_found", "detail": "The requested travel data does not exist or is not accessible." } ] } ``` You get it when the trip doesn't exist, when it belongs to a client you can't reach, when the identifier is neither a known trip `id` nor a known `trip_reference`, and when the activity belongs to another trip or is the leg of a routed flight. A trip you can't access looks exactly like one that doesn't exist. The trip list never returns `404`. A client with no trips it can reach gets `200` and an empty array. ## Implementation notes [#implementation-notes] - Set `trip_reference` on ingestion and you never need SQUAKE's trip IDs, because your reference works on every read and on delete. Activity IDs only come from SQUAKE: take them from the submission response or from a trip read. - Reconcile through the trip, not the submission response. The `trips` array of a submission reports what that request wrote. A trip read returns the stored attributes, the cost center, and activities added by earlier or later submissions. - Branch on `type` before you read an activity's route. `origin`, `destination` and `fuel_type` are absent for the types that don't have them, so a parser that expects a fixed set of keys breaks on the first hotel stay. - Use the activity endpoints for anything beyond the primary methodology. Additional methodologies and audit references aren't in the `items` array of a submission. - The trip endpoints read the stored records directly, so a read or a delete takes effect immediately. Dashboards and reporting views refresh on a schedule and catch up later. ## Related [#related] - [Create travel data items](/docs/travel-data/create-travel-data-items) - [Retrieve an audit log](/docs/audits/specific-audit-log) # Retrieve an activity (/docs/travel-data/retrieve-trip-activity) Returns one activity of a trip. Activities are always addressed through their trip, so the request needs both identifiers. Take the activity ID from the trip's `activity_ids`, or from the `trips` array of the submission that created it. ## Request [#request] `GET /v2/travel-data/trips/{trip_id}/activities/{activity_id}` - `trip_id` (string, required): The trip's SQUAKE `id` (a UUID) or your own `trip_reference`. - `activity_id` (string, required): The activity's `id` (a UUID), as listed in the trip's `activity_ids`. ```bash curl "https://api.sandbox.squake.earth/v2/travel-data/trips/TRIP-EXAMPLE-002/activities/c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` ## Response [#response] Response 200 OK (application/json): ```json { "id": "c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03", "type": "car", "trip_id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "external_reference": "ACTIVITY-CAR-001", "origin": "London Heathrow Airport, United Kingdom", "destination": "Canary Wharf, London, United Kingdom", "fuel_type": "hev", "traveler": { "name": "Jane Doe", "email": "jane.doe@example.com", "traveler_type": "employee" }, "calculations": [ { "id": "6a2e8c40-7b19-4d35-9f68-1c4b7e2a5d93", "methodology": "DEFRA", "methodology_version": "2026", "co2_in_grams": 14200.0, "audit": null }, { "id": "f5b1d873-2c60-4e97-a1d4-8b3f6c9e2074", "methodology": "US-EPA", "methodology_version": "2026", "co2_in_grams": 15100.0, "audit": null } ] } ``` This car ride has two calculations because the account is configured with two car methodologies, DEFRA and US EPA. The `items` array of the submission only reported the primary methodology. Both results are stored, and this endpoint returns them oldest first. The key set depends on the activity `type`. A car or train activity carries `origin`, `destination` and `fuel_type`. A flight has no `fuel_type`, and a hotel stay has none of the three. `co2_in_grams` is in grams, not kilograms. For every field, see [Activity fields](/docs/travel-data/retrieve-travel-data#activity-fields). Which methodologies run for each activity type depends on the client's methodology options. See [Clients](/docs/clients). ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `travel_data_not_found` | The trip doesn't exist or you can't access it, the activity belongs to another trip, the ID is a leg of a routed flight, or no activity has this ID. | Response 404 (application/json): ```json { "errors": [ { "code": "travel_data_not_found", "detail": "The requested travel data does not exist or is not accessible." } ] } ``` ## Related [#related] - [List the activities of a trip](/docs/travel-data/list-trip-activities) - [Retrieve an audit log](/docs/audits/specific-audit-log) - [Retrieve an Activity of a Travel Data Trip](/reference/squake/travel-data/get-v2-travel-data-trips-trip-id-activities-activity-id) in the API reference # Retrieve a trip (/docs/travel-data/retrieve-trip) Returns one stored trip: the identity fields a submission echoes back, plus the trip's name, purpose, status, dates, booking provider, amount and cost center as SQUAKE stored them. The trip lists its activities by ID in `activity_ids`. To read the activities, see [List the activities of a trip](/docs/travel-data/list-trip-activities). ## Request [#request] `GET /v2/travel-data/trips/{id}` - `id` (string, required): The trip's SQUAKE `id` (a UUID) or your own `trip_reference`. Both requests below read the same trip, because `TRIP-EXAMPLE-002` is that trip's `trip_reference`: ```bash curl "https://api.sandbox.squake.earth/v2/travel-data/trips/7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47" \ --header "Authorization: Bearer $SQUAKE_API_KEY" curl "https://api.sandbox.squake.earth/v2/travel-data/trips/TRIP-EXAMPLE-002" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` If you set `trip_reference` when you submit trips, you don't need to store SQUAKE's trip IDs. ## Response [#response] Response 200 OK (application/json): ```json { "id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47", "trip_reference": "TRIP-EXAMPLE-002", "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "submitted_by_client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5", "trip_name": "Example business trip to London", "trip_purpose": "Customer workshop", "trip_status": "completed", "booking_provider": "Example TMC", "start_date_utc": "2026-03-10T00:00:00Z", "end_date_utc": "2026-03-12T00:00:00Z", "amount_in_cents": 248500, "currency": "EUR", "cost_center": { "name": "Example Cost Center", "purpose": "Sales", "email": "cost-center@example.com" }, "activity_ids": [ "2b4d6f81-9c3e-4a57-b0d2-6e1f8a4c7b93", "5e1a9c34-7d62-4f08-b3a1-9c4e2d7f6b58", "c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03", "a1d3b5c7-2e94-4f68-9b0a-7c5d3e1f8a26" ] } ``` `activity_ids` lists every activity of the trip in ingestion order, including activities that later submissions with the same `trip_reference` appended. Legs of a flight submitted with `routing` aren't listed: the routed activity carries the itinerary. Dates come back as UTC date-times, such as `2026-03-10T00:00:00Z`, even though ingestion takes plain dates. `trip_status` is one of `planned`, `confirmed`, `in_progress`, `completed`, `canceled` or `null`. See [Trip status](/docs/travel-data/retrieve-travel-data#trip-status) for how SQUAKE maps the status you sent. ## Errors [#errors] | Status | Code | Meaning | | --- | --- | --- | | `401` | | The API key is missing or invalid. | | `404` | `travel_data_not_found` | No trip has this ID or reference, or the trip belongs to a client you can't access. | Response 404 (application/json): ```json { "errors": [ { "code": "travel_data_not_found", "detail": "The requested travel data does not exist or is not accessible." } ] } ``` A trip you can't access returns the same response as one that doesn't exist. ## Related [#related] - [List trips](/docs/travel-data/list-trips) - [List the activities of a trip](/docs/travel-data/list-trip-activities) - [Retrieve a Travel Data Trip](/reference/squake/travel-data/get-v2-travel-data-trips-id) in the API reference # Fulfillment with API (/docs/use-cases/fulfillment-with-api) This guide walks through a compensation made entirely through the SQUAKE API: 1. Calculate the emissions to compensate (optional). 2. Choose a product (optional). 3. Quote a price. 4. Create the purchase. 5. Follow the purchase until it's settled and its certificates are retired. All requests authenticate with your API key as a Bearer token. The examples use the sandbox at `https://api.sandbox.squake.earth`. ## Emission calculation [#emission-calculation] > **Optional** > Skip this step if you already know the carbon quantity to compensate. SQUAKE can compensate any quantity you provide. SQUAKE calculates emissions for flights, hotel stays, trains, cars, freight and more, following industry standards. This request calculates an economy flight from Berlin to Paris with DEFRA and a 25% share of sustainable fuel: ```json { "expand": ["items"], "carbon_unit": "kilogram", "items": [ { "type": "flight", "methodology": "DEFRA", "external_reference": "BK-2026-0042-OUT", "origin": "BER", "destination": "CDG", "booking_class": "economy", "number_of_travelers": 1, "aircraft_type": "7M7", "sustainable_fuels": { "carbon_reduction_percentage_of_total": 0.25 } } ] } ``` Save the request as `calculation.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/calculations" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @calculation.json ``` Response 200 OK (application/json): ```json { "carbon_quantity": 81.089, "carbon_unit": "kilogram", "items": [ { "carbon_quantity": 81.089, "carbon_unit": "kilogram", "type": "flight", "methodology": "DEFRA", "external_reference": "BK-2026-0042-OUT", "distance": 928.8, "distance_unit": "kilometer" } ] } ``` > **Calculations are stateless** > SQUAKE returns no ID for a calculation. Store the carbon quantity and unit you want to compensate later. For every activity type and methodology, see the [calculation guides](/docs/calculations). ## Define a product to use for emission compensation [#define-a-product-to-use-for-emission-compensation] > **Optional** > SQUAKE can set up a default product for your account, which is used when you don't choose one. A product contributes to one or several certified climate projects. SQUAKE offers products for predefined categories, and can assemble a custom product for you: contact SQUAKE sales for that. To choose from the products available to you, list them and note the `id` of the one you want, such as `product_2rsg35sfsdf`: ```bash curl "https://api.sandbox.squake.earth/v2/products" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` See [List products](/docs/products/list-products) for filters and the full response. ## Pricing [#pricing] Quote a price for the carbon quantity you calculated. The response holds a pricing ID that you need for the purchase. Quoting creates no obligation, so you can also use it to show a price to your customer first. ```bash curl -G "https://api.sandbox.squake.earth/v2/pricing" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --data-urlencode "product=product_2rsg35sfsdf" \ --data-urlencode "carbon_quantity=81.089" \ --data-urlencode "carbon_unit=kilogram" \ --data-urlencode "payment_method=batch_settlement" ``` Response 200 OK (application/json): ```json { "id": "eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "price": "price_1MMroL2eZvKYlo2CxbxAACvb", "product": "product_2rsg35sfsdf", "valid_until": "2026-11-24", "carbon_quantity": 81.089, "carbon_unit": "kilogram", "currency": "EUR", "total": 1216 } ``` At an illustrative 150.00 EUR per tonne, 81.089 kilograms cost 12.16 EUR. A pricing is valid for two weeks, and one pricing can back many purchases, so you can fetch one pricing per product and quantity. To quote a fixed amount of money instead of a quantity, or to calculate and price in one request, see [Quote a price](/docs/purchases/quote-pricing) and [Calculate and price in one request](/docs/purchases/calculate-with-pricing). ## Purchase [#purchase] Create the purchase with the pricing ID. Send a unique `external_reference`, such as a version 4 UUID, so that a retried request can't buy twice. This request also asks for a compensation confirmation, which SQUAKE emails to the given address: ```json { "pricing": "eyJhbGciOiJIUzI1NiJ9.eyJwIjoicHJpY2VfMU1Ncm9MMmVaIn0...", "external_reference": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "confirmation_document": { "full_name": "Example Company GmbH", "email": "sustainability@example.com", "address": { "line1": "Example Street 1", "city": "Berlin", "postal_code": "10115", "country": "DE" } } } ``` Save the request as `purchase.json` and send it: ```bash curl --request POST "https://api.sandbox.squake.earth/v2/purchases" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data @purchase.json ``` Response 201 Created (application/json): ```json { "id": "purchase_sd234asdfl23", "files": ["file_34sdfgJH9df4g35"], "payment_method": "batch_settlement", "state": "reserved", "metadata": {}, "carbon_quantity": 81.089, "carbon_unit": "kilogram", "total": 1216, "currency": "EUR", "external_reference": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "cancellable_until": "2026-11-24T10:15:00+00:00" } ``` Store the purchase `id`, or rely on your `external_reference`: both work to read the purchase later. For every request field, including certificates, see [Create a purchase](/docs/purchases/create-purchase). ## Settlement [#settlement] A purchase made through the API goes through these states: 1. `reserved`: SQUAKE registered the purchase and reserved the carbon credits. You can [cancel it](/docs/purchases/cancel-purchase) for 14 days, until `cancellable_until`. 2. `confirmed`: the cancellation period has passed. 3. `invoiced`: SQUAKE invoiced the purchase, together with your other purchases in a batch. 4. `settled`: SQUAKE received the payment. 5. `certificates_confirmed`: the project partners confirmed the certificates for the credits. 6. `certificates_retired`: the certificates were retired in their registries. Check the state with [Retrieve a purchase](/docs/purchases/retrieve-purchase), or register [webhooks](/docs/use-cases/webhooks) to be notified when documents are ready. Download the confirmation and certificates with [Retrieve a file](/docs/purchases/retrieve-file). # Fulfillment with self-checkout (/docs/use-cases/fulfillment-with-self-checkout) The SQUAKE checkout page lets your customers buy compensation themselves. SQUAKE takes the payment through Stripe and is the merchant of record. The process is similar to [Fulfillment with API](/docs/use-cases/fulfillment-with-api), but instead of creating the purchase yourself, you send your customer to the checkout page. Read that guide first. ## Steps [#steps] 1. Optionally, register an `order` webhook to hear about your customers' payments. See [Webhooks](/docs/use-cases/webhooks). 2. Optionally, calculate the emissions. See [Emission calculation](/docs/use-cases/fulfillment-with-api#emission-calculation). 3. Choose a product. See [Define a product to use for emission compensation](/docs/use-cases/fulfillment-with-api#define-a-product-to-use-for-emission-compensation). 4. Quote a price with `payment_method=stripe`. See [Quote a price](/docs/purchases/quote-pricing), or calculate and price in one request with `POST /v2/calculations-with-pricing` as described in [Calculate and price in one request](/docs/purchases/calculate-with-pricing). 5. Take the `payment_link` from the response. SQUAKE only returns it when the payment method is `stripe`. 6. Send your customer to the link. 7. Your customer pays on the checkout page. 8. SQUAKE settles the payment and sends an `order` webhook to your endpoint, if you registered one. ## Request a payment link [#request-a-payment-link] ```bash curl -G "https://api.sandbox.squake.earth/v2/pricing" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --data-urlencode "product=product_2rsg35sfsdf" \ --data-urlencode "carbon_quantity=0.123" \ --data-urlencode "carbon_unit=tonne" \ --data-urlencode "payment_method=stripe" \ --data-urlencode "payment_link_return_url=https://www.example.com/thank-you" ``` The response holds the `payment_link` next to the price. See [Payment links](/docs/purchases/quote-pricing#payment-links) for an example. ## Adjust the checkout page [#adjust-the-checkout-page] - Set `payment_link_return_url` in the pricing request. After a successful payment, the checkout page sends your customer there, if they're still in the browser. - Append `locale` to the `payment_link` to set the language of the checkout page, such as `&locale=de`. Use a two-letter ISO 639-1 code. - Append `utm_*` parameters, such as `&utm_medium=email`, for your tracking. - Append `external_reference` with your own ID for the purchase. SQUAKE sends it back in the `order` webhook, so you can match the payment to your booking. A payment link works for repeated purchases, so you can show the same link to every customer while the pricing is valid. ## Purchase states [#purchase-states] A purchase made on the checkout page starts as `payment_initiated` when your customer enters the payment flow. It becomes `settled` after a successful payment, or `payment_aborted` if the payment fails for good, for example because the customer leaves and doesn't come back before the pricing expires. See [Purchase states](/docs/purchases#purchase-states). # Use cases (/docs/use-cases) These guides combine several endpoints into a complete integration. | Guide | What you build | | --- | --- | | [Fulfillment with API](/docs/use-cases/fulfillment-with-api) | Calculate emissions, quote a price and buy credits through the API, with SQUAKE invoicing you in batches. | | [Fulfillment with self-checkout](/docs/use-cases/fulfillment-with-self-checkout) | Send your customers to the SQUAKE checkout page, where they pay for their compensation themselves. | | [Webhooks](/docs/use-cases/webhooks) | Receive and verify notifications about checkout payments and ready documents. | | [Webhook API reference](/docs/use-cases/webhooks-api-reference) | Register, list, update and delete the webhooks SQUAKE sends to. | # Webhook API reference (/docs/use-cases/webhooks-api-reference) Manage the webhooks SQUAKE sends events to. For the events themselves and how to verify them, see [Webhooks](/docs/use-cases/webhooks). All endpoints authenticate with your API key as a Bearer token. ## The webhook object [#the-webhook-object] | Field | Type | Description | | --- | --- | --- | | `id` | string (UUID) | The ID of the webhook. | | `kind` | string | The event kind: `order`, `confirmation_document_available` or `certificate_document_available`. | | `endpoint_url` | string | The URL SQUAKE sends the events to. | | `last_sent_at` | string (date-time) \| null | The latest successful delivery, or `null` if there was none yet. | | `last_failed_at` | string (date-time) \| null | The latest failed delivery, or `null` if none failed. | | `failed_attempts` | integer | The number of consecutive failed deliveries. | | `signing_key` | string | The key to verify signatures with. Only returned when you register the webhook. | ## Register a webhook [#register-a-webhook] `POST /v2/webhooks` - `kind` (string, required): The event kind: `order`, `confirmation_document_available` or `certificate_document_available`. - `endpoint_url` (string, required): The URL SQUAKE sends the events to. Use an HTTPS URL that accepts `POST` requests. ```bash curl --request POST "https://api.sandbox.squake.earth/v2/webhooks" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "kind": "order", "endpoint_url": "https://www.example.com/squake/webhooks" }' ``` Response 201 Created (application/json): ```json { "id": "5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18", "kind": "order", "endpoint_url": "https://www.example.com/squake/webhooks", "last_sent_at": null, "last_failed_at": null, "failed_attempts": 0, "signing_key": "YOUR_SIGNING_KEY" } ``` > **Store the signing key now** > SQUAKE returns `signing_key` only in this response and can't show it again. Store it securely: you need it to verify every webhook. If you lose it, delete the webhook and register a new one. A request with an invalid `kind` or `endpoint_url` fails with `422`. ## List webhooks [#list-webhooks] `GET /v2/webhooks` ```bash curl "https://api.sandbox.squake.earth/v2/webhooks" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` Response 200 OK (application/json): ```json [ { "id": "5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18", "kind": "order", "endpoint_url": "https://www.example.com/squake/webhooks", "last_sent_at": "2026-11-09T16:42:07Z", "last_failed_at": null, "failed_attempts": 0 }, { "id": "c41d8a6e-92b7-4f05-b3e8-6a1f2d9c7e50", "kind": "certificate_document_available", "endpoint_url": "https://www.example.com/squake/documents", "last_sent_at": "2026-11-08T09:15:33Z", "last_failed_at": "2026-11-02T11:20:45Z", "failed_attempts": 0 } ] ``` ## Retrieve a webhook [#retrieve-a-webhook] `GET /v2/webhooks/{id}` ```bash curl "https://api.sandbox.squake.earth/v2/webhooks/5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` Response 200 OK (application/json): ```json { "id": "5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18", "kind": "order", "endpoint_url": "https://www.example.com/squake/webhooks", "last_sent_at": "2026-11-09T16:42:07Z", "last_failed_at": null, "failed_attempts": 0 } ``` ## Update a webhook [#update-a-webhook] `PUT /v2/webhooks/{id}` Takes the same fields as registering a webhook and returns the updated webhook. - `kind` (string): The event kind: `order`, `confirmation_document_available` or `certificate_document_available`. - `endpoint_url` (string): The URL SQUAKE sends the events to. ```bash curl --request PUT "https://api.sandbox.squake.earth/v2/webhooks/5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18" \ --header "Authorization: Bearer $SQUAKE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "endpoint_url": "https://www.example.com/squake/new-webhooks" }' ``` Response 200 OK (application/json): ```json { "id": "5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18", "kind": "order", "endpoint_url": "https://www.example.com/squake/new-webhooks", "last_sent_at": "2026-11-09T16:42:07Z", "last_failed_at": null, "failed_attempts": 0 } ``` ## Delete a webhook [#delete-a-webhook] `DELETE /v2/webhooks/{id}` ```bash curl --request DELETE "https://api.sandbox.squake.earth/v2/webhooks/5b7e9c2a-3f14-4d6b-8a21-0c9e7f4b2d18" \ --header "Authorization: Bearer $SQUAKE_API_KEY" ``` A successful delete returns `204 No Content` with an empty body. ## Errors [#errors] | Status | Meaning | | --- | --- | | `403` | The request is forbidden for your account. | | `404` | The webhook doesn't exist or belongs to another client. | | `422` | The `kind` or `endpoint_url` is invalid. | ## Related [#related] - [Webhooks](/docs/use-cases/webhooks) - [Register New Webhook](/reference/squake/webhooks/post-v2-webhooks) in the API reference # Webhooks (/docs/use-cases/webhooks) Webhooks are HTTP callbacks. When something happens in SQUAKE, SQUAKE sends a `POST` request with the details to your endpoint, so you don't have to poll the API. ## Webhook kinds [#webhook-kinds] | Kind | When SQUAKE sends it | Payload | | --- | --- | --- | | `order` | The payment status of a purchase made on the checkout page changes. | The purchase ID, your `external_reference` and the payment status. | | `confirmation_document_available` | A compensation confirmation is ready to download. | The file. | | `certificate_document_available` | A compensation certificate is ready to download. | The file. | Register one webhook for each kind you want to receive. A client can register several webhooks. See [Webhook API reference](/docs/use-cases/webhooks-api-reference). ## Verify incoming webhooks [#verify-incoming-webhooks] Each webhook request carries two headers: - `SQUAKE-Signature`: the HMAC-SHA256 signature of the raw request body, as a hexadecimal string, computed with the signing key of your webhook. - `SQUAKE-Timestamp`: when SQUAKE sent the webhook, as an ISO 8601 timestamp. Rack-based frameworks such as Rails expose them as `HTTP_SQUAKE_SIGNATURE` and `HTTP_SQUAKE_TIMESTAMP`. The signing key is only returned when you register the webhook. To verify a webhook: 1. Read the raw request body as a string, before you parse the JSON. 2. Compute the HMAC-SHA256 hex digest of the body with your signing key. 3. Compare it with the `SQUAKE-Signature` header, using a constant-time comparison. ```ruby title="Ruby" payload = request.raw_post # the raw request body signature = OpenSSL::HMAC.hexdigest('SHA256', SIGNING_KEY, payload) valid = ActiveSupport::SecurityUtils.secure_compare(signature, request.headers['HTTP_SQUAKE_SIGNATURE']) ``` ```js title="Node.js" import crypto from 'node:crypto'; // rawBody: the request body as a Buffer, before JSON parsing const signature = crypto.createHmac('sha256', SIGNING_KEY).update(rawBody).digest('hex'); const received = request.headers['squake-signature'] ?? ''; const valid = signature.length === received.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(received)); ``` ```python title="Python" import hashlib import hmac # raw_body: the request body as bytes, before JSON parsing signature = hmac.new(SIGNING_KEY.encode(), raw_body, hashlib.sha256).hexdigest() valid = hmac.compare_digest(signature, request.headers.get("SQUAKE-Signature", "")) ``` > **Webhooks registered before July 1, 2025** > Webhooks registered before July 1, 2025 keep the earlier format. Their payload is wrapped in a `data` key, and the signature covers only the content of `data`. See [Webhook updates](/changelog/webhook-updates). ## Order [#order] Kind: `order` SQUAKE sends an `order` webhook when a payment on the checkout page completes, fails, is canceled or is refunded. It only covers purchases made with the payment method `stripe`, through a `payment_link` from `GET /v2/pricing`. To recognize the purchase when the webhook arrives, append your own `external_reference` to the payment link before you send your customer there: ```text &external_reference=YOUR_EXTERNAL_REFERENCE ``` SQUAKE sends the reference back in the payload: ```json { "external_reference": "YOUR_EXTERNAL_REFERENCE", "purchase_id": "purchase_123456", "payment_status": "succeeded" } ``` `payment_status` takes these values: | Value | Meaning | | --- | --- | | `complete` | The payment was completed. | | `canceled` | The payment was canceled. | | `failed` | The payment failed. | | `succeeded` | The payment succeeded. | | `refunded` | The payment was refunded. | | `settled` | SQUAKE received the payment. | ## Confirmation document available [#confirmation-document-available] Kind: `confirmation_document_available` Sent when a compensation confirmation is ready to download. The payload is the file: ```json { "id": "file_XXX-XXX-XXX-XXX-XXX", "filename": "SQUAKE-CompensationConfirmation-euc1XXX.pdf", "purpose": "confirmation_document", "size": 100, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/...." } ``` ## Certificate document available [#certificate-document-available] Kind: `certificate_document_available` Sent when a compensation certificate is ready to download. The payload is the file: ```json { "id": "file_XXX-XXX-XXX-XXX-XXX", "filename": "SQUAKE-CompensationCertificate-project_XXX-euc1XXX.pdf", "purpose": "certificate_document", "size": 100, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/...." } ``` The `download_url` expires after one year. To read the file again later, use [Retrieve a file](/docs/purchases/retrieve-file). ## Delivery status [#delivery-status] Each webhook records its deliveries. `last_sent_at` is the latest successful delivery, `last_failed_at` the latest failed one, and `failed_attempts` counts the consecutive failures. Read them with [Retrieve a webhook](/docs/use-cases/webhooks-api-reference#retrieve-a-webhook). # API changelog (/changelog/api) ## 2026-11-02: Optional sustainability labels on hotel travel data Type: Added Endpoints: `POST /v2/travel-data` Hotel activities accept the sustainability labels or certifications the hotel holds. The field is optional, so existing integrations need no change. See [Create travel data items](/docs/travel-data/create-travel-data-items). - Added: `trips[].activities[hotel].eco_labels`, an array of strings such as `["eu_ecolabel", "green_key"]`. SQUAKE trims each label and drops blank and duplicate entries. ## 2026-10-20: Green Travel Pledge is now Green Travel Data Type: Added, Deprecated Endpoints: `POST /v2/calculations`, `POST /v2/calculations-with-pricing`, `POST /v2/travel-data` The Rail Delivery Group renamed the train methodology. Send `GREEN-TRAVEL-DATA` from now on. `GREEN-TRAVEL-PLEDGE` is still accepted and calculates the same way. See [Green Travel Pledge Is Now Green Travel Data](/changelog/calculation-changes/train-green-travel-data) for details. - Added: `items[train].methodology` value `GREEN-TRAVEL-DATA` - Deprecated: `items[train].methodology` value `GREEN-TRAVEL-PLEDGE`, still accepted - Changed: `items[train].origin` and `destination` must be CRS codes of GB National Rail stations, such as `KGX` - Changed: Error code `green_travel_pledge_emission_not_found` is now `green_travel_data_emission_not_found` ## 2026-10-20: One status vocabulary for travel data trips Type: Changed Endpoints: `POST /v2/travel-data`, `GET /v2/travel-data/trips`, `GET /v2/travel-data/trips/{id}` Trip `status` is no longer echoed as sent. SQUAKE maps whatever wording the source uses onto five values, and the trip's dates decide the value where they can. - Changed: `status` in responses is one of `planned`, `confirmed`, `in_progress`, `completed`, `canceled` or `null` - Changed: `status` in requests is still free text, mapped on ingestion; common wordings such as `booked` and `cancelled` are recognised ## 2026-09-04: Invitations endpoints Type: Added Endpoints: `POST /v2/invitations`, `GET /v2/invitations/{id}` Invite users to one of your sub-clients and read an invitation back. Re-inviting the same email address for the same sub-client is safe and sends the email again. - Added: `POST /v2/invitations` and `GET /v2/invitations/{id}` - Added: Error code `client_not_invitable` (`403`) when `client_id` isn't one of your sub-clients ## 2026-09-02: REM commuter and urban rail train types Type: Added Endpoints: `POST /v2/calculations`, `POST /v2/calculations-with-pricing` Two new train types for the REM methodology. Existing train types are unchanged. - Added: `items[train].train_type` values `commuter` and `urban_rail` ## 2026-08-27: Flight schema no longer declares a discriminator Type: Changed Endpoints: `POST /v2/calculations`, `POST /v2/calculations-with-pricing` The API accepts the same flight payloads as before. Only the OpenAPI description changed: clients generated from it may change shape, so regenerate typed clients and check how they handle flight items. - Removed: `Flight` schema: the `methodology` discriminator # Accommodation - 2024 Updates (/changelog/calculation-changes/accommodation-august-2024) The research team at SQUAKE has integrated several new data sources and findings into its methodology for calculating carbon emissions in vacation rentals: 1. **Electricity Data**: Updated information on carbon intensity and electricity generation per capita has been incorporated. These updates were sourced from the [Our World in Data platform](https://ourworldindata.org/grapher/carbon-intensity-electricity?time=latest), focusing on the latest insights into carbon intensity of electricity generation and per capita electricity production. 2. **Water Data**: New data concerning water usage has been obtained from [Worldometer](https://www.worldometers.info/water/), with updated emission factors derived from recent research, specifically the *[Operational carbon footprint of the U.S. water and wastewater sector’s energy consumption](https://www.sciencedirect.com/science/article/pii/S0959652621030110)* study published in the *Journal of Cleaner Production*. 3. **Heating Factors**: The methodology now includes recently published data on heating consumption per square meter in households, provided by the [Odyssee-Mure Project](https://www.odyssee-mure.eu/publications/efficiency-by-sector/households/heating-consumption-per-m2.html). This inclusion enhances the accuracy of heating-related carbon emission calculations. 4. **Housing Size - Square Meters**: Recent data on average housing sizes by country has been incorporated, sourced from the [World Population Review](https://worldpopulationreview.com/country-rankings/house-size-by-country). This data provides more precise inputs for calculating carbon emissions based on accommodation area. 5. **Household Size - Number of People**: The [Global Data Lab](https://globaldatalab.org/areadata/table/hhsize/) latest findings on average household sizes have been added to the methodology. This ensures that carbon emission estimates more accurately reflect real-world conditions by accounting for variations in the number of occupants in vacation rentals. # BASE-EMPREINTE - Flights & Trains (2025) (/changelog/calculation-changes/base-empreinte-live-2025) The **BASE-EMPREINTE methodology** for flights and trains is now live in the SQUAKE API, based on the latest ADEME datasets. ### **Key Features** [#key-features] - **Flights & Trains Emission Factors**: Uses ADEME’s **2025 Base Empreinte** environmental impact data. - **Granular Methodology**: Factors in aircraft performance, fuel consumption, and train energy mix. - **Compliance Ready**: Aligns with ADEME’s **Base Carbone Methodological Guide (2024)**. Users can now retrieve BASE-EMPREINTE-compliant emissions data with the API. ### **Sources** [#sources] - ADEME (2025). [Base Empreinte - Données d’impacts environnementaux](https://base-empreinte.ademe.fr/) - ADEME (2024). [Base Carbone Methodological Guide](https://base-empreinte.ademe.fr/) - ADEME (2023). Documentation on aviation emission factors. - Eurocontrol (2022). Aircraft performance and fuel consumption statistics. # Bus: SQUAKE - September 2024 Update (/changelog/calculation-changes/bus-operator-specific-september-2024) The SQUAKE bus methodology is now live, with emission factors for various fuel types and operators. ## What's New? [#whats-new] ### Supported Fuel Types [#supported-fuel-types] - LNG - Diesel - LPG - PHEV (Plug-in Hybrid Electric Vehicle) - Hydrogen - Electricity - Average ### Operators [#operators] - [Greyhound Lines](https://www.firstgroupplc.com/~/media/Files/F/Firstgroup-Plc/Responsibilty%20Reports/environmental-data-report-20200826.pdf) - [Metrobus](https://www.co2everything.com/co2e-of/bus-travel) - [Halifax Transit](https://www.co2everything.com/co2e-of/bus-travel) - [OC Transpo](https://canadiancor.com/public-transit-in-ottawa-kilometres-and-litres/) - [Brussels Intercommunal Transport Company (STIB)](https://www.stib-mivb.be/article.html?_guid=008a3561-2ac1-3410-22bc-d575f8441615&l=en) - [Metropolitan Atlanta Rapid Transit Authority (MARTA)](https://www.itsmarta.com/uploadedFiles/More/About_MARTA/MARTA%20Sustainability%20Report%20120519%20Digital.pdf) - [New Jersey Transit Corporation](https://www.njtransit.com/press-releases/nj-transit-move-earth-day) - [St. Lawrence County Public Transit](https://reason.org/commentary/does-bus-transit-reduce-greenhouse/) - [Southeastern Pennsylvania Transportation Authority (SEPTA)](https://planning.septa.org/wp-content/uploads/2021/02/SEPTA-Forward_StrategicPlan2021-2026.pdf) - [Research Triangle Regional Public Transportation Authority](https://www.transit.dot.gov/sites/fta.dot.gov/files/docs/PublicTransportationsRoleInRespondingToClimateChange2010.pdf) - [Jefferson Lines](https://www.jeffersonlines.com/is-bus-travel-better-for-the-environment/) - [Megabus](https://uk.megabus.com/be-greener-as-you-go) - [Trans-Bridge Lines](https://transbridgelines.com/wp-content/uploads/2022/08/Commuter-August_22.pdf) - [Citybus](https://www.co2everything.com/co2e-of/bus-travel) - [RapidKL](https://jit.sirim.my/Volume/Volume%2023%20No.1%202015/operational_carbon_footprint_of_light_rail_transit_service_in_the_greater_kl_klang_valley_metropolis0.pdf) - [SMRT Corporation](https://www.smrt.com.sg/Portals/0/InvestorRelations/Annual%20Report/2016/SMRT%20Sustainability%20Report%202016_LR.pdf) - [Greyhound Australia](https://www.greyhound.com.au/company/travel-green) - [Busabout Sydney](https://www.busabout.com/sustainable-tourism) - [TFGM Metrolink](https://tfgm.com/public-transport/tram/metrolink-and-the-enviroment) - [Telfords Bus & Coach](https://www.transport.gov.scot/publication/scottish-transport-statistics-no-33-2014-edition/j357783-16/) - [State Transit Authority of New South Wales](https://www.linkedin.com/pulse/greenhouse-emissions-from-travel-sydney-leon-arundell/?trk=articles_directory) - [Transdev NSW](https://www.linkedin.com/pulse/greenhouse-emissions-from-travel-sydney-leon-arundell/?trk=articles_directory) - [Transit Systems NSW](https://www.linkedin.com/pulse/greenhouse-emissions-from-travel-sydney-leon-arundell/?trk=articles_directory) - [New England Coaches](http://www.busandcoach.travel/download/factsheets/factsheet_green_en.pdf) - [Brisbane Bus Lines](https://australasiantransportresearchforum.org.au/wp-content/uploads/2022/03/ATRF2018_paper_58.pdf) - [Bus Queensland](https://chartingtransport.com/category/greenhouse-gas-emissions/) - [Moreland Bus Lines](https://www.irishtimes.com/life-and-style/motors/surprise-carbon-offenders-1.765821) - [InterCity](https://www.itf-oecd.org/sites/default/files/docs/dp200928.pdf) - [FlixBus](https://corporate.flixbus.com/de/investition-in-unseren-planeten-flix-treibt-die-mobilitaets-revolution-voran/#:~:text=Die%20CO2%2DEmissionen%20sprechen%20f%C3%BCr,sogar%20etwa%20zehnmal%20so%20gro%C3%9F) - [Hamburger Hochbahn](https://www.hochbahn.de/resource/blob/17266/c3fad06b81a2698a363b4127a90ea0b2/gri-englisch-data.pdf) - [Bus Éireann](https://www.buseireann.ie/pdf/1621430203-Sustainability.pdf) - [Dublin Bus](https://www.irishtimes.com/life-and-style/motors/surprise-carbon-offenders-1.765821) - [ATAC](https://www.polisnetwork.eu/wp-content/uploads/2019/06/new_mobility_requirements_in_rome.pdf) - [BVB](https://www.sustainable-bus.com/news/gvb-amsterdam-zero-emission-transport-2025-44-vdl/) - [Qbuzz](https://assured-project.eu/storage/files/4-qbuzz-assured-uitp.pdf) - [National Express](https://www.nationalexpress.com/en/environment) - [Stagecoach Group](https://www.stagecoachbus.com/news/south-west/2021/april/3-reasons-why-buses-are-better-for-the-environment) - [Boreal Norge](https://www.mdpi.com/1996-1073/14/3/770) - [Nobina Norge](https://www.mdpi.com/1996-1073/14/3/770) - [Tide ASA](https://www.mdpi.com/1996-1073/14/3/770) - [Torghatten Buss](https://www.mdpi.com/1996-1073/14/3/770) - [Vy Express](https://www.vy.no/en/the-vy-group/sustainability-and-social-responsibility) - [Vy Buss](https://www.vy.no/en/the-vy-group/sustainability-and-social-responsibility) Stay tuned for future updates as more operators and regions become part of the SQUAKE methodology! # Car: DEFRA - 2024 (/changelog/calculation-changes/car-defra-2024) In 2024, the DEFRA methodology for carbon emission calculations from passenger vehicles has been updated to align with the latest Greenhouse Gas (GHG) reporting conversion factors. These updates focus on direct emissions from vehicles, covering both Scope 1 and Scope 3 emissions from petrol, diesel, and electric vehicles. The updated conversion factors ensure businesses can accurately report their land transport-related emissions for compliance and sustainability reporting. ## **Summary of Key Updates** [#summary-of-key-updates] The key updates for passenger vehicles in 2024 include: - **PHEV Utility Factors:** The 2024 update introduces revised utility factors for plug-in hybrid electric vehicles (PHEVs) to better reflect real-world emissions data. The proportion of distance traveled in electric mode has been decreased, accounting for the actual battery usage and increased fuel consumption in real-world driving. - **Electric Vehicles:** The update also includes more accurate conversion factors for electric vehicles (EVs), reflecting the electricity consumed (Scope 2) as well as transmission and distribution losses and well-to-tank (WTT) emissions (Scope 3) associated with it. - **Passenger Vehicles Data:** Conversion factors for petrol and diesel vehicles continue to incorporate real-world performance uplifts based on driving conditions and regulatory test cycles, particularly transitioning from the New European Driving Cycle (NEDC) to the Worldwide Harmonized Light Vehicle Test Procedure (WLTP). ## **Key Methodological Considerations** [#key-methodological-considerations] - **Real-World Driving Adjustments:** The update applies uplifts to account for differences between regulatory test emissions and real-world vehicle performance. These adjustments are based on studies conducted by the **International Council on Clean Transportation (ICCT)** and other UK-based sources. - **Segmented Emission Factors:** Conversion factors have been segmented by vehicle type (for example petrol, diesel and PHEV) and engine size, ensuring a granular approach to emission calculations. - **Hybrid and Electric Vehicles:** For hybrid and electric vehicles, real-world utility factors and electric range data have been revised to more accurately reflect emissions from electric and hybrid operations. For full details on the 2024 GHG conversion factors for passenger vehicles, visit the [UK Government website](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024). ### **Bibliography** [#bibliography] - *Greenhouse Gas Reporting: Conversion Factors 2024*, UK Government. Retrieved from [https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024) - *ICCT Real-World Emissions Study* (2017). International Council on Clean Transportation. # Train: Energy Scope Support for CO2 Emissiefactoren (/changelog/calculation-changes/co2-emissiefactoren-energy-scope) We’re expanding our methodology support for train emissions. From now on, energy scope differentiation is available for train calculations based on the **CO2 Emissiefactoren** framework. ## What's New? [#whats-new] ### Added Scope Support [#added-scope-support] For all train emission calculations using the CO2 Emissiefactoren methodology, you can now choose between: - **TTW (Tank-to-Wheel):** Emissions from vehicle operation only. - **WTW (Well-to-Wheel):** Well-to-tank plus tank-to-wheel emissions, covering energy production and transmission as well as final use. This enhancement allows for: - More accurate reporting aligned with customer expectations and regulatory demands. - Greater control in distinguishing between operational vs upstream emissions in carbon reporting. To select the energy scope in a request, see [Train: CO2 Emissiefactoren](/docs/calculations/travel/train/train-co2-emissiefactoren). # Bus & Train: DEFRA - 2024 (/changelog/calculation-changes/defra-live-2024) The **DEFRA 2024 methodology** for bus and train carbon emissions is now live in the SQUAKE API. It includes: - **Updated emission factors** for local buses (London/non-London), coaches, and train services. - **Energy scopes**: Supports **Tank-to-Wheel (TTW)** and **Well-to-Wheel (WTW, default)** emissions. - **Granular classification**: Differentiates transport modes for improved accuracy. Users can now retrieve DEFRA-compliant emissions data for **both buses and trains** via the API. For details, see [UK Government GHG factors](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024). # Flight: DEFRA - July 2024 Update (/changelog/calculation-changes/flight-defra-july-2024) DEFRA has updated the emission factors for greenhouse gas conversion. You can access the updated methodology here: [2024 Greenhouse Gas Conversion Factors Methodology](https://assets.publishing.service.gov.uk/media/668408e6a59289f59b840597/2024-greenhouse-gas-conversion-factors-methodology.pdf). Here is [Conversion factors 2024: full set (for advanced users)](https://assets.publishing.service.gov.uk/media/668408512a468a64f5dde5ea/ghg-conversion-factors-2024_full_set__for_advanced_users_.xlsx). ## What's New? [#whats-new] ### Flight Classifications [#flight-classifications] DEFRA classifies flights as follows: - **Domestic**: Both origin and destination are in the UK. - **Short-haul**: Under 3,700 km, when either origin or destination is in the UK. - **Long-haul**: Above 3,700 km, when either origin or destination is in the UK. - **International**: Neither origin nor destination is in the UK (DEFRA's "International, to/from non-UK" factors). ### Updated Logic [#updated-logic] All other aspects of the logic remain the same as in previous versions. ### Updated Factors [#updated-factors] - DEFRA kept the air travel emission factors of the 2023 set unchanged in 2024. - DEFRA scheduled the next update of the air travel factors for 2025. # Flight: GATE4 Methodology Is Now Available (/changelog/calculation-changes/flight-gate4-august-2024) ## Accurately Measure Your Travel Emissions with GATE4 [#accurately-measure-your-travel-emissions-with-gate4] GATE4 is an ISO 14000 series-certified carbon emissions calculation methodology specifically designed for business travel. ### Key Benefits of GATE4 [#key-benefits-of-gate4] - **Avoid Inaccurate Emissions Reporting:** GATE4 is recognized for yielding precise reporting in the industry, giving your organization confidence in its sustainability data. - **Support Sustainable Travel Decisions:** GATE4 empowers travelers and organizations to make informed choices that align with their sustainability goals. - **Gain Visibility into Travel Contributions:** With GATE4, you can gain a clear understanding of how travel impacts your organization’s overall sustainability objectives, helping you track progress and identify areas for improvement. ### Set Science-Based Sustainability Targets [#set-science-based-sustainability-targets] GATE4 enables organizations to set and achieve science-based sustainability targets. With its ISO 14000 series certification, GATE4's emissions data can be included in annual financial reporting as recognized carbon calculations. This ensures that organizations not only meet their sustainability goals but also unlock potential cost savings. For more information, visit the [GATE4 website](https://www.advito.com/gate4/). If you want to enable the GATE4 methodology, email your key account manager (KAM) or sales@squake.earth. # GLEC, ECTA, and CLEAN-CARGO November 2023 Update (/changelog/calculation-changes/glec-november-2023) _This loosely follows the style of [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)._ The GLEC framework regularly publishes updates that SQUAKE implements in order to stay up to date with the latest standards and keep the certification valid. The following changes are rolled out in the November 2023 update: The ECTA framework is now included in GLEC, thus the same update and certification policy as for GLEC applies. CLEAN-CARGO is yet another subset of GLEC, thus the same update and certification policy as for GLEC applies. ## Sea Freight [#sea-freight] ### Changed [#changed] * `fuel_type` now has the options `hfo`, `vlsfo`, `mdo` * `load_characteristic` is no longer considered for GLEC #### Default Values [#default-values] * `fuel_type`: "hfo" * `vessel_type`: "general_cargo_under_4999_dwt" * `energy_scope`: "wtw" ### Removed [#removed] * `load_characteristic` ### Added [#added] New `vessel_type` options * `bulk_carrier_under_9999_dwt` * `bulk_carrier_under_34999_dwt` * `bulk_carrier_under_59999_dwt` * `bulk_carrier_under_99999_dwt` * `bulk_carrier_under_199999_dwt` * `bulk_carrier_above_200000_dwt` * `chemical_tanker_under_4999_dwt` * `chemical_tanker_under_9999_dwt` * `chemical_tanker_under_19999_dwt` * `chemical_tanker_under_39999_dwt` * `chemical_tanker_above_40000_dwt` * `general_cargo_under_4999_dwt` * `general_cargo_under_9999_dwt` * `general_cargo_under_19999_dwt` * `general_cargo_above_20000_dwt` * `liquefied_gas_tanker_under_49999_dwt` * `liquefied_gas_tanker_under_99999_dwt` * `liquefied_gas_tanker_under_199999_dwt` * `liquefied_gas_tanker_above_200000_dwt` * `oil_tanker_under_4999_dwt` * `oil_tanker_under_9999_dwt` * `oil_tanker_under_19999_dwt` * `oil_tanker_under_59999_dwt` * `oil_tanker_under_79999_dwt` * `oil_tanker_under_119999_dwt` * `oil_tanker_under_199999_dwt` * `oil_tanker_above_200000_dwt` * `other_liquids_tankers_under_999_dwt` * `other_liquids_tankers_above_1000_dwt` * `ferry_ropax_under_1999_dwt` * `ferry_ropax_under_4999_dwt` * `ferry_ropax_under_9999_dwt` * `ferry_ropax_under_19999_dwt` * `ferry_ropax_above_20000_dwt` * `refrigerated_bulk_under_1999_dwt` * `refrigerated_bulk_under_5999_dwt` * `refrigerated_bulk_under_9999_dwt` * `refrigerated_bulk_above_10000_dwt` New parameter `trade_lane` added, it's only considered for methodology `CLEAN-CARGO`, the possible values are: * `panama` * `trans_atlantic` * `trans_suez` * `trans_pacific` * `other` ## Air Freight [#air-freight] ### Added [#added-1] * `average` as the new default for `GLEC` ## Road Freight [#road-freight] ### Added [#added-2] New `truck_type` options * `artic_truck_under_40_gvw_si_engine` * `rigid_truck_under_12_gvw` New `fuel_type` options * `average` * `petrol` * `lpg` * `bio-lng` No `load_characteristic` and `fuel_type` for the North American region. ### Changed [#changed-1] #### Default values [#default-values-1] * `fuel_type`: `average` * `truck_type`: `van_under_3.5_t` ## Rail Freight [#rail-freight] ### Changed [#changed-2] #### Default Values [#default-values-2] * `train_type`: "average" * `fuel_type`: "average" ### Added [#added-3] New `fuel_type`: `electricity` New values added to `train_type`: * `average` * `container_train_intermodal` * `blocktrain_rtc` * `single_wagon_train_rtc` ECTA now supports `fuel_type` and `train_type`. New values for `train_type` are only available for ECTA methodology. ## Logistics Site [#logistics-site] ### Changed [#changed-3] #### Default Values [#default-values-3] * `condition_type`: "mixed" * `logistics_site_type`: "warehouse" #### Algorithm Parameters [#algorithm-parameters] Values internally used for the computation were updated with the latest research results. ## Hotel [#hotel] ### Added [#added-4] New `hotel_type` values: * `convention_hotel` * `economy_segment_nonresort` * `extended_stay` * `integrated_resort` * `luxury_segment_nonresort` * `luxury_segment_resort` * `midscale_segment_nonresort` * `non_resort` * `nonresort` * `resort` * `rural_highway_location` * `small_metro_town_location` * `upper_midscale_segment_nonresort` * `upper_midscale_segment_resort` * `upper_upscale_segment_nonresort` * `upper_upscale_segment_resort` * `upscale_segment_nonresort` * `upscale_segment_resort` ### Changed [#changed-4] `stars` is now prioritized over `hotel_type` ## Inland Waterways [#inland-waterways] ### Added [#added-5] Available vessel types: * `motor_vessels_under_50_m` * `motor_vessels_under_80_m` * `motor_vessels_under_110_m` * `motor_vessels_135_m` * `pushed_convoy_push_boat_2_barges` * `pushed_convoy_push_boat_4_5_barges` * `pushed_convoy_push_boat_6_barges` ### Changed [#changed-5] New default vessel type is `motor_vessels_under_50_m` ### Removed [#removed-1] Available vessel types: * `motor_vessel_under_1000_t` * `motor_vessel_under_20000_t` * `motor_vessel_under_30000_t` * `push_boat_2_barges` * `push_boat_4_barges` * `push_boat_5_barges` * `push_boat_6_barges` # GLEC Framework Update: Version 3.1 (/changelog/calculation-changes/glec-v3.1) ## Summary of Framework Updates [#summary-of-framework-updates] The **GLEC Framework**, a standard for logistics emissions accounting and reporting, has been updated from **version 3** to **version 3.1**, with the new version published in **October 2024**. This update reflects refinements to emissions calculation methodologies and expands upon previous frameworks to align with evolving industry standards. ### Main Updates in Version 3.1 [#main-updates-in-version-31] 1. **Air Freight**: - Updated to include **new emission factors** for calculations. 2. **Sea Freight**: - Revised emission factors. - Discontinued support for `"ferry_ropax_under_x_dwt"`. - Introduced new vessel types: - `"ferry_ropax_under_x_gt"` - `"roro_under_x_dwt"` - `"vehicle_under_x_gt"` 3. **Inland Waterways**: - Added **new emission factors** for better accuracy. 4. **Logistics Sites**: - Incorporated **new emission factors**. 5. **Rail Freight**: - Enhanced with **new emission factors**. 6. **Sea Freight (Clean Cargo)**: - Adopted **updated emission factors** to align with Clean Cargo methodologies. 7. **Road Freight**: - Included **new emission factors**. - Introduced **China-specific emission factors** for tailored regional applications. --- ### Key Framework Details [#key-framework-details] - The GLEC Framework continues to align with the **ISO 14083** standard for greenhouse gas (GHG) emissions quantification and reporting. - It supports companies across the logistics sector in improving transparency and consistency in emissions accounting. - The framework integrates advancements in emission factors to accommodate global decarbonization efforts and industry-specific demands. For more information, refer to the **GLEC Framework v3.1 documentation**. # GLEC Framework Update: Version 3.2 (/changelog/calculation-changes/glec-v3.2-jul) ## Summary of Framework Updates [#summary-of-framework-updates] The **GLEC Framework**, a standard for logistics emissions accounting and reporting, has been updated from **version 3.1** to **version 3.2**, published by the **Smart Freight Centre** in **October 2025**. This update focuses on expanded regional emission factor coverage (notably India), a refreshed Clean Cargo sea freight dataset, and consolidated logistics site/hub terminology, while the underlying calculation methodology and category structure remain unchanged. ### Main Updates in Version 3.2 [#main-updates-in-version-32] 1. **Road Freight**: - Added **India-specific emission factors**, following the same approach as the existing China-specific data. - Updated **USA, EU, and South America** datasets with revised fuel-mix factors. - China's factors are unchanged. 2. **Rail Freight**: - Added a new `indian_average` traction factor, alongside the existing `electricity`, `diesel`, and `us_diesel` options. - No changes to API schema fields or category structure. 3. **Sea Freight (GLEC)**: - One emission factor updated (international container vessels, energy scope calculation). - No changes to vessel categories, distance tiers, or well-to-wheel multipliers. 4. **Sea Freight (Clean Cargo)**: - Refreshed 2025 datasets for average and trade-lane–specific CO₂e intensities. - Harmonized with GLEC's global sea freight dataset. 5. **Logistics Site / Logistics Hub**: - API `type` terminology now prefers `logistics_hub`; `logistics_site` remains supported for backward compatibility. 6. **Air Freight & Inland Waterways**: - No factor changes; audit trail and documentation references updated to v3.2. --- ### Key Framework Details [#key-framework-details] - All GLEC-, ECTA-, and Clean Cargo-related methodology references now point to **GLEC Framework v3.2 (October 2025)**. - The framework continues to align with the **ISO 14083** standard and the **GHG Protocol** for Scope 3 Category 4 & 9 reporting. - No changes to API schema field names for any mode. For more information, refer to the **GLEC Framework v3.2 documentation**. # Greenview Hotel Methodology Now Live & SQUAKE Retirement (/changelog/calculation-changes/greenview-july-2025) ## **Overview** [#overview] The **Greenview Hotel Footprinting Tool (HFT)** is now fully integrated and available as the preferred methodology for calculating hotel carbon emissions. This transition aligns with industry standards and brings improved accuracy and transparency, leveraging the globally recognized **Hotel Carbon Measurement Initiative (HCMI)** and **Cornell Hotel Sustainability Benchmarking Index (CHSB)** datasets. At the same time, the legacy **SQUAKE** methodology for hotel carbon calculations will be **retired on September 30, 2025**. All clients are strongly encouraged to transition their systems to use **Greenview** or **HCMI** before this date to ensure continued service and alignment with best practices. > **After September 30, 2025, the SQUAKE methodology will no longer be available for hotel carbon calculations.** --- ## **Key Highlights** [#key-highlights] ### Greenview Methodology [#greenview-methodology] - Based on **HCMI & CHSB** standards. - Updated annually, using data from ~200 countries, 450 market areas, and segmented by hotel star rating. - Aligned with ISO 14064 and trusted by over 25,000 hotels globally. - Granular, reliable, and industry-recognized data for robust reporting. ### SQUAKE Methodology Retirement [#squake-methodology-retirement] - Officially retired on **September 30, 2025**. - No longer supported in the API or reports after this date. - Must be replaced by the Greenview or HCMI methodology. For details, contact your key account manager (KAM). - Retiring SQUAKE ensures better alignment with international standards and more accurate calculations. --- ## **API Example Request** [#api-example-request] ```json { "expand": [ "items" ], "items": [ { "type": "hotel", "methodology": "GREENVIEW", "external_reference": "string", "country": "DE", "city": "Berlin", "stars": 4, "number_of_nights": 1 } ] } ``` Or equivalently, you can also use: ```json { "type": "hotel", "methodology": "HCMI", ... } ``` --- ## **Actions Required** [#actions-required] - **Review Documentation:** Familiarize yourself with the updated API docs for Greenview/HCMI. - **Update API Requests:** Replace `"methodology": "SQUAKE"` with `"methodology": "GREENVIEW"` or `"HCMI"` in your hotel-related API calls. - **Test Outputs:** Validate the updated calculations in your staging environment before the deadline. - **Transition by September 30:** Ensure all your systems, scripts, and integrations are updated before the retirement date to avoid disruptions. - **Eco-Labels (Optional):** If you require hotel sustainability certifications (eco-labels), reach out to enable the optional BeCause partnership feed. --- ## **Recommended Actions** [#recommended-actions] - Begin using Greenview/HCMI immediately to ensure a smooth transition. - Monitor your outputs for minor differences, which reflect improved data accuracy. - Inform your internal teams and update user-facing materials to remove references to SQUAKE. --- ## **Timeline** [#timeline] | Milestone | Date | |-------------------------------|---------------------| | Initial Announcement | July 2025 | | Reminder & Transition Guidance| Mid-August 2025 | | Final Notice & Call to Action | Mid-September 2025 | | SQUAKE Retirement | September 30, 2025 | --- ## **Bibliography** [#bibliography] - Greenview. *Hotel Footprinting Tool Version 2024*. Greenview Hospitality Pte. Ltd., adapted from CHSB 2024. - Ricaurte, Eric. *Hotel Sustainability Benchmarking Index 2024: Carbon, Energy, and Water*. Cornell University, 2024. - **EN ISO 14064-1:2018** — Greenhouse gases — Part 1: Specification with guidance for the quantification and reporting of greenhouse gas emissions. # Events: HCMI 2024 Methodology is Now Live (/changelog/calculation-changes/hcmi-event-2024) The **Hotel Carbon Measurement Initiative (HCMI) 2024** methodology for events is now live in SQUAKE. ## What is HCMI 2024? [#what-is-hcmi-2024] The HCMI 2024 methodology provides standardized guidance for calculating carbon emissions from hotel stays and event-related activities, ensuring alignment with industry best practices and global reporting standards. ## Source [#source] The 2024 emission factors come from the Hotel Sustainability Benchmarking Index (HSBI) 2024: [HSBI 2024 on Cornell eCommons](https://ecommons.cornell.edu/items/85eddae3-2b5b-41fb-88ad-75a0b53f8424) ## What’s Included [#whats-included] - Support for event-based carbon calculations - Updated emission factors and logic according to HCMI 2024 This update ensures your event-related carbon reporting is consistent, transparent, and compatible with the latest global guidelines. # Hotel: DEFRA - 2024 (/changelog/calculation-changes/hotel-defra-2024) In 2024, the DEFRA methodology for hotel stay carbon emission calculations has been updated, now aligned with the latest Greenhouse Gas (GHG) reporting conversion factors. These updates are essential for reporting Scope 3 emissions related to overnight hotel stays for business travel. The new conversion factors are accessible via the full UK GHG Conversion factors set, ensuring compliance with the latest sustainability metrics. ## **Summary of Key Updates** [#summary-of-key-updates] The hotel stay conversion factors for 2024 are unchanged since the 2022 GHG conversion factors were published. What to know about them: - The methodology still draws from the **Hotel Sustainability Benchmarking Index 2021** (HSBI), produced by **Cornell University** and **Greenview**. However, due to limitations in the HSBI data (which reports emissions in CO2e without specifying CH4 and N2O emissions), the conversion factors may not align with the AR5 Global Warming Potentials (GWP). - In certain countries, the hotel stay conversion factors are based on either AR4 or AR5 standards, depending on the GWP used by the reporting hotels. - All conversion factors presented in the 2024 update are in a CO2e basis and were derived from annual data submitted by international hotel organizations using the **Cornell Hotel Sustainability Benchmarking Index** (CHSB). ## **Key Methodological Considerations** [#key-methodological-considerations] - Data harmonization ensures consistency in CO2e units. - Geographic segmentation and property type classifications (for example full-service and limited-service) were applied to the datasets, with the 2022 study's focus predominantly on higher-tier branded hotels, leading to some limitations. - Future updates are expected to expand datasets to cover a wider range of countries and hotel types. For full details on the 2024 GHG conversion factors for hotel stays, visit the [UK Government website](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024). ### **Bibliography** [#bibliography] - *Greenhouse Gas Reporting: Conversion Factors 2024*, UK Government. Retrieved from [https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024](https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024) - Cornell University Center for Hospitality Research and Greenview (2021). Hotel Sustainability Benchmarking Index 2021. # Hotel: HCMI & HSBI - 2024 Updates (/changelog/calculation-changes/hotel-hcmi-2024) In 2024, significant updates were made to both the Hotel Carbon Measurement Initiative (HCMI) and the Hotel Sustainability Benchmarking Index (HSBI), incorporating the latest data and methodologies to provide more accurate benchmarks for the hospitality sector. These updates reflect the evolving landscape of sustainability reporting in the hotel industry, with a strong emphasis on carbon, energy, and water consumption metrics. ## **HCMI Updates** [#hcmi-updates] The HCMI 2024 version now integrates improved methods for calculating carbon emissions across various hotel operations, including outsourced services like laundry. The methodology has been refined to ensure more accurate per-room and per-occupied-room metrics, taking into account factors like energy source and usage patterns that vary across regions. This update aligns with global decarbonization efforts and helps hotel operators better understand their carbon footprint. ## **HSBI 2024 Updates** [#hsbi-2024-updates] The 2024 edition of the HSBI presents expanded geographic coverage, with data from over 27,000 hotels worldwide. The benchmarking data now spans 1,072 geographies, including more regions and climate zones, and is segmented by asset class, market segment, and hotel type. These updates enhance the ability of hotels to benchmark their performance against peers and make informed decisions to reduce their environmental impact. Key metrics such as energy consumption, water usage, and carbon emissions per occupied room are now presented in more granular detail, allowing for a more precise understanding of resource efficiency across different hotel categories. For a detailed breakdown of these updates, please refer to the full 2024 report available through the Cornell University Center for Hospitality Research. ### **Bibliography** [#bibliography] - Ricaurte, E., & Jagarajan, R. (2024). Hotel Sustainability Benchmarking Index 2024. Cornell University Center for Hospitality Research. Retrieved from [https://ecommons.cornell.edu/items/85eddae3-2b5b-41fb-88ad-75a0b53f8424](https://ecommons.cornell.edu/items/85eddae3-2b5b-41fb-88ad-75a0b53f8424) # Airline Code Support Update (/changelog/calculation-changes/iata-icao-airline) ## Expanded Code Support for Airlines [#expanded-code-support-for-airlines] Airline code support now accepts more code formats for identifying airlines. ### **New Code Support** [#new-code-support] In addition to the previously supported **2-letter IATA codes**, the system now supports the following formats: 1. **3-digit IATA codes**. 2. **3-letter ICAO codes**, providing additional precision for international airline identification. ### **Example** [#example] | Airline Name | 2-Letter IATA | 3-Digit IATA | 3-Letter ICAO | Country | |--------------|---------------|--------------|---------------|---------| | Lufthansa | LH | 220 | DLH | Germany | This enhancement ensures broader compatibility with industry standards and simplifies integration with systems requiring detailed airline identification. --- ### **Benefits of This Update** [#benefits-of-this-update] - **Improved Flexibility**: Enables users to work with multiple coding standards. - **Enhanced Compatibility**: Aligns with both cargo and passenger airline identification systems. - **Global Applicability**: Supports the needs of diverse international stakeholders. For detailed guidance on implementation or to report issues, please refer to the updated API documentation or contact support. # Flight: ICAO v13 - July 2024 Update (/changelog/calculation-changes/icao-v13-july-2024) ICAO has updated the ICAO Carbon Emissions Calculator Methodology. You can access the updated methodology here: [ICAO Carbon Emissions Calculator Methodology: Version 13](https://www.icao.int/sites/default/files/environmental-protection/ENVtools/SuportingMaterials/ICEC_Methodology_Passagers_v13_Final.pdf). ## What's New? [#whats-new] ### Cabin class data [#cabin-class-data] Depending on user selection for the cabin class (economy, premium economy, business, or first), and where the selected class is available, a multiplicative cabin class factor is applied to the fuel burn to adjust the CO2 (kg) per passenger. The cabin classes offered (economy, premium economy, business, and first) are based on a dataset provided by ch-aviation and determined by the available route pairs, which were approximated according to the SeatGuru database. In cases where a specific cabin class is unavailable, passenger emissions are estimated based on the available cabin classes. This estimation may result in emissions being lower or higher than the actual portion. Additionally, the average emissions for a given route may be influenced by the combination of seat configurations of airlines operating on that route. # TIM & DEFRA: Distance Changes (/changelog/calculation-changes/tim-defra-distance-nov-2024) ## **Summary of Changes** [#summary-of-changes] We have updated how SQUAKE calculates flight distances for the Travel Impact Model (TIM) and DEFRA methodologies, to enhance accuracy and better align with external recommendations. These changes impact the way Great Circle Distance (GCD) is provided and how DEFRA uplift factors are applied: ### **1. Removal of ICAO Correction in API Responses** [#1-removal-of-icao-correction-in-api-responses] Previously, SQUAKE's TIM calculations applied corrections based on ICAO guidelines to the Great Circle Distance (GCD) provided in the API response. As part of this update: - We now exclusively provide the **raw GCD** for flights. - Corrections or adjustments for specific use cases, such as flight path deviations, are no longer included in the default API output. This change simplifies the model and ensures transparency by returning the raw GCD, allowing users to apply their own adjustments as needed. ### **2. DEFRA Uplift Factor Application** [#2-defra-uplift-factor-application] For flights requiring DEFRA-compliant emissions reporting: - Previously, the GCD distance was directly used for DEFRA distance reporting. - Now, an **8% uplift factor** is applied to the GCD, in line with DEFRA's recommendation to account for indirect routing and operational inefficiencies. This adjustment aligns DEFRA results with DEFRA's guidance and enhances the accuracy of emissions reporting for users requiring DEFRA-compliant data. --- ## **Implications for Users** [#implications-for-users] - **Developers using TIM** should note that the raw GCD is now provided by default. Any additional corrections must be implemented client-side, depending on specific requirements. - **Users reporting emissions under DEFRA** will automatically benefit from the 8% uplift factor applied to GCD for more accurate and compliant reporting. For further details, please refer to the updated [TIM documentation](https://github.com/google/travel-impact-model) and [Greenhouse gas reporting: conversion factors 2024 by DEFRA](https://assets.publishing.service.gov.uk/media/66a9fe4ca3c2a28abb50da4a/2024-greenhouse-gas-conversion-factors-methodology.pdf). # TIM v1.8 (/changelog/calculation-changes/tim-v1.3) We've updated the Google TIM dataset to version 1.8, which splits emissions into well-to-tank and tank-to-wheel. With this version, `TIM` supports the new parameter `energy_scope`. Permitted values are `wtw` and `ttw`. The default value is `wtw`. # TIM Transition to Version 2.0 (/changelog/calculation-changes/tim-v2) ## **Overview** [#overview] The Travel Impact Model (TIM) is evolving to **Version 2.0**, introducing major enhancements aimed at improving the accuracy, transparency, and usability of emissions calculations for flights. This update includes key changes to methodology and data structure, ensuring better alignment with current industry standards and practices. --- ## **Key Updates in TIM 2.0** [#key-updates-in-tim-20] ### **1. Adoption of the Latest EEA Tier 3 Methodology** [#1-adoption-of-the-latest-eea-tier-3-methodology] - TIM will now use the aviation chapter of the **EMEP/EEA air pollutant emission inventory guidebook 2023** to estimate fuel burn, replacing the 2019 edition. - This change reflects the most up-to-date methodologies for emissions modeling. ### **2. Enhanced Flight Distance Accuracy** [#2-enhanced-flight-distance-accuracy] - Great Circle Distance (GCD) will remain the baseline for flight distance calculations. - A **distance correction feature** will be introduced to account for deviations due to real-world factors like air traffic and routing inefficiencies, providing more realistic emissions estimates. ### **3. Emissions Allocation for Cargo** [#3-emissions-allocation-for-cargo] - Emissions will now be apportioned between passengers and cargo, addressing the fact that many commercial flights transport both. This change ensures a more accurate representation of per-passenger emissions. ### **4. Versioning Policy and Longevity** [#4-versioning-policy-and-longevity] - TIM 2.0 introduces a clear versioning system: - **Major Versions**: Represent substantial changes to methodology or data, potentially affecting comparability with previous versions. - **Minor Versions**: Incremental updates to refine calculations or incorporate new data while maintaining consistency. - Major versions will be supported for a minimum of **24 months**, providing users ample time to transition. ### **5. Typical Flight Emissions** [#5-typical-flight-emissions] - A new methodology for calculating **Typical Flight Emissions** will replace the Market Reference Emissions dataset. This approach ensures better transparency, reproducibility, and alignment with industry practices. --- ## **Important Dates** [#important-dates] - **November 13, 2024**: Launch of Typical Flight Emissions methodology. - **December 11, 2024**: Official release of TIM 2.0. --- ## **Actions for Users** [#actions-for-users] - Ensure proper communication of TIM versions in emissions reporting for clarity and accuracy. # TIM Transition to Version 3.0.0 (/changelog/calculation-changes/tim-v3.0.0) ## **Overview** [#overview] The Travel Impact Model (TIM) evolves to **Version 3.0.0**, introducing significant functionality enhancements focused on transparency, regulatory alignment, and climate impact completeness. This version incorporates contrail warming impact estimation, supports the Flight Emissions Label (FEL) from the European Union Aviation Safety Agency (EASA), and introduces optional logistics hub emissions in line with ISO 14083. > **TIM 3.0.0 applies to future flight estimates only. Historical emissions reporting continues to use TIM 2.0.0.** --- ## **Key Updates in TIM 3.0.0** [#key-updates-in-tim-300] ### **1. Contrail Impact Buckets** [#1-contrail-impact-buckets] - New output: **`contrails_impact_bucket`** - Values: - `"NEGLIGIBLE"` (0–20% relative to fuel burn warming impact) - `"MODERATE"` (20–100%) - `"SEVERE"` (100% or more) - `"UNSPECIFIED"` (unknown impact) - Contrail impact reflects the **risk of additional climate warming from persistent contrail formation**, modeled based on historical meteorological and flight path data. - **Contrail impact is not converted to CO₂e.** It is displayed as a relative indicator and is not combined with fuel burn emissions. - **Multi-leg aggregation method:** - Negligible = 0.1 - Moderate = 0.6 - Severe = 1.2 - The aggregated contrail impact for a journey is calculated as the weighted average relative to fuel burn across flights. --- ### **2. Flight Emissions Label (FEL) Support** [#2-flight-emissions-label-fel-support] - New column: **`source`** - If **`source = "EASA"`**, the CO₂ estimate comes from the official **EASA Flight Emissions Label**, not TIM. - Additional metadata fields when FEL is used: - **`label_version`** - **`issue_date`** - **`validity_date`** - **`saf_discount_percent`** (if applicable) - FEL replaces the TIM estimate when available and is used for display and audit purposes. - A disclaimer and link must be provided: **[https://www.flightemissions.eu](https://www.flightemissions.eu)** --- ### **3. Logistics Hub (Airport) Emissions (Optional)** [#3-logistics-hub-airport-emissions-optional] - Based on **ISO 14083 recommendation**, emissions from airport facilities are now optionally included. - New parameter: **`logistics_hub`** (Boolean, default = `false`) - If **`logistics_hub = true`**, add: - **1.71 kg CO₂e per airport visited** (arrival + departure → **3.42 kg CO₂e per flight**) - This accounts for emissions from airport operations like baggage handling, terminal services, and passenger movement. --- ## **API Response Example** [#api-response-example] ```json { "carbon_quantity": 78709, "carbon_unit": "gram", "items": [ { "carbon_quantity": 78709, "carbon_unit": "gram", "external_reference": "test", "type": "flight", "methodology": "TIM", "distance": 706.0, "distance_unit": "kilometer", "algorithm_specifics": { "dataset_type": "google_tim", "contrails_impact_bucket": "MODERATE", "logistics_hub": true }, "audit_trail": { "source": "TIM", "label_version": null, "issue_date": null, "validity_date": null, "saf_discount_percent": null } } ] } ``` --- ## **API Request Additions** [#api-request-additions] - **Optional parameters:** - `"logistics_hub": true | false` (default `false`) - **Response additions:** - `contrails_impact_bucket` (in `algorithm_specifics`) - `source` (`"TIM"` or `"EASA"`) - FEL metadata if `source = "EASA"` --- ## **Default Values** [#default-values] | Parameter | Default | |-------------------|------------| | `logistics_hub` | `false` | | `source` | `"TIM"` | | `contrails_impact_bucket` | Calculated | --- ## **Best Practices** [#best-practices] - **Contrail Impact:** - Display as **"Risk of high contrail impact"** or **"Moderate contrail warming likelihood"**. - Never convert to CO₂e. - Keep separate from fuel burn in reporting. - **FEL Source:** - Always display the disclaimer and link when FEL data is used. - **Hub Emissions:** - Apply only when clients explicitly request full end-to-end emissions per ISO 14083. --- ## **Bibliography** [#bibliography] - **EN ISO 14083:2023** — Greenhouse gases — Quantification and reporting of greenhouse gas emissions from transport chain operations. - **EASA Flight Emissions Label (2024)** — [https://www.flightemissions.eu](https://www.flightemissions.eu) - **Airport Carbon Accreditation (ACA) Annual Report 2024** — Emissions values for airport facilities. - Google Travel Impact Model (TIM) Release Notes — June 2025. # Train: US EPA Methodology Now Live (/changelog/calculation-changes/train-epa-live) **What:** Train emissions via the US EPA *GHG Emission Factors Hub*. Factors in **gCO₂e/pax-km** (CO₂, CH₄, N₂O). If `methodology_version` is omitted, **latest supported year** is used. **Supported `train_type`:** `intercity_northeast_corridor`, `intercity_other_routes`, `intercity_national_average` *(default)*, `commuter_rail`, `transit_rail`. **Do now:** Use **US-EPA** for U.S. rail; add `"methodology_version"` if you need fixed-year reproducibility. **Source:** US EPA — GHG Emission Factors Hub. # Train: Green Travel Data — Now Live (/changelog/calculation-changes/train-green-travel-data-live) **What:** **Green Travel Data (GTD)**, formerly **Green Travel Pledge**, is now live in SQUAKE for GB National Rail journeys. The Rail Delivery Group renamed its dataset, and SQUAKE's train methodology now uses the new name. | | Methodology value | Status | | --- | --- | --- | | **New name** | `GREEN-TRAVEL-DATA` | Use this going forward | | **Former name** | `GREEN-TRAVEL-PLEDGE` | Still accepted and calculates the same way | Both values give the same result, so existing integrations keep working without changes. **What's included:** - Each journey is calculated with the Green Travel Data release whose timetable covers its `departure_date`, or the latest release when none does. `algorithm_specifics` in the response names the release used. - From the timetable starting 14 December 2025, every pair of GB National Rail stations is covered, whether the journey is direct or has changes. - Seat types stay the same: `first_class`, `second_class` and `average`. - Client methodology settings and reports show the methodology as `GREEN-TRAVEL-DATA`. **Do now:** Switch to `"methodology": "GREEN-TRAVEL-DATA"` and keep sending CRS station codes and `departure_date`. Send `distance_in_km` if you want a figure for station pairs a release does not cover. **More:** [Train: Green Travel Data](/docs/calculations/travel/train/train-green-travel-data) (guide) · [Train: Green Travel Pledge Is Now Green Travel Data](/changelog/calculation-changes/train-green-travel-data) (what changed in detail) # Train: Green Travel Pledge Is Now Green Travel Data (/changelog/calculation-changes/train-green-travel-data) The Rail Delivery Group renamed Green Travel Pledge to **Green Travel Data (GTD)**, and SQUAKE's methodology follows: use **`"methodology": "GREEN-TRAVEL-DATA"`**. The former name `GREEN-TRAVEL-PLEDGE` is still accepted and calculates the same way. ## What's New? [#whats-new] ### Every Station Pair, per Timetable [#every-station-pair-per-timetable] The release for the timetable starting 14 December 2025 covers every pair of GB National Rail stations, whether the journey is direct or has changes. The earlier releases covered direct journeys only. SQUAKE keeps every release and calculates each journey with the release whose timetable covers its `departure_date`, or the latest release when none does. `algorithm_specifics` in the response names the release used. ### Distance-Based Figure Only on Request [#distance-based-figure-only-on-request] When a release has no figure for a station pair, SQUAKE now multiplies RDG's GB-wide figure per passenger-kilometre by the `distance_in_km` you send. Without `distance_in_km`, the calculation fails with `green_travel_data_emission_not_found` instead of returning a figure. ### Changes to Responses and Audits [#changes-to-responses-and-audits] - `origin` and `destination` must be CRS codes of GB National Rail stations, such as `KGX`. The response no longer reports a distance derived from them; it reports `distance_in_km` when you send it. - Audits no longer store car and air comparison values (`co2_diesel_car`, `co2_plug_in_hybrid_electric_car`, `co2_battery_electric_car`, `co2_air`). - The error code `green_travel_pledge_emission_not_found` is now `green_travel_data_emission_not_found`. - Client methodology configuration and reports list the methodology as `GREEN-TRAVEL-DATA`. ## What This Means for You [#what-this-means-for-you] Switch to `"methodology": "GREEN-TRAVEL-DATA"` and keep sending CRS codes and `departure_date`. Send `distance_in_km` if you want a figure for station pairs a release does not cover. See [Train: Green Travel Data](/docs/calculations/travel/train/train-green-travel-data). # Train: Green Travel Pledge — Now Live (/changelog/calculation-changes/train-green-travel-pledge-live) **What:** The **Green Travel Pledge (GTP)** rail methodology is live in SQUAKE. It uses RDG’s Green Travel Data for **per-journey CO₂e** (with a clean fallback to per-pax-km factors). We also store comparison modes (diesel/PHEV/BEV/air) for audit; `"N/A"` means **Not Comparable**. **Seat types:** `second_class`, `first_class`, `average` (mapped to RDG `standard`, `first`, `average`). **Dataset:** Selected by `departure_date` (latest on/before that date); otherwise latest available. **Do now:** Start using `methodology: "GREEN-TRAVEL-PLEDGE"` for GB rail. Keep passing `departure_date` for deterministic datasets. # Train: REM methodology v2.4 — documentation & API alignment (/changelog/calculation-changes/train-rem-v2-4) **What:** The **REM** (Rail Emissions Model) train methodology is documented as the primary rail integration path. **`methodology: "REM"`** replaces **`"SQUAKE"`** in examples (legacy alias still accepted). Integration docs and OpenAPI train schemas now include **`departure_date`** (ISO `YYYY-MM-DD`), **`origin_country`** / **`destination_country`** (ISO 3166-1 alpha-2), **`energy_scope`** (`wtw` / `ttw`), optional **`route_coords`** for border-aware distance, and the **tiered factor resolver** (Tier 1 → Tier 3 → Tier 4 → Tier 5; Tier 2 is not used in production). **Do now:** Use [Train: REM](/docs/calculations/travel/train/train-rem) for field definitions and request shapes; prefer **`REM`** in new integrations. **Reference:** The methodology description follows REM v2.4. See the [REM whitepaper](https://www.squake.earth/resources/rail-emission-model-whitepaper). # Train: REM v2.7 Update (/changelog/calculation-changes/train-rem-v2-7) We’ve updated SQUAKE’s Rail Emissions Model (REM) to **version 2.7**. This release refreshes and expands the verified rail emission factor dataset across all five REM tiers, updates train-type and detour-factor coverage, and improves consistency across REM calculations. ## What's New? [#whats-new] ### Updated Tier 1–5 Emission Factors [#updated-tier-15-emission-factors] REM v2.7 introduces updated and re-validated emission factors across **Tier 1 through Tier 5**, including refreshed operator-specific, country- and service-specific, and fallback values. The dataset also expands validated operator and country coverage. As a result, the most specific factor resolved for a rail journey may differ from the previous REM version. ### Expanded Train-Type Coverage [#expanded-train-type-coverage] REM now supports the expanded set of canonical train types available in the latest dataset, including categories such as `commuter` and `urban_rail` where applicable. This allows REM to use more specific factors when they are available instead of falling back solely because a train type was not previously supported. ### Updated Detour Factors [#updated-detour-factors] Detour factors used to estimate rail-route distance have been updated and expanded. These factors are applied only when SQUAKE needs to estimate rail-route distance from straight-line origin/destination distance. They are not applied when an actual rail-route distance or passenger-kilometer value is already available. Because of this update, calculations where the rail distance needs to be estimated may change compared with earlier REM versions. ### Tier 2 Joins the Fallback Order [#tier-2-joins-the-fallback-order] The REM fallback hierarchy is now: **Tier 1 → Tier 2 → Tier 3 → Tier 4 → Tier 5** REM v2.4 skipped Tier 2 in production. With v2.7, Tier 2 factors, the operator-reported energy mixes, are part of the resolution. REM continues to use the most specific verified factor available for the provided journey data. It does not create a synthetic `average` factor from a specific train or service type when a verified average is unavailable. Tier 4 remains country-specific, while Tier 5 continues to provide the global fallback. ## What This Means for You [#what-this-means-for-you] No change is required to existing integrations that use REM, including those that still send its legacy alias `SQUAKE`. However, recalculating the same rail journey with REM v2.7 may produce a different result where: - an emission factor has been updated or corrected; - new operator or country coverage, or the new Tier 2, provides a more specific factor; - expanded train-type coverage changes factor resolution; or - an updated detour factor is used to estimate rail-route distance. For more information about the Rail Emissions Model, see the [SQUAKE Rail Emissions Model whitepaper](https://www.squake.earth/resources/rail-emission-model-whitepaper). # Train: SQUAKE - Expanded Emission Factor Update (/changelog/calculation-changes/train-squake-april-2025) > **Update:** The train methodology name is now **REM** (`methodology: "REM"`). **`SQUAKE`** remains a supported legacy alias. See [Train: REM](/docs/calculations/travel/train/train-rem). We’ve released a comprehensive update to emission factors for numerous train operators already supported in the SQUAKE methodology. These updates reflect the latest available data and aim to enhance accuracy and alignment with official operator disclosures and datasets. ## What's New? [#whats-new] ### Updated Emission Factors [#updated-emission-factors] The following train operators had their emission factors revised to reflect new data: - Deutsche Bahn (DB) - SBB - SJ - NS International - Renfe - Trenitalia - National Express - Thalys - Stansted Express - Transport Scotland Limited - Westbahn - TGV (France and Italy) - Eurostar - ÖBB - Merseyrail - and many more... These updates make train emissions reporting more precise and the sustainability data you provide more accurate. # Train: SQUAKE - August 2024 Update (/changelog/calculation-changes/train-squake-august-2024) > **Update:** The train methodology name is now **REM** (`methodology: "REM"`). **`SQUAKE`** remains a supported legacy alias. See [Train: REM](/docs/calculations/travel/train/train-rem). Vy emission factors are now available in the SQUAKE train methodology. ## What's New? [#whats-new] ### Updated Factors [#updated-factors] - [SBB](https://reporting.sbb.ch/en/sustainability) - [DB](https://nachhaltigkeit.deutschebahn.com/en/key-figures) ### New Operator [#new-operator] - [Vy](https://www.vy.no/en/the-vy-group/sustainability-and-social-responsibility) # Product updates (/changelog) # December 2022 release notes (/changelog/release-notes/2022/2022-dec) ### New Features [#new-features] - **[Dashboard]** • Refund calls stats added • Checkout page usage stats added - **[Trust Page]** • Initial “Under Construction” page released • Full trust page frontend/backend implemented • Trust page now allows users to track the status of their contributions via `reference_id` from compensation confirmation • Compensation certificates now include direct trust page links - **[Credit Notes]** • New `CreditNote` and `CreditNoteItem` models • CRUD endpoints for credit notes • Endpoint to create credit_note - **[Calculations]** • New `private_jet` calculation for jet flight offsets --- ### Improvements [#improvements] - **[General & API]** • Checkout page fallback if `fare_override` is too low • Validate `compensation_confirmation` schema on `/purchase` calls • Improved token expired response message • Better logging of client identifier on auth errors - **[Invoices]** • Improved invoice admin page • Hide amount input if currency is EUR (invoice admin) • Remove “PDF missing” button from invoice admin - **[Calculations]** • Update mobility_co2 gem (multiple times) - **[Dashboard]** • Better charts for client dashboard - **[Airports]** • Improved airports import - **[Testing]** • Internal API docs improvements • Added new certification display # November 2022 release notes (/changelog/release-notes/2022/2022-nov) ### New Features [#new-features] - **[Calculations]** New **money_amount** calculation type — allows contributing a specific monetary amount without linking to a specific activity (e.g., a flight). - **[Dashboard]** “Refresh” button added to refresh API usage statistics instantly. --- ### Improvements [#improvements] - **[Invoices]** • Validations & improvements to the invoice creation page. • Added filtering to invoices page for easier navigation. - **[General]** • Airport lookup by IATA code for M&M when IATA code is provided. - **[Projects]** • Adjusted project metadata fields. • Converted `project['metadata']` field to a number for better data handling. # April 2023 release notes (/changelog/release-notes/2023/2023-apr) ### New Features [#new-features] - **[Calculations – Hotels]** • Added **HCMI methodology** for hotel calculations — more accurate and standardized emissions reporting. - **[Frameworks]** • Preparations for **Google TIM** framework integration. - **[Purchases]** • Added `total_in_eur` field to purchase responses — easier multi-currency reporting. --- ### Improvements [#improvements] - **[Stripe Integration]** • Dispute webhook handling added — better payment lifecycle management. - **[General]** • Added **Antarctica** to continents list. # August 2023 release notes (/changelog/release-notes/2023/2023-aug) ### New Features [#new-features] - **[Calculations]** • Added support for **ICAO airport codes**. • Updated DEFRA data and private jet calculation factors (including C56X). - **[Accommodation]** • Fixed calculation for `country: FI` + `home_gym: true` combination. - **[Purchases]** • Purchases can now be looked up via an **external ID**. • Purchase endpoint can now be enabled/disabled per client. • Credential used for a purchase is now stored for better traceability. • Expired pricing tokens can still be used if the underlying price remains valid. - **[Client Dashboard]** • Faster dashboard load + improved visuals. - **[Security UX]** • New password input with strength indicator & visibility toggle. --- ### Improvements [#improvements] - **[Caching]** • Overall caching improvements for speed & memory use. • Simplified in-memory caching. - **[Files & Products]** • Products and files endpoints now return more detailed file information. --- ### Bugfixes [#bugfixes] - Fixed bugs in **price creation**. - Fixed invoice-related bugs. - Fixed visual bug in **certifications** display on Trust Page. - **[Google TIM]** • Validation for airline & flight number added. • Item ID now included in TIM error messages. - **[Clients]** • Added validation for `country` field on client creation. # December 2023 release notes (/changelog/release-notes/2023/2023-dec) ### New Features [#new-features] - **[Client Dashboard]** • Purchases view enabled for all users. • Dashboard now redirects to login if the frontend session has expired. - **[Products API]** • Filtering & pagination added to the products endpoint. - **[Purchases & Certificates]** • VAT now stored separately on purchases. • Trust page URL added to certificates. • Trust page shows a warning if certificates are cancelled. - **[Clients]** • New address model introduced to store full address information. --- ### Improvements [#improvements] - Added new font to the client dashboard. - Tracking added for failed **IATA/ICAO/LOCODE** lookups. - Added missing IATA codes. - Purchase endpoint speed improved by asynchronously inserting created records & generating PDFs. --- ### Bugfixes [#bugfixes] - Fixed **per tonne factor** in algorithm specifics for GLEC Clean Cargo. - Fixed currency symbol and missing date in compensation details. - Fixed VAT being applied twice in AirPlus transactions. # February 2023 release notes (/changelog/release-notes/2023/2023-feb) ### New Features [#new-features] - **[API v2]** • `/products/{id}` now supports fetching a specific product by ID. • Added **InlandWaterways** and **Expenditure** calculations to v2. • Moved the following methodologies to v2: – Bus – Logistics (formerly Parcel) – Cruise – AirFreight – CampingSite – PrivateJet – RoadFreight – Van – SeaFreight – Ferry – RailFreight • New **EU EEA** car methodology added. - **[Invoices]** • PDFs now attached directly to invoices. - **[Admin]** • Admins can now create suppliers. --- ### Improvements [#improvements] - **[API v2]** • Currency conversion enabled. • Moved to `aircraft_size` parameter for relevant flight calculations. • Improved validations and error messages for v2 endpoints. - **[Calculations]** • Updated default values for hotel methodology. - Added support for **5 more currencies**. # January 2023 release notes (/changelog/release-notes/2023/2023-jan) ### New Features [#new-features] - **[Accommodation]** • New methodology based on a given **date range**, factoring in **heating seasons** for the specified country and stay period. • Existing `number_of_nights` methodology now uses **average heating factors** for more precise calculations. - **[Train]** • New **SQUAKE train methodology** using the `operator_name` parameter for operator-specific emission factors (supported operators documented). - **[Flights]** • Added new flight calculation methodologies: **ADEME**, **DEFRA**, **US EPA** — more flexibility for compliance and reporting. --- ### Improvements [#improvements] - **[API Docs]** Updated example request for the `accommodation` methodology. - **[Calculations]** • Adjusted default accommodation values for better accuracy. - **[Performance]** • Ruby upgraded to **3.0** — notable performance boost. - **[Train & Parcel]** • Calculations now accept LOCODEs in more formats (e.g., `LO//CODE`). # July 2023 release notes (/changelog/release-notes/2023/2023-jul) ### New Features [#new-features] - **[Client Dashboard]** • Initial improvements to the client dashboard UI & functionality. - **[Products Endpoint]** • Products now include **images** and **location data** in API responses. - **[Methodologies]** • Algorithm specifics added to more methodologies for greater transparency. --- ### Improvements [#improvements] - **[Compensation Confirmation]** • Adjusted wording & positioning of items for clarity. - **[Hotels]** • Renamed hotel code mappings for consistency. # June 2023 release notes (/changelog/release-notes/2023/2023-jun) ### New Features [#new-features] - **[Hotels]** • Improved mappings of room types in **hotel basic methodology**. • Added **hotel code** support (Amadeus, Sabre, Worldspan, and more) — SQUAKE can now resolve hotels from multiple booking systems. - **[Calculations – Train]** • Added **CO₂-emissiefactoren** methodology for trains. - **[Client Dashboard]** • Added support for **v2 data** in the dashboard. - **[Carbon Query – Google TIM]** • Added codeshare & fallback data — now over **70M rows** while keeping query times in milliseconds. - **[Invoices]** • Added **Bad Debt** state for invoices. - **[Projects]** • Added **two new certification standards** for projects. --- ### Improvements [#improvements] - Major **overall performance improvements** and reduced memory usage. - Better validations on items passed to calculations. - Better validations for **hotel methodology** inputs. # March 2023 release notes (/changelog/release-notes/2023/2023-mar) ### New Features [#new-features] - **[General]** • New locales added for broader language support. - **[Calculations – ACRISS]** • Support for **SIPP codes** in the ACRISS methodology. - **[Calculations – Flights]** • Added `booking_class` resolution for flight methodologies. • IATA codes now supported by M&M. - **[V2 Purchases]** • Clients now receive **confirmation emails** after successful v2 purchases. --- ### Improvements [#improvements] - **[Purchases]** • `/purchase` request is now fully **idempotent** — prevents accidental duplicate charges or records. - **[Client Notifications]** • All users related to a client are now emailed when a project is retired. - **[Translations]** • Updated language translations. - **[General]** • Better input validations across endpoints. • Removed unused `valid_until` field from responses. # May 2023 release notes (/changelog/release-notes/2023/2023-may) ### New Features [#new-features] - **[Trust Page]** • Trust page support now available on **V2**. - **[Calculations – Car ACRISS]** • Started supporting **pseudo codes** (Phase 1 in v1.40.8, Phase 2 fix in v1.41.0). - **[Compensation Confirmation]** • Company name now included in PDF confirmations. --- ### Improvements [#improvements] - **[Performance]** • Faster ICAO calculations using a **new dataset** and improved logic. • Faster deployments with streamlined scripts and folder structure cleanup. - **[Calculations]** • Improved ICAO calculation logic for accuracy. - **[Purchases]** • Manual force-confirmation of purchases now possible (internal tool but impacts resolution speed for clients). # November 2023 release notes (/changelog/release-notes/2023/2023-nov) ### New Features [#new-features] - **[Methodologies & Data]** • Updated all **GLEC** datasets to **2023** data. • Updated emission factors for **Rail Freight** and **Ship Freight**. • Updated and expanded data for **Hotel** calculations. • Added **green fare carbon reductions** to flight calculations. • Added **energy_scope** support to Google TIM. - **[Invoices]** • Added `paid_on` field to invoices in the admin panel. • Backfilled `paid_on` dates for existing invoices. --- ### Improvements [#improvements] - Added missing **private jet** mappings. - Added missing **LOCODEs**. --- ### Bugfixes [#bugfixes] - Fixed invoice creation for already invoiced purchases. - Restored missing invoice IDs on some purchases. - Fixed Clean Cargo calculation occasionally returning `0`. - Fixed error when viewing detailed purchase information for purchases made via Stripe. # October 2023 release notes (/changelog/release-notes/2023/2023-oct) ### New Features [#new-features] - **[Client Dashboard]** • Sorting added to fields in the purchases table. • CSV export option for purchases table. - **[Calculations]** • Added **Green Fare Compensation Ratio**. • New **carbon comparison endpoint** — compare CO₂ amounts to everyday equivalents (e.g., cars, kettles). • Updated operator-specific emission factors for SQUAKE train methodology. • Began updating **GLEC** datasets to 2023 version (Logistics Site completed; others in progress). --- ### Improvements [#improvements] - Adjusted styles for the purchases table on the client dashboard. - Always include `SQUAKE-Request-Id` in responses (even for failed requests) for easier debugging. - Backfilled missing `invoiced_at` data for migrated purchases. - Adjusted invoice types (e.g., `carbon_purchase` → `affiliate_fee`). - Improved purchase state indicator design in detailed purchase view. - Removed carbon credit status from detailed purchase view. --- ### Bugfixes [#bugfixes] - Improved syncing of purchases to purchase order lines. - Added missing airports. - Fixed some issues with dashboard charts. - Corrected schema usage on sandbox for synced tables. - Improved normalization of item types in calculation endpoint. - Fixed sandbox purchase errors caused by missing synced data. # September 2023 release notes (/changelog/release-notes/2023/2023-sep) ### New Features [#new-features] - **[Hotels]** • Added more GDS hotel codes for better mapping to city/state/country. - **[Client Dashboard]** • New backend route to retrieve detailed transaction info (for upcoming transaction view). • Pagination & filters for purchases. • Full-text search for purchases. • New sidebar + ongoing design improvements. • Domain change notification banner (`dashboard` → `app`). --- ### Improvements [#improvements] - Fixed scaling of charts in the client dashboard. - Reduced memory usage by skipping prices without a valid product. - Split infrastructure for v1 and v2 apps. - Added client code to metrics for better tracking. - Allowed enabling/disabling AirPlus via environment variable. - Added validations for external references to avoid overly long values. - Removed monetary amounts from the Trust Page (privacy improvement). - Added staging environment banner. --- ### Bugfixes [#bugfixes] - Fixed logging for non-string data. - Restored missing country data on invoices & compensation headers. - Fixed missing TAMARA file generation pieces. - Fixed typo in purchase filters. - Ensured invoices are sent from finance email address. - Fixed account form in client dashboard. - Used project title instead of product title on invoices. - Corrected CO₂ volumes on certifications. - Filtered purchases in certain states from client statistics. - Fixed CircleCI orbs affecting deployments. - Fixed invalid URLs on the client dashboard. # April 2024 release notes (/changelog/release-notes/2024/2024-apr) ### New Features [#new-features] - **[Carbon Report Builder]** • Pagination & ordering fixes. • Ability to handle semicolon-separated CSVs. • Fewer mutually exclusive parameter validation errors. - **[User Management]** • Backend + frontend for user role handling. • Invite, accept, and manage user access directly from the dashboard. • User impersonation for admins. - **[Carbon Comparison]** • New comparison categories. • Accepts multiple items and custom units. --- ### Improvements [#improvements] - Updated **Flight ICAO**, **Private Jet**, and DEFRA flight factors. - Grace period added for invalidated prices. - UI improvements to Carbon Report Builder, account settings, and checkout. - Added **hotel_average** fallback when no star rating is available. --- ### Bugfixes [#bugfixes] - Fixed demo supplier frontend state issues. - Fixed Salesforce user confirmation flow. - Corrected Adyen purchase transaction sync. - Fixed price builder errors. - Addressed routing issues for v2 traffic and Trust Page requests. - Fixed download URLs for v2 & Sandbox. - Corrected parsing for non-UTF8 CSV files. # August 2024 release notes (/changelog/release-notes/2024/2024-aug) ### New Features [#new-features] - **[Product Pages]** • Full public release of Product Pages in the Dashboard. • External product list and product details pages now available. • “Not Found” page for unavailable products. • Pop-up for project details on the new purchase page. - **[Certificates & Reporting]** • External Reference field now shown on compensation certificates. • CSV export for calculation items. - **[Carbon Calculation]** • Introduced **GATE4 methodology** in Carbon Query. --- ### Improvements [#improvements] - DEFRA factor updates and ICAO seat value logic refresh. - Added airline and fare class validations. - Improved product details performance and UI consistency. - Optimized caching and Redis locking for product pages. - Better error handling for external imports. - Additional missing airports added. - Improved Cloudflare routing for product pages. - Enhanced Travel Data (formerly Trip Data) charts and styles. - Adjusted wording, filters, and pagination for product views. --- ### Bugfixes [#bugfixes] - Fixed DEFRA calculations when aircraft type is provided. - Resolved format issues for numbers on orders page. - Corrected styles on Travel Data and purchase details screens. - Fixed handling of settled purchase state on Trust Page. - Compensation status now correctly updates when purchase is settled. - Fixed placeholder images in product pages with real API URLs. - Removed visual artifacts from “product not found” images. # December 2024 release notes (/changelog/release-notes/2024/2024-dec) ### New Features [#new-features] - **[Stripe Checkout]** • Certificates now generated for Stripe Checkout transactions. • Added co-branding capability to the Stripe Checkout page. - **[Webhooks & API]** • Introduced **Webhooks API** for real-time event triggers. • Feature flag to generate certificates after purchase confirmation. • Webhooks now triggered upon certificate generation. - **[Travel Data]** • Lambda function for enhanced processing. • Frontend handling for **manually uploaded CSV travel data**. - **[Carbon Calculations]** • Added support for **Flight DEFRA TTW energy scope**. • Added new **SIPP fuel types** for ACRISS methodology. --- ### Improvements [#improvements] - **Stripe Checkout** — Set default transaction status to "Settled"; PDF generation triggered on webhook events; cache reload after client image upload. - **Calculations** — • Applied distance corrections for Flight DEFRA & TIM. • Updated **Air Freight, Rail Freight, Sea Freight, Inland Waterway, Logistics Site** methodologies to **GLEC v3.1**. • Updated **Sea Freight Clean Cargo factors**. • Updated **Road Freight GLEC** dataset. - **General** — • Used public CDN bucket for banner uploads. • Improved webhook API error handling. • Avoided redundant product page cache reloads. --- ### Bugfixes [#bugfixes] - **General** — Fixed PDF downloads, invoice URLs, portfolio display in admin dashboard, purchases table failure when payment reference is null, and Sidekiq queue issues in sandbox/production. - **Travel Data** — Fixed worker execution in sandbox. - **Navan Integration** — Corrected authentication URL. # February 2024 release notes (/changelog/release-notes/2024/2024-feb) ### New Features [#new-features] - **[Carbon Report Builder]** • Added initial backend routes and models for building carbon reports. - **[Client Tiers]** • Client configs now include **tiering**, allowing differentiated functionality. - **[Address Handling]** • Added **lat/long resolution** for addresses. • Improved caching → fewer requests to Google Geocoding API. --- ### Improvements [#improvements] - **Client Dashboard** • Improved **filtering** in purchases table. - **Data & Calculations** • Added **VDD IATA** code to datasets. • No longer generate prices for clients with **limited access**. - **General Improvements** • Explicitly log when a client is deleted. • Improved metric tags sent to Snowflake. • Made **addresses non-nullable** for users. --- ### Bugfixes [#bugfixes] - Fixed initial values on **settings page** in client dashboard. - Fixed missing address creation for new clients. - Fixed address creation during Salesforce account & supplier sync. - Improved product filtering for migrated V1 data. - Fixed **price per ton** field during Salesforce sync. - Added **VAT label & rate** to purchases from dashboard checkout. - Fixed sandbox issue where client could not be found for a user. - Fixed bug in **AsyncPurchaseWorker** job. # January 2024 release notes (/changelog/release-notes/2024/2024-jan) ### New Features [#new-features] - **[Dashboard Checkout]** • Added checkout page to **staging** with initial bug bash improvements. • Released dashboard checkout **behind a feature flag**. • Purchases made via dashboard checkout now show their **external reference** in the purchases table and can be searched by it. • Added validation for **minimum amounts** in dashboard checkout (€250). - **[Client Dashboard]** • Defaults charts to a **6-month timeframe**. • Shows if a purchase was made via API or dashboard checkout. • Made dashboard layout smaller and more compact. --- ### Improvements [#improvements] - **Salesforce Integration** • Fine-tuned syncing logic, including **associated address models** for clients. • Added follow-up project handling. • Connected **CO₂ Transactions** to Purchases and **Service Trade Agreements** to Prices. • Added **Salesforce Synchronizer** cron job. - **[Calculations]** • Added missing merchant codes & names to **expenditure** calculation. • ICAO flight calculation now falls back to **global average** if origin & distance are missing. • Updated **train operator-specific** and **CO₂ Emissiefactoren** factors. - **[General]** • Purge **Cloudflare caches** for both staging & production deployments. • Generate prices when a split is added/updated and product is valid. • Improved Adyen invoicing logic. • Added validation for **minimum amounts** in projects (checkout). --- ### Bugfixes [#bugfixes] - Fixed **GLEC road freight** calculation bug. - Backfilled purchase VAT rates & purchase order line states. - Fixed sandbox client cache read-through issue. - Fixed file serialization with `expand` on API purchases. - Fixed dashboard API usage chart for 6-month timespan. - Fixed missing **on behalf of** data in compensation confirmation creation. - Fixed back-button behavior on detailed purchase view in client dashboard. - Fixed bug in SQUAKE hotel calculation. - Fixed formatting of **on behalf of** addresses in detailed purchase view. # July 2024 release notes (/changelog/release-notes/2024/2024-jul) ### New Features [#new-features] - **[Carbon Reporting]** • Unlimited carbon reports quota setting for eligible clients. • Added energy scope to CO₂ Emissiefactoren NL. • Added support for string list input in “emissions from CSV” in Carbon Report Builder. - **[Trust Page]** • Second retirement link for retired purchases. • Adjustments for improved display and usability. - **[Purchase Details]** • New purchase detail screen. • Payment reference ID now included in purchase export. --- ### Improvements [#improvements] - Updated EPA factors for more accurate calculations. - Enhanced Carbon Report Builder functionality and resolved edge-case errors. - Expanded admin panel with additional info. - Standardized logging and metrics across services. - Purchase history CSV export refinements (removing ambiguous columns). - Aligned purchase filters and icon styles in purchases table. - Added fallback to CAR US-EPA. - Trip data now includes more specific per-type details. - Performance boosts to internal purchase index endpoint. - Infrastructure and dependency maintenance. --- ### Bugfixes [#bugfixes] - Fixed carbon credit “canceled” state display. - Corrected user role assignment in sandbox. - Fixed flight number parsing issues. - Resolved payment status and invoice price mismatches. - Fixed customer-facing issues with sandbox switch and confirmations. - Added fuel_type validations for CAR BASIC methodology. - Corrected CO₂ transaction status sync in Salesforce. - Mapped Salesforce `Payment_Date__c` to `paid_on` in invoices. - Fixed staging image base URLs for projects. - Corrected type conversion errors in Carbon Report Builder. # March 2024 release notes (/changelog/release-notes/2024/2024-mar) ### New Features [#new-features] - **[Carbon Report Builder]** • Backend completed and in testing. • Now outputs **algorithm-specific data** in emissions scripts and reports. - **[Event Calculation]** • Added **HCMI methodology** for event emissions. - **[GLEC Road Freight]** • Added **temperature-controlled freight** option. --- ### Improvements [#improvements] - **Methodology & Factors** • Updated default values for **Flight, Road Freight, and Air Freight**. • DEFRA factors updated, including **DEFRA 2024 flight changes**. • Improved EU-EEA parameters & validations. - **Frontend & Dashboard** • Errors now contained in the **app shell** instead of breaking the full page. • Removed setup and subscription fee invoices from the client dashboard. • Multiple state filters now work correctly in the purchases table. - **Data Quality** • Converted all existing **address country codes** to ISO alpha-2. • Added better alpha-3 → alpha-2 conversion. • LOCODE regex improvements. • Added more missing airports. - **Metrics & Tracking** • Track **feature usage** and **calculation items** in metrics. • Track client codes when exceptions are raised. --- ### Bugfixes [#bugfixes] - Fixed **invoicing issues** on sandbox. - Ensured products cannot contain the same project more than once. - Fixed Salesforce field mappings. - Invoicing now uses **purchase order lines** instead of projects from the product. - Fixed invoicing state machine errors. - Corrected project state errors. - Fixed price generation for clients gaining access to new projects. - Fixed Salesforce **user registration flow**. # May 2024 release notes (/changelog/release-notes/2024/2024-may) ### New Features [#new-features] - **[Methodologies]** • Coffee Production calculation now available. • Added train and car methodologies to Carbon Report Builder. - **[Integrations]** • Integrated IATA CO2 Connect. • Added handling of product variations to the admin panel. - **[Carbon Report Builder]** • Options restored for Flight IATA selection. • Train & car methodologies added for richer reporting. - **[Trust Page]** • Fully rebranded and mobile-optimized. --- ### Improvements [#improvements] - Disabled already-selected fields in Carbon Report Builder to reduce input errors. - Improved UX for email entry. - Multiple performance optimizations across the app. - Mandatory origin & destination for TIM in Carbon Report Builder (distance in km removed). - Clearer network error messages and better wording for “user not found.” --- ### Bugfixes [#bugfixes] - Handled null airline values in Flight IATA methodology. - Fixed access logic for admins on public API. - Hid unlisted “migrated from carbon activity” products from selection. # November 2024 release notes (/changelog/release-notes/2024/2024-nov) ### New Features [#new-features] - **[Travel & Emissions Data]** • Added flight-specific statistics metadata in Travel Data. • Implemented handling for **BCD imports** in Travel Data screens. - **[Integrations]** • **BCD integration**: initial implementation to process travel data from BCD sources. • Enabled user role editing directly from Salesforce. - **[Calculations]** • Support for ICAO and 3-digit IATA airline codes. --- ### Improvements [#improvements] - **[Carbon Targets]** • Cleaned up frontend & backend for efficiency. • Updated based on user feedback. • Rounded dashboard values & adjusted layout margins. • Temporarily disabled forecast values until further refinement. - **[Travel Data]** • Moved stats processing to a unified `StatisticHandler` class. • Added loading & error indicators for Travel Data stats. • Fixed and refined after bug bash testing. - **[General Enhancements]** • Improved carbon product caching. • Updated **PDF renderer** for performance. • Added developer documentation for Stripe Checkout + 250 € limit. • Improved release & deployment documentation. --- ### Bugfixes [#bugfixes] - **Carbon Targets:** Fixed “Number of bookings” diagram. - **Travel Data:** Resolved token refresher bugs, date handling issues, and duplicate entries for BCD imports. - **General:** Prevented Sentry errors for empty Snowflake fields, fixed feature flag validation, and improved origin/destination handling in TIM & GATE4 calculations. - **Chrome Extension:** Fixed routing & cache sync for the new extension container. - **Salesforce:** Disabled sandbox sync to avoid unnecessary updates. # October 2024 release notes (/changelog/release-notes/2024/2024-oct) ### New Features [#new-features] - **[Travel Data]** • **Lambda service** to trigger Travel Data import from uploaded files. • File upload support for Travel Data CSVs. • Travel Data now integrated into the CO₂ Targets dashboard. - **[Emissions Calculations]** • Added **DEFRA Car calculation** to expand methodology coverage. • Added **airline and aircraft type fields** to ADEME in Carbon Report Builder. --- ### Improvements [#improvements] - **CO₂ Targets Dashboard** • Backend + frontend integration completed. • Added tabbed dashboard with an **"Edit Targets"** tab. • Split dashboard into smaller, maintainable components. - **Travel Data** • Better handling of headers and filtering of unknown items. • UI/UX enhancements for CSV uploads. • Continued bug bash fixes and performance improvements. - **Performance & Code Quality** • Improved metrics for AWS ECS requests and CarbonQuery services. • Cleaner admin clients endpoint payloads. • Disabled ESLint’s shadowed variables rule for readability. • Split policies into clearer categories for maintainability. - **Frontend Enhancements** • Adjusted container padding for small screens. • Improved label rendering on charts to avoid overlaps. • Initialized **Storybook** in design library for better component documentation. --- ### Bugfixes [#bugfixes] - Fixed persistent CarbonQuery connections for more stable queries. - Corrected Travel Data endpoint to return proper S3 URLs. - Fixed product pages cache invalidation when updating clients. - Improved UI loading behavior. - Hidden source link button when no retirement links are available. - Correctly handle products passed as hashes. - Additional Travel Data bug bash fixes for edge cases. # September 2024 release notes (/changelog/release-notes/2024/2024-sep) ### New Features [#new-features] - **[CO₂ Targets]** • Added **CO₂ Targets dashboard screen** (feature-flagged for staged rollout). • Created backend **CO₂ targets model & controller** to support carbon tracking. • Added baseline setting form to UI. - **[Travel Data & Booking Tools]** • Added feature flag for Travel Data and Booking Tools. • Initial draft of **Travel Data API endpoint**. • Display metadata from Travel Data API items on dashboard. • Added service to process CSVs into trip data for faster imports. - **[Certificates & Product Pages]** • Ability to **attach company images** to clients and display on product pages. • Added client image to products page for improved branding. - **[Data Import & CSV Handling]** • Endpoint to start CSV import for easier ingestion of trip data. --- ### Improvements [#improvements] - **Emissions Methodologies** • Adjusted **accommodation** and **bus** emissions calculations for greater accuracy. • Updated coffee values for more precise impact calculations. • Adjusted default methodologies and added new fare class codes for expanded coverage. - **Data & Integrations** • Final refinements for **historic data import processing**. • Improved project sync to include missing country data. • Set Redis cache token on initial SAP Concur connection. - **UI & UX** • Optimized mobile view for product pages. • Improved data visualization by adding new charts to frontend. • Adjusted designs for company image upload. • Improved label positions on charts for readability. - **Performance & Stability** • Bumped Ruby to **3.3.5** for performance gains. • Updated dependencies (micromatch, webpack, OpenTelemetry for security). • Reused AWS ECS connections for efficiency. • Enabled locale fallbacks for missing translations. --- ### Bugfixes [#bugfixes] - Fixed handling of **fixed prices** and **purchase confirmations**. - Resolved issues with **project images backfill**. - Fixed **frontend build issues** and Stripe controller on sandbox. - Corrected SAP Concur import route. - Fixed squished client images on product pages. - Corrected booking class handling in Google TIM. - Invalidate Trust Page data when purchases are cancelled. - Fixed cache reload read timeouts. # April 2025 release notes (/changelog/release-notes/2025/2025-apr) ### New Features [#new-features] - **[Dashboard Redesign]** • New sidebar & dashboard redesign — fresh, more intuitive layout! • Dashboard cards updated: no more shadows & NaN values now rounded properly. - **[General]** • Company ID now shown on company info page — for easier reference. • Product pages now display product ID + copy button — easier for clients to grab & share IDs. - **[Calculations]** • New restaurant calculation for BASE-EMPREINTE methodology — sustainable dining counts too! • Added factors for first class travel — more accurate premium class estimates. • Updated event HCMI factors (2024) & train CO2 EMISSIEFACTOREN (2025). - **[Checkout]** • Clients can now pass an external reference when creating purchases — helps with reconciliation. - **[General]** • Certificates now generated on confirm by default — less waiting. ### Improvements [#improvements] - **[Carbon Connect]** • Fixed Project Totals & View cards + updated transaction view — clearer & more reliable. - **[Portfolio View]** • Better scroll handling on project cards + use portfolio cover for portfolio products. - **[Carbon Report Builder]** • Added missing items to report builder — more complete reports. --- ### Bugfixes [#bugfixes] - **[Calculations]** • Fixed BASE-EMPREINTE for flights when using averages. • Fixed Google TIM calculation. • Fixed TU-CHALMERS when no emission factors found. • Fixed emission factor keys for hotel cities/states. • Adjust errors for car basic fuel intensities. - **[Purchases]** • Fixed certificates not being generated properly. - **[Dashboard]** • Fixed price caching issue & other small redesign glitches. - **[Carbon Report]** • Fixed overflows in report builder. # August 2025 release notes (/changelog/release-notes/2025/2025-aug) ### New Features [#new-features] - **[Calculations] Green Travel Pledge methodology** • New **Green Travel Pledge** calculation added to the engine • Improved handling of factors files for this methodology (more robust updates, fewer silent failures) - **[Calculations – Hotels] Room type everywhere** • **Room type** now supported across **all hotel methodologies** (SQUAKE, Greenview, HCMI, etc.) • Fixes previous edge cases where some hotel types returned zero emissions - **[Calculations – US-EPA & Trains]** • **US-EPA train calculation** added • **US-EPA** now selectable as a methodology in the **Carbon Report Builder** • Support for **UIC provider codes** in train calculations • More train operators added + better error handling in versioned train methods - **[Reporting & Dashboard] Analytics glow-up** • Many new charts & graphs for **Flight, Hotel, Train, and Car** pages • **SPP details page** added for Carbon Connect • Transaction details page now shows **only transaction-related SPPs**, reducing noise - **[Historic Google TIM] Time-travel ready** • Ability to **update older Google TIM datasets** (historic datasets now maintainable) - **[Admin Panel] Easier navigation for ops & CS** • **Filtering and searching** added to **clients and projects** — faster debugging and account reviews ### Improvements [#improvements] - **[Calculations] Accuracy & coverage** • More operators added to **Train** calculations • Improved error handling in **versioned train** methodologies • Added more **LOCODEs and airports** to datasets • Fixed stars handling in **Hotel SQUAKE** methodology • Fixed some hotel types that previously returned **zero emissions** • Fixed OFNK emissions discrepancy caused by **currency handling** - **[Hotels & Greenview]** • **Greenview Hotel** calculation added to the **Carbon Report Builder** • Methodology **versioning enabled in the Carbon Report Builder** so users can explicitly pick versions (e.g. historic DEFRA / Greenview versions) - **[Midoco]** • Added support for **more types** from Midoco (client-visible for integrated Midoco setups) - **[Geocoding & Maps]** • Improved handling of **unicode** in Google Maps API requests • If Google Maps fails, we now **fall back to OpenStreetMap** for better resilience - **[Carbon Connect & Certifications]** • Fixed and improved **totals** in detailed Carbon Connect project view • Improved handling of **line breaks** in external invoices on certifications for nicer PDFs # December 2025 release notes (/changelog/release-notes/2025/2025-dec) ### New Features [#new-features] - **[Checkout] German translation for the Privacy Policy** - **[Calculations] Flight GHGP calculation added** - **[Audits] Developers can access the audit page** - **[Dashboard] Client branding in the sidebar** - Ability to **update the dashboard sidebar logo** - Ability to **show client images** in the sidebar - **[General] Travalyst rail factors export service** - Automated export of SQUAKE rail factors for Travalyst usage ### Improvements [#improvements] - **[Integrations] ATG card now supports “On request” status** on the integrations page - **[Audits] Improved CVP loading** (faster / smoother audit experience) - **[Integrations] Improved styling of the Point of Sale screen** - **[Audits] New endpoints for audit statistics** - **[Checkout] Improved locale switching behavior** on the checkout page - **[Reporting] Improved date picker state handling** - **[Reporting] Worker added to refresh reporting caches** - **[Carbon Connect] Improved entity synchronization logic** - **[Reporting] Better handling of “no data” states** - **[Reporting] Consistent formatting for booking classes** ### Bugfixes [#bugfixes] - 🇹🇷 **[Salesforce] Fixed client serializer Turkey edge case** + minor improvements - **[Reporting] AloIndex banner can only be hidden temporarily** (as intended) - **[Reporting] Fixed icon styles for the flights table** - **[Reporting] Fixed airline name text overlap** - **[General] Audits overview now hidden when audit feature flag is disabled** - **[Dashboard] Fixed start page not loading data** - **[Dashboard] Fixed timerange filter for compensation** - **[Dashboard] Fixed selected date range being off by 1 day** - **[Calculations] Fixed GHGP calculation** - **[Calculations] Fixed DEFRA calculation** # February 2025 release notes (/changelog/release-notes/2025/2025-feb) ### New Features [#new-features] - **[Audit]** Audit mode & related features: • `on_behalf_of` support • endpoints to fetch audits & audits by ID • services to calculate & track audits - **[Inventory Management]** Inventory management preview: • basic models added • portfolio view added to product pages - **[General]** Purchase export now includes trust page, confirmation, and certificate document links — better transparency. - **[Travel Data]** • Frontend screens for travel data upload history • API errors now saved to a CSV file for review. ### Improvements [#improvements] - **[Calculations]** Base Empreinte methodology added for trains — better rail emissions reporting. - **[Calculations]** Add country handling to Expenditure OFNK — more accurate for multi-country spend. - **[General]** Performance improvements for GATE4 & Carbon Query — faster results for clients. - **[Calculations]** Fixed hotel calculations — more accurate results. # January 2025 release notes (/changelog/release-notes/2025/2025-jan) ### New Features [#new-features] - **[Carbon Calculations]** • Added `energy_scope` parameter support for **DEFRA car** methodology. • Added **DEFRA hotel** methodology to the Carbon Report Builder. - **[Travel Impact Model (TIM)]** • Historical data support added. • Distance in km parameter now available in TIM report builder. • Parameter logging for historical TIM Tier 3 fallback data. - **[Purchases]** • Cancellation deadline now included in purchase API responses. ### Improvements [#improvements] - **General** — Removed legacy Trust Page code, updated Cloudflare router, refined caching to reload sequentially, refactored `ClientBuilder` for maintainability. --- ### Bugfixes [#bugfixes] - **General** — Fixed Airplus implementation, Snowflake JWT timestamp handling, and constant naming in CSV emissions import. - **Salesforce** — Fixed project price update logic. - **Stripe Checkout** — Payment link only returned if `payment_method: stripe` is passed. - **Carbon Report Builder** — Fixed type badge display. - **Travel Data** — Stats hotfix applied. - **Webhooks** — Removed uniqueness DB constraint for improved flexibility. - **Retirement Links** — Fixed sync logic. - **Calculations** — Corrected hotel HCMI logic. # July 2025 release notes (/changelog/release-notes/2025/2025-jul) ### New Features [#new-features] - **[Carbon Connect]** • SPP tables added to project view • Filters + navigation for SPP tables • `external_reference` field added for SPVs • Deleted SPVs now synced • API endpoints for SPPs now available - **[Calculations]** • Historical DEFRA versions now enabled for Flights, Cars, Trains, Buses, and Hotels • Greenview Hotel calculation added — improved HCMI alignment • 2025 emission factors rolled out across all major modes • UN LOCODE mapping added — improved location resolution - **[Locations]** • Continents now attached to location & audit logs — for smarter analytics ### Improvements [#improvements] - **[Calculations]** • Bolt expenditure CO₂ amount adjusted • Default number of travelers now handled more gracefully • Flight DEFRA now validates `energy_scope` • Flight US-EPA now versionable - **[Carbon Reports]** • `number_of_travelers` now shown as optional in Carbon Report Builder - **[Statistics & Metrics]** • Improved endpoint name & environment handling • Metrics collection/reporting improved - **[Travel Data]** • Methodology resolution refactored for more robust matching - **[Methodologies - GLEC]** • Added TTW-specifics • Removed deprecated van methodology # June 2025 release notes (/changelog/release-notes/2025/2025-jun) ### New Features [#new-features] - **[API]** • Can now create **MoneyCollectionPurchase** directly via the `/purchases` endpoint — streamlined payment flow. - **[Products]** • New portfolio images added — fresher, more appealing visuals for client portfolios. ### Improvements [#improvements] - **[API]** • Added type validation for calculation parameters — fewer input errors & clearer feedback. - **[Products]** • Improved handling of product cache via a background worker — faster & more reliable data. - **[Calculations]** • Default value added for number of travelers — prevents empty/missing values. # March 2025 release notes (/changelog/release-notes/2025/2025-mar) ### New Features [#new-features] - **[Calculations]** • DEFRA train calculation support • DEFRA bus calculation support • ICAO code support for flight DEFRA & ICAO methodologies • TU-CHALMERS flight calculation added — another methodology choice for clients. - **[Calculations]** Base Empreinte methodology added for flights — more methodology options. - **[Dashboard Redesign]** • API usage stats available via a new endpoint — helps clients monitor their usage. • Compensation stats service added — more transparency. - **[Purchases]** Certificate downloads now enabled for confirmed purchases — clearer documentation. - **[Carbon Connect]** • Project view redesigned in Carbon Connect. • Carbon Connect officially live in production! - **[Airplus Integration]** Logic added to open ZIP-protected files — supports tricky Airplus files. - **[Settings]** New option to delete company images — cleaner admin for clients. ### Improvements [#improvements] - **[Calculations]** • Better type validation on hotel parameters. • New Vincenty distance calculation method — more precise. • Prioritize stars over `hotel_type` in HCMI. • Handle decimal commas in CSV uploads — no more parsing errors. - **[Portfolio View]** • Better handling of project data. • Support floating-point splits for projects — better accuracy. - **[Audit]** • Google TIM dataset tier & type added to response + emission factors. • Return algorithm specifics in audit responses — more transparency for clients. - **[General]** • Improved frontend error handling — better UX for clients. --- ### Bugfixes [#bugfixes] - **[Purchases]** • Fixed Stripe purchase flow through Salesforce. • Fixed certificates not being generated properly. - **[Inventory Management]** Fixed image URL. - **[Dashboard]** Fixed price caching issue. - Various smaller bugs in hotel calculations, CSV exports, user profile styles & dashboard redesign cleaned up. # May 2025 release notes (/changelog/release-notes/2025/2025-may) ### New Features [#new-features] - **[Payments]** • New **MoneyCollection** payment method. • New **MoneyCollectionPurchase** model — enables more flexible payment flows. - **[Products]** • Portfolio image uploads now supported — better visual customization. - **[Flight]** • Added new operator factors — more accurate flight calculations. ### Improvements [#improvements] - **[Calculations]** • Train operator–specific factors reintroduced + new factors added. • TU-CHALMERS: now supports fare class & airline inputs — more detailed outputs. • Car EU/EEA: country field now optional + manufacturer averages used when available. • Updated US EPA & CO₂ emissiefactoren datasets — fresher data. • Improved handling of hotel & event cities & states — more reliable reporting. • Added more locations & updated airline & fare class mappings — better coverage. - **[API]** • Pricing tokens now included per item in calculations with pricing — more transparent pricing. - **[Dashboard]** • “View more methodologies” button now enabled. • Fixed incorrect project class display. --- ### Bugfixes [#bugfixes] - **[Midoco]** • Fixed query in worker. • Prevented creation of invalid configurations. - **[Dashboard]** • Fixed calls by endpoint card. • Correct invoice state badge colors. - **[Audit Mode]** • Fixed sandbox audit mode — functional again. - **[Credentials Page]** • Removed confusing link to documentation — cleaner UX. - Fixed storage item creation errors in SAP Concur calculation groups. # November 2025 release notes (/changelog/release-notes/2025/2025-nov) ### New Features [#new-features] - **[AI Insights] First public release** • **AI Insights** is now live – surfacing insights on top of your data (usage/details depend on your plan & configuration). - **[CVP] Certificates & Auditable Entities UI** • **CVP Certificate** released – dedicated, audit-ready certificate format. • **Auditable Entities UI**: visual view for CVP entities linked to audits (projects, policies, contracts, etc.). • **Audit details page** improved, now tighter with CVP and auditable entities. - **[Reporting] UX polish & context** • **ALO index banner** added to **Hotel reporting** to give clearer context for interpretation. • **Personal vs Company** pie chart is automatically hidden when one side is 100% (no more misleading “slices”). • **Rental days** tile hidden when value is zero to reduce noise. - **[TIM & Calculations] Easier inputs** • **TIM calculations can now be run *without* flight number and airline** – helpful when only OD pair is available. • **Activities now support `external_reference`** and multiple calculations per activity via that reference (better mapping between your systems and SQUAKE). - **[Audits] In-product guidance** • **Help button** added to Audits UI to guide users through audit mode & auditable entities. --- ### Improvements [#improvements] - **[Reporting Suite] Query & UX refinements** • Fixed and improved **reporting page queries** for more reliable results. • Filters now behave correctly and no longer duplicate methodologies. • Filters on reporting now **respect client scoping** (trips per client) so you don’t mix tenants. - **[CVP & Audits]** • Further improvements to **audit details pages** (layout, data clarity). • `VAT_number` is **no longer required** for `AuditableEntity` – fewer false blocking validations. • Audits now store extra IDs for better traceability: – `external_policy_id` on **trips** – `external_employee_id` on **travelers** - **[Calculations & Methodologies]** • `external_reference` now stored on **activities**, enabling multiple related calculations and better traceability. • **base_empreinte** methodology version updated for Flights and **US-EPA car versions** added. • Added missing **EVA codes** for trains & buses. • **UIC stations** updated to the latest data. --- ### Bugfixes [#bugfixes] - **[Reporting]** • Fixed reporting page queries and filters not working correctly. • Fixed duplicated methodologies showing up in filters. - **[Purchases & Checkout]** • Fixed checkout page flow and status bubble display in the purchases table. • Fixed failures in **certificate generation** for purchases. - **[Calculations & Travel Data]** • Fixed Travel Data API for **hotels**. - **[Audits]** • Fixed audit records that could **load endlessly**. • Fixed methodology source URL not being saved on API audit creation. • Audit mode fixed for multiple methodologies (including train). - **[Integrations & Sync]** • Fixed duplicate transactions errors during **Salesforce** sync. • Improved handling of **Airplus ZIP files**. • Fixed DB schema in Travexis read model. - **[Users & Roles]** • Fixed projects cache to ensure the **correct role** is used. • Fixed user invitation mailer failing for users without an associated client. # October 2025 release notes (/changelog/release-notes/2025/2025-oct) ### New Features [#new-features] - **[Integrations] Travexis in the UI** • **Travexis** is now visible in the **Integrations tab**, making it easier to discover, connect, and manage the integration. - **[Trips & Hotels] Richer trip context** • **PNR** added to trip records. • **Hotel name** surfaced on hotel entries. → Easier reconciliation between TMC data, invoices, and SQUAKE reporting. - **[Calculations] FlixBus methodology** • New **FlixBus-specific methodology** added, enabling more accurate emissions for FlixBus travel. - **[Reporting] New controls & exports** • Brand-new **advanced filters** in the Reporting Suite. • **Export options** added to Reporting, so users can pull data for BI tools or offline analysis. • **Car usage type charts** introduced for better insight into how cars are used (e.g. rental vs. private, etc.). - **[Reporting] Make Reporting the default home (feature-flagged)** • New **feature flag** to make the **Reporting page the default screen** after login (opt-in per client / environment). - **[Audits] First UI for audit data** • **Auditable Entities view** added – see which entities are tied to a given audit. • **Audit details view** added – inspect individual audits in more detail. • (Currently staged / rolling out gradually) - **[TIM Flights] Lat/Lng support & flexible inputs** • You can now use **lat/lng** to calculate flight emissions with **Google TIM**, in addition to `distance_in_km`. • Works regardless of whether `departure_date` is provided. - **[Money Collection] Cancelable purchases** • Money Collection purchases now support a **cancel** action, aligning them with other transaction flows. ### Improvements [#improvements] - **[Flights & Calculations]** • Improved handling of **coordinate formats** in flight calculations. • For **BASE-EMPREINTE**, we now fall back to the resolved **origin/destination country** when an explicit country is missing. • Updated **fare class data** for airlines for more realistic mappings. - **[Carbon Report Builder & Methodologies]** • **Green Travel Pledge – train** methodology added to the Carbon Report Builder. • Mapping for **Flight BASE_EMPREINTE** updated for better consistency. - **[Reporting Suite] Better defaults & more accurate queries** • Default date range now always matches the actual data window. • Reporting URLs now always include relevant params & filters → **shareable, reproducible views**. • Train reporting now uses **kilometers instead of miles** and corrects date usage when querying. • Filters with no underlying data are automatically **disabled**, so you always see results. • Queries now consistently use **trip start & end dates**, improving accuracy for multi-day trips. • Further query & data-fetching optimizations for better performance on reporting pages. - **[Travel Data]** • Travel Data API improvements for more robust responses. • Added **missing travel data fields**, improving analytics granularity. - **[Dashboard & UX]** • Orders page now uses **better product cards** for clearer information density. • You can now place **orders smaller than 1 EUR** (great for testing / micro-contributions). • Environment banner updated and made more visible & friendly. # September 2025 release notes (/changelog/release-notes/2025/2025-sep) ### New Features [#new-features] - **[Audits] Auditable entities for CVP & audit mode** • Added **auditable entities models & controllers** so you can attach detailed context (CVP, contracts, etc.) to audits. • Publicly documented in [Audit mode](/docs/audits/auditable-reporting) and ready to use with **audit mode** (API consumers + auditors will care). - **[Calculations – Car / US-EPA]** • **Car US-EPA now versioned** — allows explicit factor set selection and future-proofing. • Added `number_of_days` support to **car calculations** to estimate distance in km when only duration is known (great for car rentals / mobility budgets). - **[Calculations – Flight]** • Removed distance correction for **Flight CO₂-Emissiefactoren** to better align with the official dataset. - **[Calculations – Hotel] CRC hotel code lookup** • Added **CRC hotel code** lookup for hotel calculations, improving hotel mapping and automation for specific partner feeds. - **[Carbon Report Builder] Green Travel Pledge – Train** • **Green Travel Pledge (train)** methodology added as an option in the Carbon Report Builder. - **[Reporting] New reporting suite** • Brand-new **Reporting Suite** released, bringing more structured analytics and improved UX for Flight/Hotel/Train/Car & transaction views (client-facing). - **[Integrations] Travexis** • **Travexis** added to the **Integrations tab**, making it easier to connect and manage this data source. - **[Dashboard & Orders]** • New **product cards** on the orders page — clearer layouts and better readability. • You can now create **orders smaller than 1 EUR** (useful for tests, pilots, or micro-contributions). - **[Money Collection] Metadata support** • Money collection purchases now support **custom metadata**, and clients can set it directly — helpful for internal allocation, cost centers, or campaign tags. ### Improvements [#improvements] - **[Calculations & Methodologies]** • For **BASE-EMPREINTE**, we now fall back to the **resolved origin/destination country** when explicit country is missing. • Updated **fare class data** for airlines to better match reality. • Updated **BASE_EMPREINTE mapping for Flight** for more consistent results. - **[Train & Hotel Calculations]** • More **train operators** added and improved error handling in **versioned train** calculations. • Fixes and refinements for hotel types and star handling from earlier bug reports. - **[Carbon Connect & Carbon Reports]** • Carbon Connect now renders the **correct project unit price** for transactions. • Carbon Reports no longer show **duplicated parameters** in the UI. - **[App & Product Pages]** • **App start time** improved — faster initial load. • Product Pages UI issues cleaned up for a smoother experience. # April 2026 release notes (/changelog/release-notes/2026/2026-apr) ### New Features [#new-features] - **[Calculations] Methodology version selector now persisted** - Clients can now select and save their preferred methodology version directly from the dashboard. The preference is stored in their account configuration and applied automatically on future sessions. ### Improvements [#improvements] - **[Dashboard] Flight booking class order standardised** - Booking class filters on the flight reporting page now always display in the standard order: Economy → Premium Economy → Business → First. ### Bugfixes [#bugfixes] - **[Dashboard] Rental car provider filter corrected** - The car provider filter now correctly shows only true rental car companies. Ride-hailing services were incorrectly appearing in the provider list. Relevant for clients who analyse car travel by provider. - **[Dashboard] Trust page image upload restored** - Images uploaded to a client's trust page now display correctly. Trust page links and CO₂ certificates can be shared with clients without encountering a broken image. # August 2026 release notes (/changelog/release-notes/2026/2026-aug) ### Improvements [#improvements] - **[Data Accuracy] Consistent flight distance bands across reports** - Flight distance classes (short-, medium-, and long-haul) are now persisted using each client's configured reporting distance bands and applied consistently across all reports and exports. - **[Stability] Routine dependency maintenance** - Applied routine backend and frontend dependency updates, including security patches. No action is required on your part. --- ### Bugfixes [#bugfixes] - **[Reporting] Train station display and chart axis fixes** - Fixed an issue where some reports showed train station codes instead of readable station names. Also fixed reporting charts that didn't always start their value axis at zero. # February 2026 release notes (/changelog/release-notes/2026/2026-feb) ### New Features [#new-features] - **[Reporting] Ride-hailing charts are here** - Clear visibility into ride-hailing activity and emissions - Enables easier comparisons across travel categories - **[Reporting] New flight TIM charts + refreshed TIM section** - Adds TIM cards (e.g., contrail distribution/impact, data quality tiering) - Improves readability and structure of flight insights - **[Reporting] WTW / TTW toggle on reporting pages** - Switch between **Well-to-Wheel** and **Tank-to-Wheel** emissions in the UI - Supports client-level rollout where applicable (feature-flag friendly) - **[Reporting] Year-over-year charts now include segment breakdowns** - Moves beyond a single aggregate line into segment-level insight - Helps pinpoint what’s driving changes over time - **[API] Methodology version now included in responses** - Adds `methodology_version` (when applicable) for traceability - Helps integrators validate which calculation approach was used --- ### Improvements [#improvements] - **[Data Accuracy] Updated DEFRA emission factors + backfill support** - Corrected emission factor values to align with the latest interpretation - Includes a backfill script to populate corrected values post-deploy - **[Reporting] More readable locations + better formatting** - City names shown instead of IATA codes where relevant - Improved number formatting across reporting (incl. car CO₂ metrics) - **[Dashboard] Smoother reporting experience** - Date filters no longer reset when switching report types - Updated icons for Trips and Travel Spend for clearer meaning - **[Imports/Exports] More reliable CSV workflows** - Travel data CSV processing refactored for correctness and stability - CSV exports now generate properly again - **[API Behavior] Client-provided request data now takes priority** - Request payload values override backend defaults where applicable - Integrations relying on “server default wins” should re-validate behavior --- ### Bugfixes [#bugfixes] - **[CVP] Certificate generation + values corrected** - Fixed certificate generation in sandbox environments - Corrected CO₂e amount shown on CVP certificates - **[Reporting] Float/decimal rendering issues resolved** - Pre-formatted floats now display correctly on reporting pages - Prevents misleading formatting and rounding artifacts - **[Dashboard] Project imagery display fixed** - Resolved an issue where projects could show the same image incorrectly - **[Stability] Smaller fixes across the platform** - A set of minor bug fixes improving reliability and consistency # January 2026 release notes (/changelog/release-notes/2026/2026-jan) ### New Features [#new-features] - **[Purchases] “On behalf of” filtering** - Filter purchases by who the booking/payment was made *for* (helpful for delegated purchasing and audits). - **[Reporting] Yearly trending chart on the overview** - New data services now power a **year-over-year trend view** for long-term visibility. - **[Reporting] More powerful booking filters** - Added filters for **booking class**, **geo scope**, and **distance type**. - Enables more granular analysis and cleaner segmentation across travel programs. --- ### Improvements [#improvements] - **[Reporting] Date range picker UX upgrade** - Preview updates now happen **only when you apply** changes (less jitter, fewer mis-clicks). - **[Performance] Faster reporting filters** - Cached filter options improve responsiveness on the reporting page (especially for larger datasets). - **[Reporting] New overview page building blocks** - New UI components added to support the upcoming reporting overview experience. - **[Factors] Factors page polish** - Added a footer to SQUAKE Factors for a more complete, consistent experience. --- ### Bugfixes [#bugfixes] - **[Admin] Image uploads fixed** - Resolved an issue preventing images from uploading correctly. - **[Audits] CSV export & labels corrected** - Fixed incomplete “Find Records” CSV export and corrected UI labels (e.g., Date / Unit) + empty carbon unit issues. - **[Checkout] Stripe purchase limit removed** - Removed the **€250 limit**, unblocking larger checkout amounts. - **[Calculations] Train computation fix** - Corrected an issue affecting SQUAKE train calculations. - **[Integrations] Index page display fixes** - Cleaned up issues impacting the integrations index view. - **[Purchases] Refund serial numbers now unique** - Fixed refund transactions so serial numbers are properly generated and distinct. # July 2026 release notes (/changelog/release-notes/2026/2026-jul) ### New Features [#new-features] - **[Dashboard] Flight, train & car drilldowns** - Click into any flight, train, or car figure on the dashboard to see the bookings behind it — no more exporting data just to answer "what's driving this number?" - **[Dashboard] Global filters** - Date range and scope filters now apply across the whole dashboard instead of resetting per page, so your selection carries through the full reporting experience. - **[Calculations] HCMI hotel & event emissions** - Hotel and event footprints can now be calculated using the industry-standard HCMI methodology, with year, hotel area, and total-energy inputs for more precise, auditable results. - **[API] Multi-account foundations** - The core building blocks for managing multiple linked accounts are now in place. - **[Calculations] Dutch flight methodology versions** - Flight calculations can now use versioned Dutch (CO2-EMISSIEFACTOREN-NL) emission factors, making results more reproducible over time. - **[Reporting] Programme settings foundations** - Backend and UI building blocks for defining emission-reduction programmes are now in place, ahead of full programme tracking coming later. ### Improvements [#improvements] - **[Data Accuracy] GLEC v3.2 freight factors** - Sea freight, rail freight, logistics hubs, and Clean Cargo calculations now use the latest GLEC v3.2 factors, and the outdated v3.1 methodology has been retired from new calculations. - **[Data Accuracy] More accurate flight CO2 reporting** - Improvements to how flight energy and emissions data are processed make flight CO2 figures in reports more accurate and consistent. - **[Data Accuracy] More flexible source tracking** - Travel data can now retain previously unsupported source names, making them available as filters in reporting. - **[Performance] Faster dashboards** - Flight, car, train, and hotel reporting dashboards now load noticeably faster, especially on first visit or with large reports. - **[Performance] Faster, fresher reporting** - Travel spend queries run faster and report caches refresh more reliably; reporting views also now refresh automatically as new travel data comes in. - **[Imports/Exports] Faster, more reliable CSV exports** - Travel-data and calculation-group CSV downloads now stream instead of loading the entire file into memory first, so large exports are faster and less likely to time out. - **[Reporting] Purchases grouped by company** - Purchases made on behalf of the same company are now grouped together using normalized company names, cutting down on duplicate-looking entries in reports. - **[Dashboard] Carbon Targets area removed** - The Carbon Targets section and its navigation entry have been removed from the dashboard. - **[Integrations] Smoother booking-tool imports** - The pipeline that imports booking data from connected travel platforms was reworked for more reliable syncing. - **[Dashboard] Ride-hailing chart simplified** - The ride-hailing provider breakdown chart no longer shows duration, for a cleaner view. - **[API] "Logistics Site" renamed to "Logistics Hub"** - The GLEC "Logistics Site" activity is now called "Logistics Hub." Existing API requests keep working unchanged. - **[Integrations] Traveller email now optional** - Traveller email addresses are now optional across supported travel-data imports. - **[Stability] Security maintenance** - Additional backend and frontend dependencies were updated to address security advisories. No client action required. ### Bugfixes [#bugfixes] - **[Data Accuracy] Corrected routed-flight reporting** - Multi-leg flights are now reported by individual segment rather than as a single combined journey, giving more accurate per-segment emissions and fixing related CSV column and label issues. - **[Data Accuracy] Fixed Clean Cargo region data** - Fixed malformed region data affecting some Clean Cargo ocean-freight emission figures. - **[Dashboard] Minor Overview & Reporting fixes** - Fixed a batch of smaller display and stability issues on the Overview and Reporting pages. # June 2026 release notes (/changelog/release-notes/2026/2026-jun) ### New Features [#new-features] - **[Calculations] French hotel methodology (NOS-GESTES-CLIMAT)** - A new ADEME-based hotel emission methodology is available across the API, dashboard, settings, and report builder. It uses a simple fixed factor per hotel night for clients aligning with French national standards. - **[Data Accuracy] DEFRA 2026 emission factors** - The UK Government's updated 2026 greenhouse gas conversion factors are now live for flights, trains, buses/coaches, and cars. Clients using DEFRA methodology receive the latest official figures automatically — no action required. ### Improvements [#improvements] - **[Data Accuracy] Smarter train type mapping** - Switching between train emission methodologies in settings now automatically maps the correct train type, removing a source of validation errors and manual cleanup. - **[API] Broader flight API support** - The flight calculation API now handles unresolved or masked airline codes gracefully, returning a valid result instead of an error. - **[Stability] Security patches applied** - Applied routine security updates to keep the platform secure. No client action required. ### Bugfixes [#bugfixes] - **[Dashboard] Overview page filters restored** - Fixed an issue where filters on the reporting overview page had stopped working correctly. # March 2026 release notes (/changelog/release-notes/2026/2026-mar) ### New Features [#new-features] - **[Reporting] Save preferred emission methodology per activity type** - Clients can now configure a default emission calculation methodology for each travel type (flights, hotels, cars, etc.) in Reporting Setup. Settings are persisted across sessions, so reports always run with the expected methodology without manual re-selection. - **[Reporting] Greenview hotel dataset versioning** - Hotel emissions calculated using Greenview now support year-specific dataset versions (2021–2026). Reports can be pinned to a specific year — ideal for audits and reproducible year-over-year comparisons. The version selector is also available in the Report Builder. - **[Reporting] Filter flight reports by domestic vs. international** - A new filter on the flight reporting page lets clients display only domestic flights (same origin and destination country), making it easy to separate domestic from international travel at a glance. - **[Reporting] Country codes in CSV exports** - Flight, car, and train CSV exports now include ISO country codes for origin and destination, giving clients cleaner data for downstream reporting without extra lookups. - **[Reporting] Saved flight distance band configuration** - Client-specific short/medium/long-haul distance thresholds are now persisted in the backend and flow through automatically into reporting. The flight reporting page reflects each company's configured bands instead of falling back to generic defaults. - **[Imports/Exports] Automatic flight number capture during CSV import** - Flight numbers are now automatically extracted during CSV imports, enabling richer travel data without additional manual effort. - **[Calculations] Flexible emission recalculation** - Teams can now re-run emission calculations for travel data activities using a different methodology — useful for corrections and scenario comparisons. - **[Dashboard] Ride-hailing data table** - A new detailed info table for ride-hailing emissions is live on the dashboard, giving clients better visibility into this travel category. ### Improvements [#improvements] - **[Reporting] Reporting cache cleared automatically after imports and methodology changes** - The reporting cache is now automatically invalidated after a CSV import or a methodology switch, so clients see up-to-date data immediately without needing to manually refresh. - **[Reporting] Missing values shown as dash instead of zero** - Dashboard tables now display "–" instead of 0 for missing data, making it clearer when a value was not provided versus genuinely being zero. - **[Reporting] "Avg Ticket Price" renamed to "Avg Price"** - The metric label has been updated across all reporting views to better reflect that it covers hotels, cars, and other travel types — not just flights. - **[API] More flexible calculation payloads** - The API now accepts distance-only or duration-only payloads for relevant calculation types. Existing integrations are unaffected. - **[Calculations] Improved car rental distance estimation** - Distance is now correctly derived from rental duration alone when no distance data is provided, improving accuracy for car rental records. - **[Imports/Exports] Automatic whitespace trimming during import** - Whitespace in travel data fields is automatically trimmed during import, reducing data quality issues downstream. - **[Dashboard] "Bookings" renamed to "Segments"** - Terminology has been updated across the platform for consistency. - **[Performance] Faster reporting page load times** - Reporting query optimisations mean dashboards load noticeably faster for clients with large datasets. ### Bugfixes [#bugfixes] - **[Reporting] Flight distances now consistent across dashboard and CSV export** - Fixed an issue where the same flight could show different distances in the dashboard versus a CSV export. Both now always derive distance from the origin/destination pair. - **[Reporting] CSV export CO₂ scope filters now applied correctly** - Fixed an issue where the CO₂ scope filter selection (RFI/no-RFI, TTW/WTW) was ignored in travel data CSV exports regardless of what was chosen. - **[Reporting] Car fuel type breakdown now resolves correctly from vehicle codes** - Fixed an issue where the fuel type breakdown on the car dashboard was not resolving fuel types from SIPP vehicle codes, causing an inflated "unknown" bucket. Reports are now more accurate and granular for clients with car rental data. - **[Reporting] Unknown airline shown consistently across all airline charts** - Fixed an issue where flights with missing airline information were not consistently labelled "Unknown", causing segment counts and emissions totals to appear misaligned. - **[Reporting] CO₂ values in reports now always accurate** - Fixed an issue where reports could display incorrect CO₂-equivalent figures under certain conditions. - **[Reporting] Airline logos now render correctly in PDF exports** - Fixed an issue where airline logos were sometimes missing in exported PDF reports. A clean placeholder now appears when a logo cannot be resolved. - **[Dashboard] Session stability when switching between Admin and client dashboards** - Fixed an issue where switching between the Admin and client dashboards could break re-login, previously requiring users to clear their browser history. # May 2026 release notes (/changelog/release-notes/2026/2026-may) ### New Features [#new-features] - **[Dashboard] Redesigned Hotels Dashboard** - The Hotels Dashboard has been significantly redesigned with richer analytics for travel managers, including new hotspot charts, radar charts, tabbed views, and a distribution breakdown card. The result is a much deeper view of hotel programme performance. ### Improvements [#improvements] - **[Data Accuracy] More accurate train emission calculations (REM)** - Train emissions calculated with the Rail Emissions Model (REM) methodology are now more accurate. This release improves operator-specific factor resolution, fuel type handling, cross-border routing accuracy, and country-level emission factor matching. - **[Performance] Faster hotel chain data lookups** - Hotel chain data is now cached more efficiently, improving the speed and consistency of hotel-related lookups. ### Bugfixes [#bugfixes] - **[Dashboard] Flight routing filters working correctly again** - Fixed an issue where flight routing filters were not applying correctly on the flight reporting page. Filtering flights by route now returns the expected results. # October 2026 release notes (/changelog/release-notes/2026/2026-oct) ### New Features [#new-features] - **[Support] A new Help Centre at squake.earth/support** - Search 60 articles across 8 topics, including new guides for getting started and for Gravity, with suggestions as you type - Start from your role (travel management company, corporate, carrier or forwarder, buyer of SAF, HVO or carbon credits, or Gravity user), or submit a request directly from the page - Links to release notes, calculation changes and the Developer hub are one click away - **[Calculations] Methodology library on squake.earth** - A plain-language page for each supported methodology at squake.earth/methodology-library: what it calculates, which trip details it uses and where its factors come from - Compare the methodologies available for flights, cars, hotels and trains side by side - **[Calculations] Green Travel Data for train emissions** - Train calculations now support GREEN-TRAVEL-DATA, the successor to Green Travel Pledge, using the release that matches each journey's timetable period - Requests using the former GREEN-TRAVEL-PLEDGE name continue to work, and the Report Builder shows the methodology's version and source - **[Imports/Exports] Kilogram and tonne CO₂e columns in exports** - Dashboard, purchase and Report Builder CSV exports now include CO₂e in both kilograms and tonnes, so no unit conversion is needed - **[Dashboard] Welcome flow for invited users** - Users invited to an account with an already connected data source get a short welcome flow covering their role, data sources, priorities and travel-data challenges - Your answers help SQUAKE tailor onboarding and support to your needs --- ### Improvements [#improvements] - **[Reporting] Reporting is now the default landing page** - After sign-in, accepting an invitation, completing the welcome flow or clicking the logo, you now land on Reporting - **[Reporting] Trend charts adapt to the selected date range** - Trend charts group data by day, week or month depending on the period you select, so they stay readable for both short and long ranges - **[Reporting] Clearer views when spend data is missing** - Reporting opens on CO₂e when no spend data is available, and the Spend and Both options are shown as unavailable - A loading animation now shows while Reporting data is being loaded - **[Performance] Faster account selector in Reporting** - The account selector appears immediately, while the account hierarchy loads in the background - **[Dashboard] Monitoring shows where the latest data ends** - Monitoring trend charts mark the date of the latest available data, so the rest of the period is easy to tell apart - "Trip unit" is now called "Trip count" - **[API] More detail on GATE4 flight calculations** - GATE4 results now report how each flight was matched (match level, matched record, matched flights and the booking class used), per leg for routed flights - GATE4 data covers departures back to 1 January 2019; both are described in the integration docs - **[Calculations] US-EPA energy scope labelled as TTW** - For cars, flights and trains calculated with US-EPA, the energy scope is now labelled tank-to-wheel (TTW). Reported emissions are unchanged - **[Imports/Exports] Richer imported bookings** - Imported bookings now link connected flight and train journeys and include hotel stays and car rentals with their details, with standardised station names and consistent trip amounts - The upload errors file now lists methodologies that were skipped for a row - **[Dashboard] Better localisation** - Country names are now translated, and Data Explorer wording in French and German has been improved - **[Stability] Routine security and dependency maintenance** - Applied routine security hardening and dependency updates. No action is required on your part. # September 2026 release notes (/changelog/release-notes/2026/2026-sep) ### New Features [#new-features] - **[Dashboard] The dashboard now speaks French and German** - Choose English, French or German from the sign-in and profile screens - Your saved language is now applied consistently every time you sign in, and the French and German wording has been refined - **[API] User invitation endpoints** - Invite new users to your account via the API - Invitation emails are sent in English, German or French, with links that open in the invitee's language - **[Reporting] Full-trip view in the Flight Data Explorer** - See complete trip routings, not only individual segments - Mixed-cabin trips are attributed to their highest booking class - **[Dashboard] Clearer guidance when data is missing** - Activity pages without travel data now show a banner with a direct way to contact SQUAKE - Empty car market charts are replaced with an explanation of what data is available - **[Dashboard] Legal link in the account menu** - Legal information is now one click away for all signed-in users --- ### Improvements [#improvements] - **[Performance] Faster reporting across the dashboard** - Overview, Flight, Hotel, Car, Rail and Monitoring pages load noticeably faster, including the first time a view is opened - Hotel Explorer loads details on demand, and filters for accounts with several sub-accounts respond more quickly - **[API] Faster travel-data submission** - Requests that submit travel data via the API are processed more efficiently - **[Calculations] Rail Emissions Model updated to the Tier 1–5 dataset** - Adds Tier 2 resolution and revised calculation bases and detour factors for train emissions - Commuter and urban rail train types are now mapped consistently across other supported methodologies - **[Dashboard] Monitoring is easier to read** - New information bubbles explain each Monitoring element and CO₂e intensity guidance - Chart values follow a consistent Target, tolerance, Actual order, and provisional months are shown separately from months with no data - Previous-period comparisons are hidden when activity coverage is incomplete, and future months no longer show misleading zero values - Monitoring is now the default landing page after sign-in - **[Data Accuracy] Consistent hotel chain grouping** - Hotel chain names are resolved during import, so hotel reporting groups the same chain together reliably - **[Data Accuracy] Spend converted with official historical exchange rates** - Travel spend in other currencies is now converted using official historical rates for the travel date - For trips dated in the future, the booking date and current rate are used - **[Data Accuracy] Consistent trip statuses** - Trip statuses from different data sources are now mapped to one common set of statuses - **[Data Accuracy] Traveler email no longer required** - Traveler records can now be saved without an email address - **[Reporting] Methodology settings explained** - Program Settings and Reporting now use the same methodology labels, and activities without a configured methodology stay visible - Activity-specific methodology settings come with clearer explanations - **[Imports/Exports] Clearer exports** - Reporting exports now show progress while the file is being generated, and tell you if generation fails - The per-leg CSV export option is now called “Create one row per leg” in Reporting and Data Explorer - **[Dashboard] Navigation and wording polish** - Navigation chapters other than Travel Program are collapsed by default, and your company logo is shown automatically - Car Data Explorer per-unit averages are now shown per rental, and headings, booking class and Program wording are more consistent - **[Stability] Routine dependency maintenance** - Applied routine dependency updates, including security patches. No action is required on your part. # Webhook Updates (/changelog/webhook-updates) ## Important Changes Starting July 1, 2025 [#important-changes-starting-july-1-2025] We're simplifying our webhook payload structure to make integration cleaner and more straightforward. ### What's Changing? [#whats-changing] Starting **July 1, 2025**, all new webhooks will deliver a streamlined payload structure by removing the wrapper `data` key. #### Before (Old Format) [#before-old-format] ```json { "data": { "id": "file_XXX-XXX-XXX-XXX-XXX", "filename": "SQUAKE-CompensationConfirmation-euc1XXX.pdf", "purpose": "confirmation_document", "size": 100, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/...." } } ``` #### After (New Format) [#after-new-format] ```json { "id": "file_XXX-XXX-XXX-XXX-XXX", "filename": "SQUAKE-CompensationConfirmation-euc1XXX.pdf", "purpose": "confirmation_document", "size": 100, "type": "pdf", "download_url": "https://squake.s3.eu-central-1.amazonaws.com/...." } ``` ### Security Enhancement [#security-enhancement] Along with the structural change, we're updating our security implementation: - **Previously**: Signature hash was calculated based only on the content inside the `data` key - **Now**: Signature hash is calculated based on the entire webhook body This provides more comprehensive payload integrity verification. ### Timeline & Compatibility [#timeline--compatibility] - **Effective Date**: July 1, 2025 - **Backward Compatibility**: Existing webhooks created before July 1, 2025 will continue to work with the current format - **Action Required**: No immediate action needed for existing integrations ### Benefits [#benefits] - **Cleaner Structure**: Direct access to webhook payload without unnecessary nesting - **Improved Security**: Enhanced signature validation covering the entire payload - **Simplified Integration**: Easier to parse and work with webhook data ### Migration Checklist [#migration-checklist] If you're planning to create new webhooks after July 1, 2025: - [ ] Update your webhook handler to expect the new flat structure - [ ] Adjust your signature verification logic to validate the entire body - [ ] Test your integration with the new format before going live ### Need Help? [#need-help] If you have any questions about these changes or need assistance with migration, please don't hesitate to reach out to our support team.