Lune Docs Logo
Log inContact us

AIS vessel tracking

Calculate the CO₂e emissions for a completed sea shipment by identifying the vessel used for transport. Vessel tracking is available for shipments that have been completed at least 24 hours prior to making the request.

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

  • When setting the route for sea transport, the source and destination should be locations of existing ports, preferably in UN/LOCODE format. If the port locations can’t be identified, consider using the distance property for route instead.
  • For vessel tracking, the method object requires two inputs to calcualte the CO₂e emissions:
    1. Either a vessel_name or vessel_imo_number (without the IMO prefix).
    2. A vessel_tracking object, indicating the dates that the vessel departed and arrived.
    If the vessel is a container ship, additional properties can be provided to enhance the accuracy of the emissions estimate.
    Container ship estimate
    To create a container ship estimate, add vessel_type: "container_ship" to the method object. As with all vessel tracking, the method also requires the vessel_tracking object with the dates of the shipment, and either the vessel_name, or vessel_imo_number (without the IMO prefix).For example, a container ship with the number IMO8712345, would be added in the object like so:
  • Method object
  • If the container is refrigerated, include the optional refrigerated boolean in the method object. For greater precision, add the trade route using the trade_lane property. If the trade lane is not specified, Lune will automatically infer the trade lane from the route object. For example, if shipping from Port of Santos, Brazil to Port of Sines, Portugal, include the trade_lane property, with the value disaggregated_europe_to_south_america.Trade lane values are bidirectional. In the example above, disaggregated_europe_to_south_america covers trade routes between Europe and South America, in both directions. For the complete list of trade lane values, go to the API Reference.With all optional properties included, the request for a container ship with two refrigerated TEUs that has travelled from Port of Santos, Brazil to Port of Sines, Portugal would appear as:
  • Container ship vessel tracking request
  • Non-container ship estimate
    For non-container ships, the method only requires the vessel_tracking object and either the vessel_name or vessel_imo_number. The vessel_tracking object must include the dates of arrival and depature. An example method object using a vessel name can be seen below:
  • Method object
  • 2. Make the API request

    To calculate emissions for sea 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 API Key as 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 10.36 tonnes shipment that travelled from the Port of Santos to the Port of Sines, named Lune Voyager.
  • Method object
  • 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! Your sea transport emissions for your vessel have been calculated. Each step counts in the sustainability journey!

    What to do next...

    Now that you’ve calculated emissions for your vessels, here are some next steps to explore!

    Troubleshooting

    If you used the vessel name and the methodology is returned as imo_unavailable_container_ship_fallback, consider using the IMO number. If the vessel name matches multiple vessels with different IMO numbers or no vessel at all, an average is calculated based on the identified trade lane (this is the fallback methodology).