Skip to main content

Calculators Types

Our API calculates the amount of tCO2eq emitted by different types of transport and electricity and water consumption.

Types [GET]

BASE URL
 https://api-calculators.carbonext.com.br/v2/calculators/types

This endpoint returns a list of supported transports for emissions calculation, including the unit that the calculation request will use (e.g. "grams", "passenger") and the freight response unit for bus and airplane transports, respectively ( e.g. "tCO2eq/ton", "tCO2eq/passenger").

Response Attributes

AttributeDescription
typesA list of supported types
valueIdentifier of the type to be used when making requests to calculate emissions
nameThe name of the transport type
responseUnitUnit of the emission calculation response, when using the distance calculator
requestUnitUnit in which the field unitValue should be sent when making requests using Origin/Dest codes

Example Request

var axios = require('axios');

var config = {
method: 'get',
url: 'https://api-calculators.carbonext.com.br/v2/calculators/types',
headers: { }
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});

Example Response

{
"types": [
{
"value": 0,
"name": "CargoTruck",
"responseUnit": "tCO2eq/tonne",
"requestUnit": "grams"
},
{
"value": 1,
"name": "PassengerAirplane",
"responseUnit": "tCO2eq/passenger",
"requestUnit": "passenger"
},
{
"value": 2,
"name": "PassengerBus",
"responseUnit": "tCO2eq/passenger",
"requestUnit": "passenger"
},
{
"value": 3,
"name": "Car",
"responseUnit": "tCO2eq",
"requestUnit": "km"
},
{
"value": 4,
"name": "Motorcycle",
"responseUnit": "tCO2eq",
"requestUnit": "km"
},
{
"value": 5,
"name": "CargoAirplane",
"responseUnit": "tCO2eq/tonne",
"requestUnit": "grams"
},
{
"value": 6,
"name": "Form",
"responseUnit": "tCO2eq",
"requestUnit": null
},
null,
{
"value": 8,
"name": "Electricity",
"responseUnit": "tCO2eq",
"requestUnit": "kW/h"
},
{
"value": 9,
"name": "Water",
"responseUnit": "tCO2eq",
"requestUnit": "m3"
}
]
}

Airports [GET]

BASE URL
 https://api-calculators.carbonext.com.br/v2/calculators/airports

This request returns a list of Airports.

AttributeDescription
itemsA list of airports
codeThe IATA airport code
countryCountry where the airport is located
cityCity where the airport is located

Example Request

var axios = require('axios');

var config = {
method: 'get',
url: 'https://api-calculators.carbonext.com.br/v2/calculators/airports',
headers: { }
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});

Example Response

{
"items": [
{
"code": "CPT",
"country": "África do Sul",
"city": "Cidade do Cabo"
},
{
"code": "JNB",
"country": "África do Sul",
"city": "Joanesburgo"
},
{
"code": "TXL",
"country": "Alemanha",
"city": "Berlim"
},
{
"code": "BER",
"country": "Alemanha",
"city": "Berlin"
},
{
"code": "FRA",
"country": "Alemanha",
"city": "Frankurt"
},
{
"code": "HAM",
"country": "Alemanha",
"city": "Hamburgo"
},
{
"code": "LEJ",
"country": "Alemanha",
"city": "Leipzig"
},
{
"code": "MUC",
"country": "Alemanha",
"city": "Munique"
},
{
"code": "STR",
"country": "Alemanha",
"city": "Stuttgart "
},
{
"code": "CGN",
"country": "Alemanha",
"city": "Colônia"
}
],
"pageIndex": 1,
"totalPages": 46,
"totalCount": 458,
"hasPreviousPage": false,
"hasNextPage": true
}