Boarding Pass
List all passes
fetch('https://api.placeholderjson.dev/boarding-pass')
.then(response => response.json())
.then(json => console.log(json))
// Return
[
{"id": "2KPFW08X5O", /* ... */ },
{"id": "4J0XRF83X6", /* ... */ }
]
Fetch a given boarding pass
fetch('https://api.placeholderjson.dev/boarding-pass/2KPFW08X5O')
.then(response => response.json())
.then(json => console.log(json))
// Return
{
"id": "2KPFW08X5O",
"airline": "Atlantic International Airlines",
"flightCode": "AIA002",
"seat": "23K",
"gate": "B17",
"date": "22/08/2020",
"boardingTime": "19:30",
"boardingZone": 2,
"terminal": 5,
"departureTime": "19:45",
"departureAirport": "London Heathrow",
"departureAirportIATA": "LHR",
"arrivalAirport": "Newark",
"arrivalAirportIATA": "EWR",
"passenger": "Oscar Morley"
}
Information
Data
Name | Type |
---|---|
id | string |
airline | string |
flightCode | string |
seat | string |
gate | number | string |
date | string |
boardingTime | string |
boardingZone | number | null |
terminal | number | null |
departureTime | string |
departureAirport | string |
departureAirportIATA | string |
arrivalAirport | string |
arrivalAirportIATA | string |
passenger | string |
Example
Airlines
This data set includes flights for the following (fictitious) airlines
- Oceanic Airlines
- Atlantic International Airlines
- Trans American Airlines
- Windsor Airlines
Ideas
- Implement a different style for each airline
- Include a (unique) scannable code for each pass