> For the complete documentation index, see [llms.txt](https://developer.gotadi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gotadi.com/vietnamese/doi-tac-b2b2c/phuong-thuc-api/hotel/api/api-hotel-offers.md).

# API Hotel Offers

Endpoint: `offers`

Mọi phòng và gói giá của một khách sạn.

**Request**

| Field                 | Kiểu   | Bắt buộc | Mô tả                                |
| --------------------- | ------ | -------- | ------------------------------------ |
| `masterId`            | string | ✔        |                                      |
| `checkin`, `checkout` | date   | ✔        |                                      |
| `rooms[]`             | array  | ✔        | 1–8 phòng, `{ adults, childAges[] }` |
| `language`            | enum   |          | `vi` \| `en`                         |

```json
{
  "masterId": "30715",
  "checkin": "2026-11-20",
  "checkout": "2026-11-22",
  "rooms": [{ "adults": 2, "childAges": [6] }],
  "language": "vi"
}
```

**Response**

| Field                                    | Kiểu      | Mô tả                                                                            |
| ---------------------------------------- | --------- | -------------------------------------------------------------------------------- |
| `offerId`                                | string    | Chuỗi mờ, **hết hạn sau 30 phút** (`expiresAt`)                                  |
| `roomTypeId`, `roomName`, `ratePlanName` | string    |                                                                                  |
| `mealPlan`                               | enum      | `ROOM_ONLY`, `BREAKFAST`, `HALF_BOARD`, `FULL_BOARD`, `ALL_INCLUSIVE`            |
| `breakfastIncluded`                      | boolean   |                                                                                  |
| `bedTypes[]`                             | string\[] |                                                                                  |
| `amenities[]`                            | string\[] | Tiện ích của gói giá                                                             |
| `price`                                  | `Money`   | `total`, `perNight`, `currency`, `taxIncluded`, `taxAndFees`, `totalBeforePromo` |
| `promo`                                  | boolean   |                                                                                  |
| `refundable`                             | boolean   |                                                                                  |
| `freeCancellationUntil`                  | date-time | Hạn huỷ không mất phí; không có khi `refundable: false`                          |
| `cancelPolicies[]`                       | array     | `{ from, penaltyAmount }` — bản **lúc tìm kiếm**                                 |
| `remainingRooms`                         | int       |                                                                                  |
| `expiresAt`                              | date-time |                                                                                  |

```json
{
  "masterId": "30715",
  "offers": [{
    "offerId": "of_8Jk2...",
    "roomTypeId": "DLX",
    "roomName": "Deluxe hướng biển",
    "ratePlanName": "Gồm ăn sáng, huỷ miễn phí",
    "mealPlan": "BREAKFAST",
    "breakfastIncluded": true,
    "bedTypes": ["1 giường đôi"],
    "amenities": ["Ăn sáng buffet", "Nâng hạng phòng nếu còn"],
    "price": {
      "total": 2400000, "perNight": 1200000, "currency": "VND",
      "taxIncluded": true, "taxAndFees": 283600, "totalBeforePromo": 2700000
    },
    "promo": true,
    "refundable": true,
    "freeCancellationUntil": "2026-11-18T12:00:00+07:00",
    "cancelPolicies": [{ "from": "2026-11-18T12:00:00+07:00", "penaltyAmount": 1200000 }],
    "remainingRooms": 3,
    "expiresAt": "2026-11-15T15:30:00+07:00"
  }]
}
```

{% hint style="info" %}
Lần gọi **đầu tiên** cho một bộ `masterId`/ngày/khách có thể mất tới **\~6 giây** vì Gotadi tìm khách sạn trước; các lần sau trong 30 phút nhanh hơn.
{% endhint %}

`cancelPolicies` ở đây là bản lúc tìm kiếm; bản **chốt** cho booking nằm ở `price-check`. `penaltyAmount` đã quy đổi từ số tiền, % tổng tiền hoặc số đêm.
