This API endpoint allows you to update an existing booking.
Method
PUT
URL
https://api.mosler.in/api/v3/booking/update
https://api.mosler.in/api/v3/booking/update/:referenceId
Event Types
|
| 1 | update | Update the booking details and regenerate keys accordingly. |
| 2 | check_in | Generate Ekey for existing booking. |
| 3 | check_out | Freeze Ekey for existing booking. |
| 4 | cancel | Delete Ekeys for existing booking. |
| 5 | room_move | Generate Ekey for new room and delete Ekey for old room. |
| 6 | date_change | Update the booking dates. |
Request Body
|
bookingStartDate | string | No | Start date of the booking. Must be provided in ISO 8601 format. |
bookingEndDate | string | No | End date of the booking. Must be provided in ISO 8601 format. |
roomNumber | string | No | The room number for the booking. |
customerEmail | string | No | The email address of the customer. |
bedNumber | string | No | The bed number for the booking. |
referenceId | string | Yes | The unique identifier for the booking. |
customerName | string | No | The name of the customer. |
eventType | string | No | The event type of the update query. Defaults to update. |
Request Example
fetch('https://api.mosler.in/api/v3/booking/update', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
apikey: 'YOUR_API_KEY',
},
body: JSON.stringify({
bookingStartDate: '2025-07-18T14:48:00.000Z',
bookingEndDate: '2025-11-30T14:48:00.000Z',
roomNumber: '101',
customerEmail: 'johndoe2@gmail.com',
bedNumber: 'a',
referenceId: 'ABCDEF-123',
customerName: 'John Doe',
eventType: 'update',
}),
});
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 | object | The data returned by the API. |
Response Example
{
"message": "Successfully updated Booking.",
"code": 7001,
"error": false,
"data": {
"customerEmail": "johndoe2@gmail.com",
"keyId": 118483660,
"lockId": "123456",
"referenceId": "ABCDEF-123",
"moslerEmail": "",
"additionalLocksWithKey": [
{
"lockId": "547353",
"keyId": 118483664
},
{
"lockId": "463634",
"keyId": 118483666
}
]
}
}