> For the complete documentation index, see [llms.txt](https://apidocs.mytravellerschoice.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.mytravellerschoice.com/hotel-booking-api/booking-api/check-rate-api.md).

# Check Rate API

This is an important step following the availability API request. Here, you need to provide the details of the specific room you intend to book.

This API should be invoked to reconfirm the rate details and obtain the cancellation policy, as well as any associated rate comments.

## API details

<mark style="color:green;">`POST`</mark> `/api/v1/hotel/booking-api/check-rate/rooms`

**Headers**

| Name            | Value              |
| --------------- | ------------------ |
| Content-Type    | `application/json` |
| Authorization   | `Bearer <token>`   |
| Accept-Encoding | `gzip`             |

**Body**

<table><thead><tr><th width="185">Name</th><th width="101">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>hotelId</code></td><td>Integer</td><td>HotelId</td></tr><tr><td><code>tokenNumber</code></td><td>String</td><td>Unique code for an availability request received from availability response.</td></tr><tr><td><code>rateKey</code></td><td>String</td><td>Unique key of the specific room received from availability response</td></tr><tr><td><code>fromDate</code></td><td>String</td><td>checkin date</td></tr><tr><td><code>toDate</code></td><td>String</td><td>checkout date</td></tr><tr><td><code>noOfAdults</code></td><td>Integer</td><td>No of adults in a room</td></tr><tr><td><code>noOfChildren</code></td><td>Integer</td><td>No of children in a room</td></tr><tr><td><code>childrenAges</code></td><td>Array</td><td>Age of each children in a room </td></tr><tr><td><code>nationality</code></td><td>String</td><td>nationality of the guest</td></tr></tbody></table>

<details>

<summary>Sample Request</summary>

```json
{
    "hotelId": 100018,
    "tokenNumber": "RA_1728413337142",
    "rateKey": "40221e490acbd10955a41d128029a56e",
    "fromDate":"2024-10-17",
    "toDate": "2024-10-20",
    "rooms": [
        {
        "noOfAdults": 1,
        "noOfChildren": 0,
        "childrenAges": []
        }
    ],
    "nationality": "IN"
}
```

</details>

### Response details

**Response General data**

<table><thead><tr><th width="185">Name</th><th width="93">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenNumber</td><td>String</td><td>Unique code for an availability request. </td></tr><tr><td>fromDate</td><td>String</td><td>Checkin Date</td></tr><tr><td>toDate</td><td>String</td><td>Check out Date</td></tr><tr><td>nationality</td><td>String</td><td>Guest Nationality ISO code</td></tr><tr><td>roomPaxes</td><td>Array</td><td>roomPaxes.noOfAdults<br>roomPaxes.noOfChildren<br>roomPaxes.childrenAges[]</td></tr><tr><td>noOfNights</td><td>Integer</td><td>Total stay nights</td></tr></tbody></table>

#### Response Guest required data

<table><thead><tr><th width="168">Name</th><th width="154">Type</th><th>Description</th></tr></thead><tbody><tr><td>roomId</td><td>Integer</td><td>room number</td></tr><tr><td>type</td><td>String</td><td>guest type data</td></tr><tr><td>ageRequired</td><td>boolean</td><td><code>true</code> : Mandatory to pass guest age</td></tr><tr><td>genderRequired</td><td>boolean</td><td><code>true</code>: Mandatory to pass guest gender </td></tr></tbody></table>

#### Response Hotel data

<table><thead><tr><th width="151">Name</th><th width="101">Type</th><th>Description</th></tr></thead><tbody><tr><td>hotelId</td><td>Integer</td><td>Unique Id for the hotel</td></tr><tr><td>hotelName</td><td>String</td><td>Name of the hotel</td></tr></tbody></table>

#### Response Room data

<table><thead><tr><th width="184">Name</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td>rateKey</td><td>String</td><td>Unique Id for the specific rate</td></tr><tr><td>standardName</td><td>String</td><td>Name of the room provided by room mapping provider</td></tr><tr><td>roomName</td><td>String</td><td>Name of the room provided by supplier</td></tr><tr><td>roomMaster</td><td>Boolean</td><td><code>true</code>: if room details available in room master<br><code>false</code> : If room details not available in room master</td></tr><tr><td>roomMasterCode</td><td>String</td><td>Unique room code for mapping from room master </td></tr><tr><td>boardName</td><td>String</td><td>Name of the board type</td></tr><tr><td>boardMaster</td><td>Boolean</td><td><code>true</code>: if board details available in board master<br><code>false</code> : If board details not available in board master</td></tr><tr><td>boardMasterId</td><td>Integer</td><td>Unique board code for mapping from board master </td></tr><tr><td>occupancies</td><td>Array</td><td>occupancies.name<br>occupancies.maxCount</td></tr><tr><td>cancellationPolicies</td><td>Array</td><td><code>cancellationPolicies.from</code> : Date from which the policy comes in effect<br><code>cancellationPolicies.amount</code> : charge</td></tr><tr><td>rateComments</td><td>String</td><td>Important info to be displayed to guest before booking</td></tr><tr><td>netPrice</td><td>Number</td><td>Total price</td></tr></tbody></table>

<details>

<summary>Sample Response </summary>

```json
{
    "success": true,
    "data": {
        "tokenNumber": "RA_1728413337142",
        "fromDate": "2024-10-17",
        "toDate": "2024-10-20",
        "nationality": "IN",
        "noOfNights": 3,
        "roomPaxes": [
            {
                "noOfAdults": 1,
                "noOfChildren": 0,
                "childrenAges": []
            }
        ],
        "travellerDetails": [
            {
                "roomId": 1,
                "type": "adult",
                "ageRequired": false,
                "genderRequired": false
            }
        ],
        "hotel": {
            "hotelId": 112,
            "hotelName": "Nine Hotel"
        },
        "standardName": "Standard Room",
        "rate": {
            "rateKey": "40221e490acbd10955a41d128029a56e",
            "roomName": "Standard Room",
            "roomMaster": true,
            "roomMasterCode": "X1-1046",
            "boardName": "bed and breakfast",
            "boardMaster": true,
            "boardMasterId": 10003,
            "netPrice": 771,
            "cancellationPolicies": [
                {
                    "from": "06-10-2024",
                    "amount": 385.50
                },
                {
                    "from": "08-10-2024",
                    "amount": 585.50
                },
            ],
            "rateComments": [
                "price excludes mandatory tourism fees and is payable directly at the hotel."
            ],
            "occupancies": {
                "name": "Single",
                "maxCount": 1
            }
        }
    }
}
```

</details>
