Booking Hotels
  1. Rooms
Booking Hotels
  • About API
  • Auth
    • Register
      POST
    • Login by Password
      POST
    • Login by Access Token
      GET
    • Renew Access Token
      GET
    • Update Password
      PATCH
    • Update Profile
      PATCH
    • Request Forgot Password
      POST
    • Verify Forgot Password
      POST
    • Confirm Forgot Password
      PATCH
    • Logout
      DELETE
  • Hotels
    • Get Hotel List
      GET
    • Get Hotel by Id
      GET
    • Create Hotel
      POST
    • Update Hotel by Id
      PATCH
    • Delete Hotel by Id
      DELETE
  • Rooms
    • Get Room List
      GET
    • Get Room by Id
      GET
    • Create Room
      POST
    • Update Room by Id
      PATCH
    • Delete Room by Id
      DELETE
  • Bookings
    • Actions
      • Pay Booking by Id
      • Cancel Booking by Id
      • Check In Booking by Id
    • Get Booking List
      GET
    • Get Booking by Id
      GET
    • Create Booking
      POST
  • Check Service Status
    GET
  1. Rooms

Get Room by Id

GET
/api/v1/rooms/{room_id}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/api/v1/rooms/1'
Response Response Example
{
    "status_code": 200,
    "message": "Get Room by Id Success.",
    "data": {
        "id": 1,
        "created_at": "2025-03-25T03:43:55.070Z",
        "updated_at": "2025-03-28T03:43:55.070Z",
        "name": "Teresa Fisher",
        "price_per_night": 355.45,
        "max_guests": 2,
        "available_rooms_per_day": 10,
        "hotel": {
            "id": 1,
            "created_at": "2025-03-24T11:06:36.270Z",
            "updated_at": "2024-08-24T11:06:36.270Z",
            "name": "Genevieve Stroman",
            "location": "aute eu sint minim",
            "rating": 5
        }
    }
}

Request

Path Params
room_id
string 
required
Example:
1

Responses

🟢200Success
application/json
Body
status_code
number 
required
message
string 
required
data
object 
required
id
number 
required
created_at
string 
required
updated_at
string 
required
name
string 
required
price_per_night
number 
required
max_guests
number 
required
available_rooms_per_day
number 
required
hotel
object 
required
Previous
Get Room List
Next
Create Room
Built with