# Booking Summary API

This API provides detailed information about a booking. It can also be used to verify the booking status to confirm the booking.

**Request**

| **Parameter**      | **Type** | **Mandatory** | **Description**                                                          |
| ------------------ | -------- | ------------- | ------------------------------------------------------------------------ |
| source             | String   | Y             | Travel seller ID                                                         |
| token              | String   | N             | Partner unique request id at the time of booking request                 |
| confirmationNumber | String   | N             | Booking confirmation number if available                                 |
| propertyCode       | String   | Y             | Property code (Format = TP041778, TP = brand code & 041778 = hotel code) |

**Note:**

1. Either of the tokens or confirmation number is mandatory in the request.
2. In case both token and confirmationNumber are present, confirmationNumber takes precedence over the token. And booking will be retrieved against the confirmation number. If no booking is found against the confirmation number, then the booking will be searched against the token. If no booking is found, an error will be returned.

**Sample Request**

{

&#x20;      "source": "TGX\_MB",

&#x20;      "token": "TOKEN123",

&#x20;      "confirmationNumber": "CONFNUM123",

&#x20;      "propertyCode": "TP041778"

}<br>

**Response**

| **Parameter**      | **Type**  | **Mandatory** | **Description**                                                          |
| ------------------ | --------- | ------------- | ------------------------------------------------------------------------ |
| token              | String    | Y             | Partner unique request id at the time of booking request.                |
| propertyCode       | String    | Y             | Property code (Format = TP041778, TP = brand code & 041778 = hotel code) |
| inDate             | Date      | Y             | Check-in date. Format YYYY-MM-DD                                         |
| outDate            | Date      | Y             | Check-out date. Format YYYY-MM-DD                                        |
| ratePlanCode       | String    | Y             | Rate plan code                                                           |
| roomTypeCode       | String    | Y             | Room type code                                                           |
| numberOfRooms      | Integer   | Y             | Number or rooms                                                          |
| numberOfAdults     | Integer   | Y             | Number of adults                                                         |
| numberOfChildren   | Integer   | Y             | Number of children                                                       |
| firstName          | String    | Y             | Primary Guest First Name                                                 |
| lastName           | String    | Y             | Primary Guest Last Name                                                  |
| totalRateInclusive | Decimal   | Y             | Total rate including tax                                                 |
| totalTax           | Decimal   | Y             | Total taxes                                                              |
| currenyCode        | String    | Y             | Currency code (for ex: “USD”)                                            |
| bookingStatus      | Enum      | Y             | Booking status (Possible values : "BOOKED", “FAILED” or “CANCELLED” )    |
| confirmationNumber | String    | N             | Booking confirmation number                                              |
| bookingDateTime    | Timestamp | Y             | Booking time (Format : 2024-11-18 10:55:10)                              |
| cancellationNumber | String    | N             | Booking cancellation number                                              |
| cancelPolicy       | String    | N             | Cancellation policy description                                          |
| cancelDateTime     | Timestamp | N             | Cancellation time (Format : 2024-11-18 10:55:10)                         |
| specialRequest     | String    | N             | Special request                                                          |
| **error**          | Object    | N             | Present only for error response                                          |
| code               | String    | Y             | Error code                                                               |
| description        | String    | Y             | Error Description                                                        |

**Sample Response**

{

&#x20;   "token": "jhfr3i",

&#x20;   "propertyCode": "TP041677",

&#x20;   "inDate": "18-11-2024",

&#x20;   "outDate": "20-11-2024",

&#x20;   "ratePlanCode": "ABC",

&#x20;   "roomTypeCode": "KLQ",

&#x20;   "numberOfRooms": "1",

&#x20;   "numberOfAdults": "2",

&#x20;   "numberOfChildren": "0",

&#x20;   "firstName": "AK",

&#x20;   "lastName": "Gupta",

&#x20;   "totalRateInclusive": "160.00",

&#x20;   "totalTax": "29.53",

&#x20;   "currencyCode": "USD",

&#x20;   "bookingStatus": "BOOKED",

&#x20;   "confirmationNumber": "CONFNUM123",

&#x20;   "bookingDateTime": "2024-11-18 10:55:10",

&#x20;   "cancellationNumber": "CANCNUM123",

&#x20;   "cancelPolicy": "CANCEL BY 1800 20241118 LOCAL PROPERTY TIME TO AVOID PENALTIES",

&#x20;   "cancelDateTime": "2024-11-18 10:55:10",

&#x20;   "specialRequest": "EXTRA BED"

}

**Sample Error Response**

{

&#x20;   "error": {

&#x20;       "code": "SD400",

&#x20;       "description": "No record found"

&#x20;   }

}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.rategain.com/our-products/smart-distribution/property-list-and-booking-summary/booking-summary-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
