- Simple estimate: A single input method that doesn’t require specific flight information.
- Granular estimate: A detailed method that requires additional details, such as flight number and departure date, for greater accuracy.
Pre-requisites
Complete the following setup steps before using this guide:Generate an API key and authenticate your account.
Set up Client Accounts to track emissions for your individual customers.
Review how to calculate emissions for multi-leg shipments using the API.
1. Gather shipment details
As air shipments do not use containers, the
mass
parameter in the request should be strictly in tonnes or kilograms.Simple estimate
To create a simple estimate, choose one of the following for themethod
property:passenger_plane
: For passenger aircraft that also carry cargo.cargo_plane
: For dedicated cargo-only aircraft.plane
: For unknown plane configurations, this option will use a weighted average of passenger and cargo aircraft emissions.
Granular estimate
To calculate a precise estimate, include both theflight_number
(in IATA or ICAO format) and departure_on
(as a UTC timestamp) in the method
object.For example, the legs
object below represents a shipment segment that flew on flight number AC 856 from Toronto Pearson Airport (YYZ
) to London Heathrow Airport (LHR
), departing on 28 October, 2024.
2. Make the API request
To calculate emissions for air shipments, use the estimates/shipping/multi-leg/ endpoint. Send aPOST
request to this endpoint to create an emissions estimate.Remember to add the Authorization header with your generated Bearer Token, as well as a Lune Account header with the client account that this emission is being calculated for.
Sample request
The sample request below generates an estimate for a shipment with one leg transported by air from Toronto Pearson Airport to London Heathrow Airport.
What to do next...
Offset the calculated emissions by purchasing carbon credits through the API.
Generate an analytics report for your customers about their emissions.
Troubleshooting
When using the granular estimate, if themethodology
property may return flight_number_unavailable_fallback
. This indicates that a simple estimate was applied, likely because the flight could not be located.If this happens, check the following:- Ensure the
departure_on
date is correctly formatted in UTC. - Confirm the source and destination airport codes are accurate.