Calculate

Freight (GLEC) — the factor's denominator picks the method: mass × distance (tonne-km) or TEU × distance (TEU-km)

Send mass for a factor denominated per tonne-km, teu for one denominated per TEU-km (the sea-container family — a TEU is a twenty-foot container slot, not a mass). Sending the wrong one is refused with 422 gc_freight_basis_mismatch rather than silently multiplied.

post/v1/calculate/freight

Request

  • Base URL: https://api.greencalculus.com
  • URL: https://api.greencalculus.com/v1/calculate/freight
  • Auth: HTTP bearer

Query parameters

as_ofstring
Example:2026.175

Run this calculation against an ARCHIVED data version. Every factor used is the row as it stood at that version, and meta.gc_version, meta.version_pin, the citation and the receipt all report it. Unlike GET /v1/factors/{key}?as_of=, an unavailable version is REFUSED (400) rather than served from current data with a label: a calculation returns a single figure that goes into a report under a receipt, so it must be the version it claims. A factor key that did not exist yet at that version is refused for the same reason. Archived versions are listed in the error, and by GET /v1/factors/{key}?as_of= on a miss.

Request body

factor_keystring required
countrystring

Optional. The country the ACTIVITY belongs to — ISO3, ISO2 or a name ("deu", "DE", "Germany"). When given, the response carries factor.resolution stating whether the factor used is published for that country (tier: exact), is a global figure applied to it (global), or belongs to a different country (proxy, with proxy_of naming which). Omit it and no geography claim is made — the response is unchanged. A country we do not recognise yields no claim rather than a wrong one.

Example request

{
  "mass": {
    "unit": "t"
  },
  "teu": {
    "value": 2,
    "unit": "teu"
  },
  "distance": {
    "unit": "km"
  },
  "factor_key": "freight.road_hgv.tonne_km",
  "country": "deu"
}

Response

Tonne-km or TEU-km emissions + working + source

methodologystring
standardstring
activityobject

ghg-activity only. freight sends transport, spend-based spend, business-travel trip.

scopeobject nullable
notestring nullable
proof_urlsstring[]

Every factor used by this answer, as a public proof URL pinned to the data version. A portfolio calculation may list many; cite per line from here. Contains no request data — each URL is a fact about the GreenCalculus corpus and is identical for every caller.

Example response

{
  "methodology": "ghg-activity",
  "standard": "GHG Protocol Corporate Standard (activity-based)",
  "emissions": {
    "value": 654.8,
    "unit": "kg CO2e"
  },
  "factor": {
    "uncertainty": {
      "basis": "published"
    },
    "citation": {
      "source_id": "DEFRA_2026",
      "cell_ref": "'UK electricity'!E25"
    },
    "resolution": {
      "tier": "proxy"
    }
  },
  "working": {
    "unit_conversion": "5 MWh = 5000 kWh (converted to the factor's basis)",
    "formula": "5000 kWh × 0.13096 (kg CO2e per kWh) = 654.8 kg CO2e"
  },
  "source": {
    "id": "DEFRA_2026",
    "cell_ref": "'UK electricity'!E25",
    "retrieved": "2026-06-18"
  },
  "meta": {
    "gc_version": "2026.180",
    "gc_updated": "2026-08-19"
  },
  "receipt": {
    "id": "gcr_5a7b64dfa501bfea508cba7d0e5d8d03…",
    "algorithm": "sha256",
    "mb_version": "2026.180"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.