$Id: ghgml.en.xml 505 2016-11-23 14:10:57Z afue $
Copyright © 2006 - 2016 GIATA GmbH
Table of Contents
Abstract
This web service is provided as a REST application (REST = REpresentational State Transfer).
The web service and its associated documentation are currently being extended.
Access to the resources of this web service is password-protected.
Password protection supports HTTP Basic authentification.
The username for authentification consists of the username (usually the first part of the email address before "@") + | (Pipe) + the company name.
Thus access for testing purposes is given using:
testUser|testCompany
testPw
http://ghgml.giatamedia.com/webservice/rest/1.0/items/
The following modifiers can be used and may be added to this URI as a QueryString:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Displays properties last modified after the given date (format: YYYY-MM-DD)
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/items/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/items/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/items/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xlink="http://www.w3.org/1999/xlink"> <items changedSince="2006-09-01" country="ES"> <item giataId="2272" lastUpdate="2006-09-04T17:13:46+02:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/items/2272" /> <item giataId="2275" lastUpdate="2006-09-04T17:13:46+02:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/items/2275" /> <!-- ... --> </items> </result>
The node <items> in <result> may contain the following attributes depending on the modifiers used in the request:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Indicates that properties were last modified after the given date (format: YYYY-MM-DD)
Each node <item> in <result><items> has the following attributes:
GIATA-ID
Time of the last modification according to ISO 8601
URI representing the individual view of this property
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/*language*/
The language as a 2-letter-code according to ISO 639-1
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/
The following modifiers can be used and may be added to this URI as a QueryString:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Displays properties last modified after the given date (format: YYYY-MM-DD)
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xlink="http://www.w3.org/1999/xlink"> <items lang="en" changedSince="2006-09-01" country="ES"> <item giataId="2687" lastUpdate="2006-09-04T17:13:46+02:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/2687" /> <item giataId="3159" lastUpdate="2006-09-04T17:13:21+02:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/3159" /> <!-- ... --> </items> </result>
The node <items> in <result> has the following attribute:
The language as a 2-letter-code according to ISO 639-1
The node <items> in <result> may contain the following attributes depending on the modifiers used in the request:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Indicates that properties were last modified after the given date (format: YYYY-MM-DD)
Each Node <item> in <result><items> has the following attributes:
GIATA-ID
The time of the last modification according to ISO 8601
URI representing the texts in the given language for this property.
http://ghgml.giatamedia.com/webservice/rest/1.0/images/
The following modifiers can be used and may be added to this URI as a QueryString:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Displays properties last modified after the given date (format: YYYY-MM-DD)
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/images/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/images/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/images/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xlink="http://www.w3.org/1999/xlink"> <items changedSince="2006-09-01" country="ES"> <item giataId="2275" lastUpdate="2006-08-18T17:06:38+02:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275" /> <item giataId="2284" lastUpdate="2006-08-18T17:06:38+02:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2284" /> <!-- ... --> </items> </result>
The node <items> in <result> may contain the following attributes depending on the modifiers used in the request:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Indicates that properties were last modified after the given date (format: YYYY-MM-DD)
Each node <item> in <result><items> has the following attributes:
GIATA-ID
Date of the last modification to a picture of this property according to ISO 8601
URI, representing the List of all images of this property
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/
The following modifiers can be used and may be added to this URI as a QueryString:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Displays properties last modified after the given date (format: YYYY-MM-DD)
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xlink="http://www.w3.org/1999/xlink"> <items changedSince="2006-09-01" country="ES"> <item giataId="2275" lastUpdate="2006-12-30T11:41:34+01:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/2275" /> <item giataId="2284" lastUpdate="2006-12-30T11:41:34+01:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/2284" /> <!-- ... --> </items> </result>
The node <items> in <result> may contain the following attributes depending on the modifiers used in the request:
The country as a 2-letter-code according to ISO 3166-1
The ID of the destination in GIATA's database
The ID of the city in GIATA's database
Indicates that properties were last modified after the given date (format: YYYY-MM-DD)
Each node <item> in <result><items> has the following attributes:
GIATA-ID
Date of the last modification to a fact for this property according to ISO 8601
URI, representing the fact sheet for this property
When retrieving details (name, address, texts, images) within a list of several properties, you must know the GIATA-IDs for these properties.
Modifiers (such as country or changedSince) are not available.
GIATA-IDs must be sent in a HTTP-POST request.
It depends on the URI to which the request is sent what details are delivered in the response.
http://ghgml.giatamedia.com/webservice/rest/1.0/items
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/*language*
(Section 2.1.2, “List of all properties, which have texts in a given language”)
E.g.: http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en
http://ghgml.giatamedia.com/webservice/rest/1.0/images
http://ghgml.giatamedia.com/webservice/rest/1.0/items/*language*
E.g.: http://ghgml.giatamedia.com/webservice/rest/1.0/items/en
There are 2 ways to send the HTTP-Post request:
As an URL encoded HTTP-POST, having GIATA-IDs as an array in a variable giataIds.
E.g.:
curl -s --basic -u "*user*|*company*:*password*" -d "giataIds[]=2275&giataIds[]=2272" "*url*"
As a HTTP-POST, having the request wrapped in an XML document.
Example for the XML document:
<?xml version="1.0" encoding="UTF-8"?> <giataIds> <giataId>2275</giataId> <giataId>2272</giataId> </giataIds>
Example for the request:
curl -s --basic -u "*user*|*company*:*password*" -d "<?xml version=\"1.0\" encoding=\"UTF-8\"?><giataIds><giataId>2275</giataId><giataId>2272</giataId></giataIds>" "*url*"
E.g.:
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/listOfItems.xsd"> <items> <item giataId="2275"> <!-- BEGIN name, city, country http://ghgml.giatamedia.com/webservice/rest/1.0/items/ http://ghgml.giatamedia.com/webservice/rest/1.0/items/en --> <name>Melia Alicante</name> <city>San Juan</city> <country>ES</country> <!-- END name, city, country --> <!-- BEGIN texts http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en http://ghgml.giatamedia.com/webservice/rest/1.0/items/en --> <texts> <text lastUpdate="2007-04-05T00:10:08+02:00" lang="en"> <sections> <section type="100"> <title>Location</title> <para> This attractive beach hotel can be found just 100 metres from the centre of San Juans... </para> </section> <section type="101"> <title>Facilities</title> <para> Built in 1973, the hotel offers a total of 1150 rooms, of which 5 are suites 54 are singles and 486 are doubles... </para> </section> <!-- ... --> </sections> </text> </texts> <!-- END texts --> <!-- BEGIN images http://ghgml.giatamedia.com/webservice/rest/1.0/images http://ghgml.giatamedia.com/webservice/rest/1.0/items http://ghgml.giatamedia.com/webservice/rest/1.0/items/en --> <images> <image type="a" lastUpdate="2007-06-05T01:56:10+02:00"> <sizes> <size maxwidth="74" width="74" height="59" filesize="4729" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14662" /> <size maxwidth="320" width="320" height="256" filesize="33044" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14663" /> <size maxwidth="800" width="749" height="600" filesize="110853" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14664" /> </sizes> </image> <!-- ... --> </images> <!-- END images --> </item> <item giataId="2272"> <!-- ... --> </item> <!-- ... --> </items> </result>
XML Schema: http://ghgml.giatamedia.com/xsd/1.0/listOfItems.xsd
The node <result><items> contains one or more nodes <item>.
You can find the documentation for subsequent nodes within the description of the according resources to single properties:
Section 2.2.1, “List of resources for an property”
http://ghgml.giatamedia.com/webservice/rest/1.0/items/*GIATA-ID*
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/items/2275
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/item.xsd"> <item giataId="2275"> <name>Melia Alicante</name> <street/> <city>San Juan</city> <country>ES</country> <factsheet lastUpdate="2006-12-30T11:41:34+01:00" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/2275" /> <texts> <text lastUpdate="2005-10-06T11:55:33+02:00" lang="de" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/de/2275" /> <text lastUpdate="2005-12-16T20:40:16+01:00" lang="en" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/2275" /> <!-- ... --> </texts> <images> <image type="a" lastUpdate="2006-08-18T17:06:38+02:00"> <sizes> <size maxwidth="74" width="74" height="59" filesize="4729" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14662" /> <size maxwidth="320" width="320" height="256" filesize="33044" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14663" /> <size maxwidth="800" width="749" height="600" filesize="110853" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14664" /> </sizes> </image> <image type="l" lastUpdate="2006-08-18T17:06:38+02:00"> <sizes> <size maxwidth="74" width="74" height="42" filesize="3617" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14665" /> <!-- ... --> </sizes> </image> <!-- ... --> </images> </item> </result>
XML Schema: http://ghgml.giatamedia.com/xsd/1.0/item.xsd
The node <result><item> has the following nodes:
Offer name
empty
City
The country as a 2-letter-code according to ISO 3166-1
The attribute xlink:href contains the URI representing the fact sheet for this property.
Contains one or more nodes <text> with attributes lang representing the language and xlink:href representing the URI of texts for this property in this language.
Contains one or more node of type <image> with attributes type representing the aspect and lastUpdate indicating the time of the last modification.
Each node <image><sizes> contains one or more nodes <size> with attributes maxwidth for the maximum width (currently 74, 320, 800), width and height for the actual measures of the picture, furthermore an attribute xlink:href representing the URI of the image file.
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/*language*/*GIATA-ID*
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/2275
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/itemText.xsd"> <item giataId="2275"> <texts> <text lastUpdate="2005-12-16T20:40:16+01:00" lang="en"> <sections> <section type="100"> <title>Location</title> <para> This attractive beach hotel... </para> </section> <section type="101"> <title>Facilities</title> <para> Built in 1973, the hotel offers a total of 1150 rooms... </para> </section> <!-- ... --> </sections> </text> </texts> </item> </result>
XML Schema: http://ghgml.giatamedia.com/xsd/1.0/itemText.xsd
Each <result><item><texts><text><section> contains one or more nodes <section>:
Each node <section> represents a piece of information and contains two nodes:
Title
Body of text
The value of the attribute type represents the kind of information and can be used to determine the use of customised titles.
http://ghgml.giatamedia.com/webservice/rest/1.0/images/*GIATA-ID*
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/itemImage.xsd"> <item giataId="2275"> <images> <image type="a" lastUpdate="2006-08-18T17:06:38+02:00"> <sizes> <size maxwidth="74" width="74" height="59" filesize="4729" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14662" /> <size maxwidth="320" width="320" height="256" filesize="33044" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14663" /> <size maxwidth="800" width="749" height="600" filesize="110853" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14664" /> </sizes> </image> <!-- ... --> </images> </item> </result>
XML Schema: http://ghgml.giatamedia.com/xsd/1.0/itemImage.xsd
The node <result><item><images> contains one or more nodes <image>:
Each node <image> has the attributes type representing the aspect and lastUpdate indicating the time of the last modification.
Each node <image> contains one or more nodes <sizes><size> with attributes maxwidth for the maximum width (currently 74, 320, 800), width and height for the actual measures of the picture, furthermore an attribute xlink:href representing the URI of the image file.
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/*GIATA-ID*
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/3183
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/itemFactSheet.xsd"> <item giataId="2817"> <name>Orquidea Bahia Feliz</name> <street/> <city>Bahia Feliz</city> <country>ES</country> <factsheet lastUpdate="2006-12-30T11:41:34+01:00"> <sections> <section type="1001" name="object_information"> <facts> <fact id="3" name="hotel_chain" typeHint="string"> <value>HOTET</value> </fact> <fact id="6" name="postcode" typeHint="string"> <value>35107</value> </fact> <fact id="8" name="phone_reservation" typeHint="string"> <value>928157240</value> </fact> <!-- ... --> </facts> </section> <!-- ... --> <section type="1006" name="beach"> <facts> <fact id="59" name="beach_sandy" typeHint="bool"> <value>true</value> </fact> <fact id="62" name="beach_sunloungers" typeHint="bool"> <value fee="true">true</value> </fact> <!-- ... --> </facts> </section> <!-- ... --> <section type="1011" name="distances"> <facts> <fact id="1001" name="dist_city_centre" typeHint="int"> <value name="distance" unit="m">700</value> </fact> <fact id="1002" name="dist_tourist_centre" typeHint="int"> <value name="distance" unit="m">4000</value> </fact> <!-- ... --> </facts> </section> </sections> </factsheet> </item> </result>
XML Schema: http://ghgml.giatamedia.com/xsd/1.0/itemFactSheet.xsd
The node <result><item> has the following nodes:
Offer name
empty
City
The country as a 2-letter-code according to ISO 3166-1
The fact sheet for this property with an attribute lastUpdate indicating the time of the last modification.
Contains one node of type <sections> with one or more nodes of type <section>.
Each node of type <section> represents a group of facts and contains the following attributes:
A constant integer value to identify the group of facts, see fact definitions
The name of the group of facts, see fact definitions
Each node of type <section> contains one node of type <facts> with several nodes of type <fact>
Each node of type <fact> represents one fact and contains the following attributes:
A constant integer value to identify the fact, see fact definitions
The name of the fact, see fact definitions
Indicates the type of the values of the fact
Possible values:
bool
int
float
string
Each node of type <fact> contains one or more nodes of type <value> representing the values of the fact.
Possible attributes:
Indicates if a fee is applicable
Indicates the value as a test value which may differ from the actual value
Used to identify the value when a fact has more than one value
Indicates the unit in which the value is given when not deduced from the fact
Possible values:
m: meters
min: minutes
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xlink="http://www.w3.org/1999/xlink"> <languages> <!-- ... --> <factdefinitions lang="de" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/de" /> <factdefinitions lang="en" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/en" /> <factdefinitions lang="en-US" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/en-US" /> <factdefinitions lang="es" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/es" /> <factdefinitions lang="es-419" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/es-419" /> <!-- ... --> <factdefinitions lang="zh-cmn-Hans" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/zh-cmn-Hans" /> <!-- ... --> </languages> </result>
The node <result><languages> contains several nodes of type <factdefinitions> with the following attributes:
Language according to ISO 639-1 or RFC 4646 if the language is a variant
URI of the translation of fact definitions in this language
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/*language*/
Language according to ISO 639-1 or RFC 4646 if the language is a variant
E.g. English:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/en
<?xml version="1.0" encoding="UTF-8"?> <result> <factdefinitions lang="en"> <sections> <section type="1001" name="object_information"> <title>Object Information</title> <facts> <fact id="3" name="hotel_chain" typeHint="string"> <title>Hotel Chain</title> </fact> <fact id="6" name="postcode" typeHint="string"> <title>Postcode</title> </fact> <fact id="8" name="phone_reservation" typeHint="string"> <title>Telephone Reservation</title> </fact> <!-- ... --> </facts> </section> <!-- ... --> <section type="1006" name="beach"> <title>Beach</title> <facts> <fact id="59" name="beach_sandy" typeHint="bool"> <title>Sandy Beach</title> </fact> <!-- ... --> <fact id="62" name="beach_sunloungers" typeHint="bool"> <title>Sun loungers</title> </fact> <!-- ... --> </facts> </section> <!-- ... --> <section type="1011" name="distances"> <title>Distances</title> <facts> <fact id="1001" name="dist_city_centre" typeHint="int"> <title>City Centre</title> </fact> <fact id="1002" name="dist_tourist_centre" typeHint="int"> <title>Tourist Centre</title> </fact> <!-- ... --> </facts> </section> </sections> </factdefinitions> </result>
E.g. German:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/de
<?xml version="1.0" encoding="UTF-8"?> <result> <factdefinitions lang="de"> <sections> <section type="1001" name="object_information"> <title>Objekt-Informationen</title> <facts> <fact id="3" name="hotel_chain" typeHint="string"> <title>Hotelkette</title> </fact> <fact id="6" name="postcode" typeHint="string"> <title>Post-Code</title> </fact> <fact id="8" name="phone_reservation" typeHint="string"> <title>Telefon Empfang</title> </fact> <!-- ... --> </facts> </section> <!-- ... --> <section type="1006" name="beach"> <title>Strand</title> <facts> <fact id="59" name="beach_sandy" typeHint="bool"> <title>Sandstrand</title> </fact> <!-- ... --> <fact id="62" name="beach_sunloungers" typeHint="bool"> <title>Liegestühle</title> </fact> <!-- ... --> </facts> </section> <!-- ... --> <section type="1011" name="distances"> <title>Entfernungen</title> <facts> <fact id="1001" name="dist_city_centre" typeHint="int"> <title>Stadtzentrum</title> </fact> <fact id="1002" name="dist_tourist_centre" typeHint="int"> <title>Touristenzentrum</title> </fact> <!-- ... --> </facts> </section> </sections> </factdefinitions> </result>
Each node <result><factsheetdefinitions> has an attribute lang indicating the language and contains one node <sections> with several nodes <section>.
Each node <section> represents a group of facts and contains the following attributes:
A constant integer value to identify the group of facts
The name of the group of facts
Each node <section> contains one node of type <title> with the translation of the name of the group of facts.
Each node <section> contains one node of type <facts> with several nodes of type <fact>
Each node <fact> represents one fact and contains the following attributes:
A constant integer value to identify the fact
The name of the fact
Indicates the type of the values of the fact
Possible values:
bool
int
float
string
Each node <fact> contains one node of type <title> with the translation of the name of the fact.
A special agreement is required. Please contact <service@giata.de>
.
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xlink="http://www.w3.org/1999/xlink"> <mappings> <mapping supplier="hotelbeds" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/hotelbeds" /> <mapping supplier="tourico" xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/tourico" /> <!-- ... --> </mappings> </result>
The node <result><mappings> contains several nodes <mapping> with the attributes:
Name of the supplier, whose properties have been matched to GIATA-IDs in MHG
URI of the mapping of GIATA-IDs to codes of the supplier
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/*name of supplier*
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/tourico
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mapping.xsd"> <items supplier="tourico"> <!-- ... --> <item giataId="1399"> <code> <value>1038976</value> </code> </item> <item giataId="1410"> <code> <value>13806</value> </code> </item> <item giataId="1411"> <code> <value>1035278</value> </code> <code> <value>13797</value> </code> </item> <!-- ... --> </items> </result>
XML-Schema: http://ghgml.giatamedia.com/xsd/1.0/mapping.xsd
The node <result><items> has an attribute supplier with the name of the supplier and contains several nodes <item>.
Each node <item> has the attribute giataId (GIATA-ID) and contains one or more nodes <code>.
Each node <code> contains one or more nodes <value>. <value> will occur more than once when the code provided by the supplier is split, e.g. into Hotel chain and Hotel ID.
Each node <value> may contain the attribute name, e.g. into Hotel chain or Hotel ID.
You can retrieve the mapping for an property using the name of the supplier and the code of the property. All known codes of several suppliers (Section 2.3.2.1, “List of suppliers”) are returned.
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/*name of supplier*/*code of property*
E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/tourico/1038976
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd"> <items supplier="tourico" id="1038976"> <item giataId="1399"> <name>Holiday Inn Golden Mile</name> <city>Kowloon - Hongkong</city> <country>CN</country> <code supplier="hotelbeds"> <value>69601</value> </code> <code supplier="tourico"> <value>1038976</value> </code> <code supplier="pegs"> <value name="Chain Code">HI</value> <value name="Property Code">HKGKL</value> </code> </item> </items> </result>
XML-Schema: http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd
The node <result><items> has two attributes: supplier with the name of the supplier and id containing the code of the property assigned by this supplier. Furthermore it contains one or more nodes of type <item>.
Each node <item> has the attribute giataId (GIATA-ID) and may contain the nodes <name>, <city>, <street> and <country> identifying the property.
Each node <item> contains one or more nodes <code>.
Each node <code> contains one or more nodes <value>. <value> will occur more than once when the code provided by the supplier is split, e.g. into Hotel chain and Hotel ID.
Each node <value> may contain the attribute name, e.g. into Hotel chain or Hotel ID.
Mapping can also be retrieved using the GIATA-ID, e.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/giata/1399
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd"> <items supplier="giata" id="1399"> <item giataId="1399"> <name>Holiday Inn Golden Mile</name> <city>Kowloon - Hongkong</city> <country>CN</country> <code supplier="hotelbeds"> <value>69601</value> </code> <code supplier="tourico"> <value>1038976</value> </code> <code supplier="pegs"> <value name="Chain Code">HI</value> <value name="Property Code">HKGKL</value> </code> </item> </items> </result>
In some cases a request will not produce a result.
This could be because your request was made up of a compound code.
In this case you should concatenate the various components (e.g. hotel chain and hotel code or country code, destination code and hotel code) without spaces, hyphens or other separators. E.g.:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/pegs/HIHKGKL
<?xml version="1.0" encoding="UTF-8"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd"> <items supplier="pegs" id="HIHKGKL"> <item giataId="1399"> <name>Holiday Inn Golden Mile</name> <city>Kowloon - Hongkong</city> <country>CN</country> <code supplier="hotelbeds"> <value>69601</value> </code> <code supplier="tourico"> <value>1038976</value> </code> <code supplier="pegs"> <value name="Chain Code">HI</value> <value name="Property Code">HKGKL</value> </code> </item> </items> </result>
For the integration a gif file to inform GIATA about bookings made on the customer's site (§7.a of the Licensing Agreement) sample code is provided by GIATA.