Create a shipping emission estimate (multi-leg)
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
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
Returns
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 '{
"shipment": {
"mass": {
"amount": "40.501",
"unit": "t"
}
},
"legs": [
{
"route": {
"amount": "40.501",
"unit": "km"
},
"method": "inland_waterway_motor_vessel_small"
}
]
}'
{
"legs": [
{
"mass": {
"amount": "40.501",
"unit": "t"
},
"distance": {
"amount": "40.501",
"unit": "km"
},
"methodology": [
"imo_unavailable_container_ship_fallback"
]
}
],
"distance": {
"amount": "40.501",
"unit": "km"
},
"request": {
"shipment": {
"mass": {
"amount": "40.501",
"unit": "t"
}
},
"legs": [
{
"route": {
"amount": "40.501",
"unit": "km"
},
"method": "inland_waterway_motor_vessel_small",
"country_code": "PRT"
}
],
"name": "name",
"bundle_selection": [
{
"bundle_id": "BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3",
"percentage": 34
},
{
"bundle_id": "VndoQ0PZjGMzvYOZGwqy6kbgN1eOJx9B",
"percentage": 66
}
],
"quantity_trunc": "t"
},
"mass": {
"amount": "40.501",
"unit": "t"
},
"id": "90ng23MKvLqbkpMwMw7yMBD4wJQrV6O6",
"quote": {
"errors": [
{
"error_code": "account_suspended",
"message": "message"
}
]
}
}