API reference
Version 1.0.0. Download the OpenAPI file or the Postman collection.
- Live:
https://api.flyrail.space/v1 - Sandbox:
https://sandbox-api.flyrail.space/v1
get/ping
Check your key and environment
Responses: 200 OK
get/airports
List airports
Responses: 200 Airports
get/airlines
List airlines available to your key's environment
Responses: 200 Airlines
post/flights/search
Search flights (scope `search`)
Searches every available airline at once. Airlines that are slow or down are listed in `unavailable_airlines` and never block the rest.
| Field | Type | Notes |
|---|---|---|
| adults | integer | |
| children | integer | |
| infants | integer | |
| origin * | string | e.g. LOS |
| destination * | string | e.g. ABV |
| date * | string | |
| cabin | economy | premium | business |
Responses: 200 Offers422 Error
post/offers/{offer}/price
Price an offer for your exact party (scope `search`)
| Parameter | In | Type |
|---|---|---|
| offer * | path | string |
| Field | Type | Notes |
|---|---|---|
| adults | integer | |
| children | integer | |
| infants | integer |
Responses: 200 Confirmed price404 Error409 Error
post/bookings
Book and ticket (scope `book`)
Holds the total in your wallet, reserves the seat, then issues the ticket in the background. The booking starts as `ticketing`; poll it or wait for `booking.ticketed`.
| Parameter | In | Type |
|---|---|---|
| Idempotency-Key * | header | string |
| Field | Type | Notes |
|---|---|---|
| offer_id * | string | |
| client_reference | string | |
| passengers * | array | |
| contact * | object |
Responses: 201 Booking created402 Error409 Error422 Error
get/bookings
List your bookings (scope `read`)
| Parameter | In | Type |
|---|---|---|
| status | query | string |
| per_page | query | integer |
Responses: 200 Bookings
get/bookings/{booking}
Get a booking (scope `read`)
| Parameter | In | Type |
|---|---|---|
| booking * | path | string |
Responses: 200 Booking404 Error
post/bookings/{booking}/cancel
Cancel a booking (scope `cancel`)
Refunds follow the fare rules. A same-day cancellation is a full void including our service fee. Repeating the call is safe.
| Parameter | In | Type |
|---|---|---|
| booking * | path | string |
Responses: 200 Booking409 Error
get/bookings/{booking}/ticket
Get the e-ticket (scope `read`)
| Parameter | In | Type |
|---|---|---|
| booking * | path | string |
Responses: 200 Ticket409 Error
get/wallet
Wallet balances (scope `read`)
Responses: 200 Balances
get/wallet/transactions
Wallet movements, newest first (scope `read`)
Responses: 200 Transactions
get/webhooks/events
Recent webhook deliveries and their status (scope `read`)
Responses: 200 Events