Create a shipping emission estimate (multi-leg)
Each leg can be fulfilled by a different method, eg a truck, a plane or other options.
Parameters
Either a mass given in kilograms or tonnes (mass
) or the number of Twenty-foot Equivalent
Units (TEUs) (with their cargo type,
optionally). Note that providing mass
will result in more accurate estimates for methods other
than container_ship
. Estimates using container_ship
are more precise when the shipment is given
in TEUs.
One of
An array representing all the legs of a shipment.
A name to reference this calculation.
Bundle selection percentages.
The sum of all percentages must equal 100.
If not specified, the preconfigured allocation ratios are going to be used.
If, for each selection, percentage
is not provided, the selection is divided equally (best effort) between bundles. percentage
must be provided for all or none of the bundles.
Unit, t
for tonne, kg
for kilogram, g
for gram
- g
- kg
- t
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.
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.
Returns
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.
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.
An array representing a leg's emission estimate.
Returned in the same order as the request.
Distance estimation after distance adjustment factors have been applied. Adjusted factors are decided by GLEC and are added to make distances more realistic.
Parameters for estimating multi-leg shipping emissions
The emission calculation unique identifier
One of
curl 'https://api.lune.co/v1/estimates/shipping/multi-leg' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"is_shipment": true,
"shipped_at": "2023-11-20T10:20:30Z",
"shipment": {
"mass": {
"amount": "10.36",
"unit": "t"
}
},
"legs": [
{
"route": {
"source": {
"lat": 24.211893,
"lon": 120.608696
},
"destination": {
"locode": "TWTXG"
}
},
"method": "diesel_truck"
},
{
"route": {
"source": {
"locode": "TWTXG"
},
"destination": {
"locode": "TWTPE"
}
},
"method": {
"vessel_type": "container_ship"
}
},
{
"route": {
"source": {
"locode": "TWTPE"
},
"destination": {
"locode": "DEHAM"
}
},
"method": {
"vessel_imo_number": "9893890"
}
},
{
"method": "maritime_container_terminal"
},
{
"route": {
"source": {
"locode": "DEHAM"
},
"destination": {
"street_line1": "Märkische Allee 71",
"postcode": "14979",
"city": "Großbeeren",
"country_code": "DEU"
}
},
"method": "truck_articulated_34t"
}
]
}'
{
"id": "08QD7GPaBx5b6Y6mJlWyONXLvrZljRE2",
"is_shipment": false,
"shipped_at": "2023-11-20T10:20:30Z",
"mass": {
"amount": "1.105698",
"unit": "t"
},
"quote": {
"estimated_quantity": "1.105697",
"estimated_commission": "3.02",
"estimated_total_cost": "30.13",
"estimated_offset_cost": "27.11",
"requested_value": null,
"requested_quantity": "1.105698",
"currency": "USD",
"bundles": [
{
"bundle_id": "q9aKx7b6nNXMk3Yv3pD1mlW5Od2eLZE8",
"bundle_name": "Conserving forests in Asia",
"quantity": "1.050413",
"unit_price": "12.65",
"gross_unit_price": "14.06",
"offset_cost": "13.29",
"insufficient_available_quantity": null
},
{
"bundle_id": "xWaKJL3okjD46VpJ4yGXnQNZRe1vzP0w",
"bundle_name": "Ocean Carbon Removal",
"quantity": "0.055284",
"unit_price": "250",
"gross_unit_price": "277.78",
"offset_cost": "13.82",
"insufficient_available_quantity": null
}
]
},
"distance": {
"amount": "22951.682",
"unit": "km"
},
"legs": [
{
"mass": {
"amount": "0.018195",
"unit": "t"
},
"distance": {
"amount": "19.09",
"unit": "km"
},
"methodology": []
},
{
"mass": {
"amount": "0.019576",
"unit": "t"
},
"distance": {
"amount": "267.02",
"unit": "km"
},
"methodology": []
},
{
"mass": {
"amount": "0.901448",
"unit": "t"
},
"distance": {
"amount": "22350.48",
"unit": "km"
},
"methodology": []
},
{
"mass": {
"amount": "0.031184",
"unit": "t"
},
"methodology": []
},
{
"mass": {
"amount": "0.135294",
"unit": "t"
},
"distance": {
"amount": "47.2081",
"unit": "km"
},
"methodology": []
}
],
"request": {
"shipment": {
"mass": {
"amount": "10.36",
"unit": "t"
}
},
"legs": [
{
"route": {
"source": {
"lat": 24.211893,
"lon": 120.608696
},
"destination": {
"locode": "TWTXG"
}
},
"method": "diesel_truck"
},
{
"route": {
"source": {
"locode": "TWTXG"
},
"destination": {
"locode": "TWTPE"
}
},
"method": {
"vessel_type": "container_ship"
}
},
{
"route": {
"source": {
"locode": "TWTPE"
},
"destination": {
"locode": "DEHAM"
}
},
"method": {
"vessel_imo_number": "9893890"
}
},
{
"method": "maritime_container_terminal"
},
{
"route": {
"source": {
"locode": "DEHAM"
},
"destination": {
"street_line1": "Märkische Allee 71",
"postcode": "14979",
"city": "Großbeeren",
"country_code": "DEU"
}
},
"method": "truck_articulated_34t"
}
]
}
}