Available Partner Export Documentation:
-
Hotels
Returns hotels connected to your organization for those hotels that are configuered to allow export.
Returns data either as XML or JSON. Prefered format can be indicated by setting the Accept header in the HTTP request message.
Url to method: POST api/partner/hotels
Parameter: message (HotelQuery)
Example:var query = { "Language": "en", "User" : { "UserName": "MyApiUser", "Password": "MySecretPassword" } }
Response: HotelList
Example 1: Response when HotelQuery contains information for an incorrect API user.
{ "Error": { "ErrorType": 1, "Message": "The submitted user was incorrect.", IncorrectHotelIds: null}, "Hotels": null }
Example 2: Response when HotelQuery is correct.
<HotelList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Hotels> <Hotel> <Description> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </Description> <Directions> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </Directions> <Id>b0877bd9-a415-4d48-ba89-17c0a0e7a310</Id> <Language>en</Language> <Name>Vist Hotel</Name> <ShortDescription> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </ShortDescription> <Address> <Address1>Kungsgatan 34-36</Address1> <City>Göteborg</City> <CountryCode>sv</CountryCode> <ZipCode>411 19</ZipCode> </Address> <Phone> <CountryCode>46</CountryCode> <Number>(0)31 38 06 00</Number> </Phone> <Rooms> <Room> <Id>91577b32-9b36-4476-a25d-48b06631cd29</Id> <Name>Single Room</Name> </Room> <Room> <Description> Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </Description> <Id>6bfe7915-c23c-467d-96f3-57a52d9c2e62/<Id> <Name>Double room<Name> </Room> </Rooms> <RatePlans> <RatePlan> <Id>600e975e-d088-4191-93c6-65a84bc41fdd</Id> <Name>Rack rate</Name> </RatePlan> <RatePlan> <Id>41c4eb7f-5321-4757-9723-8449afca08cb</Id> <Name>Last minute discount</Name> </RatePlan> <RatePlan> <Id>f940000c-9b44-4a30-9b7a-db8259454853</Id> <Name>Best available rate</Name> <PaymentDescription>Payment directly at the time of booking</PaymentDescription> <CancellationDescription>The booking can not be cancelled and is non-refundable.</CancellationDescription> </RatePlan> </RatePlans> </Hotel> </Hotels> </HotelList>
HotelQuery
Name Type Description Language string In which language that names, descriptions and directions should be returned. If translation is missing for the specified language then the default name will be returned but no descriptions. Expected format "en" or "en-US" User User (see below) The API user connected to the organization. User
Name Type Description UserName string The user name of the API user. Password string The password for the API user account. HotelList
Name Type Description Error Error (see below) If an error occurred information of what went wrong will be provided here. Hotels Enumeration of Hotel (see below) Lists all hotels connected to the organization that are configured to allow export of data. Error
Name Type Description ErrorType Enum (see below) An enum value describing the type of error that occurred. Message string A message describing what went wrong. IncorrectHotelIds Enumeration of Guid Hotel identifiers that where incorrectly submitted ErrorType
Name Value UnexpectedError 0 InvalidUser 1 IncorrectLanguageFormat 2 IncorrectNotSupportedLanguage 3 IncorrectDateFormat 4 IncorrectNumberOfNights 5 IncorrectHotelId 6 InvalidQueryParameter 7 IncorrectDateTimeFormat 8 IncorrectNumberOfPersons 9 IncorrectNumberOfHotelIds 10 UnsupportedDateRange 11 Hotel
Name Type Description Id Guid Unique identifier for the hotel. Name string Name of the hotel Language string The translation language for descriptions/directions ShortDescription string Short description of the hotel. Description string Full description of the hotel. Direction string Directions to the hotel (might contain html-code). Address Address (see below) The hotel address. Phone Phone (see below) Phone number to the hotel. Rooms Enumeration of Room (see below) Lists all rooms (room types) in the hotel. RatePlans Enumeration of RatePlan (see below) Lists all rate plans in the hotel. Address
Name Type Description Address1 string Address row 1 Address2 string Address row 2 (if such exists) ZipCode string Zip code City string City State string State if such exists. CountryCode string Two letter country code, eg "US" for the United States or "IT" for Italy. Phone
Name Type Description CountryCode string Country calling code. Number string The phone number. Room
Name Type Description Id Guid Unique identifier for the room Name string The name of the room Description string Description of the room RatePlan
Name Type Description Id Guid Unique identifier for the rate plan Name string The name of the rate plan Description string Description of the rate plan CancellationDescription string CancellationPolicy description of the rate plan PaymentDescription string PaymentPolicy description of the rate plan -
SearchLogs
Returns search logs connected to your organization for the given user, search start and end date, and arrival from and arrival to dates.
In the case of a large dataset, the data will be displayed across multiple pages, allowing you to navigate through them to view all the information.
Returns data in JSON format.
Url to method: POST api/partner/search-logs
Parameter: message (SearchLogQuery)
Example:var query = { "User": { "UserName": "MyApiUser", "Password": "MySecretPassword" }, "SearchStartDate": "2023-11-01", "SearchEndDate": "2023-11-30", "ArrivalFrom": "2023-11-15", "ArrivalTo": "2023-11-27" }
Response: SearchLogList
Example 1: Response when SearchLogQuery contains information for incorrect API user.
{ "Error": { "ErrorType": 1, "Message": "The submitted user was incorrect." }
Example 2: Response when SearchLogQuery is correct and data format is JSON.
{ "SearchLogs": [ { "SearchLogNumber": "1", "SearchDate": "2023-11-07T15:23:35.99", "ArrivalDate": "2023-11-13T00:00:00", "NofDays": 3, "NofAdults": 1, "Child1Age": 7, "Child2Age": 0, "Child3Age": 0, "Child4Age": 0, "IsMobileSearch": false, "IsPackageSearch": false, "SpecificPackage": "", "SpecificGuestRoom": "", "SpecificCampaign": "", "GotResult": true }, { "SearchLogNumber": "2", "SearchDate": "2023-11-08T13:09:09.8", "ArrivalDate": "2023-11-20T00:00:00", "NofDays": 5, "NofAdults": 2, "Child1Age": 0, "Child2Age": 0, "Child3Age": 0, "Child4Age": 0, "IsMobileSearch": false, "IsPackageSearch": false, "SpecificPackage": "", "SpecificGuestRoom": "", "SpecificCampaign": "", "GotResult": true }, { "SearchLogNumber": "3", "SearchDate": "2023-11-14T13:41:51.513", "ArrivalDate": "2023-11-22T00:00:00", "NofDays": 1, "NofAdults": 2, "Child1Age": 0, "Child2Age": 0, "Child3Age": 0, "Child4Age": 0, "IsMobileSearch": false, "IsPackageSearch": false, "SpecificPackage": "", "SpecificGuestRoom": "", "SpecificCampaign": "", "GotResult": true } ] }
SearchLogQuery
Name Type Description User User (see above) The API user connected to the organization. SearchStartDate string Start date for the search. Expected format for SearchStartDate is 'yyyy-mm-dd', eg '2012-10-23' SearchEndDate string End date for the search. Expected format for SearchEndDate is 'yyyy-mm-dd', eg '2012-10-23' ArrivalFrom string Arrival from date. Expected format for ArrivalFrom is 'yyyy-mm-dd', eg '2012-10-23' . This field is required and with ArrivalTo should not have range greater than 1 year.ArrivalTo string Arrival to date. Expected format for ArrivalTo is 'yyyy-mm-dd', eg '2012-10-23' . This field is required and with ArrivalFrom should not have range greater than 1 year.CurrentPage number This is the current page of the search results, managed by the system and starting from page 0. If multiple pages are available, you can navigate to the next or previous page. SearchLogList
Name Type Description Error Error (see above) If an error occurred information of what went wrong will be provided here. SearchLogs Enumeration of SearchLog (see below) The organization search logs. SearchLog
Name Type Description SearchLogNumber int Sequence number of the SearchLog in SearchLogList SearchDate DateTime Date when the search is preformed ArrivalDate DateTime Date selected as arrival date when the search is preformed NofDays int Number of selected days NofAdults int Number of adults Child1Age int First child age Child2Age int Second child age Child3Age int Third child age Child4Age int Fourth child age IsMobileSearch bool Indicates if the search is performed via mobile device IsPackageSearch bool Indicates if the search is performed for package SpecificPackage string Name of the specific package SpecificGuestRoom string Name of the specific guest room SpecificCampaign string Name of the specific campaign GotResult bool Indicates if the performed search returned any results