Introduction

We provide you with access to our B2B API services and documentation on how to insert products from Lemax into your partner’s web page or back office system.

An XML Out integration is basically a connector that acts as a “translator” between Lemax clients and their partners allowing different formats or programming languages ​​(usually XML) to be compatible. This way the information from Lemax is available on the website or back office of travel agency, even if they have the databases information differently structured.

XML INTEGRATIONS ALLOWS:

  • Centralize inventory management
  • Increase distribution channels
  • Savings

In this type of XML integrations suppliers (Lemax) provide clients to search their availability, rates, etc. so they can sell the available product and are required to update the information.

Through B2B API, we provide you with access to the information in the back office such as reservations, transactions, documents, products, and it is up to your team to extract, organize and display that information in any way you like.

The information the partner can access through B2B API is limited by markets and/or contingents as for the integration are needed credentials which are provided by Lemax upon client’s request.

When credentials are entered, customer ID is automatically set up and partner can only see products and  documents assigned to them, transactions and reservations he has made.

You can find a full B2B API documentation here.

When the integration is done, the number of users a partner can have is not limited.

Lemax B2B API is a web service based on SOAP, and as such uses XML for data exchange and is technology independent. Using B2B API doesn’t require installation of any kind. Its purpose is the integration of the Agent’s system with Lemax Software back office, i.e. display of the information from the Lemax client’s back office on their Partner’s or Agent’s system, and booking of client’s products directly from Agent’s system.

Lemax Software offers various means of integration, but API provides the most flexibility and customization options.

This is not a documentation of all B2B API features, for a complete B2B API documentation find additional document, but a short guide on getting started, since our API is rather extensive. The purpose of this document is for you to figure out exactly what you’ll be looking for in the API documentation when you start the implementation phase.

Lemax booking process

Our booking process consists of four consecutive steps: search, search results, detailed view and booking.

Usually, customers want to do a search of your products by using various filters. This leads them to the second step – search results, a list containing the products that match their applied filters. Customers can then click on a particular product in the search results to see more information about it, which leads them to a detailed view of that product. From there, they can proceed to booking the product.

In case there’s only one product in the search results, that step can be skipped and you can redirect straight to the detailed view of that product. Also, you may wish to implement a way to go straight to the booking step from the search results, without necessarily going to the detailed view.

Lemax Software supports a multitude of different types of products, all of which belong to one of the three product type groups: accommodations (hotels, hostels, vessels, private accommodations…), tours (simple tours, advanced tours, activities…) and transportation (transfers, charter flights, rent-a-car…). The booking process for each type of product is the same, but each product type group has its own API methods.

Booking process steps

Search

Searching is performed with a search box, which consists of a number of filters / search fields.

Use GetSearchFields method to fetch the data for the search fields you want (the same method is used for all three product type groups – accommodations, tours and transportation).

GetSearchFields method takes a GetSearchFieldsParameters class as an input parameter. That class has the following properties:

  • LanguageID – ID of the language in which the data in the response will be.
  • ObjectTypeIDList – If objectTypeIDList is not empty, only categories, countries, regions and destinations that contain the objects of those types will be returned.
  • ObjectTypeGroupIDList – If objectTypeGroupIDList is not empty, only categories, countries, regions and destinations that contain the objects whose type belongs to the group contained in that list will be returned.
  • CategoryIDList – If categoryIDList is not empty only countries, regions and destinations that contain the objects in those categories will be returned.
  • CountryID – Only regions and destinations that are in the country with that ID will be returned.
  • RegionID – Only destinations that are in the region with that ID will be returned.

GetSearchFields method returns a SearchFields object. Its properties are:

  • Categories – List of available categories to search from.
  • CountryList – List of available countries to search from.
  • RegionList – List of available regions to search from.
  • DestinationList – List of available destinations to search from.

Of course, you don’t have to use all (or any, for that matter) of those search fields, and you can implement your own additional filters, like date pickers for travel dates, inputs for the number of people that will use the booked product or inputs for the price range.

Search results

Search results, as mentioned previously, is a list of products that match the search criteria.

Each product type group has its own API method for fetching search results. These are: GetSearchResults (for accommodations), GetPackageSearchResults (for tours, which are also called package tours) and GetTransportationSearchResults (for transportation).

Each of these three search methods has its own input parameter class: GetSearchResultsParameters, GetPackageSearchResultsParameters and GetTransportationSearchResultsParameters.

Since each product type group is unique, each of these classes has some unique search properties, but they all share the basic and most important ones. Some of them are:

  • StartDate – Start date for period in which unit should be available. If startDate is set to NULL, the system defaults it to some date.
  • EndDate – End date for period in which unit should be available. If endDate is set to NULL or startDate, the system defaults it some date other then the startDate.
  • CountryIDList – List of countryIDs. If the list is set, the method returns only objects that are located in one of the countries whose countryID is on the list.
  • RegionIDList – List of regionIDs. If the list is set, the method returns only objects that are located in one of the regions whose regionID is on the list.
  • DestinationIDList – List of destinationIDs. If the list is set, the method returns only objects that are located in one of the destinations whose destinationID is on the list.
  • ObjectAttributeFilterList – When objectAttributeFilterList is not empty, objects in response will be filtered out by given attributes in objectAttributeFilterList. This parameter is used to filter objects by Name, Stars, etc.
  • UnitAttributeFilterList – When unitAttributeFilterList is not empty, units in response will be filtered out by given attributes in unitAttributeFilterList. This parameter is used to filter units by Capacity, Air Conditioning, etc.
  • OutParameterList – This is used to limit the amount of information about objects and units in the response. Only information listed in the outParameterList will be returned. For example, you can use it to fetch only object’s or unit’s photos, description or map coordinates, instead of complete objects with their units and all of their properties.
  • OnlyOnSpecialOffer – The response contains only objects that have a special offer.
  • ObjectIDList – List of Object IDs. The search will return only objects whose IDs are on the list. If the list is NULL or empty, the parameter is ignored.
  • CurrencyID – ID of the currency in which the prices should be returned.
  • LanguageID – ID of the language in which the data in the response should be.
  • PriceFrom – If priceFrom is set, the method returns only units with price greater or equal to priceFrom.
  • PriceTo – If priceTo is set, the method returns only units with price lesser or equal to priceTo.

Since transportation is usually not connected to only one destination, but two (pickup and drop off locations), they don’t use only one list for countries, regions and destinations, but two for each.

You can make a filter/search field for any property in those input parameter classes. For instance, you can make a section of the search box that will contain checkboxes for unit attributes, like Air conditioning, Satellite TV, Balcony, Sea view etc. For each checkbox checked, you will then add that unit attribute to the UnitAttributeFilterList.

Each search method returns a distinct response object: SearchResults (accommodations), PackageSearchResults (tours) or TransportationSearchResults (transportation).

Some of the properties of SearchResults are:

  • AccommodationObjectList – List of objects returned in search results. Each AccommodationObject on this list contains detailed information about that accommodation object, like name, description, list of photos, list of accommodation units etc.
  • DestinationList – List of destinations in which objects from AccommodationObjectList are located.
  • RegionList – List of regions in which destinations from DestinationList are located.
  • CountryList – List of countries in which regions from RegionList are located.
  • ObjectLocationList – List of coordinates for the objects returned in search results.
  • TotalNumberOfResults – Total number of objects that match input parameters in GetSearchResults.
  • PageSize – Number of results returned per page.
  • CurrentPage – Defines which page of the response is returned. If a number that exceeds the total number of pages is sent, the last page is returned.

PackageSearchResults inherits SearchResults, so it has all the same properties, plus one more – PackageTourList. That property contains the list of package tours returned by the search method.

Each PackageTour in PackageTourList has the following properties:

  • PackageUnitList – List of package units in the package tour.
  • DaysList – Distinct list of days from the package period list.
  • DistinctPackagePeriodList – Distinct list of package periods from the package unit list.
  • PackageTourName – Name of the package tour.

TransportationSearchResults doesn’t inherit SearchResults, but it has similar properties, and instead of AccommodationObjectList, it has TransportationList. Each Transportation object on that list contains detailed information about that transportation, like the name, description, list of photos and transportation units.

Detailed view

Detailed view of a product is used to display much more information about a particular product than it is displayed in the search results.

Again, each product type group has its own method for fetching detailed information about a product: GetDetailedDescription (accommodations), GetPackageDetailedDescription (tours) and GetTransportationDetailedDescription (transportation).

And once again, each of those methods has its own input parameters class: GetDetailedDescriptionParameters, GetPackageDetailedDescriptionParameters and GetTransportationDetailedDescriptionParameters.

GetDetailedDescriptionParameters and GetTransportationDetailedDescriptionParameters have a lot of the same properties:

  • StartDate – Start date of the period for which the unit prices will be returned. If startDate is NULL, it will be set to current’s date following day.
  • EndDate – End date of the period for which the unit prices will be returned . If endDate is NULL, it will be set to seven days after startDate.
  • NumberOfPersons – Number of persons for which the price will be calculated. If numberOfPersons is NULL, one person is assumed.
  • ObjectID – ID of the object whose detailed description is returned. This is a required parameter.
  • CurrencyID – ID of the currency in which the unit prices will be calculated.
  • LanguageID – ID of the language in which the data in the response will be.
  • UnitID – If unitID is set, the method returns only the unit with that ID from the object’s unit list.
  • UnitTypeID – If unitTypeID is set, the method returns only the units of that type.
  • UnitCategoryID – If unitCategoryID is set, the method returns only the units from that category.
  • ObjectURL – SEO (search engine optimization) object URL. If this parameter is set, the method ignores objectID and languageID parameters and returns the object that the objectURL links to. The language is determined from the URL as well, because each object has a different URL for each supported language.

GetPackageDetailedDescriptionParameters is a bit different from them and lacks many of those properties. Some of the important properties of this class are:

  • PackageTourID – ID of the package tour whose detailed description is returned. This is a required parameter.
  • ObjectIDList – List of object’s IDs whose detailed information will be returned (package tours can contain multiple accommodation objects). For objects whose ID is not on this list, only basic information will be returned.
  • Periods – List of periods for which detailed information will be returned. For other periods that are not on this list only basic information will be returned.
  • OutParameterList – This is used to limit the amount of information about objects and units in the response. Only information listed in the outParameterList will be returned.

Each method for fetching the detailed description returns a distinct response object: AccommodationObjectDetailsPackageTourDetails or TransportationDetails.

They all share some common properties:

  • Destination – Destination in which the returned object is located.
  • Region – Region in which the returned Destination is located.
  • Country – Country in which the returned Region is located.
  • PeriodList – Period list for prices of services of the units contained by the returned object.
  • Currency – Currency in which the prices returned by the method are.
  • Language – Language in which the data returned by the method is.

The main property of the AccommodationObjectDetails is AccommodationObject. It contains all the information about a particular accommodation from the back office, such as a name, description, lists of attributes, photos, units, categories, price lists, SEO data, cancellation policy etc.

The main property of the PackageTourDetails is PackageTour. It inherits AccommodationObject and so it has the same properties, describing a single package tour in great detail. It also has additional properties unique to package tours. PackageTourDetails also contains a list of AccommodationObject objects, which contain the details of all the accommodation objects connected to that package tour.

Likewise, the main property of the TransportationDetails is Transportation. It also inherits AccommodationObject, while having additional properties unique to transportations, providing all the details about a single transportation object from the back office.

So, each of these main properties contains details about the object. It also contains the list of units of that object, and each unit object has all the details about that unit. For instance, a hotel would be an object. AccommodationObject contains the details of that hotel. A hotel room is a unit of the object. AccommodationObject has a list of units (list of AccommodationUnit objects), and each AccommodationUnit object contains the details of the room it represents.

Booking

On the booking step customers can choose the number of units being booked, the number of people who will be using those units, additional services if the booked unit has any or other booking parameters.

To help you get started, we’ll suggest some API methods that you can use, and you can check the API documentation to gain more insight into using those methods.

You can display additional services, special offers, discounts, cancellation policy etc. for the unit being booked by using the detailed description methods covered in the previous step.  Use InsertReservation to make the reservation. For retrieving the reservation, you can use GetReservation

Additional tips

  • In order to appear on the client’s website, units in the back office need to be set with a status “Published on web”. Units with the status “Active” will be available for searching and booking in the Lemax back office, but will not be returned by API methods.
  • Objects and units in the back office are cached for 30 minutes, meaning any change done to them in the back office will be visible on the website after half an hour. Cache can be cleared in the back office on Options -> General settings.
  • You should strive to minimize the number of API calls to improve the performance of the website.
  • If you are using our API, we will provide you with an API username and password. You need to include those in the header of the SOAP envelope of every API call you make.