Overview

Searching for Source Locations

Every transfer service is represented using 2 distinct locations; A starting location (source:from) and a destination location (target:to).

When performing an search it is imperative that you provide the correct codes for each endpoint you wish to perform the service search against.

In order to discover the set of valid starting locations we call the TransferService.SearchForSourceLocations(string searchTerm) action, passing a search term.

The search term may be anything from an IATA airport code to a partial name of a city centre. Our api will use this search term to provide a "best matching" set of locations.

Source Location Search Examples

using (var service = new TransfersService.TransfersServiceContractClient()) {

    // Search for all source locations.
    var sourceLocations = service.SearchForSourceLocations("");

    // Search for all source locations that contain the word "Glas".
    var sourceLocations = service.SearchForSourceLocations("Glas");
}

Once a starting source location has been determined, the next logical step is to search for all corresponding target locations.

Searching for Target Locations

Target locations are the terminating endpoints for any given route service.

To search for target locations attached to a given source you use the TransferService.SearchForTargetLocations(string sourceLocationCode, string searchTerm) action.

The search term usage is the same as for source location searching.

Target Location Search Examples

using (var service = new TransfersService.TransfersServiceContractClient()) {

    // Search for locations that have routes from Leeds/Bradford Airport.
    var targetLocations = service.SearchForTargetLocations("LBA", "");

    // Search for locations that have routes Glasgow City Centre and contain the word "bay".
    var targetLocations = service.SearchForTargetLocations("31443721", "bay");
}

Now you have your source and target locations selected you can use the two unique codes to search for available services that follow their route.

Searching for Transfer Services

Our system supports 2 types of transfer search: Singles and Returns.

  • A single is a one way trip from some source location to a given target location [A -> B]
  • A return is a two way round trip from source location to target and then back again from target to source [A -> B, B -> A]

To perform a return service search one simply populates the ReturnDate field on the TransferServiceSearchItineraryDTO instances. Omitting the ReturnDate field instructs our system to perform a single service (one-way) search.

Each service returned will contain 1 or more journeys. A journey represents a specific bus, coach, taxi or otherwise scheduled departure of such service and is uniquely identified using its JourneyToken field.

Single / Outbound Search Example

using (var service = new TransfersService.TransfersServiceContractClient()) {

    // Construct the search itinerary.
    var searchItinerary = new TransferServiceSearchItineraryDTO() {
        SourceLocationCode = "CDG",
        TargetLocationCode = "50875030",
        OutboundDate = outboundDate,
        Adults = 1,
        Children = 0,
        Infants = 0,
        CurrencyCode = "EUR",
        LanguageCode = "en"
    };

    // Perform the service availability search.
    var search = service.SearchForServices(searchItinerary);

    // Either automate selection of a service and journey, or provide the initial results for customer's to select.
    var selectedTransferService = SelectService(search);

    // Either automate selection of a service and journey, or provide the initial results for customer's to select.
    var selectedJourney = SelectOutboundJourney(selectedTransferService);
}

Standard Return Search Example

using (var service = new TransfersService.TransfersServiceContractClient()) {

    // Construct the search itinerary.
    var searchItinerary = new TransferServiceSearchItineraryDTO() {
        SourceLocationCode = "CDG",
        TargetLocationCode = "50875030",
        OutboundDate = outboundDate,
        ReturnDate = returnDate,
        Adults = 1,
        Children = 0,
        Infants = 0,
        CurrencyCode = "EUR",
        LanguageCode = "en"
    };

    // Perform the service availability search.
    var search = service.SearchForServices(searchItinerary);

    // Either automate selection of a service and journey, or provide the initial results for customer's to select.
    var selectedTransferService = SelectService(search);
    var outboundJourney = SelectOutboundJourney(selectedTransferService);
    var returnJourney;

    if (selectedTransferService.RequiresTwoStepReturnSelectionProcess) {
        returnJourney = PerformTwoStepProcess(/* ... */);
    } else {

        // When we don't use 2-step process we reuse the outbound journey as it does not require the additional step to be considered populated.
        returnJourney = outboundJourney
    }
}

As our api integrates heavily with external service providers some return services require what is known as a 2-step process.

The 2-step process is defined as first searching for outbound service journeys, then as a second step, requesting the return journeys available for the given outbound journey.

2-Step Return Search Example

using (var service = new TransfersService.TransfersServiceContractClient()) {

    // Construct the search itinerary.
    var searchItinerary = new TransferServiceSearchItineraryDTO() {
        SourceLocationCode = "CDG",
        TargetLocationCode = "50875030",
        OutboundDate = outboundDate,
        ReturnDate = returnDate,
        Adults = 1,
        Children = 0,
        Infants = 0,
        CurrencyCode = "EUR",
        LanguageCode = "en"
    };

    // Perform the service availability search.
    var outboundSearch = service.SearchForServices(searchItinerary);

    // Either automate selection of a service and journey, or provide the initial results for customer's to select.
    var selectedTransferService = SelectService(outboundSearch);

    // Either automate selection of a service and journey, or provide the initial results for customer's to select.
    var outboundJourney = SelectOutboundJourney(selectedTransferService);

    // 2-step process: assumes prior check for (selectedTransferService.RequiresTwoStepReturnSelectionProcess == true)
    var returnSearch = service.SearchForReturnServices(outboundSearch.SearchToken, outboundJourney.JourneyToken);

    // The return search will only contain 1 service, the service that the outbound journey was associated with.
    var selectedReturnTransferService = returnSearch.Services.FirstOrDefault();

    if (selectedReturnTransferService == null) {
        // ERROR: No return journeys available for the given search criteria.
    }

    // Either automate selection of a service and journey, or provide the initial results for customer's to select.
    var returnJourneys = SelectReturnJourney(returnSearch);
}

Transfer Search (Deep-Linking)

If you can't create a full integration, we can offer a deep-link search service via the Looking4Transfers.com website.

The base search url is: https://www.looking4.com/uk/airport-transfers/search-results

Below are details of the parameter names and values that must be specified in order to successfully generate a deep-linked search request.

NB: In order for deep-link searches to be traceable back to your application you must supply the campaign code issued by your account manager.

Parameter Type Description Required
Itinerary.SourceLocation.Code string The unique identifier for the starting location
Itinerary.TargetLocation.Code string The unique identifier for the ending location
Itinerary.OutboundDate.Date date [dd/MM/yyyy] The outbound date
Itinerary.OutboundDate.Time time [HH:mm] The outbound time
Itinerary.ReturnDate.Date date [dd/MM/yyyy] The return date
Itinerary.ReturnDate.Time time [HH:mm] The return time round-trips only
Itinerary.Passengers.Adults int The total number of adults travelling (+12yrs) round-trips only
Itinerary.Passengers.Children int The total number of children travelling (2-12yrs)
Itinerary.Passengers.Infants int The total number of infants travelling (0-2yrs)
Itinerary.Discount.Code string A valid promotional discount code
Itinerary.Campaign string Your unique TPA campaign code as supplied by the Travel Parking Group

Examples

Single Example

https://www.looking4.com/uk/airport-transfers/search-results?Itinerary.SourceLocation.Code=LHR&Itinerary.TargetLocation.Code=56748910&Itinerary.OutboundDate.Date=27/10/2024&Itinerary.OutboundDate.Time=01:00&Itinerary.Passengers.Adults=2&Itinerary.Campaign=TEST1

Return Example

https://www.looking4.com/uk/airport-transfers/search-results?Itinerary.SourceLocation.Code=LHR&Itinerary.TargetLocation.Code=56748910&Itinerary.OutboundDate.Date=27/10/2024&Itinerary.OutboundDate.Time=01:00&Itinerary.ReturnDate.Date=31/10/2024&Itinerary.ReturnDate.Time=01:00&Itinerary.Passengers.Adults=3&Itinerary.Passengers.Children=2&Itinerary.Passengers.Infants=1&Itinerary.Campaign=TEST2

Locations

Transfer location codes can be found here: https://www.travelparkingapps.com/api/docs/Transfers/Locations

Generating a Quotation

Once the service and journeys have been selected we must generate a full quotation for the requested purchase. The quotation contains all the information needed to display a breakdown.

The quotation object returned is also a required complex field of the booking itinerary.

Single Quotation Example

using (var api = new TransfersService.TransfersServiceContractClient()) {
    var quotation = api.GenerateQuotation(search.SearchToken, outboundJourney.JorneyToken, null);
}

Return Quotation Example

using (var api = new TransfersService.TransfersServiceContractClient()) {
    var quotation = api.GenerateQuotation(search.SearchToken, outboundJourney.JorneyToken, returnJourney.JourneyToken);
}

Placing a Booking

Placing a booking takes all the previously established service / journey / quotation data, plus some additional required information such as customer details and payment information, and ands it all to our api for processing.

Once the api returns the new booking will either have been created successfully or an error may occur, in which case error details will be returned.

Placing a Booking Example

using (var transfersApi = new TransfersService.TransfersServiceContractClient()) {

    var quotation = GetQuotationAsPerPreviousSteps();

    var bookingItinerary = new TransferBookingItineraryDTO() {
        Quotation = quotation,
        LeadPassengerDetails = new PassengerDetailsDTO() {
            FirstNames = "T",
            LastName = "Test",
            EmailAddress = "examples@travelparkinggroup.com",
            ContactNumber = "01234567980"
        },
        PaymentMethodDetails = new PaymentMethodDetailsDTO() {
            Card = new CardDTO() {
                CardHolderName = "Mr T TEST",
                CardNumber = "4263971921001307",
                ExpiryMonth = 06,
                ExpiryYear = 2016,
                SecurityNumber = "123"
            }
        }
    };

    var booking = transfersApi.PlaceBooking(bookingItinerary);
}