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.

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. Add unique account handles to use the CSV to create new client accounts.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.
  • Basic requirements
    Include the following headers in each row to improve tracking and analytics:
    version
    This is a required field. Must be set to 2 for all rows.
    shipment_id
    Use this field as an external id to reconcile emission estimates with shipments in your system. Generate this string to be able to identify the shipment in the results CSV.
    client_account_id
    Links the emission estimate to a client account when provided. Required to generate an analytics report for your customers about their emissions.
    client_account_handle
    Links the estimate to an existing client account if the handle matches. If the handle doesn't exist and no client_account_id is provided, a new client account is created. Required to generate an analytics report for your customers about their emissions
    client_account_currency
    The account's currency. ISO 4217 3 character currency code. Note: Lune does not support all currency codes. This is a required field if the client account is created through the CSV.
    is_shipment
    Specifies whether the estimate is for an actual shipment. If left blank, the default value is false.
    shipped_at
    Records the shipment date and time 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
    Cargo weight in kilograms.
    containers
    Number of TEUs.
    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
    Total distance travelled (in kilometres) for the leg.
    source
    The starting point of the shipment.
    legx_destination
    The end point of the leg; the starting point of the following leg.
    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
    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. The available inputs for method match the values in the API reference. Go to the list of method values in the API reference for a full list of supported inputs for method.

    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 estimate's unique id.
    dashboard_url
    A link to the specific emission calculation page in the Lune dashboard.
    total_mass_tco2
    The overall emission estimate in tCO₂e.
    legx_total_tco2
    The emission estimate for each leg in tCO₂e.
    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!