The booking API allow you to create new Bookings in the Roomonitor platform.
You have two options for booking:
Integration of bookings for Door opening control with the new Roomonitor SmartLocks, allow you control the open keys for Roomonitor controlled SmartLocks within the Guest Assistant Mobile Application.
Integration for Noise Alerting across the Roomonitor HUB Noice Control device.
These before methods requires an authenticated Auth Token and specify your apartments or rooms with the Roomonitor RoomId.
You would need to call to the Auth and getRooms API.
This endpoint generates bookings for SmartLock door openings control.
The bookings imported with this method can be displayed and manage manually inside the booking section in Roomonitor backend web.
When you import import one booking the Roomonitor platform sends an email and SMS message to the main email account and phone number specified in the booking (the guest email and phone) with the instructions for load in the Guest Assistant Mobile Application, the booking and open keys for the doors associated to the reserved room.
API Server: https://bookings.roomonitor.com
Endpoint: /v1/import_bookings/{userId}
HTTP Method:
POST
Authenticated: true
Parameters:
Auth headers:
Body Payload:
Bookings JSON Array in the body payload
[
{
firstname:[string],
lastname: [string],
prefix: [string],
telephone: [string],
email: [string],
room:[string],
checkin: [string],
checkout: [string],
customerReference: [string]
}
]
Note:
YYYY-MM-DD
.Example:
[
{
"firstname":"Jose",
"lastname": "Garcia González",
"prefix": "34",
"telephone": "666555444",
"email": "[email protected]",
"room": "gNY7H9ND3KMzbsFAQ",
"checkin": "2018-02-10",
"checkout": "2018-02-12",
"customerReference": "666555444"
},
...
]
Code: 200
Content:
> JavaScript array with importation result
Code: 401
Response:
{ status: 401, message: 'Unauthorized' }
Code: 400
Response:
{ status: 400, message: "No customer found with given customer ID" }
Code: 400
Response:
{ status: 400, message: "No bookings to update: empty request body" }
Code: 400
Response:
{ status: 400, message: "No customer ID" }
This endpoint imports the daily bookings of the associated rooms. This information is used for to generate alerting calls and SMS to the guests phone at first level, and to the NightAgent or configurated Room Alerting Phone Number at second level.
API Server: https://bookings.roomonitor.com
Endpoint: /v2/import_bookings/{userId}
HTTP Method:
POST
Authenticated: true
Parameters:
Auth headers:
Body Payload when using roomId:
Bookings JSON Array in the body payload
[
{
id: [string],
roomId: [string],
checkin: [timestamp],
checkout: [timestamp],
guestPhone: [string],
guestName: [string],
lang: [string]
}
]
Body Payload when using customRoomId :
Bookings JSON Array in the body payload
[
{
customRoomId: [string],
idBooking: [string],
pm: [string],
bookingType: [string],
checkin: [timestamp],
checkout: [timestamp],
guestPhone: [string],
guestName: [string],
lang: [string]
updatedBooking: [boolean]
}
]
Note:
+<prefix><phone number>
, and the phone number must be without spaces.Example with roomId:
[
{
"id": "15566",
"roomId": "ejhWzDtHadR4MYLJ",
"checkin": 1518865200000,
"checkout": 1518865200000,
"guestPhone": "+34666555666",
"guestName": "LOUIS MCARTHUR",
"lang": "EN"
},
{
"id": "15567",
"roomId": "f3akp9P8WZtyGKbdhj",
"checkin": 1673446772000,
"checkout": 1673792372000,
"guestPhone": "+34666555666, +34656656656",
"guestName": "JOHAN MCMANAMAN",
"lang": "ES"
}
]
Example with customRoomId, insert and update: Insert
[
{
"customRoomId": "15568",
"idBooking": "344556621",
"pm": "zapier",
"bookingType": "Booked",
"checkin": 1518865200000,
"checkout": 1518865200000,
"guestPhone": "+34666555666",
"guestName": "LOUIS MCARTHUR",
"lang": "EN",
"updatedBooking": false, // you can skip it
}
]
Update
[
{
"customRoomId": "15568",
"idBooking": "344556621",
"pm": "zapier",
"bookingType": "Cancel",
"guestName": "PERLIERE PETILLOT",
"lang": "EN",
"updatedBooking": true,
}
]
Code: 200
Content:
[
"[SUCCESS][Booking ID: 15566] Booking saved successfuly",
"[SUCCESS][Booking ID: 15567] Booking saved successfuly"
]
If some of the bookings failed at insert you’ll be noticed in the response content with the success bookings.
Code: 401
Response:
{ status: 401, message: 'Unauthorized' }
Code: 400
Response:
{ status: 400, message: "No customer found with given customer ID" }
Code: 400
Response:
{ status: 400, message: "No bookings to update: empty request body" }
Code: 400
Response:
{ status: 400, message: "No customer ID" }