Booking Price

This endpoint is used to retrieve price information of a given booking.

Endpoint

Method URI Headers
POST /api/p/booking/price Authorization: Bearer <token>
Accept: application/json

URL Params

None
1

Data Params

Param Description Type Required Notes
partner_room_id Room id of a partner. String Yes This form data parameter must have value
number_of_guests Number of guests. String Yes This form data parameter must have value
checkin Check in time. String Yes This form data parameter must have value
checkout Checkout time. String Yes This form data parameter must have value and greater than checkin
booking_origin Booking from web or mobile. String Yes This form data parameter can be "web" or "mobile"
used_credit Luxstay credit amount you want to use. String No This form data parameter is optional (default value is 0)

Route Params

None
1

Request & Response Examples

Successful Response

200

Example request

curl \
  --request POST \
  --url https://api-sandbox.luxstay.com/api/booking/price \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>'
  --form partner_room_id=123456 \
  --form number_of_guests=4 \
  --form checkin=16-06-2019 \
  --form checkout=18-06-2019 \
  --form booking_origin=web
1
2
3
4
5
6
7
8
9
10

Example response

{
    "data": {
        "origin": {
            "roomId": 10007,
            "checkin": "2019-06-16",
            "checkout": "2019-06-18",
            "guestCount": 4,
            "night": 693000,
            "month": 18018000,
            "weekend": 924000,
            "cleaning": 231000,
            "security": 0,
            "currency": "VND",
            "usedCredit": 0,
            "usedCreditUsd": 0,
            "inviteAmount": 0,
            "inviteAmountUsd": 0,
            "firstInviteAmount": 0,
            "hasFirstInvite": false,
            "couponCode": "",
            "couponAmount": 0,
            "totalNights": 2,
            "totalMonths": 0,
            "remainingNightCount": 0,
            "remainingNightTotalPrice": 0,
            "monthTotalPrice": 0,
            "totalBasePricePlain": 1617000,
            "total": 2956800,
            "subtotal": 2956800,
            "totalBasePrice": {
                "amount": 1617000,
                "formatted_amount": "1,617,000₫",
                "currency": "VND"
            },
            "basePriceBreakdown": [
                {
                    "date": "16/06/2019",
                    "amount": 924000,
                    "formatted_amount": "924,000₫",
                    "currency": "VND"
                },
                {
                    "date": "17/06/2019",
                    "amount": 693000,
                    "formatted_amount": "693,000₫",
                    "currency": "VND"
                }
            ],
            "normalNightList": {
                "2019-06-16": {
                    "price": 924000,
                    "currency_code": "VND"
                },
                "2019-06-17": {
                    "price": 693000,
                    "currency_code": "VND"
                }
            },
            "normalNightCount": 2,
            "normalNightTotalPrice": 0,
            "specialNightList": [],
            "specialNightListOriginal": [],
            "specialNightCount": 0,
            "specialNightTotalPrice": 0,
            "weekendCount": 1,
            "weekendTotalPrice": 924000,
            "nonweekendCount": 1,
            "nonweekendTotalPrice": 693000,
            "averagePrice": 808500,
            "additionalGuest": 1108800,
            "additionalGuestCount": 2,
            "hostFee": 0,
            "serviceFee": 0,
            "totalFee": 231000,
            "available": true,
            "discountBaseTotal": 2956800,
            "discountBaseTotalOriginal": 2956800,
            "discountAmount": 0,
            "discountPercentage": 0,
            "promotionPercentage": 0,
            "promotionHostPercentage": 0,
            "promotionLuxstayPercentage": 0,
            "promotionAmount": 0,
            "promotionAmountHost": 0,
            "promotionLuxstayAmount": 0,
            "promotionIds": [],
            "formatted": {
                "night": "693,000₫",
                "month": "18,018,000₫",
                "weekend": "924,000₫",
                "cleaning": "231,000₫",
                "security": "0₫",
                "total": "2,956,800₫",
                "subtotal": "2,956,800₫",
                "totalBasePricePlain": "1,617,000₫",
                "taxAmount": "0₫",
                "totalIncludeTax": "2,956,800₫",
                "averagePrice": "808,500₫",
                "additionalGuest": "1,108,800₫",
                "hostFee": "0₫",
                "serviceFee": "0₫",
                "totalFee": "231,000₫",
                "monthTotalPrice": "0₫",
                "weekendTotalPrice": "924,000₫",
                "nonweekendTotalPrice": "693,000₫",
                "normalNightTotalPrice": "0₫",
                "specialNightTotalPrice": "0₫",
                "couponAmount": "0₫",
                "usedCredit": "0₫",
                "inviteAmount": "0₫",
                "promotionAmount": "0₫",
                "promotionAmountHost": "0₫",
                "promotionLuxstayAmount": "0₫",
                "totalWithoutPromotion": "2,956,800₫",
                "discountAmount": "0₫"
            },
            "taxAmount": 0,
            "totalIncludeTax": 2956800,
            "totalWithoutPromotion": 2956800
        },
        "encoded": "{\"roomId\":10007,\"checkin\":\"2019-06-16\",\"checkout\":\"2019-06-18\",\"guestCount\":4,\"night\":693000,\"month\":18018000,\"weekend\":924000,\"cleaning\":231000,\"security\":0,\"currency\":\"VND\",\"usedCredit\":0,\"usedCreditUsd\":0,\"inviteAmount\":0,\"inviteAmountUsd\":0,\"firstInviteAmount\":0,\"hasFirstInvite\":false,\"couponCode\":\"\",\"couponAmount\":0,\"totalNights\":2,\"totalMonths\":0,\"remainingNightCount\":0,\"remainingNightTotalPrice\":0,\"monthTotalPrice\":0,\"totalBasePricePlain\":1617000,\"total\":2956800,\"subtotal\":2956800,\"totalBasePrice\":{\"amount\":1617000,\"formatted_amount\":\"1,617,000\\u20ab\",\"currency\":\"VND\"},\"basePriceBreakdown\":[{\"date\":\"16\\/06\\/2019\",\"amount\":924000,\"formatted_amount\":\"924,000\\u20ab\",\"currency\":\"VND\"},{\"date\":\"17\\/06\\/2019\",\"amount\":693000,\"formatted_amount\":\"693,000\\u20ab\",\"currency\":\"VND\"}],\"normalNightList\":{\"2019-06-16\":{\"price\":924000,\"currency_code\":\"VND\"},\"2019-06-17\":{\"price\":693000,\"currency_code\":\"VND\"}},\"normalNightCount\":2,\"normalNightTotalPrice\":0,\"specialNightList\":[],\"specialNightListOriginal\":[],\"specialNightCount\":0,\"specialNightTotalPrice\":0,\"weekendCount\":1,\"weekendTotalPrice\":924000,\"nonweekendCount\":1,\"nonweekendTotalPrice\":693000,\"averagePrice\":808500,\"additionalGuest\":1108800,\"additionalGuestCount\":2,\"hostFee\":0,\"serviceFee\":0,\"totalFee\":231000,\"available\":true,\"discountBaseTotal\":2956800,\"discountBaseTotalOriginal\":2956800,\"discountAmount\":0,\"discountPercentage\":0,\"promotionPercentage\":0,\"promotionHostPercentage\":0,\"promotionLuxstayPercentage\":0,\"promotionAmount\":0,\"promotionAmountHost\":0,\"promotionLuxstayAmount\":0,\"promotionIds\":[],\"formatted\":{\"night\":\"693,000\\u20ab\",\"month\":\"18,018,000\\u20ab\",\"weekend\":\"924,000\\u20ab\",\"cleaning\":\"231,000\\u20ab\",\"security\":\"0\\u20ab\",\"total\":\"2,956,800\\u20ab\",\"subtotal\":\"2,956,800\\u20ab\",\"totalBasePricePlain\":\"1,617,000\\u20ab\",\"taxAmount\":\"0\\u20ab\",\"totalIncludeTax\":\"2,956,800\\u20ab\",\"averagePrice\":\"808,500\\u20ab\",\"additionalGuest\":\"1,108,800\\u20ab\",\"hostFee\":\"0\\u20ab\",\"serviceFee\":\"0\\u20ab\",\"totalFee\":\"231,000\\u20ab\",\"monthTotalPrice\":\"0\\u20ab\",\"weekendTotalPrice\":\"924,000\\u20ab\",\"nonweekendTotalPrice\":\"693,000\\u20ab\",\"normalNightTotalPrice\":\"0\\u20ab\",\"specialNightTotalPrice\":\"0\\u20ab\",\"couponAmount\":\"0\\u20ab\",\"usedCredit\":\"0\\u20ab\",\"inviteAmount\":\"0\\u20ab\",\"promotionAmount\":\"0\\u20ab\",\"promotionAmountHost\":\"0\\u20ab\",\"promotionLuxstayAmount\":\"0\\u20ab\",\"totalWithoutPromotion\":\"2,956,800\\u20ab\",\"discountAmount\":\"0\\u20ab\"},\"taxAmount\":0,\"totalIncludeTax\":2956800,\"totalWithoutPromotion\":2956800}"
    },
    "code": 200,
    "request_id": "dba6bcc8-9916-4054-9a3c-289b8faf6aa9"
}
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

Error Response

401

Reason invalid access token

Example response

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

422

Reason invalid form data

Example response

{
    "message": "Wrong {data-form-name}."
}
1
2
3
Last Updated: 6/13/2019, 9:03:31 AM