Get Booking by Id
GET
/api/v1/bookings/{booking_id}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/api/v1/bookings/1?page=&row=&search=&sort_by=&order='
Response Response Example
{
"status_code": 200,
"message": "Get Booking by Id sucess",
"data": {
"id": 1,
"created_at": "2025-03-24T13:50:21.521Z",
"updated_at": "2025-08-11T08:49:17.165Z",
"check_in_date": "2025-05-29",
"check_out_date": "2025-06-21",
"total_price": 389.45,
"status": {
"key": 0,
"value": "waiting_for_payment"
},
"user": {
"id": 1,
"created_at": "2025-03-25T08:49:17.165Z",
"updated_at": "2025-09-12T08:49:17.165Z",
"name": "Tamara Bradtke",
"email": "Ebony91@hotmail.com",
"phone_number": "08123456789"
},
"hotel": {
"id": 1,
"created_at": "2025-03-25T03:03:04.408Z",
"updated_at": "2024-06-13T08:49:17.165Z",
"name": "Sabrina Schmeler-Schaden",
"location": "veniam",
"rating": 5
},
"room": {
"id": 1,
"created_at": "2025-03-25T02:04:25.070Z",
"updated_at": "2025-03-01T08:49:17.165Z",
"name": "Darryl Huel",
"price_per_night": 651.19,
"max_guests": 2,
"available_rooms_per_day": 20
},
"status_histories": [
{
"id": 1,
"created_at": "2025-03-24T23:51:24.183Z",
"updated_at": "2025-06-18",
"status": {
"key": 0,
"value": "waiting_for_payment"
}
}
]
}
}
Request
Path Params
booking_id
string
required
Example:
1
Query Params
page
number
optional
Default:
1
row
number
optional
Default:
10
search
string
optional
sort_by
enum<string>
optional
Allowed values:
created_atupdated_at
Default:
updated_at
order
enum<string>
optional
Allowed values:
ascdesc
Default:
desc