Last updated: 2025-03-31

Retrieve statistical data via API, CO2 emissions in grams

Valid Opter 2024.06.00 and later. Some functional improvements are available if you use Opter 2024.12.00 or later.

Using Opter's statistics API, you can see the estimated climate impact of your transport in terms of carbon emissions.

You can programme a solution where you call Opter's statistics API and then present the statistics as you wish. You can automate the flow so that the information is retrieved from Opter as often as you want. The information returned by the statistics API is "raw data"/basic data from the Opter database. For more information, see Retrieving statistical data via API.

Conditions

Example

Examples of CO2 emissions data that can be retrieved:

Examples of fields that may be of interest:

Field name in Opter The field name in the statistics API Description

Estimated CO2 emissions (g) (formerly CO2 emissions (g))

Shown under Data in order reception.

calculatedEmissionForecast

Enter includeDeliveries = "true".

What is shown in the field is the estimate, i.e. a first calculation of the CO2 emissions of the order in grams.

(This value is overwritten if the CO2 emissions are entered manually in the Estimated CO2 emissions (g) field in the Order reception, see line below).

Estimated CO2 emissions (g) (formerly CO2 emissions (g))

Shown under Data in order reception.

emissionForecast

Enter includeDeliveries = "true".

If the estimated CO2 emissions have been entered manually, the manually entered value overwrites Opter’s calculation of the order’s estimated CO2 emissions. (See the row above).

CO2 emissions, calculated (g)

Shown under Details on the shipment in order reception.

emissionEstimate

Enter includeShipments = "true".

In deliveryId, the number of the order to which the shipment belongs is displayed.

vehicleId shows which Vehicle is linked to the shipment.

What is shown in the field is a calculation of the shipment’s CO2 emissions.

CO2 emissions (g/km)

Shown on the Emissions tab in the vehicle registry.

emissionInGramPerKilometer

Enter includeVehicle = "true".

The vehicle’s CO2 emissions in grams per km.

Fuel

Shown on the Emissions tab in the vehicle registry.

fuelName

Enter includeVehicle = "true".

The type of fuel used by the vehicle, e.g. Diesel.

Fuel consumption (per 100 km)

Shown on the Emissions tab in the vehicle registry.

fuelConsumption

Enter includeVehicle = "true".

The vehicle’s fuel consumption in the selected unit per 100 km. (The unit is configured in the fuel registry).

Capacity converted into pricing weight (kg)

Shown on the Emissions tab in the vehicle registry.

emissionPricingWeightCapacity

Enter includeVehicle = "true".

See Step 1 in Settings for CO2 emission calculations.

Emission class

Shown on the General tab in the vehicle registry.

emissionClass

Enter includeVehicle = "true".

The environmental class of the vehicle, e.g. “Euro 5”.

Back

CO2 emissions in grams, overview.

See also