Lune Docs Logo
Log inContact us

By transaction details

Create a transaction emission estimate (single)

HTTP POST to /v1/estimates/transactions
Request body

Parameters for estimating emissions associated with purchasing goods or services.

A name to reference this calculation.

Monetary value of the transaction. This should exclude shipping and taxes.

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

An amount of money (the fractional part is optional)

ISO 4217 3 character currency code.

Note: Lune supports most but not all currency codes.

AED
AFN
ALL
AMD
ANG

Merchant from whom the goods or services the purchase was made

Individual diet. Used to better estimate food-related purchases.

high_meat_eater
medium_meat_eater
low_meat_eater
fish_eater
vegetarian

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

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.

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.

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

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
  • Sample request
  • 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 emission calculation unique identifier

    This property is null for any estimate created before 01/03/2024

    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.

    The most accurate term matching the search.

    The emission factor for this term is used to compute the emission estimate.

    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.

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

    The text embedding model used to support semantic search

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

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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

    An external accessible URL linking to a detailed page that provides complete information about the estimate.

  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    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

    HTTP GET to /v1/estimates/transactions/{id}
    Sample request
  • Sample request
  • Query parameters

    The estimate's unique identifier

    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 emission calculation unique identifier

    This property is null for any estimate created before 01/03/2024

    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.

    The most accurate term matching the search.

    The emission factor for this term is used to compute the emission estimate.

    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.

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

    The text embedding model used to support semantic search

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

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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

    An external accessible URL linking to a detailed page that provides complete information about the estimate.

  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    401
    404
    429
    503
    service_unavailable

    Update a transaction emission estimate

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

    The estimate's unique identifier

    Request body

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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
  • Sample request
  • 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 emission calculation unique identifier

    This property is null for any estimate created before 01/03/2024

    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.

    The most accurate term matching the search.

    The emission factor for this term is used to compute the emission estimate.

    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.

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

    The text embedding model used to support semantic search

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

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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

    An external accessible URL linking to a detailed page that provides complete information about the estimate.

  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    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

    HTTP PATCH to /v1/estimates/transactions/{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

    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.

    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

    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.
  • Sample request
  • 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 emission calculation unique identifier

    This property is null for any estimate created before 01/03/2024

    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.

    The most accurate term matching the search.

    The emission factor for this term is used to compute the emission estimate.

    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.

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

    The text embedding model used to support semantic search

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

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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

    An external accessible URL linking to a detailed page that provides complete information about the estimate.

  • Sample response
  • 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 transaction emission estimate by idempotency key

    HTTP GET to /v1/estimates/transactions/by-idempotency-key/{idempotency_key}
    Sample request
  • Sample request
  • Query parameters

    The order's idempotency key.

    Idempotency keys must be unique per account.

    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 emission calculation unique identifier

    This property is null for any estimate created before 01/03/2024

    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.

    The most accurate term matching the search.

    The emission factor for this term is used to compute the emission estimate.

    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.

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

    The text embedding model used to support semantic search

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

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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

    An external accessible URL linking to a detailed page that provides complete information about the estimate.

  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    401
    404
    429
    503
    service_unavailable

    Create a transaction emission estimate (batch)

    HTTP POST to /v1/estimates/transactions/batchPerform 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

    An array of transaction estimate requests.

    An array of transaction estimate requests.

    Parameters for estimating emissions associated with purchasing goods or services.

    A name to reference this calculation.

    Monetary value of the transaction. This should exclude shipping and taxes.

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

    An amount of money (the fractional part is optional)

    ISO 4217 3 character currency code.

    Note: Lune supports most but not all currency codes.

    AED
    AFN
    ALL
    AMD
    ANG

    Merchant from whom the goods or services the purchase was made

    Individual diet. Used to better estimate food-related purchases.

    high_meat_eater
    medium_meat_eater
    low_meat_eater
    fish_eater
    vegetarian

    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

    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.

    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.

    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

    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
  • Sample request
  • Response

    An array representing multiple transaction emission estimates.

    Returned in the same order as the request.

    An array representing multiple transaction emission estimates.

    Returned in the same order as the request.

  • Sample response
  • 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