-
Notifications
You must be signed in to change notification settings - Fork 4
Brightline API
This reference is not meant to be an exhaustive list of all possible methods to communicate with Brightlineβs services. This is intended to get fare and train departure/arrival estimates.
All valid responses should return plain JSON. Ensure your code handles errors properly in the case that another type of response is returned.
https://luxapi.verbinteractive.com/api/
Station Name | Station Code | Internal API Code |
---|---|---|
Miami | MIA | MIA |
West Palm Beach | WPB | PBI |
Fort Lauderdale | FTL | FLL |
Service Class | Internal API Code |
---|---|
Smart Service | SM |
Select Service | SL |
SmartPLUS Service | SP |
Returns a JSON object containing departure times from a station to another station on a specific date.
https://www.gobrightline.com/api/brightlineTrainAvailability
The request payload is a JSON object sent to the server as application/json
.
Key Name | Description | Example |
---|---|---|
one-way | An array with relevant trip data | [{"origin":"FLL"},{"destination":"MIA"},{"date":"2019-01-28"},{"seats":1}] |
one-way[0]
|
An object containing an origin key with the departure station code |
{"origin":"PBI"} |
one-way[1]
|
An object containing a destination key with the arrival station code |
{"destination":"FLL"} |
one-way[2]
|
An object containing a date key with the selected date in YYYY-MM-DD format. |
{"date":"2019-02-04"} |
one-way[3]
|
An object containing a seats key with a number. This value is required but doesnβt do anything. It can be set to 0 by default. |
{"seats":0} |
travel-class | A string containing any of the service class codes | SM |
curl -X POST \
https://www.gobrightline.com/api/brightlineTrainAvailability \
-H 'Content-Type: application/json' \
-d '{"one-way":[{"origin":"FLL"},{"destination":"MIA"},{"date":"2019-02-03"},{"seats":0}],"travel-class":"SM"}'
{
"success": false,
"departureTimes": [
"2019-02-03T08:39:00",
"2019-02-03T10:39:00",
"2019-02-03T11:39:00",
"2019-02-03T12:39:00",
"2019-02-03T14:39:00",
"2019-02-03T15:39:00",
"2019-02-03T16:39:00",
"2019-02-03T18:39:00",
"2019-02-03T20:39:00"
],
"insufficientSeats": []
}
Returns a JSON array containing all trains scheduled for a certain day and information about each departure and arrival. The number of train objects in the array varies by departure date, but is around the 25-35 range.
https://luxapi.verbinteractive.com/api/TrainStatus
Name | Required | Description | Example |
---|---|---|---|
arrival | optional | Trains that arrive at this station | MIA |
departure | optional | Trains that depart from this station | PBI |
departureDate | required | A single date for departing trains. Must be in YYYY-MM-DD format. |
2019-01-27 |
GET https://luxapi.verbinteractive.com/api/TrainStatus?arrival=MIA&departureDate=2019-01-22
[
{
"actualArrival": "2019-01-22T06:12:00",
"actualArrivalPlatform": "2",
"actualDeparture": "2019-01-22T05:00:00",
"actualDeparturePlatform": "2",
"arrival": "2019-01-22T06:12:00",
"arrivalPlatform": "2",
"arrivalStatus": "Arrived",
"arrivalType": "Actual",
"bagClaim": "",
"consistNumber": "BRTRED",
"departure": "2019-01-22T05:00:00",
"departurePlatform": "2",
"departureStatus": "Departed",
"departureType": "Actual",
"destination": "MIA",
"estimatedArrival": "2019-01-22T06:12:00",
"estimatedDeparture": null,
"fidsArrivalStatus": "Default",
"fidsDepartureStatus": "Default",
"legs": [
{
"actualArrival": "2019-01-22T05:36:00",
"actualArrivalPlatform": "1",
"actualDeparture": "2019-01-22T05:00:00",
"actualDeparturePlatform": "2",
"arrival": "2019-01-22T05:36:00",
"arrivalPlatform": "1",
"arrivalStatus": "Arrived",
"arrivalType": "Actual",
"bagClaim": "",
"consistNumber": "BRTRED",
"departure": "2019-01-22T05:00:00",
"departurePlatform": "2",
"departureStatus": "Departed",
"departureType": "Actual",
"destination": "FLL",
"estimatedArrival": "2019-01-22T05:36:00",
"estimatedDeparture": null,
"fidsArrivalStatus": "Default",
"fidsDepartureStatus": "Default",
"inventoryLegId": 32633,
"isCancelled": false,
"legStatus": "Closed",
"origin": "PBI",
"scheduledArrival": "2019-01-22T05:37:00",
"scheduledArrivalPlatform": "2",
"scheduledDeparture": "2019-01-22T05:00:00",
"scheduledDeparturePlatform": "2",
"train": "501"
},
{
"actualArrival": "2019-01-22T06:12:00",
"actualArrivalPlatform": "2",
"actualDeparture": "2019-01-22T05:39:00",
"actualDeparturePlatform": "1",
"arrival": "2019-01-22T06:12:00",
"arrivalPlatform": "2",
"arrivalStatus": "Arrived",
"arrivalType": "Actual",
"bagClaim": "",
"consistNumber": "BRTRED",
"departure": "2019-01-22T05:39:00",
"departurePlatform": "1",
"departureStatus": "Departed",
"departureType": "Actual",
"destination": "MIA",
"estimatedArrival": "2019-01-22T06:12:00",
"estimatedDeparture": null,
"fidsArrivalStatus": "Default",
"fidsDepartureStatus": "Default",
"inventoryLegId": 32632,
"isCancelled": false,
"legStatus": "Normal",
"origin": "FLL",
"scheduledArrival": "2019-01-22T06:15:00",
"scheduledArrivalPlatform": "3",
"scheduledDeparture": "2019-01-22T05:39:00",
"scheduledDeparturePlatform": "2",
"train": "501"
}
],
"origin": "PBI",
"scheduledArrival": "2019-01-22T06:15:00",
"scheduledArrivalPlatform": "3",
"scheduledDeparture": "2019-01-22T05:00:00",
"scheduledDeparturePlatform": "2",
"segmentStatus": "Arrived",
"train": "501"
}
]
Returns a Session ID as a JSON string (wrapped in double quotes)
https://luxapi.verbinteractive.com/api/session/new
"td5a2w3egcqkyfncmkcarasl"
Returns a JSON object containing trip information and fares.
The request payload is a JSON object sent to the server as application/json
.
You also need to supply the header SessionId
containing the key generated with
the Sessions API (without the string quotes).
Key Name | Description | Example |
---|---|---|
d1 | Arrival station (where youβre going) | PBI |
dd1 | Departure date. Must** **be in YYYY-MM-DD format |
2019-02-16 |
o1 | Departure station (where youβre leaving from) | MIA |
p | Promo code to apply. Leave as null if blank otherwise |
GOSMART |
pax | Number of passengers | 3 |
curl -X POST \
https://luxapi.verbinteractive.com/api/Booking/availability \
-H 'Content-Type: application/json' \
-H 'SessionId: td5a2w3egcqkyfncmkcarasl' \
-d '{"d1":"PBI","o1":"MIA","dd1":"2019-02-08","p":null,"pax":2}'
Note: Only data.trips[0].flights
and data.lowestFares[0]
contain repeated
arrays with a length greater than 1.
{
"trips": [{
"destination": "PBI",
"origin": "MIA",
"departureDate": "2019-01-28T00:00:00",
"flights": [{
"carrierCode": "0R",
"flightNumber": " 502",
"sellKey": "0R~ 502~ ~~MIA~01/28/2019 06:40~PBI~01/28/2019 07:55~FLL~",
"estimatedTimeOfArrival": null,
"estimatedTimeOfDeparture": null,
"standardTimeOfArrival": "2019-01-28T07:55:00",
"standardTimeOfDeparture": "2019-01-28T06:40:00",
"fares": [{
"classOfService": "M",
"productClass": "SM",
"remainingSeats": 25,
"ruleNumber": "SMRT",
"sellKey": "0~M~~0R~MSM~SMRT~000~1~6~NMIAPBI0010060~X",
"sellKeyGroup": ["0~M~~0R~MSM~SMRT~000~1~6~NMIAPBI0010060~X", "0~B~~0R~BSM~SMRT~000~1~3~NMIAPBI0010030~X", "0~Y~~0R~YSM~SMRT~000~1~6~NMIAPBI0010060~X"],
"originalPrice": 30,
"salePrice": 25,
"passengerFares": [{
"convertedAmount": null,
"convertedCurrencyCode": "",
"currencyCode": "USD",
"discountedFare": 25,
"fareAmount": 25,
"isDiscount": false,
"loyaltyPoints": 0,
"publishedFare": 25,
"revenueFare": 25,
"fareDiscountCode": "",
"isInServiceBundle": false,
"passengerType": "ADT",
"paxDiscountCode": "",
"paxType": "ADT",
"serviceCharges": {
"items": [{
"amount": 25,
"chargeCode": "",
"chargeDetail": "",
"chargeType": "FarePrice",
"collectType": 0,
"currencyCode": "USD",
"foreignAmount": 25,
"foreignCurrencyCode": "USD",
"ticketCode": ""
}],
"updateItem": null
}
}],
"isPromo": false
}, {
"classOfService": "O",
"productClass": "SP",
"remainingSeats": 32,
"ruleNumber": "SMPL",
"sellKey": "0~O~~0R~OSP~SMPL~000~2~3~NMIAPBI0020030~X",
"sellKeyGroup": ["0~O~~0R~OSP~SMPL~000~2~3~NMIAPBI0020030~X", "0~V~~0R~VSP~SMPL~000~2~3~NMIAPBI0020030~X", "0~K~~0R~KSP~SMPL~000~2~4~NMIAPBI0020040~X"],
"originalPrice": 35,
"salePrice": 30,
"passengerFares": [{
"convertedAmount": null,
"convertedCurrencyCode": "",
"currencyCode": "USD",
"discountedFare": 30,
"fareAmount": 30,
"isDiscount": false,
"loyaltyPoints": 0,
"publishedFare": 30,
"revenueFare": 30,
"fareDiscountCode": "",
"isInServiceBundle": false,
"passengerType": "ADT",
"paxDiscountCode": "",
"paxType": "ADT",
"serviceCharges": {
"items": [{
"amount": 30,
"chargeCode": "",
"chargeDetail": "",
"chargeType": "FarePrice",
"collectType": 0,
"currencyCode": "USD",
"foreignAmount": 30,
"foreignCurrencyCode": "USD",
"ticketCode": ""
}],
"updateItem": null
}
}],
"isPromo": false
}, {
"classOfService": "Z",
"productClass": "SL",
"remainingSeats": 20,
"ruleNumber": "SLCT",
"sellKey": "0~Z~~0R~ZSL~SLCT~000~1~3~NMIAPBI0010030~X",
"sellKeyGroup": ["0~Z~~0R~ZSL~SLCT~000~1~3~NMIAPBI0010030~X", "0~D~~0R~DSL~SLCT~000~1~6~NMIAPBI0010060~X", "0~C~~0R~CSL~SLCT~000~1~5~NMIAPBI0010050~X", "0~J~~0R~JSL~SLCT~000~1~7~NMIAPBI0010070~X"],
"originalPrice": 50,
"salePrice": 45,
"passengerFares": [{
"convertedAmount": null,
"convertedCurrencyCode": "",
"currencyCode": "USD",
"discountedFare": 45,
"fareAmount": 45,
"isDiscount": false,
"loyaltyPoints": 0,
"publishedFare": 45,
"revenueFare": 45,
"fareDiscountCode": "",
"isInServiceBundle": false,
"passengerType": "ADT",
"paxDiscountCode": "",
"paxType": "ADT",
"serviceCharges": {
"items": [{
"amount": 45,
"chargeCode": "",
"chargeDetail": "",
"chargeType": "FarePrice",
"collectType": 0,
"currencyCode": "USD",
"foreignAmount": 45,
"foreignCurrencyCode": "USD",
"ticketCode": ""
}],
"updateItem": null
}
}],
"isPromo": false
}],
"isCanceled": false,
"isSuspended": false
}]
}],
"lowestFares": [
[{
"departureDate": "2019-01-28T00:00:00",
"destination": "PBI",
"fareAmount": 17,
"farePointAmount": 0,
"fareSellKey": "0~Q~~0R~QSM~SMRT~000~1~7~NMIAPBI0010070~X",
"includeTaxesAndFees": false,
"journey": {
"arrivalDateChangeAmount": 0,
"arrivalDateChangeSign": null,
"notForGeneralUser": false,
"segments": null,
"sellKey": ""
},
"noFlights": false,
"origin": "MIA",
"taxesAndFeesAmount": 0
}]
],
"promotionStatus": ""
}