API Documentation
API Documentation
Note: This API is currently in beta. Functionality and endpoints may change without notice.
Authorization
To access the endpoints, include the following header in your requests:
Header:
x-api-key: provided
Note: The x-api-key value is subject to change. Please ensure you use the most up-to-date key provided.
/co2-calculator/hours
POST
URL: https://7any9g9wub.execute-api.us-east-2.amazonaws.com/v1/co2-calculator/hours
- Calculate CO2 emissions based flight hours.
Request Body:
{
"aircraftICAO": "string", // Aircraft identifier (e.g., "C25B")
"hoursFlown": "number" // Hours flown (e.g., 0.93)
}
Example Request:
{
"aircraftICAO": "C25B",
"hoursFlown": 0.93
}
Example Response:
200 OK
{
"aircraftType": "C25B",
"hoursFlown": 0.93,
"fuelType": "JetA",
"co2emissions": 1322.3,
"co2unit": "kg"
}
/co2-calculator/route
POST
URL: https://7any9g9wub.execute-api.us-east-2.amazonaws.com/v1/co2-calculator/route
- Calculate CO2 emissions based on flight route.
Request Body:
{
"aircraftICAO": "string", // Aircraft identifier (e.g., "C25B")
"departureAirportICAO": "string", // Departure airport ICAO code (e.g., "LIMC")
"destinationAirportICAO": "string", // Destination airport ICAO code (e.g., "LFPG")
"departureDate": "string (YYYY-MM-DD)" // Departure date (e.g., "2024-12-12")
}
Example Request:
{
"aircraftICAO": "C25B",
"departureAirportICAO": "LIMC",
"destinationAirportICAO": "LFPG",
"departureDate": "2024-12-12"
}
Example Response:
200 OK
{
"flightDistance": 599.3,
"estFlightTime": 1.1,
"estFuelConsumption": 157.1,
"fuelType": "JetA",
"fuelUnit": "gal",
"co2emissions": 1508.7,
"co2unit": "kg"
}
/co2-quote/hours
POST
URL: https://w7sewt0ksk.execute-api.us-east-2.amazonaws.com/v1/co2-quote/hours
- Calculate CO2 emissions and cost based on flight hours.
Request Body:
{
"aircraftICAO": "string", // Aircraft identifier (e.g., "C25B")
"hoursFlown": "number" // Hours flown (e.g., 0.93)
}
Example Request:
{
"aircraftICAO": "C25B",
"hoursFlown": 0.93
}
Example Response:
200 OK
{
"aircraftType": "C25B",
"hoursFlown": 0.93,
"fuelType": "JetA",
"co2emissions": 1322.3,
"co2unit": "kg",
"level1cost": 20,
"level2cost": 60,
"level3cost": 114,
"level4cost": 117
}
/co2-quote/route
POST
URL: https://w7sewt0ksk.execute-api.us-east-2.amazonaws.com/v1/co2-quote/route
- Calculate CO2 emissions and cost based on a flight route.
Request Body:
{
"aircraftICAO": "string", // Aircraft identifier (e.g., "C25B")
"departureAirportICAO": "string", // Departure airport ICAO code (e.g., "LIMC")
"destinationAirportICAO": "string", // Destination airport ICAO code (e.g., "LFPG")
"departureDate": "string (YYYY-MM-DD)" // Departure date (e.g., "2024-12-12")
}
Example Request:
{
"aircraftICAO": "C25B",
"departureAirportICAO": "LIMC",
"destinationAirportICAO": "LFPG",
"departureDate": "2024-12-12"
}
Example Response:
200 OK
{
"flightDistance": 599.3,
"estFlightTime": 1.1,
"estFuelConsumption": 157.1,
"fuelType": "JetA",
"fuelUnit": "gal",
"co2emissions": 1508.7,
"co2unit": "kg",
"level1cost": 23,
"level2cost": 68,
"level3cost": 130,
"level4cost": 133
}
#
Contact
For any issues or questions regarding the API, please contact our support team at joshua.blackhurst@4air.aero.