Aviation Guides & Resources
With the vast range of airline knowledge we've got at Fares24, we've put together a series of guides to help you navigate the world of aviation. From aircraft types to airline codes, we've got you covered. Our ever expanding series of guides will help you inform and educate your clients on the best aircraft for their journey.
API Integration Guide
Overview
The Fares24 API allows you to decode PNR (Passenger Name Record) data programmatically. Our service supports all major GDS systems including Amadeus, Sabre, and Galileo, providing a unified way to transform raw PNR data into structured, easy-to-use flight information.
Getting Started
- Create an account at Fares24
- Navigate to your dashboard and generate an API key
- Use the API key in your requests via the Bearer token authentication
Authentication
All API requests require authentication using Bearer token:
Requests without valid authentication will receive a 401 Unauthorized response.
Endpoints
Decode PNR
POST /api/v1/pnr
Request Headers
- Content-Type: application/json
- Authorization: Bearer your_api_key_here
Request Body
{ "dump": "your_raw_pnr_data_here" }
Response Format
{ "totalRequests": number, "data": { "flights": [ { "id": "string", "departingFrom": { "iataCode": "string", "type": "airport", "terminal": "string", "dateTime": "string", "airportName": "string", "cityName": "string", "countryName": "string", "latitude": number, "longitude": number, "timezone": "string" }, "arrivingAt": { // Same structure as departingFrom }, "aircraftType": { "name": "string", "code": "string" }, "iataCode": "string", "airlineName": "string", "airlineLogo": "string", "flightNumber": "string", "flightDuration": { "days": number, "hours": number, "minutes": number }, "cabin": "string", "operatedBy": "string", "distance": { "km": number, "miles": number }, "technicalStop": boolean, "technicalStopTime": "string" } ] } }
Example Implementations
cURL
curl -X POST https://api.fares24.com/v1/pnr \ -H "Authorization: Bearer your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"dump":"1 BA 117 20JUN LGWJFK SS1 840A 1110A /DCBA /E"}'
Python
import requests api_key = 'your_api_key_here' url = 'https://api.fares24.com/v1/pnr' headers = { 'Authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' } data = { 'dump': '1 BA 117 20JUN LGWJFK SS1 840A 1110A /DCBA /E' } response = requests.post(url, headers=headers, json=data) flights = response.json()
JavaScript
const decodePNR = async (pnrData) => { const response = await fetch('https://api.fares24.com/v1/pnr', { method: 'POST', headers: { 'Authorization': 'Bearer your_api_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify({ dump: pnrData }) }); return await response.json(); };
Demo
You can try out our API using the following demo credentials:
API Key: demo_key_123 Endpoint: https://api.fares24.com/v1/pnr
Example PNR data for testing:
1 BA 117 20JUN LGWJFK SS1 840A 1110A /DCBA /E 2 AA 100 21JUN JFKLAX SS1 100P 400P /DCAA /E
Notes
- The API has rate limiting of 10 requests per minute per API key
- PNR data must be valid and contain at least one flight segment
- Response times are typically under 500ms
- All times in responses are in ISO 8601 format
- Distances are provided in both kilometers and miles
Pricing
Free Tier
No Access to API
Starter
$15/month - 2,000 requests/Month
Professional
$50/month - 10,000 requests/Month
Enterprise
Custom pricing - Unlimited requests
Contact [email protected] for enterprise pricing and custom solutions.