Lune Docs Logo

Air shipments

Calculate the CO₂e emissions for a shipment by road using one of two methods:
  1. Simple estimate: A single input method that doesn’t require specific flight information.
  2. 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:
/illustrations/stamp-key.png
Generate an API key and authenticate your account.
/illustrations/stamp-accounts.png
Set up Client Accounts to track emissions for your individual customers.
/illustrations/stamp-route.png
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 the method 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.
    For example, to specify a leg travelling from Toronto Pearson Airport (YYZ) to London Heathrow Airport (LHR) on a cargo plane, the object would look like this:
  • Simple air shipment leg
  • Granular estimate
    To calculate a precise estimate, include both the flight_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.
  • Granular air shipment leg
  • 2. Make the API request

    To calculate emissions for air shipments, use the estimates/shipping/multi-leg/ endpoint. Send a POST 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.
  • CURL request for an air shipment
  • To interpret the results, go to the Multi-leg shipment guide. If your shipment has multiple legs involving different transport methods, refer to the relevant guides for constructing your multi-leg object.Success! You’ve successfully calculated emissions for the air transport legs of your shipment. You’re on the path to a greener supply chain!

    What to do next...

    Troubleshooting

    When using the granular estimate, if the methodology 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.
    For further assistance, contact our support team.