Overview
Our PNR Conversion API allows you to query our endpoint with a PNR and instantly receive a structured JSON object with the decoded flight, airport, and passenger data.
Our API returns the most comprehensive results available, along with standard airport details, including carbon emissions, transit times, operated by carrier if different from the ticketed carrier, image link, aircraft (where this information is available), and more.
Our API is easy to integrate. We have full documentation below, or alternatively, see our quick start guide here.
Get Started
To get started, simply sign up for an account, click through to the Manage API, and follow instructions there to get going!
Demo:
curl -X POST https://www.pnrexpert.com/api/v1/pnr \
-H "Content-Type: application/json" \
-H "Authorization: bearer my-secret-token" \
-d '{"pnr":" 1.1JOHNSON/HAL MR
1 MH 183S 11MAY Q MAAKUL HK1 1145A 615P /DCMH*THBBIP /E
2 MH5620S 14MAY S KULICN HK1 1125P 655A 15MAY M
/DCMH*THBBIP /E OPERATED BY KOREAN AIR
3 MH 39N 20MAY J ICNKUL HK1 1210A 545A /DCMH*THBBIP /E
4 MH 182N 20MAY J KULMAA HK1 935A 1045A /DCMH*THBBIP /E "}'
FetchAPI Response Documentation
Root Level Keys
data: Contains the main payload of the response.
remaining: Indicates the remaining number of flights available for the query (integer).
Data Object
flights: An array of flight objects. Each object represents an individual flight segment.
passengers: An array of passenger objects (empty in the provided response).
Flights Array
Each object in the flights array represents a flight segment and includes the following keys:
Flight Object
DepartingFrom
Object containing details about the departure airport.
id: Unique identifier for the departure airport (integer).
airportName: Name of the departure airport (string).
cityName: City where the departure airport is located (string).
countryName: Country where the departure airport is located (string).
airportCode: IATA code for the departure airport (string).
latitude: Latitude coordinate of the departure airport (string).
longitude: Longitude coordinate of the departure airport (string).
timezone: Time zone of the departure airport (string).
type: Type of location, airport, port, station (string).
time: Scheduled departure time in ISO 8601 format (string).
arrivingAt
Object containing details about the arrival airport.
id: Unique identifier for the arrival airport (integer).
airportName: Name of the arrival airport (string).
cityName: City where the arrival airport is located (string).
countryName: Country where the arrival airport is located (string).
airportCode: IATA code for the arrival airport (string).
latitude: Latitude coordinate of the arrival airport (string).
longitude: Longitude coordinate of the arrival airport (string).
timezone: Time zone of the arrival airport (string).
type: Type of location, airport, port, station (string).
time: Scheduled arrival time in ISO 8601 format (string).
dayOffset: Indicates if the flight arrives on a different day than it departs (integer).
aircraftType
Object containing details about the aircraft type.
name: Name of the aircraft model (string, null if not specified).
code: Code of the aircraft model (string, null if not specified).
distance
Object containing the distance of the flight.
- miles: Distance of the flight in miles (integer).
- km: Distance of the flight in kilometers (integer).
techStop Information about any technical stopovers (null if there are none).
carbonEmissions Carbon emissions for the flight segment in metric tonnes (float).
flightDuration
years: Duration in years (integer).
months: Duration in months (integer).
days: days
Authentication
The API requires a JWT token for authentication to access the data. The token should be included in the Authorization header of the request.
Endpoints
The API requires a JWT token for authentication to access the data. The token should be included in the Authorization header of the request.
Example Request
{
"pnr": "1 QF8405Q 05AUG 7 MELDXB*HK1 1800 0450 06AUG 1
/DCQF*SQP8UD /E
OPERATED BY EMIRATES
2 QF8135Q 06AUG 1 DXBVCE*HK1 0905 1325 /DCQF*SQP8UD /E
"
}
Response
The response contains flight information related to the provided PNR.
Success Response
{
"success": "Authorized 2",
"data": {
"flights": [
{
"departingFrom": {
"id": 14681,
"airportName": "Melbourne Intl Airport",
"cityName": "Melbourne",
"countryName": "Australia",
"airportCode": "MEL",
"latitude": "-37.6733017",
"longitude": "144.8430023",
"timezone": "Australia/Hobart",
"type": "airport",
"time": "2024-08-05T18:00:00.000+10:00"
},
"arrivingAt": {
"id": 13573,
"airportName": "Dubai Intl Airport",
"cityName": "Dubai",
"countryName": "United Arab Emirates",
"airportCode": "DXB",
"latitude": "25.25279999",
"longitude": "55.36439896",
"timezone": "Asia/Dubai",
"type": "airport",
"time": "2024-08-06T04:50:00.000+04:00",
"dayOffset": 0
},
"aircraftType": {
"name": null,
"code": null
},
"distance": {
"miles": 6801,
"km": 10944
},
"techStop": null,
"carbonEmissions": 1.25856,
"flightDuration": {
"years": 0,
"months": 0,
"days": 0,
"hours": 16,
"minutes": 50
},
"bookingClass": "Q",
"flightNumber": "8405",
"operatedBy": {
"airlineName": "Emirates",
"iataCode": "EK"
},
"transitTime": {
"hours": 4,
"minutes": 15
}
},
{
"departingFrom": {
"id": 13573,
"airportName": "Dubai Intl Airport",
"cityName": "Dubai",
"countryName": "United Arab Emirates",
"airportCode": "DXB",
"latitude": "25.25279999",
"longitude": "55.36439896",
"timezone": "Asia/Dubai",
"type": "airport",
"time": "2024-08-06T09:05:00.000+04:00"
},
"arrivingAt": {
"id": 15708,
"airportName": "Venice Marco Polo Airport",
"cityName": "Venice",
"countryName": "Italy",
"airportCode": "VCE",
"latitude": "45.505299",
"longitude": "12.3519",
"timezone": "Europe/Rome",
"type": "airport",
"time": "2024-08-06T13:25:00.000+02:00",
"dayOffset": 0
},
"aircraftType": {
"name": null,
"code": null
},
"istance": {
"miles": 2748,
"km": 4423
},
"techStop": null,
"crbonEmissions": 0.508645,
"ightDuration": {
years": 0,
months": 0,
days": 0,
"hours": 6,
"minutes": 20
},
"bookingClass": "Q",
"flightNumber": "8135",
"operatedBy": null,
"iataCode": "QF",
"airlineName": "Qantas",
"q": "Economy",
"cabin": "Economy",
"transitTime": null
}
],
"passengers": []
},
"remaining": 99998
}
Error Responses
{
"error": "Unauthorized"
}
Please check your authentication token is correct.
No PNR Provided
{
"error": "No PNR Provided"
}
Notes
All times are in ISO 8601 format.
Distances are provided in both miles and kilometers.
Carbon emissions are provided in metric tons.
Flight duration is broken down into years, months, days, hours, and minutes.
Transit time is only provided if applicable.