Thrust Carbon

Segment payload fields

Field-by-field reference for a segment request — the shared base every type extends, the location object, and each type's own fields.

Every segment request is the shared base fields below, plus the fields specific to its type. This page documents the storing model — the per-type oneOf union (openapi/models/segment-requests/segment-request.yaml) used by the Thrust Calculator's segment-creation endpoints, such as POST /projects/{projectId}/segments and its siblings. This page documents each field once. For the validation error codes returned when a payload is wrong, see Invalid segment codes — this page is for what a field means and accepts, not for what error you get when you get it wrong.

The read-only calculation endpoints use a different, flat schema

POST /emission and POST /emission/batch do not use the per-type union documented on this page. Reading a dozen near-identical type variants to find the handful of fields needed to price one segment was hard to follow, so those two endpoints instead take a single flat segment schema (segment-request-calculation.yaml) with one set of properties for every type. It carries the same field names and meanings as this page, minus booked_at (see the callout below) — but only type is schema-required, so per-type requirements that the union enforces structurally (e.g. that charter-jet needs fuel_burn_tonnes, or carbon needs quantity) are instead stated in each field's own description on that schema. This trades away per-type schema validation on those two endpoints in exchange for a single readable field list; see its own reference pages above for the full field-by-field detail rather than a duplicate table here.

Storing vs. calculating

booked_at, documented below, is defined only on this storing model — its own description says it is "only used when storing segments" — so it has been dropped entirely (not merely inert) from the calculation endpoints' flat schema described above. The other base fields marked "only relevant when storing segments" below (grouping, metadata, traveller_ref, record_locator, unique_id, traveller_profile) are different: they remain on both schemas, so the calculation endpoints still accept them — they just have no effect on a one-off calculation that doesn't store the segment.

Base fields

Every segment type extends this base (openapi/models/segment-requests/segment-request-base.yaml).

Prop

Type

Location fields

origin and destination (on every type except hotel, meeting and vacation-rental, which take a single location instead) are all the same object shape, from openapi/models/common-models/location.json. You don't need to fill in every field — provide whatever you have (an IATA code alone is often enough) — but two details commonly trip people up:

The country field is `country_code`, and unknown fields are silently ignored

There is no country field. The field is country_code (a 2-letter ISO 3166-1 alpha-2 code, e.g. GB). Sending country instead of country_code is not rejected — it is silently ignored, so the request still succeeds, just without the location data you thought you sent, and the resulting emissions figure quietly falls back to a more generic factor. This is true of unknown fields on this object generally: a typo doesn't error, it disappears.

coordinates is an object, not a string

coordinates is an object — {"latitude": 51.5073509, "longitude": -0.1277583} — not a "lat,lng" string. Each of latitude/longitude accepts a number or a numeric string.

Prop

Type

Segment types

Each type below extends the base fields above with its own fields, and (except hotel, meeting and vacation-rental) origin/destination location objects.

air

Prop

Type

Worked example, from the model's own example:

{
  "type": "air",
  "passengers": 1,
  "travel_class": "economy",
  "carrier": "BA",
  "aircraft_type": "788",
  "flight_number": "BA 112",
  "emitted_at": "2021-01-09",
  "price": 120,
  "price_currency": "USD",
  "origin": { "iata": "LHR" },
  "destination": { "iata": "JFK" }
}

car

Prop

Type

Provide either distance or days. You should only send the location at the start of the journey in origin (an IATA or 2-letter country code); if you also send destination, distance is computed between the two points.

Worked example, from the model's own example:

{
  "type": "car",
  "emitted_at": "2019-07-09",
  "price": 129.43,
  "price_currency": "GBP",
  "days": 3,
  "car_type": "IDAR"
}

car-mileage

Use this type when a traveller uses their own car — for instance, mileage expenses.

Prop

Type

Worked example, verified against staging:

// Request
{ "type": "car-mileage", "emitted_at": "2024-06-01", "distance": 200, "passengers": 1 }

Returns 0.033382 tonnes, methodology_applied: "car_mileage". car_fuel_type genuinely moves the per-km factor: diesel gives 0.169840/km, battery-electric gives 0.047450/km. Setting car_type to the ACRISS code IDAR gives 0.155040/km.

carbon

Pass in a known quantity of CO₂ directly — useful for offsetting a known amount, or getting its equivalencies, without a Thrust Carbon emissions calculation.

Prop

Type

Worked example, from the model's own example:

{ "type": "carbon", "quantity": 1.3 }

charter-jet

Prop

Type

fuel_burn_tonnes is required

Unlike every other type on this page, charter-jet has no distance/spend fallback: omit fuel_burn_tonnes (minimum 1) and the request is rejected.

Worked example, verified against staging:

{
  "type": "charter-jet",
  "emitted_at": "2024-06-01",
  "passengers": 4,
  "fuel_burn_tonnes": 5,
  "aircraft_type": "C25A",
  "origin": { "iata": "LHR" },
  "destination": { "iata": "CDG" }
}

Returns 30.21165 tonnes, with a radiative forcing factor of 1.89 in the audit.

coach

Prop

Type

Worked example, from the model's own example:

{ "type": "coach", "emitted_at": "2021-01-09", "price": 0, "price_currency": "GBP", "distance": 0, "passengers": 0 }

ferry

Prop

Type

Worked example, from the model's own example:

{ "type": "ferry", "emitted_at": "2021-01-09", "price": 0, "price_currency": "GBP", "distance": 0, "passengers": 0, "ferry_passenger_type": "average" }

hotel

Hotel, meeting and vacation-rental take a single location field (a location object) instead of origin/destination.

Prop

Type

You only get a hotel sustainability score if the hotel resolves to street level — provide a full address or coordinates in location, ideally both.

Worked example, from the model's own example:

{
  "type": "hotel",
  "emitted_at": "2021-01-09",
  "price": 0,
  "price_currency": "GBP",
  "rooms": 1,
  "nights": 1,
  "rating": 3,
  "location": { "city_code": "LON", "country_code": "GB", "city_name": "London", "region": "Greater London" }
}

meeting

Hotel, meeting and vacation-rental take a single location field (a location object) instead of origin/destination.

Prop

Type

Worked example, from the model's own example:

{
  "type": "meeting",
  "price": 200,
  "price_currency": "USD",
  "size": 500,
  "hours": 8,
  "attendee_count": 10,
  "laptop_count": 5,
  "hot_beverages": false,
  "cold_beverages": true,
  "meal_count": 30,
  "location": { "city_code": "LON", "country_code": "GB", "city_name": "London", "region": "Greater London" }
}

rail

Prop

Type

origin/destination accept lat/long pairs, IATA codes, country codes, or a train station UIC code prefixed XXXUIC (e.g. XXXUIC7061210 for London King's Cross).

Worked example, from the model's own example:

{
  "type": "rail",
  "emitted_at": "2023-12-25",
  "traveller_ref": "476958",
  "origin": { "iata": "LHR" },
  "destination": { "iata": "MAN" },
  "passengers": 1,
  "rail_type": "NATIONAL_RAIL",
  "price": 57.9,
  "price_currency": "GBP"
}

taxi

Prop

Type

Provide either a distance in KM, or spend-based data (price/price_currency), from which distance is estimated. Also send a country code for the journey in origin.

Worked examples, from the model's own examples:

{ "type": "taxi", "distance": 12 }
{ "type": "taxi", "origin": { "country_code": "GB" }, "price": 49, "price_currency": "EUR" }

vacation-rental

Hotel, meeting and vacation-rental take a single location field (a location object) instead of origin/destination. Send only one location — the rental's.

Prop

Type

Worked example, from the model's own example:

{
  "type": "vacation-rental",
  "emitted_at": "2019-07-09",
  "location": { "country_code": "US" },
  "travellers": 2,
  "nights": 4
}

On this page