Skip to main content

Get a shipping emission estimate (single)

Path Parameters
idstringrequired

The estimate's unique identifier

Returns
massobjectrequired

metadataobject

An arbitrary dictionary (key-value pairs) to store application-specific information.

Lune doesn't use this information for order processing. Its purpose is for the API clients to be able to attach arbitrary information (to an order for example) and then retrieve it.


idempotency_keystring

Account-unique identifier provided by the client.

idempotency_key has two purposes:

  1. Clients can safely retry estimate requests without accidentally performing the same operation multiple times.
  2. Clients can use idempotency_key to reconcile estimates with entities on their system.

distanceobject

adjusted_distanceobject

Distance estimation after distance adjustment factors have been applied. Adjusted factors are decided by GLEC and are added to make distances more realistic.


distance_calculation_methodrequired

The method we used to determine the shipping distance.

null in case of logistics sites.


routerequired

The shipping route.

null in case of logistics sites and situations where the concept of a route doesn't make sense or we're unable to return the route. That includes the following situations at the moment:

  • Routes where source or destination is an address (or both are).
  • Most land and inland waterways routes.
  • The actual distance value was provided by the user.
  • The emission estimate was created before 2023-09-22.

converted_shipmentrequired

The shipment after conversion to the emission factor unit (mass to/from TEU).

null if no conversion was necessary.


shipment_conversion_methodrequired

The method we used to convert the shipment to the emission factor unit.

null if no conversion was necessary.


emission_factorobjectrequired

methodologyarray of enumrequired

Summary of the methodology used to calculate emissions or any value which is a prerequisite.

imo_unavailable_container_ship_fallback: the vessel IMO was not found, therefore a generic container ship emission factor has been used.


distance_calculation_detailsrequired

Information regarding why an alternative distance calculation method was used.


idstringrequired

The emission calculation unique identifier


is_shipmentbooleanrequired

When true, the emission estimate refers to an actual shipment of goods, will be included in Lune analytics and can be included in any CO2 emissions reporting.

This property exists to distinguish booking quotes or forecasts from actual shipments where goods are moved.

You can mark an estimate as shipment at any time.


shipped_atstringdate-timerequired

The date and time of shipping the goods for the purpose of analytics (it doesn't affect emission calculations in any way).

If a value is provided when creating or updating an estimate we use the value. Otherwise defaults to the current time when creating estimates and remains unchanged when updating estimates.

This property must be formatted as RFC 3339, section 5.6 timestamp.

Examples:

  • 2023-12-01T12:30:30.000Z
  • 2023-12-01T12:30:30Z
  • 2023-12-01T11:30:30+01.00

quoterequired

requestobjectrequired

Parameters for estimating shipping emissions


metadataobject

An arbitrary dictionary (key-value pairs) to store application-specific information.

Lune doesn't use this information for order processing. Its purpose is for the API clients to be able to attach arbitrary information (to an order for example) and then retrieve it.

  • GET /estimates/shipping/{id}
  • curl 'https://api.lune.co/v1/estimates/shipping/Vxg3b7MoBkrNQA328Rgpnvmw1J8a6Lqj' \
      -H 'Authorization: Bearer <API_KEY>'
  • Response
  • {
      "id": "08QD7GPaBx5b6Y6mJlWyONXLvrZljRE2",
      "is_shipment": true,
      "shipped_at": "2023-11-20T10:20:30Z",
      "mass": {
        "amount": "2.969503",
        "unit": "t"
      },
      "quote": {
        "estimated_quantity": "2.969502",
        "estimated_commission": "8.03",
        "estimated_total_cost": "80.18",
        "estimated_offset_cost": "72.15",
        "requested_value": null,
        "requested_quantity": "2.969503",
        "currency": "USD",
        "bundles": [
          {
            "bundle_id": "q9aKx7b6nNXMk3Yv3pD1mlW5Od2eLZE8",
            "bundle_name": "Conserving forests in Asia",
            "quantity": "2.821027",
            "unit_price": "12.42",
            "gross_unit_price": "13.8",
            "offset_cost": "35.04",
            "insufficient_available_quantity": null
          },
          {
            "bundle_id": "xWaKJL3okjD46VpJ4yGXnQNZRe1vzP0w",
            "bundle_name": "Ocean Carbon Removal",
            "quantity": "0.148475",
            "unit_price": "250",
            "gross_unit_price": "277.78",
            "offset_cost": "37.12",
            "insufficient_available_quantity": null
          }
        ]
      },
      "distance": {
        "amount": "22466.6346",
        "unit": "km"
      },
      "methodology": [],
      "request": {
        "shipment": {
          "containers": "2"
        },
        "route": {
          "source": {
            "locode": "CNSGH"
          },
          "destination": {
            "locode": "NLRTM"
          }
        },
        "method": {
          "vessel_type": "container_ship"
        }
      }
    }