This API endpoint allows you to retrieve lock data for a specific booking.
Method
GET
URL
https://api.mosler.in/api/v3/booking/getLockData/:referenceId
Request Parameters
|
referenceId | string | Yes | The unique identifier for the booking. |
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 lock data objects. |
The data array contains objects with the following fields:
|
lockData | string | The data required by the lock SDK to unlock. |
lockId | string | The unique identifier for the lock. |
lockMac | string | The MAC address of the lock. |
lockName | string | The display name of the lock. |
lockLocationType | string | Type of lock location (e.g., "door" or "cabinet"). |
keyId | number | The identifier for the key associated with this lock. |
roomNumber | string | The room number (only for door locks). |
bedNumber | string | The bed number (only for cabinet locks). |
siteName | string | The name of the site where the lock is located. |
Response Example
{
"data": [
{
"lockData": "encrypted_lock_data_string",
"lockId": "123456",
"lockMac": "AA:BB:CC:DD:EE:FF",
"lockName": "Room 101 Door",
"lockLocationType": "door",
"keyId": 118483626,
"roomNumber": "101",
"bedNumber": null,
"siteName": "Hotel Main Building"
},
{
"lockData": "encrypted_lock_data_string",
"lockId": "789012",
"lockMac": "FF:EE:DD:CC:BB:AA",
"lockName": "Bed A Cabinet",
"lockLocationType": "cabinet",
"keyId": 118483628,
"roomNumber": null,
"bedNumber": "A",
"siteName": "Hotel Main Building"
}
],
"error": false,
"code": 7005,
"message": "Successfully fetched Ekeys for Booking."
}