207 lines
6.1 KiB
JSON
207 lines
6.1 KiB
JSON
{
|
|
"FlightRequest": {
|
|
"api_key": "optional string",
|
|
"provider": "string",
|
|
"operation": "string",
|
|
"calculationRequest": "FlightCalculationRequest"
|
|
},
|
|
"FlightCalculationRequest": {
|
|
"departure_date": "optional ISO-8601 date",
|
|
"rfi": "optional number",
|
|
"price_per_ton": "optional number",
|
|
"roundtrip": "optional boolean",
|
|
"passengers": "optional integer >= 1",
|
|
"cabin_class": "economy | premium_economy | business | first | unknown",
|
|
"calculation_method": "optional string",
|
|
"reference": "optional string",
|
|
"legs": ["FlightLeg"],
|
|
"include_non_co2": "boolean",
|
|
"currencies": ["optional ISO 4217 code"],
|
|
"vendor_options": "object"
|
|
},
|
|
"FlightLeg": {
|
|
"id": "optional string",
|
|
"index": "optional integer",
|
|
"origin_iata": "optional string",
|
|
"destination_iata": "optional string",
|
|
"origin": "optional LocationRef",
|
|
"destination": "optional LocationRef",
|
|
"departure_time": "optional ISO-8601 datetime",
|
|
"flight_number": "optional string",
|
|
"marketing_carrier": "optional string",
|
|
"operating_carrier": "optional string",
|
|
"airline": "optional string",
|
|
"aircraft_type": "optional string",
|
|
"passenger_count": "optional integer",
|
|
"flight_count": "optional integer",
|
|
"travel_class": "optional string",
|
|
"charter": "optional boolean",
|
|
"via": ["optional string"],
|
|
"distance_km": "optional number",
|
|
"vendor_options": "object"
|
|
},
|
|
"FlightCalculationResult": {
|
|
"provider": "string",
|
|
"domain": "string",
|
|
"operation": "string",
|
|
"status": "string",
|
|
"total": "EmissionAmount",
|
|
"per_passenger": "EmissionAmount",
|
|
"distance": "DistanceAmount",
|
|
"per_passenger_distance": "DistanceAmount",
|
|
"fuel": "FuelAmount",
|
|
"offset": "MoneyAmount",
|
|
"per_passenger_price": "MoneyAmount",
|
|
"quote": "QuoteInfo",
|
|
"methodology": "MethodologyMeta",
|
|
"passenger_count": "integer or null",
|
|
"travel_class": "string or null",
|
|
"description": "string or null",
|
|
"segments": ["SegmentEmissionResult"],
|
|
"prices": ["MoneyAmount"],
|
|
"errors": ["ProviderError"],
|
|
"metadata": "opaque object or array",
|
|
"input_echo": "opaque object",
|
|
"vendor_raw": "opaque object"
|
|
},
|
|
"SegmentEmissionResult": {
|
|
"id": "string or null",
|
|
"index": "integer or null",
|
|
"type": "string or null",
|
|
"status": "string or null",
|
|
"origin": "LocationRef",
|
|
"destination": "LocationRef",
|
|
"flight_number": "string or null",
|
|
"flight_date": "ISO-8601 date or null",
|
|
"airline": "string or null",
|
|
"aircraft_type": "string or null",
|
|
"passenger_count": "integer or null",
|
|
"flight_count": "integer or null",
|
|
"travel_class": "string or null",
|
|
"charter": "boolean or null",
|
|
"emissions": "EmissionAmount",
|
|
"class_emissions": "CabinClassEmissionSet",
|
|
"distance": "DistanceAmount",
|
|
"fuel": "FuelAmount",
|
|
"offset": "MoneyAmount",
|
|
"cruise_altitude": "number or null",
|
|
"distance_in_critical_altitudes": "number or null",
|
|
"source": "string or null",
|
|
"errors": ["ProviderError"],
|
|
"vendor_raw": "opaque object"
|
|
},
|
|
"EmissionAmount": {
|
|
"co2_kg": "number or null",
|
|
"co2e_kg": "number or null",
|
|
"non_co2_multiplier": "number or null",
|
|
"breakdown": {
|
|
"ch4_kg": "number or null",
|
|
"n2o_kg": "number or null"
|
|
},
|
|
"wtw_kg": "number or null",
|
|
"ttw_kg": "number or null",
|
|
"wtt_kg": "number or null",
|
|
"unit": "kg | tonnes | grams | null",
|
|
"per": "request | passenger | segment | null",
|
|
"vendor_raw": "opaque vendor-specific JSON/XML"
|
|
},
|
|
"MethodologyMeta": {
|
|
"method_name": "string or null",
|
|
"method_version": "string or null",
|
|
"dataset_version": "string or null",
|
|
"vendor": "string or null",
|
|
"standard": "string or null",
|
|
"documentation_url": "string or null",
|
|
"non_co2_treatment": "none | included | partial | unknown"
|
|
},
|
|
|
|
"AirportRequest": {
|
|
"api_key": "optional string",
|
|
"provider": "string",
|
|
"operation": "string",
|
|
"calculationRequest": "AirportSearchRequest"
|
|
},
|
|
"AirportSearchRequest": {
|
|
"query": "string",
|
|
"limit": "optional integer",
|
|
"country_filter": "optional ISO 3166 code",
|
|
"languages": ["optional ISO 639 code"]
|
|
},
|
|
"AirportInfo": {
|
|
"iata_code": "string",
|
|
"icao_code": "string",
|
|
"name": "string",
|
|
"localized_name": ["LocalizedString"],
|
|
"country": "ISO 3166 code",
|
|
"continent": "string",
|
|
"latitude": "double",
|
|
"longitude": "double"
|
|
},
|
|
"LocalizedString": {
|
|
"lang": "ISO 639 code",
|
|
"name": "string"
|
|
}
|
|
}
|
|
|
|
{
|
|
"CabinClassEmissionSet": {
|
|
"economy_kg": "number or null",
|
|
"premium_economy_kg": "number or null",
|
|
"business_kg": "number or null",
|
|
"first_kg": "number or null"
|
|
},
|
|
"DistanceAmount": {
|
|
"value": "number or null",
|
|
"unit": "km | miles | null",
|
|
"miles": "number or null"
|
|
},
|
|
"FuelAmount": {
|
|
"liters": "number or null",
|
|
"kg": "number or null"
|
|
},
|
|
"MoneyAmount": {
|
|
"amount": "number or null",
|
|
"amount_minor": "integer or null",
|
|
"currency": "ISO 4217 code or null",
|
|
"url": "string or null",
|
|
"locale": "string or null"
|
|
},
|
|
"QuoteInfo": {
|
|
"id": "string or null",
|
|
"expires_at": "ISO-8601 datetime or null"
|
|
},
|
|
|
|
"ProviderError": {
|
|
"code": "string or null",
|
|
"message": "string",
|
|
"field": "string or null",
|
|
"vendor_raw": "opaque object"
|
|
},
|
|
"LocationRef": {
|
|
"iata": "string or null",
|
|
"icao": "string or null",
|
|
"name": "string or null",
|
|
"city": "string or null",
|
|
"country": "ISO 3166 code or null",
|
|
"continent": "string or null",
|
|
"lat": "number or null",
|
|
"lon": "number or null",
|
|
"coord": "string or null"
|
|
},
|
|
|
|
}
|
|
|
|
{
|
|
"FlightCalculationRequest.vendor_options": {
|
|
"climatiq_year": "integer",
|
|
"climatiq_air_details": "object",
|
|
"carbontracer_type": "flight-economy | flight-business | flight-firstclass",
|
|
"travelco2_vehicle_key": "flight-regular-economy | flight-regular-business | ...",
|
|
"travelco2_fuel_key": "jetfuel | bio-fuel",
|
|
"ibm_request_type": "ACTUAL | SIMULATED",
|
|
"ibm_vehicle_type": "string",
|
|
"ibm_country": "string",
|
|
"ibm_year": "integer",
|
|
"ibm_month": "integer"
|
|
}
|
|
} |