calculate_freight
Freight & logistics emissions (Scope 3 Cat 4 & 9), GLEC framework. THE FACTOR'S DENOMINATOR PICKS THE METHOD — check the factor's unit before choosing the input. Per tonne-km: emissions = tonnes × km × factor, send "mass". Per TEU-km (the sea-container family, e.g. freight_detailed.sea.container.trans_suez.dry): emissions = TEU × km × factor, send "teu" — a TEU is a twenty-foot container slot, not a mass, and a forty-foot box is 2 TEU. Sending mass against a per-TEU-km factor is refused (422), not converted. Find mode factors via search_factors (section "freight" or "freight_detailed"), e.g. freight.road_hgv.tonne_km.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| teu | No | { "value": <number> } — container slots. Required for a per-TEU-km factor; omit for a per-tonne-km one. | |
| mass | No | { "value": <number>, "unit": "tonne|kg|lb" }. Required for a per-tonne-km factor; omit for a per-TEU-km one. | |
| distance | Yes | { "value": <number>, "unit": "km|mi|nmi" }. | |
| factor_key | Yes | Freight factor key. Its unit says whether to send mass (per tonne-km) or teu (per TEU-km). |