Lune Docs Logo

Single leg

Create a shipping emission estimate (single)

HTTP POST to /v1/estimates/shipping
Query parameters

By default estimate mass units are returned in tonnes.

Estimate mass units in responses are converted to estimate_mass_unit when set.

mg
g
kg
t
Request body

Parameters for estimating shipping emissions

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.

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.

Maps a bundle id to an allocation ratio

The bundle's unique identifier

Selects to which precision to truncate quantities specific to carbon offsetting.

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.

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

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:

  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.

Response

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

null if no conversion was necessary.

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

null if no conversion was necessary.

user_provided_cargo_type
average_cargo_type

If the input shipping method results in multiple legs being detected, each leg will be calculated and shown separately.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

Parameters for estimating shipping emissions

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.

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.

Maps a bundle id to an allocation ratio

The bundle's unique identifier

Selects to which precision to truncate quantities specific to carbon offsetting.

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.

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

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:

  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.

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.

Identifies the source used to create the estimate.

api
dashboard
csv
chain_io
ecotransit_csv
Errors
This API operation can return the following errors:
HTTP status codeError code
400
api_version_invalid
400
bundle_selection_ratios_invalid
400
bundle_selection_bundle_invalid
400
order_value_invalid
400
bundle_id_invalid
400
id_invalid
400
distance_invalid
400
test_account_name_update_disallowed
400
bundle_selection_ratios_invalid_format
400
address_not_found

List all shipping estimates

HTTP GET to /v1/estimates/shipping/allReturns single and multi-leg shipping estimates paginated in reverse order.
Query parameters

Pattern: ^\d+$

Maximum number of resources to return, between 1 and 100.

A cursor for use in pagination.

The cursor that points to the starting item of the next page of results. If not provided, the first page of results is returned.

When true, the emission estimate refers to an actual shipment of goods.

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

By default, all estimates are returned.

When set, the result includes estimates created at or after the timestamp.

Both from and through are either provided or missing.

When set, the result includes estimates created at or before the timestamp.

Both from and through are either provided or missing.

By default estimate mass units are returned in tonnes.

Estimate mass units in responses are converted to estimate_mass_unit when set.

mg
g
kg
t
Response

Whether or not there are more elements available after this set.

If false, this set comprises the end of the array.

Part of a paginated response.

The cursor value to be used as the after parameter for fetching the next page of results.

null if has_more is false.

Paginated single and multi-leg shipping emission estimates

Errors
This API operation can return the following errors:
HTTP status codeError code
400
api_version_invalid
400
bundle_selection_ratios_invalid
400
bundle_selection_bundle_invalid
400
order_value_invalid
400
bundle_id_invalid
400
id_invalid
400
distance_invalid
400
test_account_name_update_disallowed
400
bundle_selection_ratios_invalid_format
400
address_not_found

Get a shipping emission estimate (single)

HTTP GET to /v1/estimates/shipping/{id}
Query parameters

The estimate's unique identifier

By default estimate mass units are returned in tonnes.

Estimate mass units in responses are converted to estimate_mass_unit when set.

mg
g
kg
t
Response

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

null if no conversion was necessary.

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

null if no conversion was necessary.

user_provided_cargo_type
average_cargo_type

If the input shipping method results in multiple legs being detected, each leg will be calculated and shown separately.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

Parameters for estimating shipping emissions

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.

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.

Maps a bundle id to an allocation ratio

The bundle's unique identifier

Selects to which precision to truncate quantities specific to carbon offsetting.

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.

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

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:

  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.

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.

Identifies the source used to create the estimate.

api
dashboard
csv
chain_io
ecotransit_csv
Errors
This API operation can return the following errors:
HTTP status codeError code
401
404
429
503
service_unavailable

Update a shipping emission estimate (single)

HTTP PUT to /v1/estimates/shipping/{id}
Query parameters

The estimate's unique identifier

By default estimate mass units are returned in tonnes.

Estimate mass units in responses are converted to estimate_mass_unit when set.

mg
g
kg
t
Request body

Parameters for estimating shipping emissions

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.

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.

Maps a bundle id to an allocation ratio

The bundle's unique identifier

Selects to which precision to truncate quantities specific to carbon offsetting.

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.

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

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:

  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.

Response

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

null if no conversion was necessary.

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

null if no conversion was necessary.

user_provided_cargo_type
average_cargo_type

If the input shipping method results in multiple legs being detected, each leg will be calculated and shown separately.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

Parameters for estimating shipping emissions

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.

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.

Maps a bundle id to an allocation ratio

The bundle's unique identifier

Selects to which precision to truncate quantities specific to carbon offsetting.

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.

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

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:

  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.

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.

Identifies the source used to create the estimate.

api
dashboard
csv
chain_io
ecotransit_csv
Errors
This API operation can return the following errors:
HTTP status codeError code
400
api_version_invalid
400
bundle_selection_ratios_invalid
400
bundle_selection_bundle_invalid
400
order_value_invalid
400
bundle_id_invalid
400
id_invalid
400
distance_invalid
400
test_account_name_update_disallowed
400
bundle_selection_ratios_invalid_format
400
address_not_found

Update a shipping emission estimate's annotations

HTTP PATCH to /v1/estimates/shipping/{id}/annotationsThis 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.
Query parameters

The estimate's unique identifier

Request body

Response

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

null if no conversion was necessary.

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

null if no conversion was necessary.

user_provided_cargo_type
average_cargo_type

If the input shipping method results in multiple legs being detected, each leg will be calculated and shown separately.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, t for tonne, kg for kilogram, g for gram, mg for milligram

mg
g
kg
t

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:

  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.

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.

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The method we used to determine the shipping distance.

null in case of logistics sites or when resolved_legs is set.

great_circle_distance
great_circle_distance_x2
sea_distance_algorithm
mapbox
user_input

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.

Latitude

Longitude

A location and a distance from the previous location (or source, if this is the first leg).

If this is the last leg then the location is the final location (destination) of the route.

Latitude

Longitude

Pattern: ^[0-9]+(\.[0-9]+)?$

Unit, km for kilometers, mi for miles

km
mi
nm

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

Pattern: ^[0-9]+(\.[0-9]+)?$

km
mi
nm

The emission factor unique identifier

The emission factor name

epa
exiobase
ecoinvent
beis
lune

Source version of the emission factor.

Publication year of the emission factor

Unit, t for tonne, kg for kilogram, g for gram

g
kg
t

Denominator unit of the emission factor

Date of creation of the emission factor

The name of the region that the emission factor covers.

A category that describes the emission factor.

Detailed information about the gas emissions.

This property is always set as of March 2024.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ equivalent gas. All gas emissions are accounted here.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of CO₂ gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of methane gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of nitrous oxide gas.

Pattern: ^[0-9]+(\.[0-9]+)?$

Amount of other greenhouse gases.

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.

imo_unavailable_container_ship_fallback
imo_unavailable_container_ship_trade_lane_fallback
flight_number_unavailable_fallback
invalid_flight_route_fallback

Information regarding why an alternative distance calculation method was used. null in case several resolved legs are presented.

The human-readable message describing the details of how we used or failed to use carrier schedule stops to calculate the route.

The property is meant only for informational purposes and its exact format can change.

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

Parameters for estimating shipping emissions

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.

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.

Maps a bundle id to an allocation ratio

The bundle's unique identifier

Selects to which precision to truncate quantities specific to carbon offsetting.

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.

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

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:

  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.

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.

Identifies the source used to create the estimate.

api
dashboard
csv
chain_io
ecotransit_csv
Errors
This API operation can return the following errors:
HTTP status codeError code
400
api_version_invalid
400
bundle_selection_ratios_invalid
400
bundle_selection_bundle_invalid
400
order_value_invalid
400
bundle_id_invalid
400
id_invalid
400
distance_invalid
400
test_account_name_update_disallowed
400
bundle_selection_ratios_invalid_format
400
address_not_found