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

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

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
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

Responses

🟢200Success
application/json
Body
status_code
number 
required
message
string 
required
data
object 
required
items
array [object {11}] 
required
meta
object 
required
Previous
Get Booking List
Next
Create Booking
Built with