Ferry Gateway API
The Ferry Gateway service is running. Try making a POST request to this URL you're view this page at.
Implemented methods
The following methods are implemented:
- GetPassengerAndVehicleTypesRequest
- GetRoutesRequest
- GetTimeTablesRequest
- GetOfferCodesRequest
- GetSailingsRequest
- GetServicesRequest
- GetPriceRequest
- BookRequest
- RecallBookingRequest
- GetCancelChargeRequest
- CancelBookingRequest
Authentication
This service is stateless and acts as a middleman between you and the Expian Public API. As such, refer to the Expian API documentation for full details on how to authenticate.
Authentication involves passing a client ID and secret either as a Basic Auth header, or exchanging them for a Bearer token via the OAuth2 flow, using POST https://api.po.expian.io/oauth2/token.
Obtaining a client ID and secret
Credentials can be generated for Trade Partners in the Expian Admin Portal. The Trade Partner is then associated with every booking made using the credentials, and the client will only be able to access bookings made by the Trade Partner.
Setup
In order for this service to be able to map incoming requests to the correct entities in Expian, some configuration is required in the Expian Admin Portal.
-
Ticket Types
Building Blocks > Ticket Types > [Your ticket type]
- Configure the "Category" field on the integration tab for all ticket types that are used in the service.
- Configure the "Subcategory" field on the integration tab. For example, for all "student" ticket types, set it to "student". The correct "student" ticket type will be chosen based on the vehicles in the request.
- Configure the "Vehicle ticket type group" for passenger ticket types so that the correct ticket type is chosen based on the vehicles in the request. This allows an "Adult" category passenger with Subcategory "student" to be dynamically assigned the right ticket type, which may differ for different types of vehicles, or foot passengers.
- Configure the "Min Age" and "Max Age" fields on the integration tab for all passenger ticket types.
- Configure the min and max "Capacity units" (length) and "Height" on the "Capacity" tab for all vehicle ticket types. Note, if more than one capacity type is configured for a vehicle, the largest is the one assumed to be the length of the vehicle in metres, and that is the type that custom units are applied to in order to communicate the customer's vehicle length to the Expian API. For example, if a coach is configured to take "12 lane metres" and "1 coach" capacity, when the user specifies a vehicle length of 12.5 metres, the "12 lane metres" capacity type is the one overridden to 12.5 metres, assuming that is under the max capacity specified. The "1 coach" capacity is unchanged.
- Ensure all ticket types have an "Order" defined, and that they are ordered with the preferred ticket types first. When more than 1 ticket type could be a match to a specified passenger or vehicle type in a Ferry Gateway request, the first one that matches is chose. Examples include:
- Adult (order "0"), Senior (order "1") and Student (order "2") might all have the Category field set to "Adult". But if no SubCategory is specified for an "Adult" passenger in a Ferry Gateway request, the "Adult" ticket type will be chosen because it's first in the list.
- Small Trailer (order "300"), Medium Trailer (order "301") and Large Trailer (order "302") might all have the Category field set to "Trailer". From this list, the first one that is big enough based on its configured capacity and the trailers Length in the request is chosen.
-
Locations
Building Blocks > Locations > [Your location]
- Ensure the ID is something suitable for use in the Ferry Gateway API. The spec limits the characters, and length.
- Ensure that the "Country" field on locations are set to the ISO 3166-1 alpha-2 country codes, like "GB" for the United Kingdom.
-
Products
Products > [Your product]
- Configure the fare type on the integration tab.
- Enable the product for the "OTA" channel (also labelled "API" channel in the admin portal).
-
Trade Partners
Trade Partners > [Your trade partner]
- Enable the products the partner should be able to access.
- Obtain API Credentials to share with the partner, for use with this API.