v3/Booking API's

Get Upcoming Bookings

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

Headers

NameTypeRequiredDescription
apikeystringYesAPI Key

Query Parameters

NameTypeRequiredDescription
pageNonumberNoThe page number to fetch. Default is 1.
pageSizenumberNoThe number of items per page. Default is 10.

Response Parameters

NameTypeDescription
messagestringThe message returned by the API.
codenumberThe status code returned by the API.
errorbooleanIndicates if an error occurred during the API call.
dataarrayAn array of booking objects.

Each object in the data array contains the following fields:

NameTypeDescription
referenceIdstringThe unique reference ID for the booking.
bookingStartDatestringCheck-in date and time (ISO 8601, UTC).
bookingEndDatestringCheck-out date and time (ISO 8601, UTC).
roomNumberstringThe room number for the booking.
bedNumberstringThe bed identifier (hostels / shared rooms).
customerNamestringThe full name of the guest.
customerEmailstringThe guest's email address.
statusstringBooking status — always "active" in this list.
siteIdstringThe site ObjectId.
accessTypearrayAccess 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"]
        }
    ]
}