By transaction details
Create a transaction emission estimate (single)
POST
to /v1/estimates/transactions
Request body
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
Response
massobjectrequired
amountstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram, mg
for milligram
mg
g
kg
t
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:
- 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.
idstringrequired
The emission calculation unique identifier
quoteoneOfrequired
emission_factorobjectrequirednullable
This property is null
for any estimate created before 01/03/2024
idstringrequired
The emission factor unique identifier
namestringrequired
The emission factor name
sourcestringrequired
epa
exiobase
ecoinvent
beis
lune
source_versionstringrequired
Source version of the emission factor.
publication_yearnumberrequired
Publication year of the emission factor
numerator_unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram
g
kg
t
denominator_unitoneOfrequired
Denominator unit of the emission factor
created_atstring (date-time)required
Date of creation of the emission factor
regionstringrequired
The name of the region that the emission factor covers.
categorystringrequirednullable
A category that describes the emission factor.
gas_emissionsobjectrequirednullable
Detailed information about the gas emissions.
This property is always set as of March 2024.
co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas. All gas emissions are accounted here.
co2string
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ gas.
methanestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of methane gas.
nitrous_oxidestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of nitrous oxide gas.
otherstring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas contributed by other greenhouse gases.
wtw_breakdownobject
sourcestringrequired
direct_from_source
inferred_from_fuel
global_fuel_mix_inferred
wtt_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the WTT (Well-To-Tank) stage. All gas emissions are accounted here.
ttw_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the TTW (Tank-To-Wheel) stage. All gas emissions are accounted here.
search_term_matchstringrequirednullable
The most accurate term matching the search.
The emission factor for this term is used to compute the emission estimate.
search_term_match_scorenumber (float)requirednullable
Populated if semantic search was used to find a match to the provided search term or category Indicates confidence in the match from 0 - 2, 0 being most confident.
diet_factorstringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
semantic_matching_modelstringrequirednullable
The text embedding model used to support semantic search
exchange_ratestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
exchange_rate_datestring (date)requirednullable
requestobjectrequired
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
external_estimate_urlstring (https-url)requirednullable
An external accessible URL linking to a detailed page that provides complete information about the estimate.
is_transactionbooleanrequirednullable
transaction_processed_atstring (date-time)requirednullable
Errors
This API operation can return the following errors:204
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
Get a transaction emission estimate
GET
to /v1/estimates/transactions/{id}
Query parameters
idstringrequired
The estimate's unique identifier
Response
massobjectrequired
amountstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram, mg
for milligram
mg
g
kg
t
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:
- 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.
idstringrequired
The emission calculation unique identifier
quoteoneOfrequired
emission_factorobjectrequirednullable
This property is null
for any estimate created before 01/03/2024
idstringrequired
The emission factor unique identifier
namestringrequired
The emission factor name
sourcestringrequired
epa
exiobase
ecoinvent
beis
lune
source_versionstringrequired
Source version of the emission factor.
publication_yearnumberrequired
Publication year of the emission factor
numerator_unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram
g
kg
t
denominator_unitoneOfrequired
Denominator unit of the emission factor
created_atstring (date-time)required
Date of creation of the emission factor
regionstringrequired
The name of the region that the emission factor covers.
categorystringrequirednullable
A category that describes the emission factor.
gas_emissionsobjectrequirednullable
Detailed information about the gas emissions.
This property is always set as of March 2024.
co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas. All gas emissions are accounted here.
co2string
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ gas.
methanestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of methane gas.
nitrous_oxidestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of nitrous oxide gas.
otherstring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas contributed by other greenhouse gases.
wtw_breakdownobject
sourcestringrequired
direct_from_source
inferred_from_fuel
global_fuel_mix_inferred
wtt_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the WTT (Well-To-Tank) stage. All gas emissions are accounted here.
ttw_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the TTW (Tank-To-Wheel) stage. All gas emissions are accounted here.
search_term_matchstringrequirednullable
The most accurate term matching the search.
The emission factor for this term is used to compute the emission estimate.
search_term_match_scorenumber (float)requirednullable
Populated if semantic search was used to find a match to the provided search term or category Indicates confidence in the match from 0 - 2, 0 being most confident.
diet_factorstringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
semantic_matching_modelstringrequirednullable
The text embedding model used to support semantic search
exchange_ratestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
exchange_rate_datestring (date)requirednullable
requestobjectrequired
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
external_estimate_urlstring (https-url)requirednullable
An external accessible URL linking to a detailed page that provides complete information about the estimate.
is_transactionbooleanrequirednullable
transaction_processed_atstring (date-time)requirednullable
Errors
This API operation can return the following errors:401
404
429
503
service_unavailable
Update a transaction emission estimate
PUT
to /v1/estimates/transactions/{id}
Query parameters
idstringrequired
The estimate's unique identifier
Request body
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
Response
massobjectrequired
amountstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram, mg
for milligram
mg
g
kg
t
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:
- 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.
idstringrequired
The emission calculation unique identifier
quoteoneOfrequired
emission_factorobjectrequirednullable
This property is null
for any estimate created before 01/03/2024
idstringrequired
The emission factor unique identifier
namestringrequired
The emission factor name
sourcestringrequired
epa
exiobase
ecoinvent
beis
lune
source_versionstringrequired
Source version of the emission factor.
publication_yearnumberrequired
Publication year of the emission factor
numerator_unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram
g
kg
t
denominator_unitoneOfrequired
Denominator unit of the emission factor
created_atstring (date-time)required
Date of creation of the emission factor
regionstringrequired
The name of the region that the emission factor covers.
categorystringrequirednullable
A category that describes the emission factor.
gas_emissionsobjectrequirednullable
Detailed information about the gas emissions.
This property is always set as of March 2024.
co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas. All gas emissions are accounted here.
co2string
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ gas.
methanestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of methane gas.
nitrous_oxidestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of nitrous oxide gas.
otherstring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas contributed by other greenhouse gases.
wtw_breakdownobject
sourcestringrequired
direct_from_source
inferred_from_fuel
global_fuel_mix_inferred
wtt_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the WTT (Well-To-Tank) stage. All gas emissions are accounted here.
ttw_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the TTW (Tank-To-Wheel) stage. All gas emissions are accounted here.
search_term_matchstringrequirednullable
The most accurate term matching the search.
The emission factor for this term is used to compute the emission estimate.
search_term_match_scorenumber (float)requirednullable
Populated if semantic search was used to find a match to the provided search term or category Indicates confidence in the match from 0 - 2, 0 being most confident.
diet_factorstringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
semantic_matching_modelstringrequirednullable
The text embedding model used to support semantic search
exchange_ratestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
exchange_rate_datestring (date)requirednullable
requestobjectrequired
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
external_estimate_urlstring (https-url)requirednullable
An external accessible URL linking to a detailed page that provides complete information about the estimate.
is_transactionbooleanrequirednullable
transaction_processed_atstring (date-time)requirednullable
Errors
This API operation can return the following errors:204
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
Update a transaction emission estimate's annotations
PATCH
to /v1/estimates/transactions/{id}/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.Query parameters
idstringrequired
The estimate's unique identifier
Request body
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
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:
- 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.
Response
massobjectrequired
amountstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram, mg
for milligram
mg
g
kg
t
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:
- 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.
idstringrequired
The emission calculation unique identifier
quoteoneOfrequired
emission_factorobjectrequirednullable
This property is null
for any estimate created before 01/03/2024
idstringrequired
The emission factor unique identifier
namestringrequired
The emission factor name
sourcestringrequired
epa
exiobase
ecoinvent
beis
lune
source_versionstringrequired
Source version of the emission factor.
publication_yearnumberrequired
Publication year of the emission factor
numerator_unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram
g
kg
t
denominator_unitoneOfrequired
Denominator unit of the emission factor
created_atstring (date-time)required
Date of creation of the emission factor
regionstringrequired
The name of the region that the emission factor covers.
categorystringrequirednullable
A category that describes the emission factor.
gas_emissionsobjectrequirednullable
Detailed information about the gas emissions.
This property is always set as of March 2024.
co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas. All gas emissions are accounted here.
co2string
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ gas.
methanestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of methane gas.
nitrous_oxidestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of nitrous oxide gas.
otherstring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas contributed by other greenhouse gases.
wtw_breakdownobject
sourcestringrequired
direct_from_source
inferred_from_fuel
global_fuel_mix_inferred
wtt_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the WTT (Well-To-Tank) stage. All gas emissions are accounted here.
ttw_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the TTW (Tank-To-Wheel) stage. All gas emissions are accounted here.
search_term_matchstringrequirednullable
The most accurate term matching the search.
The emission factor for this term is used to compute the emission estimate.
search_term_match_scorenumber (float)requirednullable
Populated if semantic search was used to find a match to the provided search term or category Indicates confidence in the match from 0 - 2, 0 being most confident.
diet_factorstringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
semantic_matching_modelstringrequirednullable
The text embedding model used to support semantic search
exchange_ratestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
exchange_rate_datestring (date)requirednullable
requestobjectrequired
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
external_estimate_urlstring (https-url)requirednullable
An external accessible URL linking to a detailed page that provides complete information about the estimate.
is_transactionbooleanrequirednullable
transaction_processed_atstring (date-time)requirednullable
Errors
This API operation can return the following errors: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 transaction emission estimate by idempotency key
GET
to /v1/estimates/transactions/by-idempotency-key/{idempotency_key}
Query parameters
idempotency_keystringrequired
The order's idempotency key.
Idempotency keys must be unique per account.
Response
massobjectrequired
amountstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram, mg
for milligram
mg
g
kg
t
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:
- 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.
idstringrequired
The emission calculation unique identifier
quoteoneOfrequired
emission_factorobjectrequirednullable
This property is null
for any estimate created before 01/03/2024
idstringrequired
The emission factor unique identifier
namestringrequired
The emission factor name
sourcestringrequired
epa
exiobase
ecoinvent
beis
lune
source_versionstringrequired
Source version of the emission factor.
publication_yearnumberrequired
Publication year of the emission factor
numerator_unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram
g
kg
t
denominator_unitoneOfrequired
Denominator unit of the emission factor
created_atstring (date-time)required
Date of creation of the emission factor
regionstringrequired
The name of the region that the emission factor covers.
categorystringrequirednullable
A category that describes the emission factor.
gas_emissionsobjectrequirednullable
Detailed information about the gas emissions.
This property is always set as of March 2024.
co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas. All gas emissions are accounted here.
co2string
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ gas.
methanestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of methane gas.
nitrous_oxidestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of nitrous oxide gas.
otherstring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas contributed by other greenhouse gases.
wtw_breakdownobject
sourcestringrequired
direct_from_source
inferred_from_fuel
global_fuel_mix_inferred
wtt_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the WTT (Well-To-Tank) stage. All gas emissions are accounted here.
ttw_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the TTW (Tank-To-Wheel) stage. All gas emissions are accounted here.
search_term_matchstringrequirednullable
The most accurate term matching the search.
The emission factor for this term is used to compute the emission estimate.
search_term_match_scorenumber (float)requirednullable
Populated if semantic search was used to find a match to the provided search term or category Indicates confidence in the match from 0 - 2, 0 being most confident.
diet_factorstringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
semantic_matching_modelstringrequirednullable
The text embedding model used to support semantic search
exchange_ratestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
exchange_rate_datestring (date)requirednullable
requestobjectrequired
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
external_estimate_urlstring (https-url)requirednullable
An external accessible URL linking to a detailed page that provides complete information about the estimate.
is_transactionbooleanrequirednullable
transaction_processed_atstring (date-time)requirednullable
Errors
This API operation can return the following errors:401
404
429
503
service_unavailable
Create a transaction emission estimate (batch)
POST
to /v1/estimates/transactions/batch
Perform multiple transaction emissions estimate in one request.Each estimate is handled individually.The response contains estimates or errors in the same orders as the request.Request body
array
An array of transaction estimate requests.
object
An array of transaction estimate requests.
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
Response
array
An array representing multiple transaction emission estimates.
Returned in the same order as the request.
oneOf
An array representing multiple transaction emission estimates.
Returned in the same order as the request.
Errors
This API operation can return the following errors: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
Create a multi-match transaction emission estimate
POST
to /v1/estimates/transactions/multi-match
Obtain multiple emission estimates for a single transaction by applying different emission factors in one request.The transaction estimate endpoint selects the emission factor with highest confidence. While this is typically ideal, sometimes you may prefer a different emission factor choice. The multi-match endpoint calculates estimates using up to five alternative emission factors, ordered by confidence score, giving you options to select from.Each estimate counts towards your plan's emission estimate allowance.Query parameters
limitstringrequired
The number of matches to return.
Request body
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
Response
The estimates for each emission factor in the order from highest to lowest confidence.
Each estimate returned in the array is a standalone transaction estimate with its own id.
The array may be empty if there are no emission factors matching the input data with the required confidence level.
estimatesarray
object
massobjectrequired
amountstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram, mg
for milligram
mg
g
kg
t
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:
- 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.
idstringrequired
The emission calculation unique identifier
quoteoneOfrequired
emission_factorobjectrequirednullable
This property is null
for any estimate created before 01/03/2024
idstringrequired
The emission factor unique identifier
namestringrequired
The emission factor name
sourcestringrequired
epa
exiobase
ecoinvent
beis
lune
source_versionstringrequired
Source version of the emission factor.
publication_yearnumberrequired
Publication year of the emission factor
numerator_unitstringrequired
Unit, t
for tonne, kg
for kilogram, g
for gram
g
kg
t
denominator_unitoneOfrequired
Denominator unit of the emission factor
created_atstring (date-time)required
Date of creation of the emission factor
regionstringrequired
The name of the region that the emission factor covers.
categorystringrequirednullable
A category that describes the emission factor.
gas_emissionsobjectrequirednullable
Detailed information about the gas emissions.
This property is always set as of March 2024.
co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas. All gas emissions are accounted here.
co2string
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ gas.
methanestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of methane gas.
nitrous_oxidestring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of nitrous oxide gas.
otherstring
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent gas contributed by other greenhouse gases.
wtw_breakdownobject
sourcestringrequired
direct_from_source
inferred_from_fuel
global_fuel_mix_inferred
wtt_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the WTT (Well-To-Tank) stage. All gas emissions are accounted here.
ttw_co2estringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Amount of CO₂ equivalent for the TTW (Tank-To-Wheel) stage. All gas emissions are accounted here.
search_term_matchstringrequirednullable
The most accurate term matching the search.
The emission factor for this term is used to compute the emission estimate.
search_term_match_scorenumber (float)requirednullable
Populated if semantic search was used to find a match to the provided search term or category Indicates confidence in the match from 0 - 2, 0 being most confident.
diet_factorstringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
semantic_matching_modelstringrequirednullable
The text embedding model used to support semantic search
exchange_ratestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
exchange_rate_datestring (date)requirednullable
requestobjectrequired
Parameters for estimating emissions associated with purchasing goods or services.
namestring
A name to reference this calculation.
valueobjectrequired
Monetary value of the transaction. This should exclude shipping and taxes.
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
An amount of money (the fractional part is optional)
currencystringrequired
ISO 4217 3 character currency code.
Note: Lune supports most but not all currency codes.
AED
AFN
ALL
AMD
ANG
merchantoneOfrequired
Merchant from whom the goods or services the purchase was made
dietstring
Individual diet. Used to better estimate food-related purchases.
high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOf
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
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.
region_fallbackstring
Controls how geographical constraints are interpreted and if a fallback is performed.
For example, how fields like country_code
and region
are interpreted.
never
(the default) means no fallback is performed and only emission factors that match the specified geographical area are returned.always
means the emission factors for related geographic areas are unconditionally included in the results.
never
always
idempotency_keystring
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.
is_transactionboolean
When true, the emission estimate refers to an actual transaction for goods or services and will be included in Lune analytics and can be included in any CO2 emissions reporting.
This property exists to distinguish generic estimates, quotes or forecasts from actual transactions that have occured.
You can mark an estimate as transaction at any time.
transaction_processed_atstring (date-time)
This property captures the exact date and time at which the transaction was recorded and processed.
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
external_estimate_urlstring (https-url)requirednullable
An external accessible URL linking to a detailed page that provides complete information about the estimate.
is_transactionbooleanrequirednullable
transaction_processed_atstring (date-time)requirednullable
Errors
This API operation can return the following errors: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