Detailed Information

This endpoint is used to fetch the detailed information of a given booking. The information includes booking ID, check-in and check-out dates, pricing, customer, payment, associated room, etc.

Endpoint

Method URI Headers
GET /api/bookings/{booking} Authorization: Bearer <token>
Accept: application/json

Route Params

Param Description Type Required
{booking} The ID of a given booking Integer Yes

Request & Response Examples

Below are some example responses from the API:

Successful Response

200

Example request

curl \
  --request GET \
  --url https://api.luxstay.com/api/bookings/8260 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
  --header 'Time-Zone: Europe/Busingen'
1
2
3
4
5
6

Example response

{
    "data": {
        "booking_id": 8173,
        "booking_code": "M5UFOG",
        "status": "Cancelled",
        "check_in": "2018-10-17T00:00:00+00:00",
        "check_out": "2018-10-17T00:00:00+00:00",
        "number_of_guest": 3,
        "booking_date": "2018-10-10T09:42:43+00:00",
        "last_action": "2018-10-18T00:00:05+00:00",
        "price": {
            "currency_code": "VND",
            "total": 860850
        },
        "customer": {
            "first_name": "Tú",
            "last_name": "Lê",
            "gender": "Female",
            "email": "tutu280495@gmail.com",
            "phone": "+841682728365"
        },
        "payment": {
            "currency_code": "VND",
            "type": "Manual Bank Transfer",
            "amount": 860850
        },
        "room": {
            "name": "Le Cadre -BALCONY FLAT, 30s walk to"
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Error Response

401

Reason invalid access token

Example response

{
    "message": "Unauthenticated."
}
1
2
3

403

Reason unauthorized to access booking

Example response

{
    "message": "You are not allowed to access this booking."
}
1
2
3

404

Reason cannot find the given booking

Example response

{
    "message": "Cannot find the given booking"
}
1
2
3
Last Updated: 11/18/2018, 9:11:26 AM