Booking Hotels
  1. Hotels
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. Hotels

Get Hotel List

GET
/api/v1/hotels
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/api/v1/hotels?page&row&search&sort_by&order&location'
Response Response Example
{
    "status_code": 200,
    "message": "Get Hotel List Success.",
    "data": {
        "items": [
            {
                "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,
                "owner": {
                    "id": 1,
                    "created_at": "2025-03-24T14:38:44.531Z",
                    "updated_at": "2024-04-24T14:38:44.531Z",
                    "name": "Willie Jaskolski V",
                    "email": "Kale_Becker44@hotmail.com",
                    "phone_number": "087978362121"
                }
            },
            {
                "id": 2,
                "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,
                "owner": {
                    "id": 1,
                    "created_at": "2025-03-24T14:38:44.531Z",
                    "updated_at": "2024-04-24T14:38:44.531Z",
                    "name": "Willie Jaskolski V",
                    "email": "Kale_Becker44@hotmail.com",
                    "phone_number": "087978362121"
                }
            },
            {
                "id": 3,
                "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,
                "owner": {
                    "id": 1,
                    "created_at": "2025-03-24T14:38:44.531Z",
                    "updated_at": "2024-04-24T14:38:44.531Z",
                    "name": "Willie Jaskolski V",
                    "email": "Kale_Becker44@hotmail.com",
                    "phone_number": "087978362121"
                }
            }
        ],
        "meta": {
            "total_all_data": 3,
            "total_view": 3,
            "max_view": 10,
            "current_page": 1,
            "total_page": 1
        }
    }
}

Request

Query Params
page
number 
optional
Default:
1
row
number 
optional
Default:
10
search
string 
optional
sort_by
enum<string> 
optional
Allowed values:
nameratingcreated_atupdated_at
Default:
rating
order
enum<string> 
optional
Allowed values:
ascdesc
Default:
desc
location
string 
optional

Responses

🟢200Success
application/json
Body
status_code
number 
required
message
string 
required
data
object 
required
items
array [object {7}] 
required
meta
object (Pagination Meta) 
required
total_all_data
integer 
required
total_view
integer 
required
max_view
integer 
required
current_page
integer 
required
total_page
integer 
required
Previous
Logout
Next
Get Hotel by Id
Built with