Get Reservations

This operation allows you to get the details of all successful reservations within a specified date range. This operation returns limited information about the reservations. To get the complete details of the reservation, use the GetReservation operation for each booking individually.

The response structure remains the same irrespective of the request format. See the sample response below.

You can only search for a maximum time period of 31 days at a time.

Schema

The schema remains the same for all 3 types of requests.

query getReservations($GetReservations: GetReservationsRequestInput) {
    getReservations(getReservationsRequest: $GetReservations) {
        reservations{
            ...reservations
        }
    }
}
fragment reservations on GetReservationResponse {
    htConfirmationCode
        clientConfirmationCode
        otaConfirmationCode
        bookingDate
        propertyDetails {
            ...propertyDetails
        }
        rooms {
            ...roomDetails
        }
}
fragment propertyDetails on PropertyResponseEntity {
    city
    propertyId
    propertyName
}
fragment roomDetails on RoomResponse {
    cancelled
    checkInDate
    checkOutDate
    clientRoomConfirmationCode
    htRoomConfirmationCode
    crsConfirmationCode
    crsCancelConfirmationCode
    pmsConfirmationCode
    refundable
    rates {
        ...ratesDetails
    }
}
fragment ratesDetails on RoomRatesResponseEntity {
    netPrice
    tax
    grossPrice
}

Requests

See below examples of requests using each type of date range.

Creation Start and End Dates

{
  "GetReservations": {
    "creationDateStart": "2024-06-01T00:00:00+01:00",
    "creationDateEnd": "2024-06-30T00:00:59+01:00"
  }
}

Check-in Start and End Dates

{
  "GetReservations": {
    "checkInDateStart": "2024-06-01",
    "checkInDateEnd": "2024-06-30"
  }
}

Check-out Start and End Dates

{
  "GetReservations": {
    "checkOutDateStart": "2024-06-01",
    "checkOutDateEnd": "2024-06-30"
  }
}

Response

The error response format remains the same for all 3 types of date ranges. For more information on the list of error codes see the Error Codes page.

The results are always sorted based on the bookingDate.

Success Response Sample

{
  "data": {
    "getReservations": {
      "reservations": [
        {
          "htConfirmationCode": "HT-2OSUJF",
          "clientConfirmationCode": "test4765565",
          "otaConfirmationCode": null,
          "bookingDate": "2024-06-02T05:35:43.000-0400",
          "propertyDetails": {
            "city": "New York",
            "propertyId": 292,
            "propertyName": "Arthouse Hotel New York City"
          },
          "rooms": [
            {
              "cancelled": false,
              "checkInDate": "2024-06-05",
              "checkOutDate": "2024-06-06",
              "clientRoomConfirmationCode": "test4765565",
              "htRoomConfirmationCode": "HT-2OSUJF-1",
              "crsConfirmationCode": null,
              "crsCancelConfirmationCode": null,
              "pmsConfirmationCode": null,
              "refundable": false,
              "rates": {
                "netPrice": 220,
                "tax": 22,
                "grossPrice": 242
              }
            }
          ]
        },
        {
          "htConfirmationCode": "HT-Q8DUON",
          "clientConfirmationCode": "876trdfghjkjn",
          "otaConfirmationCode": null,
          "bookingDate": "2024-06-04T11:37:42.000-0400",
          "propertyDetails": {
            "city": "Key West",
            "propertyId": 64049,
            "propertyName": "24° North Hotel"
          },
          "rooms": [
            {
              "cancelled": false,
              "checkInDate": "2024-06-10",
              "checkOutDate": "2024-06-11",
              "clientRoomConfirmationCode": "876trdfghjkjn",
              "htRoomConfirmationCode": "HT-Q8DUON-1",
              "crsConfirmationCode": "KEY24N107429986",
              "crsCancelConfirmationCode": null,
              "pmsConfirmationCode": null,
              "refundable": true,
              "rates": {
                "netPrice": 600,
                "tax": 611,
                "grossPrice": 1211
              }
            }
          ]
        },
        {
          "htConfirmationCode": "HT-XRHDRO",
          "clientConfirmationCode": "tc-test-cvxbdfb2",
          "otaConfirmationCode": "test-client-89",
          "bookingDate": "2024-06-12T10:34:55.000-0400",
          "propertyDetails": {
            "city": "New York",
            "propertyId": 64116,
            "propertyName": "Dingus Property - Test -11016"
          },
          "rooms": [
            {
              "cancelled": true,
              "checkInDate": "2024-06-25",
              "checkOutDate": "2024-06-26",
              "clientRoomConfirmationCode": "tc-test-cvxbdfb2",
              "htRoomConfirmationCode": "HT-XRHDRO-1",
              "crsConfirmationCode": null,
              "crsCancelConfirmationCode": null,
              "pmsConfirmationCode": null,
              "refundable": false,
              "rates": {
                "netPrice": 30,
                "tax": 24,
                "grossPrice": 54
              }
            }
          ]
        }
      ]
    }
  }
}

Error Response Sample

A complete list of error codes can be found on the Error Codes page.

{
  "errors": [
    {
      "message": "Invalid date format. Allowed format is yyyy-MM-dd'T'HH:mm:ssZ",
      "extensions": {
        "errorCode": 1823
      }
    }
  ],
  "data": {
    "getReservation": null
  }
}