Wiki source code of Get Hotels

Version 7.1 by Giorgi Mdivnishvili on 2023/12/04 11:42

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 = endpoint - Get Hotels =
6
7 [[https:~~/~~/testapi.rustaronline.com/api/Hotels/GetHotels>>https://testapi.rustaronline.com/api/Hotels/GetHotels]]
8
9
10 Use this endpoint with Get function to take in response all the list of available hotels. please take in consideration that this method CAN BE USED WITH `ApiVersion` with the value `r1` ONLY! Get the list of our hotels in the old format
11
12 == Response example ==
13
14 Example of the response looks like this:
15
16
17 {{code language="Json"}}
18 {
19 "Code": "00",
20 "Message": "",
21 "Timestamp": "2023-12-01T16:22:16.877779+04:00",
22 "Version": "r1",
23 "ResponseID": "77ee41d6-284f-41d1-bf89-2092e62f00b0",
24 "Data": [
25 {
26 "hotelid": "e6cba477-db27-40f3-b713-5d4dd5aa572d",
27 "hotelname": "25Hours Dubai One Central",
28 "pricestatus": "ready",
29 "cityid": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
30 "cityname": "Dubai",
31 "districtid": "1fa8bb75-707b-40e6-8212-f705eeeaa16b",
32 "districtname": "Sheikh Zayed Road",
33 "countrycode": "AE",
34 "hasalcohol": true,
35 "hasfreewifi": true,
36 "hasmall": false,
37 "hasmetro": false,
38 "haspool": true,
39 "hotelclass": "*****",
40 "hoteltype": "City",
41 "popular": false,
42 "recommended": false
43 },
44 {
45 "hotelid": "31c00d7f-5d43-4212-afe6-eaec5f2a38df",
46 "hotelname": "72 Hotel",
47 "pricestatus": "ready",
48 "cityid": "f78ac3bc-f040-46d0-8319-2c52083080a6",
49 "cityname": "Sharjah",
50 "districtid": "7ac1bbc8-59ea-4977-b272-ed8553f94f9b",
51 "districtname": "Sharjah",
52 "countrycode": "AE",
53 "hasalcohol": false,
54 "hasfreewifi": true,
55 "hasmall": false,
56 "hasmetro": false,
57 "haspool": true,
58 "hotelclass": "*****",
59 "hoteltype": "City",
60 "popular": false,
61 "recommended": false
62 },
63 {
64 "hotelid": "aa16fe79-5cb0-403a-80ff-8e2fdf117afc",
65 "hotelname": "Abar Hotel Apartments",
66 "pricestatus": "ready",
67 "cityid": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
68 "cityname": "Dubai",
69 "districtid": "8c32a538-629e-4b73-8f1f-b06b7ff4db81",
70 "districtname": "Dubai Investments Park",
71 "countrycode": "AE",
72 "hasalcohol": false,
73 "hasfreewifi": true,
74 "hasmall": false,
75 "hasmetro": false,
76 "haspool": true,
77 "hotelclass": "****",
78 "hoteltype": "City",
79 "popular": false,
80 "recommended": false
81 },
82 {
83 "hotelid": "d1a7c40b-c63b-4445-b107-252fa12b7223",
84 "hotelname": "Abidos Hotel Apartments Dubailand",
85 "pricestatus": "ready",
86 "cityid": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
87 "cityname": "Dubai",
88 "districtid": "b5e176d6-b990-48e3-8366-e3fe5ee9e55c",
89 "districtname": "Dubailand",
90 "countrycode": "AE",
91 "hasalcohol": false,
92 "hasfreewifi": true,
93 "hasmall": false,
94 "hasmetro": false,
95 "haspool": true,
96 "hotelclass": "Apartments",
97 "hoteltype": "City",
98 "popular": false,
99 "recommended": false
100 },
101 {{/code}}
102
103
104 == Description of Response parameteres ==
105
106
107 **The method returns the list of hotels with the statuses and timestamps of the prices**
108
109 >(((
110 * **hotelid**: GUID of the hotel in the database of Rustar. This GUID will be used to retrieve additional information (like prices) about the hotel
111 * **hotelname**: string. Name of the hotel
112 * **pricestatus**: string. "ready" or "pending". “ready” means that prices are ready to be downloaded. “pending” means that price registration is under processing and not all prices are available for the hotel. In case of “pending” the prices should be downloaded later when the status is changed to “ready”.
113 * **cityid**: GUID of the City where the hotel is located.
114 * **cityname**: string. Name of the city
115 * **districtid**: GUID of the district, where the hotel is located
116 * **districtname**: string. Name of the district
117 * **hasalcohol**: Boolean parameter. Describes whether hotel serves alcohol or not
118 * **hasfreewifi**: Boolean parameter. Describes whether free wifi is available in the rooms
119 * **hasmall**: Boolean parameter. Describes whether there is a shopping mall near the hotel
120 * **hasmetro**: Boolean parameter. Describes whether there is a metro station near the hotel
121 * **haspool**: Boolean parameter. Describes whether there is swimming pool in the hotel
122 * **hotelclass**: string. “//”,””,”//~*~*”,”~*~*~*~*”,”~*~*~*~**” or ”Apartments”. Number of stars or Apartment hotel
123 * **hoteltype**: string. "City" or “Beach”. Describes whether this hotel is located in the city or at the beach
124 * **popular**: Boolean. Describes if the hotel was popular last 7 days
125 * **recommended**: Boolean. True if the hotel is recommended by Rustar
126 * **priceupdated**: DateTime of the last price update
127 * **note**: string. Free formed text
128 * **imageurl**: string. Optional. Points the URL for the image of the hotel if any.
129 )))
130
131 (((
132 * **hotelid**: GUID of the hotel in the database of Rustar. This GUID will be used to retrieve additional information (like prices) about the hotel
133 * **hotelname**: string. Name of the hotel
134 * **pricestatus**: string. "ready" or "pending". “ready” means that prices are ready to be downloaded. “pending” means that price registration is under processing and not all prices are available for the hotel. In case of “pending” the prices should be downloaded later when the status is changed to “ready”.
135 * **cityid**: GUID of the City where the hotel is located.
136 * **cityname**: string. Name of the city
137 * **districtid**: GUID of the district, where the hotel is located
138 * **districtname**: string. Name of the district
139 * **hasalcohol**: Boolean parameter. Describes whether hotel serves alcohol or not
140 * **hasfreewifi**: Boolean parameter. Describes whether free wifi is available in the rooms
141 * **hasmall**: Boolean parameter. Describes whether there is a shopping mall near the hotel
142 * **hasmetro**: Boolean parameter. Describes whether there is a metro station near the hotel
143 * **haspool**: Boolean parameter. Describes whether there is swimming pool in the hotel
144 * **hotelclass**: string. “//”,””,”//~*~*”,”~*~*~*~*”,”~*~*~*~**” or ”Apartments”. Number of stars or Apartment hotel
145 * **hoteltype**: string. "City" or “Beach”. Describes whether this hotel is located in the city or at the beach
146 * **popular**: Boolean. Describes if the hotel was popular last 7 days
147 * **recommended**: Boolean. True if the hotel is recommended by Rustar
148 * **priceupdated**: DateTime of the last price update
149 * **note**: string. Free formed text
150 * **imageurl**: string. Optional. Points the URL for the image of the hotel if any.
151 )))