Wiki source code of 7. GetReservations

Version 8.1 by Giorgi Mdivnishvili on 2024/08/16 18:27

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