7. GetReservations

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

Method Description

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.

Endpoint URL - [POST]

Request Parameters

None

Request Body

{
 "reservationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
 "number": "string",
 "checkInStart": "2024-08-16T14:13:00.686Z",
 "checkInEnd": "2024-08-16T14:13:00.686Z",
 "checkOutStart": "2024-08-16T14:13:00.686Z",
 "checkOutEnd": "2024-08-16T14:13:00.686Z",
 "registrationDateStart": "2024-08-16T14:13:00.686Z",
 "registrationDateEnd": "2024-08-16T14:13:00.686Z",
 "statusForAgent": "New",
 "countryCode": "string",
 "touristLastName": "string"
}

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

Request Body example

{
   
   "registrationDateStart": "2024-06-16",
   "registrationDateEnd": "2024-09-16"
  
}

Response

{
 "pageId": 0,
 "pagesCount": 0,
 "reservations": [
    {
     "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
     "number": "string",
     "agentConfirmationNumber": "string",
     "registrationDate": "2024-08-16T14:13:00.703Z",
     "packageType": "Package",
     "status": "NotConfirmed",
     "statusForAgent": "New",
     "departureToCityName": "string",
     "departureToAirlineName": "string",
     "arrivalTime": "2024-08-16T14:13:00.703Z",
     "arrivalCountryName": "string",
     "departureTime": "2024-08-16T14:13:00.703Z",
     "pickupPeriods": [
       "string"
      ],
     "driverMobile": "string",
     "paymentInOutInvCurrency": {
       "currencyCode": "string",
       "price": 0,
       "netPrice": 0,
       "paid": 0,
       "unpaid": 0,
       "comission": 0,
       "comissionPercent": 0
      },
     "paymentInSellCurrency": {
       "currencyCode": "string",
       "price": 0,
       "netPrice": 0,
       "paid": 0,
       "unpaid": 0,
       "comission": 0,
       "comissionPercent": 0
      },
     "showDownloadDocuments": true,
     "guideMeetings": [
        {
         "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "meetingStartTime": "2024-08-16T14:13:00.703Z",
         "meetingEndTime": "2024-08-16T14:13:00.703Z",
         "hotelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "hotelName": "string",
         "guides": [
            {
             "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
             "name": "string",
             "mobile": "string"
            }
          ]
        }
      ],
     "services": [
        {
         "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "serviceDate": "2024-08-16T14:13:00.703Z",
         "type": "Arrival",
         "description": "string",
         "touristIds": [
           "string"
          ],
         "serviceDetails": [
            {
             "flightCode": "string",
             "airlineName": "string",
             "departureTime": "2024-08-16T14:13:00.703Z",
             "departureCityName": "string",
             "departureAirportCode": "string",
             "departureTerminalCode": "string",
             "arrivalTime": "2024-08-16T14:13:00.703Z",
             "arrivalCityName": "string",
             "arrivalAirportCode": "string",
             "arrivalTerminalCode": "string",
             "isArrivalFlight": true
            }
          ]
        }
      ],
     "tourists": [
        {
         "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
         "gender": "None",
         "ageCategory": "Adult",
         "title": "string",
         "firstName": "string",
         "lastName": "string",
         "birthDate": "2024-08-16",
         "passportNumber": "string",
         "passportExpiryDate": "2024-08-16",
         "tin": "string",
         "citizenshipCountryCode": "string",
         "canEdit": true
        }
      ],
     "documents": [
        {
         "type": "None",
         "descriptions": [
           "string"
          ],
         "url": "string"
        }
      ],
     "invoiceUrl": "string"
    }
  ]
}
No links

POST
/api/Reservations/GetReser

Response example

{
   "pageId": 0,
   "pagesCount": 0,
   "reservations": [
        {
           "id": "07fff3fd-7ae9-409f-b50b-2cc7a948b8d0",
           "number": "110576",
           "agentConfirmationNumber": "",
           "registrationDate": "2024-07-11T10:09:52.243",
           "packageType": "Package",
           "status": "Canceled",
           "statusForAgent": "Canceled",
           "departureToAirlineName": "N/A",
           "arrivalTime": "2024-09-23T07:15:00.000",
           "arrivalCountryName": "United Arab Emirates",
           "departureTime": "2024-09-29T21:30:00.000",
           "pickupPeriods": [],
           "driverMobile": "N/A",
           "paymentInOutInvCurrency": {
               "price": 952.90,
               "netPrice": 952.90,
               "paid": 0.00,
               "unpaid": 952.90,
               "comission": 0.00,
               "comissionPercent": 0
            },
           "paymentInSellCurrency": {
               "currencyCode": "USD",
               "price": 952.90,
               "netPrice": 952.90,
               "paid": 0.00,
               "unpaid": 952.90,
               "comission": 0.00,
               "comissionPercent": 0
            },
           "showDownloadDocuments": false,
           "guideMeetings": [],
           "services": [
                {
                   "id": "00000000-0000-0000-0000-000000000000",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "Hotel",
                   "description": "N/A (N/A*) 23.09.2024 - 29.09.2024 / N/A N/A DBL",
                   "touristIds": [
                       "29236304-d23c-4999-88ec-76ac4b99b614",
                       "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
                    ]
                },
                {
                   "id": "00000000-0000-0000-0000-000000000000",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "AviaTicket",
                   "touristIds": [
                       "29236304-d23c-4999-88ec-76ac4b99b614",
                       "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
                    ],
                   "serviceDetails": [
                        {
                           "flightCode": "FZ1721",
                           "airlineName": "N/A",
                           "departureTime": "2024-09-29T21:30:00.000",
                           "departureCityName": "Almaty",
                           "departureAirportCode": "ALA",
                           "departureTerminalCode": "DXB3",
                           "arrivalTime": "2024-09-23T07:15:00.000",
                           "arrivalCityName": "Dubai",
                           "arrivalAirportCode": "DXB",
                           "isArrivalFlight": false
                        }
                    ]
                },
                {
                   "id": "00000000-0000-0000-0000-000000000000",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "AviaTicket",
                   "touristIds": [
                       "29236304-d23c-4999-88ec-76ac4b99b614",
                       "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
                    ],
                   "serviceDetails": [
                        {
                           "flightCode": "FZ1721",
                           "airlineName": "N/A",
                           "departureTime": "2024-09-29T21:30:00.000",
                           "departureCityName": "Dubai",
                           "departureAirportCode": "DXB",
                           "departureTerminalCode": "DXB3",
                           "arrivalTime": "2024-09-30T02:40:00.000",
                           "arrivalCityName": "Almaty",
                           "arrivalAirportCode": "ALA",
                           "isArrivalFlight": false
                        }
                    ]
                },
                {
                   "id": "97ba44e6-9158-40fe-8ec5-49626d786446",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "Transfer",
                   "description": "Трансфер: Прилет Индивидуальный 23.09.2024 Dubai DXB -> Concorde Inn Hotel, Bur Dubai, United Arab Emirates",
                   "touristIds": [
                       "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c",
                       "29236304-d23c-4999-88ec-76ac4b99b614"
                    ]
                },
                {
                   "id": "c404e59c-6cab-491c-a3ff-f712cf74103c",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "Transfer",
                   "description": "Трансфер: Вылет Индивидуальный 29.09.2024 с Concorde Inn Hotel -> DXB, Dubai United Arab Emirates",
                   "touristIds": [
                       "29236304-d23c-4999-88ec-76ac4b99b614",
                       "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
                    ]
                },
                {
                   "id": "fb8c4e42-03e8-4bb7-8fc9-2783ae664510",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "Insurance",
                   "description": "Страхование: N/A (10000 USD) 23.09.2024 - 29.09.2024",
                   "touristIds": [
                       "29236304-d23c-4999-88ec-76ac4b99b614"
                    ]
                },
                {
                   "id": "97c32399-66b5-414b-bd88-d9c4584b22b1",
                   "serviceDate": "0001-01-01T00:00:00.000",
                   "type": "Insurance",
                   "description": "Страхование: N/A (10000 USD) 23.09.2024 - 29.09.2024",
                   "touristIds": [
                       "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"
                    ]
                }
            ],
           "tourists": [
                {
                   "id": "29236304-d23c-4999-88ec-76ac4b99b614",
                   "gender": "Male",
                   "ageCategory": "Adult",
                   "title": "MR.",
                   "firstName": "Teeeeest",
                   "lastName": "Teeeest",
                   "birthDate": "1990-09-23T00:00:00",
                   "passportNumber": "1231233",
                   "passportExpiryDate": "2029-12-23T00:00:00",
                   "citizenshipCountryCode": "N/A",
                   "canEdit": false
                },
                {
                   "id": "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c",
                   "gender": "Male",
                   "ageCategory": "Adult",
                   "title": "MR.",
                   "firstName": "Test",
                   "lastName": "Teeeest",
                   "birthDate": "1990-09-23T00:00:00",
                   "passportNumber": "123123",
                   "passportExpiryDate": "2029-12-23T00:00:00",
                   "citizenshipCountryCode": "N/A",
                   "canEdit": false
                }
            ],
           "documents": []
        }
    ]
}

Schema

Success

GetReservationsResponse{

pageIdinteger($int32)
pagesCountinteger($int32)
reservations[
nullable: trueReservation{
idstring($uuid)
numberstring
nullable: true
agentConfirmationNumberstring
nullable: true
registrationDatestring($date-time)
packageTypePackageTypeEnumstringEnum:
[ Package, OnlyHotel, OnlyAvia ]
statusReservationStatusEnumstringEnum:
[ NotConfirmed, ConfirmedAndNotPaid, ConfirmedAndPaid, Overdued, Canceled ]
statusForAgentStatusForAgentEnumstringEnum:
[ New, OnProcess, Confirmed, Pending, Overdued, Delete, Draft, Canceled ]
departureToCityNamestring
nullable: true
departureToAirlineNamestring
nullable: true
arrivalTimestring($date-time)
arrivalCountryNamestring
nullable: true
departureTimestring($date-time)
pickupPeriods[
nullable: truestring]
driverMobilestring
nullable: true
paymentInOutInvCurrencyReservationPaymentDetails{
currencyCodestring
nullable: true
pricenumber($double)
netPricenumber($double)
paidnumber($double)
unpaidnumber($double)
comissionnumber($double)
comissionPercentnumber($double)

}

paymentInSellCurrencyReservationPaymentDetails{
currencyCodestring
nullable: true
pricenumber($double)
netPricenumber($double)
paidnumber($double)
unpaidnumber($double)
comissionnumber($double)
comissionPercentnumber($double)

}

showDownloadDocumentsboolean
guideMeetings[
nullable: trueGuideMeeting{
idstring($uuid)
meetingStartTimestring($date-time)
meetingEndTimestring($date-time)
nullable: true
hotelIdstring($uuid)
hotelNamestring
nullable: true
guides[
nullable: trueGuide{
idstring($uuid)
namestring
nullable: true
mobilestring
nullable: true

}]

}]

services[
nullable: trueReservationService{...}]
tourists[
nullable: trueReservationTourist{
id[...]
genderGenderEnumstringEnum:
[ None, Male, Female ]
ageCategoryAgeCategorystringEnum:
[ Adult, Infant, Child ]
titlestring
nullable: true
firstNamestring
nullable: true
lastNamestring
nullable: true
birthDatestring($date)
nullable: true
passportNumberstring
nullable: true
passportExpiryDatestring($date)
nullable: true
tinstring
nullable: true
citizenshipCountryCodestring
nullable: true
canEditboolean

}]

documents[
nullable: trueReservationDocument{
typeReservationDocumentTypeEnumstringEnum:
[ None, HotelVoucher, Invoice, AviaTicketVoucher, Insurance ]
descriptions[
nullable: truestring]
urlstring
nullable: true

}]

invoiceUrlstring
nullable: true

}]

}

Description

Parameter NameTypeDescriptionExample
pageIdintegerRepresents the current page of the results returned. Used for pagination.0
pagesCountintegerIndicates the total number of pages available based on the query filters applied.0
reservationsarrayAn 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.[ {...}, {...} ]
reservations[].idstringThe unique identifier for the reservation."07fff3fd-7ae9-409f-b50b-2cc7a948b8d0"
reservations[].numberstringThe reservation number, typically used as a reference by agents and customers."110576"
reservations[].agentConfirmationNumberstringA confirmation number provided by the agent. It can be empty if not applicable.""
reservations[].registrationDatedatetimeThe date and time when the reservation was registered in the system."2024-07-11T10:09:52.243"
reservations[].packageTypestringSpecifies the type of package associated with the reservation (e.g., "Package")."Package"
reservations[].statusstringThe current status of the reservation (e.g., "Canceled", "Confirmed")."Canceled"
reservations[].statusForAgentstringThe reservation status as seen from the agent's perspective."Canceled"
reservations[].departureToAirlineNamestringThe name of the airline for the departure flight. If not applicable, it will be "N/A"."N/A"
reservations[].arrivalTimedatetimeThe scheduled arrival time for the trip."2024-09-23T07:15:00.000"
reservations[].arrivalCountryNamestringThe name of the country where the trip is scheduled to arrive."United Arab Emirates"
reservations[].departureTimedatetimeThe scheduled departure time for the return trip."2024-09-29T21:30:00.000"
reservations[].pickupPeriodsarrayAn 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.[]
reservations[].driverMobilestringThe mobile number of the driver assigned for transfer services. It can be "N/A" if not applicable."N/A"
reservations[].paymentInOutInvCurrencyobjectContains payment details in the invoice currency.{...}
reservations[].paymentInOutInvCurrency.pricedecimalTotal price in the invoice currency.952.90
reservations[].paymentInOutInvCurrency.netPricedecimalNet price after any discounts in the invoice currency.952.90
reservations[].paymentInOutInvCurrency.paiddecimalAmount already paid.0.00
reservations[].paymentInOutInvCurrency.unpaiddecimalAmount that is still unpaid.952.90
reservations[].paymentInOutInvCurrency.comissiondecimalCommission amount, if applicable.0.00
reservations[].paymentInOutInvCurrency.comissionPercentintegerPercentage of the commission.0
reservations[].paymentInSellCurrencyobjectSimilar to paymentInOutInvCurrency, but in the selling currency.{...}
reservations[].paymentInSellCurrency.currencyCodestringThe code of the currency (e.g., "USD")."USD"
reservations[].paymentInSellCurrency.pricedecimalTotal price in the selling currency.952.90
reservations[].paymentInSellCurrency.netPricedecimalNet price after any discounts in the selling currency.952.90
reservations[].paymentInSellCurrency.paiddecimalAmount already paid.0.00
reservations[].paymentInSellCurrency.unpaiddecimalAmount that is still unpaid.952.90
reservations[].paymentInSellCurrency.comissiondecimalCommission amount, if applicable.0.00
reservations[].paymentInSellCurrency.comissionPercentintegerPercentage of the commission.0
reservations[].showDownloadDocumentsbooleanIndicates whether documents related to the reservation can be downloaded.false
reservations[].guideMeetingsarrayAn array of guide meeting details. This can be empty if no guide meetings are associated with the reservation.[]
reservations[].servicesarrayAn 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).[ {...}, {...} ]
reservations[].services[].idstringThe unique identifier for the service."00000000-0000-0000-0000-000000000000"
reservations[].services[].serviceDatedatetimeThe date of the service."0001-01-01T00:00:00.000"
reservations[].services[].typestringThe type of service (e.g., "Hotel", "AviaTicket")."Hotel"
reservations[].services[].descriptionstringA textual description of the service."N/A (N/A*) 23.09.2024 - 29.09.2024 / N/A N/A DBL"
reservations[].services[].touristIdsarrayAn array of tourist IDs associated with the service.["29236304-d23c-4999-88ec-76ac4b99b614", "a2e833cf-cdcd-4ff9-9c43-b63066da1f7c"]
reservations[].services[].serviceDetailsarrayAdditional details specific to the service type, such as flight details.[ {...}, {...} ]
reservations[].touristsarrayAn array of tourists associated with the reservation. Each tourist object contains personal details such as name, gender, passport information, and more.[ {...}, {...} ]
reservations[].tourists[].idstringThe unique identifier for the tourist."29236304-d23c-4999-88ec-76ac4b99b614"
reservations[].tourists[].genderstringThe gender of the tourist."Male"
reservations[].tourists[].ageCategorystringThe age category of the tourist (e.g., "Adult")."Adult"
reservations[].tourists[].titlestringThe title of the tourist (e.g., "MR.")."MR."
reservations[].tourists[].firstNamestringThe first name of the tourist."Teeeeest"
reservations[].tourists[].lastNamestringThe last name of the tourist."Teeeest"
reservations[].tourists[].birthDatedatetimeThe birth date of the tourist."1990-09-23T00:00:00"
reservations[].tourists[].passportNumberstringThe passport number of the tourist."1231233"
reservations[].tourists[].passportExpiryDatedatetimeThe expiration date of the tourist's passport."2029-12-23T00:00:00"
reservations[].tourists[].citizenshipCountryCodestringThe citizenship country code of the tourist."N/A"
reservations[].tourists[].canEditbooleanIndicates whether the tourist’s details can be edited.false
reservations[].documentsarrayAn array containing document details associated with the reservation.[]