This endpoint is used to retrieve price information of a given booking.
Method | URI | Headers |
---|---|---|
POST | /api/p/booking/price | Authorization: Bearer <token> Accept: application/json |
None
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) |
None
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
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"
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}
Reason invalid form data
Example response
{
"message": "Wrong {data-form-name}."
}