Skip to main content

Update a company emissions estimate

Path Parameters
idstringrequired

The estimate's unique identifier

Parameters
monthsinteger

Number of months covered by the emission estimate


employeesintegerrequired

Number of employees


remote_employees_percentageintegerrequired

amountstring^[0-9]+(\.[0-9]+)?$required

unitenumrequired
Enum:
  • square_meters
  • square_feet

country_codestringrequired

The three-letter country code of the country where the company is located.


postcodestring

The company's postal code


citystring

electricity_consumptionintegerrequired

Electricity consumption in kWh


green_electricity_usedbooleanrequired

Is the electricity provided by renewable source(s)?


gas_consumptionintegerrequired

Yearly natural gas consumption in cubic meters


company_carsintegerrequired

Company cars


amountstring^[0-9]+(\.[0-9]+)?$required

unitenumrequired

Unit, km for kilometers, mi for miles

Enum:
  • km
  • mi
  • nm

employees_using_public_transportintegerrequired

Number of employees commuting by public transport


short_flightsintegerrequired

Number of short (under 3 hours) flights per year


medium_flightsintegerrequired

Number of medium (between 3 and 6 hours) flights per year


long_flightsintegerrequired

Number of long (over 6 hours) flights per year


first_or_business_class_percentageintegerrequired

valuestring^[0-9]+(\.[0-9]+)?$required

An amount of money (the fractional part is optional)


currencyenumrequired

ISO 4217 3 character currency code.

Note: Lune does not support all currency codes.

Enum:
  • GBP
  • EUR
  • USD
  • SEK
  • CHF
  • PLN
  • DKK
  • NOK
  • BGN
  • INR
  • SGD
  • AED
  • AUD
  • HUF
  • ISK
  • CZK

vegetarian_and_vegan_percentageintegerrequired

valuestring^[0-9]+(\.[0-9]+)?$required

An amount of money (the fractional part is optional)


currencyenumrequired

ISO 4217 3 character currency code.

Note: Lune does not support all currency codes.

Enum:
  • GBP
  • EUR
  • USD
  • SEK
  • CHF
  • PLN
  • DKK
  • NOK
  • BGN
  • INR
  • SGD
  • AED
  • AUD
  • HUF
  • ISK
  • CZK

garbageintegerrequired

The amount of garbage produced, in kilograms


recycled_garbage_percentageintegerrequired

valuestring^[0-9]+(\.[0-9]+)?$required

An amount of money (the fractional part is optional)


currencyenumrequired

ISO 4217 3 character currency code.

Note: Lune does not support all currency codes.

Enum:
  • GBP
  • EUR
  • USD
  • SEK
  • CHF
  • PLN
  • DKK
  • NOK
  • BGN
  • INR
  • SGD
  • AED
  • AUD
  • HUF
  • ISK
  • CZK

valuestring^[0-9]+(\.[0-9]+)?$required

An amount of money (the fractional part is optional)


currencyenumrequired

ISO 4217 3 character currency code.

Note: Lune does not support all currency codes.

Enum:
  • GBP
  • EUR
  • USD
  • SEK
  • CHF
  • PLN
  • DKK
  • NOK
  • BGN
  • INR
  • SGD
  • AED
  • AUD
  • HUF
  • ISK
  • CZK

providerenumrequired

The identifier of a cloud provider.

Enum:
  • aws
  • gcp
  • azure
  • ovh
  • other

bundle_selectionarray of object

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.


quantity_truncenum

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

Enum:
  • g
  • kg
  • t

namestring

A name to reference this calculation.


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:

  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.
Returns
massobjectrequired

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:

  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.

idstringrequired

The emission calculation unique identifier


quoterequired

requestobjectrequired

Parameters for estimating emissions associated with operating a company.

All relevant values are yearly values.


scope1objectrequired

scope2objectrequired

scope3objectrequired

componentsobjectrequired
  • PUT /estimates/company/{id}
  • curl 'https://api.lune.co/v1/estimates/company/Vxg3b7MoBkrNQA328Rgpnvmw1J8a6Lqj' \
      -H 'Authorization: Bearer <API_KEY>' \
      -H 'Content-Type: application/json' \
      -X PUT \
      -d '{
        "employees": 1,
        "remote_employees_percentage": 1,
        "amount": "40.501",
        "unit": "km",
        "country_code": "GBR",
        "electricity_consumption": 1,
        "green_electricity_used": true,
        "gas_consumption": 1,
        "company_cars": 1,
        "employees_using_public_transport": 1,
        "short_flights": 1,
        "medium_flights": 1,
        "long_flights": 1,
        "first_or_business_class_percentage": 1,
        "value": "3.14",
        "currency": "GBP",
        "vegetarian_and_vegan_percentage": 1,
        "garbage": 1,
        "recycled_garbage_percentage": 1,
        "on_premise": {
          "electricity_cost": {
            "value": "3.14",
            "currency": "GBP"
          }
        },
        "cloud": {
          "cost": {
            "value": "3.14",
            "currency": "GBP"
          },
          "provider": "aws"
        }
      }'
      
  • Response
  • {
      "mass": {
        "amount": "40.501",
        "unit": "t"
      },
      "idempotency_key": "5bd808a954e",
      "id": "90ng23MKvLqbkpMwMw7yMBD4wJQrV6O6",
      "quote": {
        "errors": [
          {
            "error_code": "account_suspended",
            "message": "message"
          }
        ],
        "error": {
          "error_code": "account_suspended",
          "message": "message"
        }
      },
      "request": {
        "months": 12,
        "employees": 1,
        "remote_employees_percentage": 1,
        "office_area": {
          "amount": "40.501",
          "unit": "square_meters"
        },
        "country_code": "GBR",
        "postcode": "99 210",
        "city": "Ledville",
        "electricity_consumption": 1,
        "green_electricity_used": true,
        "gas_consumption": 1,
        "company_cars": 1,
        "average_car_distance_travelled": {
          "amount": "40.501",
          "unit": "km"
        },
        "employees_using_public_transport": 1,
        "short_flights": 1,
        "medium_flights": 1,
        "long_flights": 1,
        "first_or_business_class_percentage": 1,
        "food_and_drinks_expenses": {
          "value": "3.14",
          "currency": "GBP"
        },
        "vegetarian_and_vegan_percentage": 1,
        "electronic_device_expenses": {
          "value": "3.14",
          "currency": "GBP"
        },
        "garbage": 1,
        "recycled_garbage_percentage": 1,
        "tech": {
          "on_premise": {
            "electricity_cost": {
              "value": "3.14",
              "currency": "GBP"
            }
          },
          "cloud": {
            "cost": {
              "value": "3.14",
              "currency": "GBP"
            },
            "provider": "aws"
          }
        },
        "bundle_selection": [
          {
            "bundle_id": "BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3",
            "percentage": 34
          },
          {
            "bundle_id": "VndoQ0PZjGMzvYOZGwqy6kbgN1eOJx9B",
            "percentage": 66
          }
        ],
        "quantity_trunc": "t",
        "name": "name",
        "idempotency_key": "5bd808a954e"
      },
      "scope1": {
        "amount": "40.501",
        "unit": "t"
      },
      "scope2": {
        "amount": "40.501",
        "unit": "t"
      },
      "scope3": {
        "amount": "40.501",
        "unit": "t"
      },
      "components": {
        "material_and_waste": {
          "amount": "40.501",
          "unit": "t"
        },
        "energy": {
          "amount": "40.501",
          "unit": "t"
        },
        "travel_and_commute": {
          "amount": "40.501",
          "unit": "t"
        },
        "food_and_drink": {
          "amount": "40.501",
          "unit": "t"
        },
        "tech": {
          "amount": "40.501",
          "unit": "t"
        },
        "remote_employee": {
          "amount": "40.501",
          "unit": "t"
        }
      }
    }