Path
to Road Trip Emission Calculator API
POST https://api.earthonly.io/api/v1/emissions/road-trip
Authentication
Authentication Headers
{
"eo-api-key" : "eb57f933ebbc42139c0a65813c2763b2"
}
hello@earthonly.io
Request Schema
Example Request body
{
"from_point":[23.24,45.34],
",to_point":[23.24,45.34],
"trip_type":"Round Trip",
"fuel_type":"Petrol",
"fuel_mileage":12
}
Parameters
from_point: number[]
requiredRepresents the Latitude-Longitude coordinates of the starting point of the trip represented as an array of numbers.
to_point: number[]
requiredRepresents the Latitude-Longitude coordinates of the ending point of the trip represented as an array of numbers.
fuel_type: enum: ["Petrol","Diesel","CNG","Electric"]
required Represent the trip type where it is a One Way trip or a Round Trip.
fuel_mileage: number
required Represents the fuel efficiency of the vehicle in terms of Km/L mileage.
Response Schema
200
you get the following responseExample Response body
{
"total_CO2":354.00,
"from_point": [23.243,35.45],
"to_point": [24.243,39.45],
"fuel_consumed": 91.1882
}
Attributes
total_CO2 : number
Represents the emission calculator result in Kgs. In this case the result is 632.00 Kgs of CO2 emissions in the flight taken
from_point: number[]
Represents the Latitude-Longitude coordinates of the starting point of the trip represented as an array of numbers.
to_point: number[]
Represents the Latitude-Longitude coordinates of the ending point of the trip represented as an array of numbers.
fuel_type: enum:[]
Represents the type of fuel the transportation is subjected to.
fuel_consumed: number[]
Represents the litres of fuel consumed in litres.