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