Road Trip Emissions API


picture

Path to Road Trip Emission Calculator API

POST https://api.earthonly.io/api/v1/emissions/road-trip

Authentication

All requests to EarthOnly servers requires an API key which you can set in the request headers like the example below.

Authentication Headers

{
	"eo-api-key" : "eb57f933ebbc42139c0a65813c2763b2"
}
Get your API Key access by requesting access to EarthOnly Partner Platform at 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[] required

Represents the Latitude-Longitude coordinates of the starting point of the trip represented as an array of numbers.


to_point: number[] required

Represents 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

After a successfull Status 200 you get the following response

Example 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.


EarthOnly Logo
EarthOnly is your partner in achieving sustainability of our Earth through its impactful technological interventions.
Contact Us:
203, 2-A/3, Kundan Mansion, Asaf Ali Rd, New Delhi,
Delhi, India - 110002
© 2023 Earthonly. All rights reserved.