v3/Booking API's

Remote Unlock Device

This API endpoint allows you to remotely unlock a device associated with an active booking.

Method

POST

URL

https://api.mosler.in/api/v3/device/remote-unlock

Headers

NameTypeRequiredDescription
apikeystringYesAPI Key

Request Body

NameTypeRequiredDescription
referenceIdstringYesThe unique identifier for the booking.
locationTypestringYesThe type of device location to unlock. Valid values: "room", "bed", "building"

Request Example

fetch('https://api.mosler.in/api/v3/device/remote-unlock', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        apikey: 'YOUR_API_KEY',
    },
    body: JSON.stringify({
        referenceId: 'ABCDEF-123',
        locationType: 'room',
    }),
});

Response Parameters

NameTypeDescription
messagestringThe message returned by the API.
errorbooleanIndicates if an error occurred during the API call.
dataobjectThe data returned by the API.

Response Example

{
    "message": "Device unlocked successfully",
    "error": false,
    "data": {
        "deviceId": "64f5fc4aad93a7fadbf013d7",
        "deviceName": "Room 101 Door Lock",
        "unlockTime": "2025-09-10T10:30:00.000Z"
    }
}