Lune Docs Logo
Log inContact us

CSV upload

Calculate the CO₂e emissions for your shipment by uploading a CSV.

Pre-requisites

Complete the following setup steps before using this guide:
/illustrations/stamp-accounts.png
Set up Client Accounts to track emissions for your individual customers.
/illustrations/stamp-analytics.png
Log in and familiarize yourself with the Lune dashboard.

1. Fill in the CSV

Each row in the CSV represents a single shipment, supporting up to 10 legs per shipment. At least one leg is required per row.For each shipment, include the:
  • Distance travelled
  • Cargo weight
  • Transport method
When adding multi-leg shipments, define the cargo weight once, but specify the distance and transport mode for each legInclude the client account handle or ID in each row to unlock tracking and reporting features for your customers. If new account handles are added, new client accounts will be created when the CSV is uploaded.Get started with ready-made CSV templates that can be found in the Lune dashboard:
  • Sea shipment template: Five single-leg shipments by sea.
  • Road shipment template: Three single-leg shipments by road.
  • Air shipment template: Three single-leg shipments by air.
  • Train shipment template: Three single-leg shipments by train.
  • Multi-modal template. Three shipments with three legs each, using different transport methods. You can create a multi-modal sheet by combining the columns of the sea, road and air templates.
  • Use the prefix legx_ for values that are unique to each leg, replacing x with the leg number. For example, use leg1_ for the first leg and leg6_ for the sixth leg.
  • Go to the CSV reference for a full list of available properties and values. Each property is a heading on the CSV file.
    Basic requirements
    Include the following headers in each row to improve tracking and analytics:
    version
    Required. Set this to 2 for all rows.
    shipment_id
    A unique identifier for reconciling emission estimates with shipments in your system. Generate this string to track shipments in the results CSV.
    client_account_id
    Links the emission estimate to an existing client account. Required for generating emission reports for your customers.
    client_account_handle
    Associates the estimate with an existing client account if the handle matches. If no matching handle is found and no client_account_id is provided, a new client account is created. Required for generating emission reports for your customers.
    client_account_currency
    The client account’s currency, specified as an ISO 4217 three-letter currency code. Note: Lune does not support all currency codes. Required if creating a new client account via CSV.
    is_shipment
    Indicates whether the estimate is for an actual shipment. Defaults to false if left blank.
    shipped_at
    The shipment date and time, recorded for analytics purposes. Use the RFC 3339 section 5.6 timestamp format.
    Cargo weight
    Specify cargo weight using one or both of the following headers in each row:
    mass_kg
    The shipment’s weight in kilograms. Either mass_kg or containers is required. Both can be provided for more accurate estimates.
    containers
    The number of TEU containers in the shipment. Either mass_kg or containers is required. Both can be provided for more accurate estimates.
    Refer to the sea shipment template for an example where both values are included in a single shipment.
    Distance or route
    Define the travel details for each leg of the shipment by specifying either the distance in kilometres or the start and end points of the leg.
    legx_distance_km
    The distance traveled during this shipment leg, in kilometres.
    source
    Where the shipment originated.
    legx_destination
    Where the leg terminated; where the subsequent leg begins.
    The source and destination can be identified through:
    • Comma-seperated address, ending with a country code: The country code is a 3-letter ISO 3166 country code. For example, Apple Lane, London, SW1A 2AA, GBR.
    • UN LOCODE For example, CA.
    • IATA or ICAO airport code: For example, LHR.
    • Geographical coordinates: Should be formatted as lat x lon y . For example: lat 43.65 lon 79.38.
    Transport method
    Specify the transport method for each leg using the legx_method heading. Common values include:
    • cargo_plane
    • container_ship
    • diesel_truck
    All the available values can be found in the CSV reference.If tracking a sea shipment by vessel, leave the legx_method column blank and instead provide the vessel’s IMO number or name under legx_vessel_identification. Examples include:
    • IMO number: 9619969
    • Vessel name: MARIBO MAERSK
    Refer to the sea shipment template for an example.Additional details such as fuel, trade lane, and refrigeration can be added to the shipments row. For a full list of available headings, go to the CSV reference.

    2. Upload the CSV

    Populate the CSV sheet using your preferred editor. You can either omit or leave blank any non-required columns. Once all required values have been added, save the file in .csv format, ensuring it has the .csv file extension.Next, go to the logistics spreadsheet calculation page to upload your file. You can upload the CSV by either dragging and dropping it onto the page or clicking the Upload button to select the file manually. Make sure the file size does not exceed 2MB.An image showing the drag and drop area of the dashboard, where the CSV can be uploaded.Once uploaded, the file will begin processing automatically. You will receive an email notification when the processing is complete.

    3. Interpret the results

    Once the sheet has been processed and you receive the confirmation email, you can download the results directly from the confirmation email.The results are also available in a table at the bottom of the logistics spreadsheet calculation page. This table displays each upload, the number of calculations processed, and provides an option to download the results.The results are provided in CSV format. Your original submitted data remains intact, with a few additional headings added to the results file:
    estimate_id
    The unique identifier for the emission estimate.
    dashboard_url
    The URL to the specific emission calculation page in the Lune dashboard. This page allows you to review your estimate, understand how the emissions were calculated, and offset emissions.
    total_mass_tco2
    The total emission estimate for the shipment, measured in tCO₂e.
    legx_total_tco2
    Prefixed with the relevant leg (legx_). The emission estimate for the shipment leg, measured in tCO₂e.
    For a full list of possible additional headings in the results CSV, go to the CSV Reference.Success! You’ve successfully calculated emissions for your shipment. This brings you one step closer to climate compliance!

    What to do next...

    Now that you have your estimate, there are several actions you can take!