This endpoint is used to retrieve pricing and terms of a given room. The pricing attributes include the currency code, basic pricing (nightly price, weekend price), long-term pricing (monthly price), additional costs (additional guests fee, cleaning fee and security fee), the number of standard guests, the maximum and minimum days of staying. The term attributes include the cancellation policy (Flexible or Moderate), check-in/check-out time and the booking policy (Instant Book or Request To Book).
Method | URI | Headers |
---|---|---|
GET | /api/rooms/{room}/pricing | Authorization: Bearer <token> Accept: application/json |
Param | Description | Type | Required |
---|---|---|---|
{room} | The ID of a given room. | Integer | Yes |
Example request
curl \
--request GET \
--url https://api.luxstay.com/api/rooms/10000/pricing \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example response
{
"data": {
"room_id": 10000,
"nightly_price": 650000,
"monthly_price": 550000,
"weekend_price": 650000,
"cleaning_fee": 250000,
"security_fee": 150000,
"additional_guests_fee": 200000,
"currency_code": "VND",
"standard_guests": 5,
"cancellation_policy": "Flexible",
"booking_type": "instant_book",
"checkin_time": "2:0 PM",
"checkout_time": "12:00 PM",
"minimum_stay": "5",
"maximum_stay": "12"
}
}
Reason invalid access token
Example response
{
"message": "Unauthenticated."
}
Reason cannot access the given room
Example response
{
"message": "You are not allowed to access or change information associated with this room."
}
Reason cannot find the given room
Example response
{
"message": "Cannot find the given room"
}