Skip to main content

Get a company emission estimate

Path Parameters
idstringrequired

The estimate's unique identifier

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
  • GET /estimates/company/{id}
  • curl 'https://api.lune.co/v1/estimates/company/Vxg3b7MoBkrNQA328Rgpnvmw1J8a6Lqj' \
      -H 'Authorization: Bearer <API_KEY>'
  • 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"
        }
      }
    }