v3/Booking API's

Get Lock Data

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

Headers

NameTypeRequiredDescription
apikeystringYesAPI Key

Request Parameters

NameTypeRequiredDescription
referenceIdstringYesThe unique identifier for the booking.

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 lock data objects.

The data array contains objects with the following fields:

NameTypeDescription
lockDatastringThe data required by the lock SDK to unlock.
lockIdstringThe unique identifier for the lock.
lockMacstringThe MAC address of the lock.
lockNamestringThe display name of the lock.
lockLocationTypestringType of lock location (e.g., "door" or "cabinet").
keyIdnumberThe identifier for the key associated with this lock.
roomNumberstringThe room number (only for door locks).
bedNumberstringThe bed number (only for cabinet locks).
siteNamestringThe 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."
}