REST API
API Documentation
Convert raw Sabre/Amadeus itineraries programmatically. Grab your API key from your dashboard.
POST
https://pnrdecode.com/api/convertParses a raw PNR/itinerary string and returns structured flight segments — the same engine that powers the web app.
Authentication
Pass your API key as a Bearer token. Requests without a valid key return 401. Once your monthly plan limit is reached, requests return 429 until the next billing cycle.
Header
Authorization: Bearer YOUR_API_KEY
Example request
cURL
curl -X POST https://pnrdecode.com/api/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pnr_text": " 1 AA 100Y 15JUN F JFKLAX HK1 800A 1103A"}'Request body
{
"pnr_text": "raw itinerary string"
}Example response
200 OK — application/json
{
"gds": "Sabre",
"segments": [
{
"airline_code": "AA",
"airline_name": "American Airlines",
"airline_logo_url": "https://img.logo.dev/aa.com?token=...",
"flight_number": "100",
"booking_class": "Y",
"cabin_class": "Economy",
"date": "15 Jun",
"origin_code": "JFK",
"origin_name": "John F. Kennedy International Airport",
"origin_city": "New York",
"destination_code": "LAX",
"destination_name": "Los Angeles International Airport",
"destination_city": "Los Angeles",
"departure_time": "08:00",
"arrival_time": "11:03",
"status_code": "HK1",
"status": "Confirmed"
}
],
"warnings": [],
"error": null,
"calls_remaining": 19
}Status codes
200Success — parsed itinerary returned
401Missing or invalid API key
429Monthly call limit reached for your plan
