CO2

Example 1 – Calculating CO2 emissions with the independent endpoint

In the following example, we will use the independent endpoint to calculate the amount of CO2 emitted on an 80.7 km route, using gasoline as fuel in a vehicle with an average consumption of 11.3 km/l.

We will use GHG_PROTOCOL as source, which refers to the emission factors adopted by the GHG protocol. As the route is in Brazil, we will use BR_GASOLINE as the fuel type at fuelType.

We will also use the optional parameter fuelPrice with the price per liter of fuel, so that we can calculate how much was spent on fuel on this route.

At fractionedEmissions we have defined that 20% of the route’s emissions will be the responsibility of the carrier and 80% the responsibility of the producer.

The full request can be found below:

{
    "source": "GHG_PROTOCOL",
    "fuelType": "BR_GASOLINE",
    "totalDistance": 80700,
    "autonomy": 11.3,
    "fuelPrice": 4.9,
    "fractionedEmissions": [
        {
            "name": "Produtor",
            "percentage": 80
        },
        {
            "name": "Transportador",
            "percentage": 20
        }
    ]
}

The response can be seen below:

{
    "fuelType": "BR_GASOLINE",
    "source": "GHG_PROTOCOL",
    "fuelConsumed": 7.14,
    "totalFuelPrice": 34.99,
    "totalEmission": 9.612,
    "fractionedEmissionResponses": [
        {
            "name": "Produtor",
            "fuelConsumed": 5.71,
            "totalFuelPrice": 27.99,
            "totalEmission": 7.689
        },
        {
            "name": "Transportador",
            "fuelConsumed": 1.43,
            "totalFuelPrice": 7.00,
            "totalEmission": 1.923
        }
    ]
}

Where:

  • fuelType – Confirmation of the fuel type selected;
  • source – Confirmation of the source used for the emission calculation;
  • fuelConsumed – Amount of fuel consumed on the route (in liters);
  • totalFuelPrice – Total amount of fuel consumed on the route;
  • totalEmission – Amount of CO2 emitted on the route (in Kg);
  • fractionedEmissionResponses – Array of objects with the result of the fractional calculation. Each object represents a part of the calculation as specified in the request. The following fields are returned:
    • name – Identifier of the entity responsible for this fraction of the calculation;
    • fuelConsumed – Amount of fuel consumed on the route (in liters) proportional;
    • totalFuelPrice – Total amount of fuel consumed on the proportional route;
    • totalEmission – Amount of CO2 emitted on the route (in Kg) proportional.