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
Request Body
|
referenceId | string | Yes | The unique identifier for the booking. |
locationType | string | Yes | The 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
|
message | string | The message returned by the API. |
error | boolean | Indicates if an error occurred during the API call. |
data | object | The 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"
}
}