🧳Travel Data API

Push structured trip records into SQUAKE for emissions reporting and carbon accounting.

The Travel Data API lets you ingest complete trip records β€” flights, hotels, car rides, and train journeys β€” directly into SQUAKE's reporting and analytics platform.

Use it when you want SQUAKE to store, attribute, and calculate emissions for travel data you already have, rather than performing an on-demand calculation at booking time.


When to use this endpoint

Scenario
Recommended endpoint

Real-time emissions estimate at booking / 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

The key difference: /v2/calculations is a synchronous, low-latency calculation β€” you pass activities and get emissions back in one call. /v2/travel-data is a data ingestion endpoint β€” it accepts trip records, calculates emissions per activity, stores everything in your SQUAKE account, and makes it available for dashboards, reporting, and carbon accounting.


The data model

Every request wraps one or more trips. A trip groups activities that belong together (e.g. a single business journey) and carries metadata like cost, traveler, and cost center.

trips[]
  β”œβ”€β”€ trip_reference        (your unique ID β€” reusing it appends activities)
  β”œβ”€β”€ trip_name / purpose / status
  β”œβ”€β”€ start_date_utc / end_date_utc
  β”œβ”€β”€ booking_provider / pnr
  β”œβ”€β”€ amount_in_cents / currency
  β”œβ”€β”€ cost_center {}
  └── activities[]
        β”œβ”€β”€ type: flight | hotel | car | train
        β”œβ”€β”€ methodology
        β”œβ”€β”€ traveler {}
        └── [type-specific fields]

Supported activity types

Type
Available methodologies

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-PLEDGE, SQUAKE, US-EPA


Environments and authentication

Environment
Base URL

Sandbox

https://api.sandbox.squake.earth

Production

https://api.squake.earth

All requests require an API key β€” pass it as a Bearer token or as the username in HTTP Basic Auth (no password). Sandbox and production are fully isolated and use separate keys. Create keys in the SQUAKE Dashboardarrow-up-right.

πŸ’‘ Always develop and test against the sandbox environment first.


What to expect from the response

A successful 200 response returns:

  • A total carbon_quantity across all activities in the request (in kilograms by default).

  • An items array with per-activity breakdowns β€” each entry echoes your external_reference, type, calculated carbon_quantity, distance, and methodology details.

If a single activity cannot be calculated (e.g. a missing required field), its result will contain a methodology.errors array rather than causing the entire request to fail.


Next step

β†’ Create Travel Data Items β€” full endpoint reference with copy-paste request/response examples and field-by-field explanations.

Last updated