Update a shipping emission estimate's annotations
This method allows updating a selection of estimate annotations without going through a full estimate update (with all the necessary inputs).
Only properties included in the input data are updated.
Path Parameters
The estimate's unique identifier
Parameters
One of
Returns
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.
Account-unique identifier provided by the client.
idempotency_key
has two purposes:
- Clients can safely retry estimate requests without accidentally performing the same operation multiple times.
- Clients can use
idempotency_key
to reconcile estimates with entities on their system.
The method we used to infer a vessel from client provided input.
null
when vessel identifier provided by client or no vessel inference not relevant to estimation.
One of
Distance estimation after distance adjustment factors have been applied. Adjusted factors are decided by GLEC and are added to make distances more realistic.
The method we used to determine the shipping distance.
null
in case of logistics sites or when resolved_legs is set.
One of
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.
One of
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.
flight_number_unavailable_fallback
: the flight number could not be found or the aircraft is currently not supported, therefore a generic plane method has been used.
Information regarding why an alternative distance calculation method was used.
null
in case several resolved legs are presented.
One of
One of
The shipment after conversion to the emission factor unit (mass to/from TEU).
null
if no conversion was necessary.
One of
The method we used to convert the shipment to the emission factor unit.
null
if no conversion was necessary.
One of
If the input shipping method results in multiple legs being detected, each leg will be calculated and shown separately.
One of
The emission calculation unique identifier
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.
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
One of
Parameters for estimating shipping emissions
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.
An external accessible URL linking to a detailed page that provides complete information about the estimate.
One of
Identifies the source used to create the estimate.
- api
- dashboard
- csv
- chain_io
- ecotransit_csv
- widget
- ecotransit
curl 'https://api.lune.co/v1/estimates/shipping/Vxg3b7MoBkrNQA328Rgpnvmw1J8a6Lqj/annotations' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-X PATCH \
-d '{
"is_shipment": true
}'
{
"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"
}
},
"source": "api"
}