Liligo Widget API v2.4
Liligo Widget API v2.4
Version 2.4
October 10th , 2017
Change log :
Added in version 2.4
- Direct flight prefiltering support (options sections on page 11)
Added in version 2.3
- Best Offers widget p. 13
- Flight xml feed url has been modified p. 17
1
Contents
Introduction
Overview of the integration
Integration through widgets
Integration with hosted result page
Search form widget
Layout
Code sample
Configuration
Result page widget
Layout
Code Sample
Configuration
Inspiration form flight widget
Sample layout
Configuration
Inspiration result page widget
Code sample
Sample layout
Parameters
Options
Flight direct link
URL
Parameters
Best Offer widget
Code sample
Sample layout
Parameters
Flight destination selection service
URL
Parameters
Sample call
Output format
Flight cache service
URL
Output format
Parameters
Appendix
Customizable color codes
Search form
Result page
Detail view
Redirect view
Liligo widgets are packaged in widget script to make their integration easier.
Each widget has some parameters to customize the integration.
Liligo widgets are responsive, their size will be adjusted according to the space allocated to
their container ( min width is 300 px ).
By specifying a resultPageRedirect URL when you launch a search, you can redirect the
user to a page on your domain and includes the result page widget in your page.
By integrating this script in your page, you will display a liligo search form at the location of
the script.
Product defines the default category displayed
Preset allow to define the departure and destination default value.
Result url is the url to your website where the result page widget is integrated.
Layout
{white_label_domain} refers to the whitelabel subdomain hosted on Liligo platform which
operates the flight searches.
Configuration
targetDivId Id of the html div to Define the location of the
integrate the form search form in the html
page
Options:
product defines the category to display among : “flight”, “car”, “hotel”,”package”
flight is a json object which defines the specific options for the flight search form
· resultPageRedirect : defines the url of the result page ( specified for each category ).
· from/to : preset defines the default city name , country name or iata code to display in f rom
and /or to fields. For country name, the most popular airport/city will be displayed.
Layout
Code Sample
<script>
w indow.liligoWidgets = window.liligoWidgets || [];
l iligoWidgets.push(["init", {
widget: "resultPage",
targetDivId: "divId",
options: {
product: "flight"
}
}]);
</script>
<script src="http://{white_label_domain}/servlet/api/widgets/v2.js"> </script>
{white_label_domain} refers to the whitelabel subdomain hosted on Liligo platform which
operates the flight searches.
targetDivId Id of the html div to Define the location of the
integrate the form search form in the html
page
Code Sample
<script src="http://{white_label_domain}/servlet/api/widgets/v2.js"></script>
<div id="targetDiv"></div>
<script>
window.liligoWidgets = window.liligoWidgets || [];
liligoWidgets.push(['init', {
widget: "inspirationForm",
targetDivId: "targetDiv",
options: {
flight: {
resultPageRedirect: "{inspiration result page url}",
directOnlyPrefiltering: "true"
}
}
}]);
</script>
Configuration
Parameter Value Description
targetDivId Id of the html div to Define the location of the
integrate the form search form in the html
page
Code sample
<script src="http://{white_label_domain}/servlet/api/widgets/v2.js"></script>
<div id="targetDiv"></div>
<script>
window.liligoWidgets = window.liligoWidgets || [];
liligoWidgets.push(['init', {
widget: "destinationFeed",
targetDivId: "targetDiv",
integrateBy: "url",
options: {
flight: {
resultPageRedirect: "{flight_resultpage_url}",
directOnlyPrefiltering: true
}
}
}]);
</script>
Sample layout
© 2010 - 2017 Copyright Liligo Metasearch Technologies 10 of 28
Parameters
Parameter Value Description
targetDivId Id of the html div to Define the location of the
integrate the form search form in the html
page
Options
For each product among : “flight”, “car”, “hotel”
resultPageRedirect defines the url of the result page ( used for
link building from the offers ) can be used
on flight, hotel, car categories
URL
http://{white_label_domain}/mobileweb_v4/api/launch.jsp
Sample call
http://{white_label_domain}/mobileweb_v4/api/launch.jsp?apiVersion=2&class=EC&dep=2017-12-15&fromI
ATA=BCN&passengers=1,0,0&product=air&ret=2017-12-22&roundTrip=roundTrip&toIATA=MRS&direct=1
&redirectUrl={parner_domain_resultpage}
© 2010 - 2017 Copyright Liligo Metasearch Technologies 11 of 28
Parameters
Parameter Value Description
© 2010 - 2017 Copyright Liligo Metasearch Technologies 12 of 28
Best Offer widget
Code sample
<script src="http://{white_label_domain}/servlet/api/widgets/v2.js"></script>
<div id="targetDiv"></div>
<script>
window.liligoWidgets = window.liligoWidgets || [];
liligoWidgets.push(['init', {
widget: "bestOffer",
targetDivId: "targetDiv",
integrateBy: "url",
options: {
box: "3",
departure: "paris_FR",
arrival: "world",
resultPageRedirect: "{{result_page}}"
}
}]);
</script>
Sample layout
© 2010 - 2017 Copyright Liligo Metasearch Technologies 13 of 28
Parameters
box Specify the box type 3 or 1 is accepted.
- “3” the large one, can handle three rows.
Size: 426*295px
- “1” small one, up to five rows. Size:
250*275px
© 2010 - 2017 Copyright Liligo Metasearch Technologies 14 of 28
Flight destination selection service
This service allows to search for a IATA code in our repository
URL
http://{white_label_domain}/servlet/comp
Parameters
Parameter Value Description
frag Cityname or IATA code to Value you are searching for
search
Sample call
http://{white_label_domain}/servlet/comp?type=flight&apiVersion=1&frag=Madrid&maxrows=15
Output format
[{"country":"France","city":"Marseille","highlighted":"<strong>Marseille<\/strong>, France - tous
aéroports (MRS)","IATA":"MRS","label":"Marseille, France - tous aéroports
(MRS)","type":"1","relevance":1,"airport":"tous
aéroports","showStateInfo":false,"countryCode":"FR","accessibleByPlane":true,"state":null,"value":"1,3
0001096,0","group":1},{...}]
URL
http://{white_label_domain}/servlet/flight-cache
Sample call
http://{white_label_domain}/servlet/flight-cache?depdate=2016-11-30&retdate=2016-12-05&from=MRS&to=
PAR&direct=true&range=1&exclude-exact=false
© 2010 - 2017 Copyright Liligo Metasearch Technologies 15 of 28
Output format
Each Item has the following format in JSON :
"roundTrip": true,
"providerCode": "GTG",
"arrCityName": "Paris",
"inbound": {
"supplierName": "Air France",
"duration": 85,
"date": "2017-02-05",
"flightCode": "AF7660",
"arrDate": 1486281000000,
"arrStation": "MRS",
"supplier": "AF",
"stops": 0,
"depStation": "CDG",
"depDate": 1486275900000
}
Parameters
© 2010 - 2017 Copyright Liligo Metasearch Technologies 16 of 28
Flight XML feed
Parameters
Parameter Value Description
count Number of results to display Define the maxium number
of offers to return
source Define the source of the call Default : inspiration
redirectUrl URL of the result page ( Define the url of the page
mandatory for ApiVersion 2) which contains the flight
result page widget encoded
in UTF-8
Example
(deprecated) >
http://{white_label_domain}/wpartner/views/{partner_identifier}/feeds/flight/destinationFeed.j
sp?count=20&depairportcode=TLS&type=all&source=inspiration&depmonth=11&tocontinent=europe&redi
rectUrl={redirect/resultpageURL}t&apiVersion=2
© 2010 - 2017 Copyright Liligo Metasearch Technologies 17 of 28
Hotel XML feed
Parameters
Parameter Value Description
count Number of results to display Define the maxium number
of offers to return
redirectUrl URL of the result page ( Define the url of the page
mandatory for API version 2 which contains the flight
) result page widget encoded
in UTF-8
Example
http://{white_label_domain}/servlet/hotelcitydeals?format=xml&template={liligo_template_to_a
pply}&countryCode=FR&city=lyon&apiVersion=2&redirectUrl={result_page_url}
© 2010 - 2017 Copyright Liligo Metasearch Technologies 18 of 28
Package XML feed
Parameters
Parameter Value Description
count Number of results to display Define the maxium number
of offers to return
redirect Url of the result page URL of the package result
page encoded in UTF-8
Example
http://{white_label_domain}/wpartner/feeds/package/xmlMultiFeed.jsp?count=15&from=toulouse&cat
=sejours&url=afrique,tunisie,djerba&redirect={result_page_url_encoded}
© 2010 - 2017 Copyright Liligo Metasearch Technologies 19 of 28
Sample codes
<script t ype="text/javascript">
window.liligoWidgets = window.liligoWidgets || [];
liligoWidgets.push(["init", "widget-1-id", {
widget: "searchForm",
targetDivId: "targetDiv",
options: {
product: "flight"
}
}]);
liligoWidgets.push(["init", "widget-2-id", {
widget: "searchForm",
targetDivId: "targetDiv2",
options: {
product: "hotel"
}
}]);
</script>
<script src="http://{white_label_domain}/servlet/api/widgets/v2.js"></script>
</head>
...
<body>
<h1>Begin of the page</h1>
<h1>TargetDiv</h1>
<div id="targetDiv"></div>
<h1>TargetDiv end</h1>
<h1>TargetDiv2</h1>
<div id="targetDiv2" style="width: 300px"></div>
<h1>TargetDiv2 end</h1>
<script type="text/javascript">
window.liligoWidgets = window.liligoWidgets || [];
liligoWidgets.push(["init", "widget-3-id", {
widget: "searchForm",
targetDivId: "targetDiv3",
options: {
product: "flight"
}
}]);
</script>
<h1>TargetDiv3</h1>
<div id="targetDiv3" style="width: 300px" ></div>
<h1>TargetDiv3 end</h1>
<h1>End of the page</h1>
© 2010 - 2017 Copyright Liligo Metasearch Technologies 20 of 28
Appendix
In this section, you will find the main customizable colors and their impacts on the design elements.
Search form
Primary color ( red : #C00003) : Switches, backgrounds, Icons, Buttons
Secondary colors ( grey #698694) : Text colors , labels
Text dark color ( black #FFFFFF ) : bold and emphasized text
© 2010 - 2017 Copyright Liligo Metasearch Technologies 21 of 28
Tablet search form ( width between 320px and 768px )
© 2010 - 2017 Copyright Liligo Metasearch Technologies 22 of 28
Result page
© 2010 - 2017 Copyright Liligo Metasearch Technologies 23 of 28
Desktop result page layout Width >1008px
© 2010 - 2017 Copyright Liligo Metasearch Technologies 24 of 28
Tablet result page layout ( width between 768px and 1008px)
© 2010 - 2017 Copyright Liligo Metasearch Technologies 25 of 28
Mobile result page layout ( width < 768px )
© 2010 - 2017 Copyright Liligo Metasearch Technologies 26 of 28
Detail view
© 2010 - 2017 Copyright Liligo Metasearch Technologies 27 of 28
Mobile and tablet detail view layout ( width < 768px)
Redirect view
Background #C00003
Text colors, labels #698694
Dark text colors #FFF
Website logo on the top is your own logo.
© 2010 - 2017 Copyright Liligo Metasearch Technologies 28 of 28