Wiki source code of 7. GetReservations

Last modified by Giorgi Mdivnishvili on 2024/08/16 18:29

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
8
9
10 **Objective:** The GetReservations method is designed to retrieve a comprehensive list of past reservations along with detailed information associated with each reservation. This method is particularly useful for users who need to perform targeted data retrieval by applying specific filters. By enabling the use of parameters such as date ranges, reservation IDs, tourist information, and more, the GetReservations method allows for precise and efficient querying of reservation data. This capability streamlines the process of accessing relevant information, ensuring that users can quickly and accurately retrieve the exact data they need without sifting through unnecessary records.
11
12
13 == Endpoint URL - [POST] ==
14
15 {{info}}
16 [[https:~~/~~/integration.kazunion.com/api/Reservations/GetReservations>>https://integration.kazunion.com/api/Reservations/GetReservations]]
17 {{/info}}
18
19
20 == Request Parameters ==
21
22 (% class="box infomessage" %)
23 (((
24 None
25 )))
26
27
28 == Request Body ==
29
30 {{code language="Json"}}
31 {
32 "reservationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
33 "number": "string",
34 "checkInStart": "2024-08-16T14:13:00.686Z",
35 "checkInEnd": "2024-08-16T14:13:00.686Z",
36 "checkOutStart": "2024-08-16T14:13:00.686Z",
37 "checkOutEnd": "2024-08-16T14:13:00.686Z",
38 "registrationDateStart": "2024-08-16T14:13:00.686Z",
39 "registrationDateEnd": "2024-08-16T14:13:00.686Z",
40 "statusForAgent": "New",
41 "countryCode": "string",
42 "touristLastName": "string"
43 }
44 {{/code}}
45
46 (% class="wikigeneratedid" id="HRequestBodyexample" %)
47 (% id="cke_bm_10575S" style="display:none" %)
48
49
50 All provided parameters are optional, meaning it is not mandatory to include all of them in the request. You can specify just one parameter as a search criterion if needed
51
52
53 == Request Body example ==
54
55 {{code language="Json"}}
56 {
57
58 "registrationDateStart": "2024-06-16",
59 "registrationDateEnd": "2024-09-16"
60
61 }
62 {{/code}}
63
64
65 == Response ==
66
67 {{code language="JSON"}}
68 {
69 "pageId": 0,
70 "pagesCount": 0,
71 "reservations": [
72 {
73 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
74 "number": "string",
75 "agentConfirmationNumber": "string",
76 "registrationDate": "2024-08-16T14:13:00.703Z",
77 "packageType": "Package",
78 "status": "NotConfirmed",
79 "statusForAgent": "New",
80 "departureToCityName": "string",
81 "departureToAirlineName": "string",
82 "arrivalTime": "2024-08-16T14:13:00.703Z",
83 "arrivalCountryName": "string",
84 "departureTime": "2024-08-16T14:13:00.703Z",
85 "pickupPeriods": [
86 "string"
87 ],
88 "driverMobile": "string",
89 "paymentInOutInvCurrency": {
90 "currencyCode": "string",
91 "price": 0,
92 "netPrice": 0,
93 "paid": 0,
94 "unpaid": 0,
95 "comission": 0,
96 "comissionPercent": 0
97 },
98 "paymentInSellCurrency": {
99 "currencyCode": "string",
100 "price": 0,
101 "netPrice": 0,
102 "paid": 0,
103 "unpaid": 0,
104 "comission": 0,
105 "comissionPercent": 0
106 },
107 "showDownloadDocuments": true,
108 "guideMeetings": [
109 {
110 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
111 "meetingStartTime": "2024-08-16T14:13:00.703Z",
112 "meetingEndTime": "2024-08-16T14:13:00.703Z",
113 "hotelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
114 "hotelName": "string",
115 "guides": [
116 {
117 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
118 "name": "string",
119 "mobile": "string"
120 }
121 ]
122 }
123 ],
124 "services": [
125 {
126 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
127 "serviceDate": "2024-08-16T14:13:00.703Z",
128 "type": "Arrival",
129 "description": "string",
130 "touristIds": [
131 "string"
132 ],
133 "serviceDetails": [
134 {
135 "flightCode": "string",
136 "airlineName": "string",
137 "departureTime": "2024-08-16T14:13:00.703Z",
138 "departureCityName": "string",
139 "departureAirportCode": "string",
140 "departureTerminalCode": "string",
141 "arrivalTime": "2024-08-16T14:13:00.703Z",
142 "arrivalCityName": "string",
143 "arrivalAirportCode": "string",
144 "arrivalTerminalCode": "string",
145 "isArrivalFlight": true
146 }
147 ]
148 }
149 ],
150 "tourists": [
151 {
152 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
153 "gender": "None",
154 "ageCategory": "Adult",
155 "title": "string",
156 "firstName": "string",
157 "lastName": "string",
158 "birthDate": "2024-08-16",
159 "passportNumber": "string",
160 "passportExpiryDate": "2024-08-16",
161 "tin": "string",
162 "citizenshipCountryCode": "string",
163 "canEdit": true
164 }
165 ],
166 "documents": [
167 {
168 "type": "None",
169 "descriptions": [
170 "string"
171 ],
172 "url": "string"
173 }
174 ],
175 "invoiceUrl": "string"
176 }
177 ]
178 }
179 No links
180
181 POST
182 /api/Reservations/GetReser
183 {{/code}}
184
185
186 === Response example ===
187
188 {{code language="Json"}}
189 {
190 "pageId": 0,
191 "pagesCount": 0,
192 "reservations": [
193 {
194 "id": "07fff3fd-7ae9-409f-b50b-2cc7a948b8d0",
195 "number": "110576",
196 "agentConfirmationNumber": "",
197 "registrationDate": "2024-07-11T10:09:52.243",
198 "packageType": "Package",
199 "status": "Canceled",
200 "statusForAgent": "Canceled",
201 "departureToAirlineName": "N/A",
202 "arrivalTime": "2024-09-23T07:15:00.000",
203 "arrivalCountryName": "United Arab Emirates",
204 "departureTime": "2024-09-29T21:30:00.000",
205 "pickupPeriods": [],
206 "driverMobile": "N/A",
207 "paymentInOutInvCurrency": {
208 "price": 952.90,
209 "netPrice": 952.90,
210 "paid": 0.00,
211 "unpaid": 952.90,
212 "comission": 0.00,
213 "comissionPercent": 0
214 },
215 "paymentInSellCurrency": {
216 "currencyCode": "USD",
217 "price": 952.90,
218 "netPrice": 952.90,
219 "paid": 0.00,
220 "unpaid": 952.90,
221 "comission": 0.00,
222 "comissionPercent": 0
223 },
224 "showDownloadDocuments": false,
225 "guideMeetings": [],
226 "services": [
227 {
228 "id": "00000000-0000-0000-0000-000000000000",
229 "serviceDate": "0001-01-01T00:00:00.000",
230 "type": "Hotel",
231 "description": "N/A (N/A*) 23.09.2024 - 29.09.2024 / N/A N/A DBL",
232 "touristIds": [
233 "29236304-d23c-4999-88ec-76ac4b99b614",
234 "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
235 ]
236 },
237 {
238 "id": "00000000-0000-0000-0000-000000000000",
239 "serviceDate": "0001-01-01T00:00:00.000",
240 "type": "AviaTicket",
241 "touristIds": [
242 "29236304-d23c-4999-88ec-76ac4b99b614",
243 "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
244 ],
245 "serviceDetails": [
246 {
247 "flightCode": "FZ1721",
248 "airlineName": "N/A",
249 "departureTime": "2024-09-29T21:30:00.000",
250 "departureCityName": "Almaty",
251 "departureAirportCode": "ALA",
252 "departureTerminalCode": "DXB3",
253 "arrivalTime": "2024-09-23T07:15:00.000",
254 "arrivalCityName": "Dubai",
255 "arrivalAirportCode": "DXB",
256 "isArrivalFlight": false
257 }
258 ]
259 },
260 {
261 "id": "00000000-0000-0000-0000-000000000000",
262 "serviceDate": "0001-01-01T00:00:00.000",
263 "type": "AviaTicket",
264 "touristIds": [
265 "29236304-d23c-4999-88ec-76ac4b99b614",
266 "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
267 ],
268 "serviceDetails": [
269 {
270 "flightCode": "FZ1721",
271 "airlineName": "N/A",
272 "departureTime": "2024-09-29T21:30:00.000",
273 "departureCityName": "Dubai",
274 "departureAirportCode": "DXB",
275 "departureTerminalCode": "DXB3",
276 "arrivalTime": "2024-09-30T02:40:00.000",
277 "arrivalCityName": "Almaty",
278 "arrivalAirportCode": "ALA",
279 "isArrivalFlight": false
280 }
281 ]
282 },
283 {
284 "id": "97ba44e6-9158-40fe-8ec5-49626d786446",
285 "serviceDate": "0001-01-01T00:00:00.000",
286 "type": "Transfer",
287 "description": "Трансфер: Прилет Индивидуальный 23.09.2024 Dubai DXB -> Concorde Inn Hotel, Bur Dubai, United Arab Emirates",
288 "touristIds": [
289 "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c",
290 "29236304-d23c-4999-88ec-76ac4b99b614"
291 ]
292 },
293 {
294 "id": "c404e59c-6cab-491c-a3ff-f712cf74103c",
295 "serviceDate": "0001-01-01T00:00:00.000",
296 "type": "Transfer",
297 "description": "Трансфер: Вылет Индивидуальный 29.09.2024 с Concorde Inn Hotel -> DXB, Dubai United Arab Emirates",
298 "touristIds": [
299 "29236304-d23c-4999-88ec-76ac4b99b614",
300 "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
301 ]
302 },
303 {
304 "id": "fb8c4e42-03e8-4bb7-8fc9-2783ae664510",
305 "serviceDate": "0001-01-01T00:00:00.000",
306 "type": "Insurance",
307 "description": "Страхование: N/A (10000 USD) 23.09.2024 - 29.09.2024",
308 "touristIds": [
309 "29236304-d23c-4999-88ec-76ac4b99b614"
310 ]
311 },
312 {
313 "id": "97c32399-66b5-414b-bd88-d9c4584b22b1",
314 "serviceDate": "0001-01-01T00:00:00.000",
315 "type": "Insurance",
316 "description": "Страхование: N/A (10000 USD) 23.09.2024 - 29.09.2024",
317 "touristIds": [
318 "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
319 ]
320 }
321 ],
322 "tourists": [
323 {
324 "id": "29236304-d23c-4999-88ec-76ac4b99b614",
325 "gender": "Male",
326 "ageCategory": "Adult",
327 "title": "MR.",
328 "firstName": "Teeeeest",
329 "lastName": "Teeeest",
330 "birthDate": "1990-09-23T00:00:00",
331 "passportNumber": "1231233",
332 "passportExpiryDate": "2029-12-23T00:00:00",
333 "citizenshipCountryCode": "N/A",
334 "canEdit": false
335 },
336 {
337 "id": "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c",
338 "gender": "Male",
339 "ageCategory": "Adult",
340 "title": "MR.",
341 "firstName": "Test",
342 "lastName": "Teeeest",
343 "birthDate": "1990-09-23T00:00:00",
344 "passportNumber": "123123",
345 "passportExpiryDate": "2029-12-23T00:00:00",
346 "citizenshipCountryCode": "N/A",
347 "canEdit": false
348 }
349 ],
350 "documents": []
351 }
352 ]
353 }
354 {{/code}}
355
356
357 === Schema ===
358
359 {{success}}
360 GetReservationsResponse{
361
362 |pageId|integer($int32)
363 |pagesCount|integer($int32)
364 |reservations|[
365 nullable: trueReservation{(((
366 |id|string($uuid)
367 |number|string
368 nullable: true
369 |agentConfirmationNumber|string
370 nullable: true
371 |registrationDate|string($date-time)
372 |packageType|PackageTypeEnumstringEnum:
373 [ Package, OnlyHotel, OnlyAvia ]
374 |status|ReservationStatusEnumstringEnum:
375 [ NotConfirmed, ConfirmedAndNotPaid, ConfirmedAndPaid, Overdued, Canceled ]
376 |statusForAgent|StatusForAgentEnumstringEnum:
377 [ New, OnProcess, Confirmed, Pending, Overdued, Delete, Draft, Canceled ]
378 |departureToCityName|string
379 nullable: true
380 |departureToAirlineName|string
381 nullable: true
382 |arrivalTime|string($date-time)
383 |arrivalCountryName|string
384 nullable: true
385 |departureTime|string($date-time)
386 |pickupPeriods|[
387 nullable: truestring]
388 |driverMobile|string
389 nullable: true
390 |paymentInOutInvCurrency|ReservationPaymentDetails{(((
391 |currencyCode|string
392 nullable: true
393 |price|number($double)
394 |netPrice|number($double)
395 |paid|number($double)
396 |unpaid|number($double)
397 |comission|number($double)
398 |comissionPercent|number($double)
399
400 }
401 )))
402 |paymentInSellCurrency|ReservationPaymentDetails{(((
403 |currencyCode|string
404 nullable: true
405 |price|number($double)
406 |netPrice|number($double)
407 |paid|number($double)
408 |unpaid|number($double)
409 |comission|number($double)
410 |comissionPercent|number($double)
411
412 }
413 )))
414 |showDownloadDocuments|boolean
415 |guideMeetings|[
416 nullable: trueGuideMeeting{(((
417 |id|string($uuid)
418 |meetingStartTime|string($date-time)
419 |meetingEndTime|string($date-time)
420 nullable: true
421 |hotelId|string($uuid)
422 |hotelName|string
423 nullable: true
424 |guides|[
425 nullable: trueGuide{(((
426 |id|string($uuid)
427 |name|string
428 nullable: true
429 |mobile|string
430 nullable: true
431
432 }]
433 )))
434
435 }]
436 )))
437 |services|[
438 nullable: trueReservationService{...}]
439 |tourists|[
440 nullable: trueReservationTourist{(((
441 |id|[...]
442 |gender|GenderEnumstringEnum:
443 [ None, Male, Female ]
444 |ageCategory|AgeCategorystringEnum:
445 [ Adult, Infant, Child ]
446 |title|string
447 nullable: true
448 |firstName|string
449 nullable: true
450 |lastName|string
451 nullable: true
452 |birthDate|string($date)
453 nullable: true
454 |passportNumber|string
455 nullable: true
456 |passportExpiryDate|string($date)
457 nullable: true
458 |tin|string
459 nullable: true
460 |citizenshipCountryCode|string
461 nullable: true
462 |canEdit|boolean
463
464 }]
465 )))
466 |documents|[
467 nullable: trueReservationDocument{(((
468 |type|ReservationDocumentTypeEnumstringEnum:
469 [ None, HotelVoucher, Invoice, AviaTicketVoucher, Insurance ]
470 |descriptions|[
471 nullable: truestring]
472 |url|string
473 nullable: true
474
475 }]
476 )))
477 |invoiceUrl|string
478 nullable: true
479
480 }]
481 )))
482
483 }
484 {{/success}}
485
486
487 == Description ==
488
489
490 (% class="table-bordered" %)
491 |=**Parameter Name**|=**Type**|=**Description**|=**Example**
492 |**pageId**|integer|Represents the current page of the results returned. Used for pagination.|0
493 |**pagesCount**|integer|Indicates the total number of pages available based on the query filters applied.|0
494 |**reservations**|array|An array containing details of each reservation matching the query parameters. Each entry in this array is a JSON object with multiple fields related to a single reservation.|[ {...}, {...} ]
495 |**reservations[].id**|string|The unique identifier for the reservation.|"07fff3fd-7ae9-409f-b50b-2cc7a948b8d0"
496 |**reservations[].number**|string|The reservation number, typically used as a reference by agents and customers.|"110576"
497 |**reservations[].agentConfirmationNumber**|string|A confirmation number provided by the agent. It can be empty if not applicable.|""
498 |**reservations[].registrationDate**|datetime|The date and time when the reservation was registered in the system.|"2024-07-11T10:09:52.243"
499 |**reservations[].packageType**|string|Specifies the type of package associated with the reservation (e.g., "Package").|"Package"
500 |**reservations[].status**|string|The current status of the reservation (e.g., "Canceled", "Confirmed").|"Canceled"
501 |**reservations[].statusForAgent**|string|The reservation status as seen from the agent's perspective.|"Canceled"
502 |**reservations[].departureToAirlineName**|string|The name of the airline for the departure flight. If not applicable, it will be "N/A".|"N/A"
503 |**reservations[].arrivalTime**|datetime|The scheduled arrival time for the trip.|"2024-09-23T07:15:00.000"
504 |**reservations[].arrivalCountryName**|string|The name of the country where the trip is scheduled to arrive.|"United Arab Emirates"
505 |**reservations[].departureTime**|datetime|The scheduled departure time for the return trip.|"2024-09-29T21:30:00.000"
506 |**reservations[].pickupPeriods**|array|An array of pickup periods, detailing the times when pickup services are scheduled. This can be empty if no pickup services are associated with the reservation.|[]
507 |**reservations[].driverMobile**|string|The mobile number of the driver assigned for transfer services. It can be "N/A" if not applicable.|"N/A"
508 |**reservations[].paymentInOutInvCurrency**|object|Contains payment details in the invoice currency.|{...}
509 |**reservations[].paymentInOutInvCurrency.price**|decimal|Total price in the invoice currency.|952.90
510 |**reservations[].paymentInOutInvCurrency.netPrice**|decimal|Net price after any discounts in the invoice currency.|952.90
511 |**reservations[].paymentInOutInvCurrency.paid**|decimal|Amount already paid.|0.00
512 |**reservations[].paymentInOutInvCurrency.unpaid**|decimal|Amount that is still unpaid.|952.90
513 |**reservations[].paymentInOutInvCurrency.comission**|decimal|Commission amount, if applicable.|0.00
514 |**reservations[].paymentInOutInvCurrency.comissionPercent**|integer|Percentage of the commission.|0
515 |**reservations[].paymentInSellCurrency**|object|Similar to paymentInOutInvCurrency, but in the selling currency.|{...}
516 |**reservations[].paymentInSellCurrency.currencyCode**|string|The code of the currency (e.g., "USD").|"USD"
517 |**reservations[].paymentInSellCurrency.price**|decimal|Total price in the selling currency.|952.90
518 |**reservations[].paymentInSellCurrency.netPrice**|decimal|Net price after any discounts in the selling currency.|952.90
519 |**reservations[].paymentInSellCurrency.paid**|decimal|Amount already paid.|0.00
520 |**reservations[].paymentInSellCurrency.unpaid**|decimal|Amount that is still unpaid.|952.90
521 |**reservations[].paymentInSellCurrency.comission**|decimal|Commission amount, if applicable.|0.00
522 |**reservations[].paymentInSellCurrency.comissionPercent**|integer|Percentage of the commission.|0
523 |**reservations[].showDownloadDocuments**|boolean|Indicates whether documents related to the reservation can be downloaded.|false
524 |**reservations[].guideMeetings**|array|An array of guide meeting details. This can be empty if no guide meetings are associated with the reservation.|[]
525 |**reservations[].services**|array|An array of services associated with the reservation. Each service contains details such as service type, description, associated tourist IDs, and service-specific details (e.g., flight details).|[ {...}, {...} ]
526 |**reservations[].services[].id**|string|The unique identifier for the service.|"00000000-0000-0000-0000-000000000000"
527 |**reservations[].services[].serviceDate**|datetime|The date of the service.|"0001-01-01T00:00:00.000"
528 |**reservations[].services[].type**|string|The type of service (e.g., "Hotel", "AviaTicket").|"Hotel"
529 |**reservations[].services[].description**|string|A textual description of the service.|"N/A (N/A*) 23.09.2024 - 29.09.2024 / N/A N/A DBL"
530 |**reservations[].services[].touristIds**|array|An array of tourist IDs associated with the service.|["29236304-d23c-4999-88ec-76ac4b99b614", "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"]
531 |**reservations[].services[].serviceDetails**|array|Additional details specific to the service type, such as flight details.|[ {...}, {...} ]
532 |**reservations[].tourists**|array|An array of tourists associated with the reservation. Each tourist object contains personal details such as name, gender, passport information, and more.|[ {...}, {...} ]
533 |**reservations[].tourists[].id**|string|The unique identifier for the tourist.|"29236304-d23c-4999-88ec-76ac4b99b614"
534 |**reservations[].tourists[].gender**|string|The gender of the tourist.|"Male"
535 |**reservations[].tourists[].ageCategory**|string|The age category of the tourist (e.g., "Adult").|"Adult"
536 |**reservations[].tourists[].title**|string|The title of the tourist (e.g., "MR.").|"MR."
537 |**reservations[].tourists[].firstName**|string|The first name of the tourist.|"Teeeeest"
538 |**reservations[].tourists[].lastName**|string|The last name of the tourist.|"Teeeest"
539 |**reservations[].tourists[].birthDate**|datetime|The birth date of the tourist.|"1990-09-23T00:00:00"
540 |**reservations[].tourists[].passportNumber**|string|The passport number of the tourist.|"1231233"
541 |**reservations[].tourists[].passportExpiryDate**|datetime|The expiration date of the tourist's passport.|"2029-12-23T00:00:00"
542 |**reservations[].tourists[].citizenshipCountryCode**|string|The citizenship country code of the tourist.|"N/A"
543 |**reservations[].tourists[].canEdit**|boolean|Indicates whether the tourist’s details can be edited.|false
544 |**reservations[].documents**|array|An array containing document details associated with the reservation.|[]
545
546