This API endpoint returns all active bookings whose check-in date is in the future.
Method
GET
URL
https://api.mosler.in/api/v3/booking/upcoming
Query Parameters
|
pageNo | number | No | The page number to fetch. Default is 1. |
pageSize | number | No | The number of items per page. Default is 10. |
Response Parameters
|
message | string | The message returned by the API. |
code | number | The status code returned by the API. |
error | boolean | Indicates if an error occurred during the API call. |
data | array | An array of booking objects. |
Each object in the data array contains the following fields:
|
referenceId | string | The unique reference ID for the booking. |
bookingStartDate | string | Check-in date and time (ISO 8601, UTC). |
bookingEndDate | string | Check-out date and time (ISO 8601, UTC). |
roomNumber | string | The room number for the booking. |
bedNumber | string | The bed identifier (hostels / shared rooms). |
customerName | string | The full name of the guest. |
customerEmail | string | The guest's email address. |
status | string | Booking status — always "active" in this list. |
siteId | string | The site ObjectId. |
accessType | array | Access credential types granted (e.g. EKEY). |
Response Example
{
"message": "Successfully fetched Bookings.",
"code": 7003,
"error": false,
"data": [
{
"referenceId": "RES-20250718-001",
"bookingStartDate": "2025-07-18T14:00:00.000Z",
"bookingEndDate": "2025-07-20T11:00:00.000Z",
"roomNumber": "101",
"bedNumber": null,
"customerName": "Jane Smith",
"customerEmail": "jane@example.com",
"status": "active",
"siteId": "6530f9dce0c1bd73ded0d1be",
"accessType": ["EKEY"]
},
{
"referenceId": "RES-20250719-004",
"bookingStartDate": "2025-07-19T15:00:00.000Z",
"bookingEndDate": "2025-07-22T10:00:00.000Z",
"roomNumber": "205",
"bedNumber": null,
"customerName": "Rahul Sharma",
"customerEmail": "rahul@example.com",
"status": "active",
"siteId": "6530f9dce0c1bd73ded0d1be",
"accessType": ["EKEY"]
}
]
}