Download OpenAPI specification:
นี่คือคู่มือ API สำหรับระบบการจองห้องพัก
ลงทะเบียนโรงแรมหรือที่พักใหม่ และ ผูกอสังหาดังกล่าวกับผู้ที่สร้าง
Hotel input data
| address | string |
| city | string |
| country_code | string |
| name | string |
{- "address": "777 Suriwong",
- "city": "Bangrak",
- "country_code": "TH",
- "name": "My Resort"
}{- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}ใช้เพื่อปิดหรือระงับการให้บริการโรงแรมชั่วคราว
| hotel_id required | string Hotel ID |
{- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}ใช้เพื่อเปิดโรงแรมที่ถูกปิดไปแล้ว
| hotel_id required | string Hotel ID |
{- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}ดึงข้อมูลโรงแรมทั้งหมดในระบบ
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}
]ดึงข้อมูลโรงแรมที่ฉันสร้างและสามารถจัดการได้
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}
]สร้างผู้ใช้งานหรือลงทะเบียนผู้ใช้งานจากระบบของท่านในระบบของเรา
Member Information
string | |
| external_id | string |
| external_system_id | string |
| first_name | string |
| last_name | string |
| phone_intl_code | string |
| phone_number | string |
{- "external_id": "ext-001",
- "external_system_id": "550e8400-e29b-41d4-a716-446655440002",
- "first_name": "John",
- "last_name": "Doe",
- "phone_intl_code": "66",
- "phone_number": "0812345678"
}{- "external_id": "ext-001",
- "external_system_id": "550e8400-e29b-41d4-a716-446655440002",
- "first_name": "John",
- "id": 1,
- "last_name": "Doe",
- "phone_intl_code": "66",
- "phone_number": "0812345678"
}ดึงรายการสมาชิกในระบบ (เฉพาะของผู้ใช้ที่ login)
| external_system_id | string External System ID (UUID) |
| page | integer Page number (default: 1) |
| limit | integer Items per page (default: 20, max: 100) |
{- "created_at": "string",
- "email": "string",
- "external_id": "string",
- "external_system_id": "string",
- "first_name": "string",
- "id": "string",
- "last_name": "string",
- "phone": "string",
- "phone_intl_code": "string",
- "user_id": "string"
}สร้าง Booking ใหม่สำหรับห้อง และ โรงแรมที่มีสิทธิ์
Booking details
| check_in | string |
| check_out | string |
| guest_name | string |
| hotel_id | string |
| member_id | string |
| quantity | integer |
Array of objects (dto.BookingRoomReq) | |
| special_request | string |
{- "check_in": "2025-04-10",
- "check_out": "2025-04-12",
- "guest_name": "John Doe",
- "hotel_id": "550e8400-e29b-41d4-a716-446655440002",
- "member_id": "550e8400-e29b-41d4-a716-446655440000",
- "quantity": 0,
- "rooms": [
- {
- "check_in": "string",
- "check_out": "string",
- "room_type_id": "0198e0bc-ed0c-7f37-9ccf-eac0e47e029a"
}
], - "special_request": "Pick Up at Turino Train Stn 13:00"
}{- "check_in": "string",
- "check_out": "string",
- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "member_id": "string",
- "rooms": [
- {
- "bookingID": "string",
- "checkIn": "string",
- "checkOut": "string",
- "createdAt": "string",
- "guestName": "string",
- "id": "string",
- "price": 0,
- "quantity": 0,
- "roomTypeID": "string",
- "roomTypeName": "string",
- "specialRequest": "string"
}
], - "status": "string",
- "total_price": 0
}ดึงข้อมูลการจองทั้งหมดของโรงแรมที่ผู้ใช้งานเป็นเจ้าของ
| hotel_id required | string Hotel ID |
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "check_in": "string",
- "check_out": "string",
- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "member_id": "string",
- "rooms": [
- {
- "bookingID": "string",
- "checkIn": "string",
- "checkOut": "string",
- "createdAt": "string",
- "guestName": "string",
- "id": "string",
- "price": 0,
- "quantity": 0,
- "roomTypeID": "string",
- "roomTypeName": "string",
- "specialRequest": "string"
}
], - "status": "string",
- "total_price": 0
}
]เปลี่ยนแปลงสถานะของ Booking จาก "pending" เป็น "cancelled"
| id required | integer Booking ID |
| hotel_id required | integer Hotel ID |
{- "check_in": "string",
- "check_out": "string",
- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "member_id": "string",
- "rooms": [
- {
- "bookingID": "string",
- "checkIn": "string",
- "checkOut": "string",
- "createdAt": "string",
- "guestName": "string",
- "id": "string",
- "price": 0,
- "quantity": 0,
- "roomTypeID": "string",
- "roomTypeName": "string",
- "specialRequest": "string"
}
], - "status": "string",
- "total_price": 0
}เปลี่ยนสถานะ booking เป็น หลักจากได้รับการชำระเงินเรียบร้อยแล้ว
| id required | integer Booking ID |
| hotel_id required | integer Hotel ID |
{- "check_in": "string",
- "check_out": "string",
- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "member_id": "string",
- "rooms": [
- {
- "bookingID": "string",
- "checkIn": "string",
- "checkOut": "string",
- "createdAt": "string",
- "guestName": "string",
- "id": "string",
- "price": 0,
- "quantity": 0,
- "roomTypeID": "string",
- "roomTypeName": "string",
- "specialRequest": "string"
}
], - "status": "string",
- "total_price": 0
}แสดง Booking ทั้งหมดภายในโรงแรมที่กำหนด เฉพาะผู้ที่เป็นเจ้าของโรงแรมเท่านั้น
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "check_in": "string",
- "check_out": "string",
- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "member_id": "string",
- "rooms": [
- {
- "bookingID": "string",
- "checkIn": "string",
- "checkOut": "string",
- "createdAt": "string",
- "guestName": "string",
- "id": "string",
- "price": 0,
- "quantity": 0,
- "roomTypeID": "string",
- "roomTypeName": "string",
- "specialRequest": "string"
}
], - "status": "string",
- "total_price": 0
}
]สร้าง External System แบบที่ใช้ authenticate user ผ่าน JWT
External System Input
| name required | string |
{- "name": "Hotel PMS"
}{- "created_at": "2025-08-26T12:34:56Z",
- "id": "9b9c1f8e-3f24-4f10-8a89-9a7c7a8d0e54",
- "is_active": true,
- "name": "Hotel PMS",
- "user_id": "9b9c1f8e-3f24-4f10-8a89-9a7c7a8d0e54"
}แสดงรายการ External System ทั้งหมดของผู้ใช้ที่ล็อกอิน
[- {
- "created_at": "2025-08-26T12:34:56Z",
- "id": "9b9c1f8e-3f24-4f10-8a89-9a7c7a8d0e54",
- "is_active": true,
- "name": "Hotel PMS",
- "user_id": "9b9c1f8e-3f24-4f10-8a89-9a7c7a8d0e54"
}
]ค้นหาห้องว่างทั้งหมดในโรงแรมที่กำหนด ตาม API User ที่คิวรี
Search criteria
| check_in | string |
| check_out | string |
| hotel_id | integer |
| occupancy | integer |
{- "check_in": "2026-02-01",
- "check_out": "2026-02-05",
- "hotel_id": 10,
- "occupancy": 2
}[- {
- "created_at": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "room_description": "string",
- "room_number": "string",
- "room_type": {
- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}, - "room_type_id": "string"
}
]กำหนดราคาสำหรับแต่ละชนิดห้องในโรงแรมที่พัก
| hotel_id required | string Hotel ID |
Room Pricing Data
| effective_date | string <date> |
| hotel_id | string |
| is_available | boolean |
| price | number |
| pricing_model | string |
| room_type_id | string |
{- "effective_date": "2025-01-01T00:00:00Z",
- "hotel_id": "0199282d-5625-794b-a4ba-d2dcffa22a1c",
- "is_available": true,
- "price": 1500,
- "pricing_model": "Base Price",
- "room_type_id": "0199282d-5625-794b-a4ba-d2dcffa22abb"
}{- "created_at": "string",
- "date": "string",
- "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "price": 0,
- "pricing_model": "string",
- "room_type_id": "string"
}เพิ่มราคาห้องเป็นช่วงวัน ตามโรงแรมที่กำหนด เพิ่มหลายวันต่อ 1 รายการ
| hotel_id required | string Hotel ID |
Room Pricing Data (By Range)
| end_date | string |
| hotel_id | string |
| is_available | boolean |
| price | number |
| pricing_model | string |
| room_type_id | string |
| start_date | string |
{- "end_date": "2025-09-20",
- "hotel_id": "0199282d-5625-794b-a4ba-d2dcffa22a1c",
- "is_available": true,
- "price": 1800,
- "pricing_model": "Seasonal Price",
- "room_type_id": "01992919-d772-7236-a94b-5018a45749b0",
- "start_date": "2025-09-10"
}[- {
- "created_at": "string",
- "date": "string",
- "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "price": 0,
- "pricing_model": "string",
- "room_type_id": "string"
}
]สร้างชนิดห้องใหม่ ในโรงแรมที่กำหนด
Room Type Request
| description | string |
| hotel_id required | string |
| is_active | boolean |
| room_type required | string |
{- "description": "string",
- "hotel_id": "string",
- "is_active": true,
- "room_type": "string"
}{- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}รายละเอียดห้อง ที่จะมีทั้งรูปแบบราคาและโรงแรมมาแสดงรวมกัน
| hotel_id required | string Hotel ID |
| room_id required | string Room ID |
{- "effective_date": "string",
- "hotel_name": "string",
- "price": 0,
- "pricing_model": "string",
- "room_id": "string",
- "room_number": "string",
- "room_type": "string"
}เปิดใช้ ชนิดราคาห้องอีกครั้ง ในโรงแกรมที่กำหนด
| hotel_id required | string Hotel ID |
| id required | string RoomPricing ID |
{- "created_at": "string",
- "date": "string",
- "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "price": 0,
- "pricing_model": "string",
- "room_type_id": "string"
}ระงับราคาห้องพักตามหมายเลขโรงแรมและหมายเลขราคา
| hotel_id required | string Hotel ID |
| pricing_id required | string Room Pricing ID |
{- "created_at": "string",
- "date": "string",
- "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "price": 0,
- "pricing_model": "string",
- "room_type_id": "string"
}แสดงระดับราคา ตามโรงแรมและประเภทห้อง
| hotel_id required | string Hotel ID |
| room_type_id required | string Room Type ID |
[- {
- "created_at": "string",
- "date": "string",
- "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "price": 0,
- "pricing_model": "string",
- "room_type_id": "string"
}
]แสดงชนิดห้อง ตามโรงแรมที่กำหนด
| hotel_id required | string Hotel ID |
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}
]เปิดใช้ ชนิดห้องอีกครั้ง ในโรงแกรมที่กำหนด
| hotel_id required | string Hotel ID |
| id required | string RoomType ID |
{- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}ระงับการใช้ประเภทห้องพัก ตามหมายเลขโรงแรมและหมายเลขประเภทห้อง
| hotel_id required | string Hotel ID |
| room_type_id required | string Room Type ID |
{- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}เพิ่มห้องเข้าสู่โรงแรมที่พัก ตามหมายเลขโรงแรมที่กำหนด
Room input
| is_available | boolean |
| max_occupancy | integer |
| room_number | string |
| room_type_id | string |
{- "is_available": true,
- "max_occupancy": 0,
- "room_number": "string",
- "room_type_id": "string"
}{- "created_at": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "room_description": "string",
- "room_number": "string",
- "room_type": {
- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}, - "room_type_id": "string"
}แสดงห้องแต่ละโรงแรม โดยการค้นหาตามหมายเลขโรงแรม
| hotel_id required | string Hotel ID |
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "created_at": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "id": "string",
- "is_available": true,
- "max_occupancy": 0,
- "room_description": "string",
- "room_number": "string",
- "room_type": {
- "description": "string",
- "id": "string",
- "room_type": "string"
}
}
]ระงับการใช้ห้อง ตามหมายเลขโรงแรมที่กำหนด
| hotel_id required | string Hotel ID |
| room_id required | string Room ID |
{- "created_at": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "room_description": "string",
- "room_number": "string",
- "room_type": {
- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}, - "room_type_id": "string"
}เปิดใช้ ห้องอีกครั้ง ในโรงแกรมที่กำหนด
| hotel_id required | string Hotel ID |
| room_id required | string Room ID |
{- "created_at": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_available": true,
- "room_description": "string",
- "room_number": "string",
- "room_type": {
- "created_at": "string",
- "description": "string",
- "hotel": {
- "address": "string",
- "city": "string",
- "country_code": "string",
- "created_at": "string",
- "id": "string",
- "is_active": true,
- "name": "string",
- "rating": 0,
- "user_id": "string"
}, - "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "max_occupancy": 0,
- "room_type": "string"
}, - "room_type_id": "string"
}เพิ่ม Amenity ตามรายชื่อ hotel id ที่ระบุ
Amenity input data
| name | string |
| room_type_id | string |
{- "name": "Swimming Pool",
- "room_type_id": "2b8c1fb1-8a12-4a22-99e1-bb7f0d9a9981"
}{- "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "name": "string"
}แสดง Amenities ตาม hotel_id ที่ส่งเข้ามา query
| hotel_id required | string Hotel ID |
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=100 Items per page (default: 100) |
[- {
- "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "name": "string"
}
]เพิ่มสิ่งอำนวยความสะดวกให้โรงแรมที่ระบุ
| hotel_id required | string Hotel ID |
Facility details
| is_active | boolean |
| name | string |
{- "is_active": true,
- "name": "Hair Dryer"
}{- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "name": "string"
}ดึงรายการ Facility ของโรงแรม (เฉพาะเจ้าของโรงแรมเท่านั้น)
| hotel_id required | string Hotel ID (UUID) |
| page | integer Page number (default: 1) |
| limit | integer Items per page (default: 20, max: 100) |
{- "data": [
- {
- "created_at": "string",
- "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "name": "string"
}
], - "pagination": {
- "limit": 20,
- "page": 1,
- "total": 5,
- "total_page": 1
}
}แสดงรายการภาพสิ่งอำนวยความสะดวกของโรงแรม
| hotel_id required | string Hotel UUID |
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "created_at": "string",
- "host_prefix": "string",
- "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "object_path": "string"
}
]อัพโหลดภาพสิ่งอำนวยความสะดวกในโรงแรม เป็น .jpg .jpeg .png โดยมีขนาดไม่เกิน 2MB
| hotel_id required | string Hotel UUID |
| file required | string <binary> อัพโหลดไฟล์เฉพาะ .png .jpg หรือ .jpeg |
{- "hotel_id": "019b9bc0-5a6a-7153-b62d-b11a49ee81f8",
- "image_id": "019c1a22-7b44-7f12-a0b9-3dca12345678",
- "path": "/pms-images/019b9bc0/019c1a22.jpg"
}อัพโหลดรูปภาพรวม หรือ รูปทั่วไปของสถานประกอบการ เป็น .jpg .jpeg .png โดยมีขนาดไม่เกิน 2MB
| hotel_id required | string Hotel UUID |
| file required | string <binary> อัพโหลดไฟล์เฉพาะ .png .jpg หรือ .jpeg |
{- "hotel_id": "019b9bc0-5a6a-7153-b62d-b11a49ee81f8",
- "image_id": "019c1a22-7b44-7f12-a0b9-3dca12345678",
- "path": "/pms-images/019b9bc0/019c1a22.jpg"
}อัพโหลดภาพของแต่ละชนิดห้อง เป็น .jpg .jpeg .png โดยมีขนาดไม่เกิน 2MB
| hotel_id required | string Hotel UUID |
| id required | string Room Type UUID |
| file required | string <binary> อัพโหลดไฟล์เฉพาะ .png .jpg หรือ .jpeg |
{- "hotel_id": "019b9bc0-5a6a-7153-b62d-b11a49ee81f8",
- "image_id": "019c1a22-7b44-7f12-a0b9-3dca12345678",
- "path": "/pms-images/019b9bc0/019c1a22.jpg",
- "room_type_id": "019b9bc0-5a6a-7153-b62d-b11a49ee81f8"
}แสดงรายการภาพของชนิดห้อง
| hotel_id required | string Hotel UUID |
| id required | string Room Type UUID |
| page | integer Example: page=1 Page number (default: 1) |
| limit | integer Example: limit=20 Items per page (default: 20) |
[- {
- "created_at": "string",
- "host_prefix": "string",
- "hotel_id": "string",
- "id": "string",
- "is_active": true,
- "object_path": "string",
- "room_type_id": "string"
}
]ค้นหาห้องว่างและแสดง แต่ละมาตรฐานราคา สำหรับโรงแรมที่พักที่กำหนด
| hotel_id required | string Example: hotel_id=0199282d-5625-794b-a4ba-d2dcffa22a1c Hotel ID |
| start_date required | string Example: start_date=2025-09-09 Start date in YYYY-MM-DD format, default today |
| end_date required | string Example: end_date=2025-09-12 End date in YYYY-MM-DD format, default same as start_date |
| guests required | integer Example: guests=2 Number of guests (compared with room_type.max_occupancy) |
[- {
- "count": 5,
- "price": 1500,
- "pricing_model": "standard",
- "room_type": "Deluxe"
}
]ตรวจสอบสิทธิ์ และ คืน token สำหรับการทำงาน
User credentials
| password | string |
| username | string |
{- "password": "123456",
- "username": "john"
}{- "token": "eyJhbGciOiJI..."
}ใช้รีเฟรสโทเค็นส่งเข้ามาเพื่อจะรับ access token อันใหม่ไป ซึ่งมีเวลา 1 สัปดาห์
Refresh token payload
| refresh_token | string |
{- "refresh_token": "8f14e45f-ea9f-4c72-abc1-92c98f2398aa"
}{- "property1": "string",
- "property2": "string"
}