Please make sure you read the Conventions before continuing with this guide.
Requirements.
You will need an X-API-KEY.
Finding trips
You will interact with the /inventory-trips/trips endpoint of the Inventory Bucket to find a trip given some parameters.
| Parameter | Type | Example |
|---|---|---|
| departureDate | Date formatted as yyyy-mm-dd | 2017-10-28 |
| returnDate | Date formatted as yyyy-mm-dd if provided the results will include return trips | 2017-10-28 |
| fareIds | Array | 5910cfbafa1b904d0c000013:1,5910cfbafa1b904d0c000012:1 |
| destinationId | String | 5910cfbafa1b904d0c000015 |
| originId | String | 5910cfbafa1b904d0c000014 |
| providersId | String | 5910cfbafa1b904d0c000017 |
| productId | String | 5910cfbafa1b904d0c000016 |
| ignoreCutoffs | Boolean. Indicates if cutoffs should be ignored. | true |
| roundtripChangeset | Boolean. (DEPRECATED) Indicates if the search is for a roundtrip change. | false |
| changeTicketId | String. (Only for roundtrip) The id of the roundtrip return ticket that is being changed. | 5910cfbafa1b904d0c000021 |
| ignoreFilterEarlierReturnTrips | Boolean. Indicates if the search should ignore the filter for earlier return trips. | false |
| minDeparturePrice | Number. The minimum price of the departure that is going to be changed. | 10.00 |
| minReturnPrice | Number. The minimum price of the return that is going to be changed. | 10.00 |
| currency | String. The desired currency in which to perform the trip search (ISO 4217). | USD |
| pathfinder | String. The internal pathfinder system to use. For debugging use only. | |
| showSoldOutTrips | Boolean. Indicates if it should return sold out trips in the response. | false |
| isChange | Boolean. Indicates if the trip results are being used for a ticket change. | false |
| includeMoveToTrips | Boolean. Return trip results where associated manifest is in "published" or "paused" state. | false |
| isMove | Boolean. Return all the trips, including the dispatched trips. | false |
| allowedManifestStatuses | String. A comma-separated list of manifest statuses. | published,paused |
| ignorePerFareCapacityLimits | Boolean. If set to true, the capacity limits configured for each fare will be ignored. | false |
| replaceFaresOnLowAvailability* | Boolean. If set to true, when the requested fare(s) are unavailable but the base fare is available, the trip search will still return the trip. | false |
* If fares were replaced in the trip, a replacementFares array (alongside each fares array) will be included, containing the fare used as replacement.
Each fare (from the normal fares array) will also include amountReplaced and replacementFareId properties.
Notice the fareIds is not only an array of fareIds, but they include the number of passengers for that fare Id as well.
The fareId and the qty are separated by a colon :.
The originId and destinationId parameters are station ids.
The response will contain zero or more departure and return Trips. For each Trip, pricing information can be found in the fares property, or the fareClasses property if you performed a search for a product that has Fare Classes configured.