Lune Docs Logo

Road shipments

Calculate the CO₂e emissions for a shipment by road using one of two methods:
  1. Simple estimate: A single input method requiring only truck type.
  2. Granular estimate: A detailed method allowing inputs for any type of fuel, including sustainable fuels or fuel blends. Inputs for road gradients and emission standards are also available.

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

Simple estimate
To calculate a simple estimate, select the appropriate value for the method property.There are many possible options. Each value represents a combination of three key parameters: truck type, fuel, and load characteristics.The values follow a consistent naming pattern to convey detailed information:
  • Truck type: The category of the vehicle, by GVW. For example, vans, MGVs, and HGVs.
  • Fuels type: Specifies the fuel used. Diesel is assumed if the vehicle is not electric or if no fuel type is specified.
    • cng: Compressed natural gas
    • lpg: Liquefied petroleum gas
    • lng: Liquefied natural gas
    • bio-lng: Liquefied biomethane
  • Load characteristics: Specified using keywords such as light_load, heavy_load, or container. Average load is assumed if no load characteristics are indicated.
Additional details about the shipment may be indicated using keywords such as refrigerated or tanker. Some truck types are prefixed with na to indicate a North American vehicle.All method values start with truck and use underscores (_) to separate components. The most commonly used method values are shown below.
truck_generic_van
Use if you know a Light Commercial Vehicle (LCV) is being used for transport but lack details about the specific truck type or fuel type.
truck_generic_hgv
Use if you know a Heavy Goods Vehicle (HGV) is being used for transport but lack details about the specific truck type or fuel type.
truck_articulated_40t
This is the most common articulated truck type for European countries, except Nordic.
truck_articulated_60t
This is the most common articulated truck type for Nordic countries.
truck_na_general
This is the most common articulated truck type for the United States.
Look through the entire list of options to determine which value best represents your shipment.For the full list of supported values, go to the API Reference.
Granular estimate
To calculate a granular estimate, provide, at minimum, the vehicle type and fuel. For example, to calculate an emission estimate of a truck using a fuel blend, the method object would look like:
  • Detailed road shipment
  • Many properties are available as part of this calculation method to provide the most accurate emission estimate. See them below:If optional properties are not provided, the value will default to most representative option given the information provided.Including all optional and required properties, the method object for a rigid diesel truck traveling on flat roads in a city with heavy traffic will look like this:
  • Detailed road shipment
  • 2. Make the API request

    To calculate emissions for road 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
    Below is an example of a simple emission estimate calculation for a 4.36 tonne shipment traveling 592 miles using an average heavy goods vehicle:
  • CURL request for a road 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 road transport legs of your shipment. You’re doing your part in climate-conscious logistics!

    What to do next...

    Troubleshooting

    If encountering any issues with the simple estimate, please double check your input to ensure it matches one of the expected values in the API reference.For further assistance, contact our support team.