Get Ekeys (Legacy v2)
Deprecated — use the v3 endpoint instead. New integrations should use
GET /api/v3/booking/getLockData/:referenceIdwhich returns the same data with additional fields (lockName,lockLocationType).
This API endpoint allows you to fetch Ekeys for an existing booking.
Method
GET
URL
https://api.mosler.in/api/v2/booking/getLockData/:referenceId
Headers
| Name | Type | Required | Description |
|---|---|---|---|
apikey | string | Yes | API Key |
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
referenceId | string | Yes | The unique identifier for the booking. |
Response Parameters
| Name | Type | Description |
|---|---|---|
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 objects containing the data returned by the API. |
Each object in the data array contains the following fields:
| Name | Type | Description |
|---|---|---|
lockData | string | Lock data, used to operate lock. |
lockMac | string | MAC address of the lock. |
lockId | string | The unique identifier of the lock. |
lockLocationType | string | The type of lock location. "door" or "cabinet" |
roomNumber | string or null | The room number. null when lockLocationType == "cabinet" |
bedNumber | string or null | The bed number. null when lockLocationType == "door" |
siteName | string | The site name. |
keyId | number | The unique identifier of the e-key. |