Webhooks are a way for an application to send real-time data to another system or application whenever certain events occur. They enable communication between systems by sending HTTP POST requests containing event data to a specified URL. Unlike traditional API requests where you pull data from an API, webhooks push data automatically when triggered by an event.
The RICOH Spaces platform allows WebHook users to subscribe to data changes of 3 key entities; Bookings, Requests and Jobs. A WebHook consumer can subscribe to these changes on these entities, receive them in a third-party API and execute external logic outside of the RICOH Spaces ecosystem.
How
Set Up an Endpoint:
Create a publicly accessible URL that will receive the HTTP POST request from RICOH Spaces.
Once the endpoint is set up, you need to add any desired security measures. RICOH Spaces currently supports No Auth, Token Authentication or Custom Headers.
Handle Incoming Data:
Your endpoint should parse the data from the request (usually in JSON format). The data often contains event-related information like bookings, requests, or job updates.
Once the WebHook has been configured within RICOH Spaces you should start to receive data automatically, at this point, you can begin any custom functionality development utilising the data stream.
Why
In some cases, users of RICOH Spaces want to export the data to perform custom tasks, such as additional integrations or custom reporting. WebHooks allow customers with technical knowledge to create custom functionality without requiring a RICOH Spaces engineer.
Data Structures
RICOH Spaces Webhooks allow you to subscribe to specific event types and receive relevant data. Here’s a breakdown of the entity types, Bookings, Requests, and Jobs, that can be subscribed to.
Bookings Entity
Within RICOH Spaces a booking can be found against different space types such as Desk, Parking, Locker and Rooms. The RICOH Spaces WebHook allows the consumption of Desk, Parking and Locker bookings. The booking type can be found via the “bookingType” property on the data.
The following fields are available in a Bookings webhook payload:
|
Request Entity
A request can be made against a Room booking, the request holds information about the booking it has been made for and any Jobs that have been requested as part of the booking.
|
Job Entity
A job is something that needs to be done for a Room Booking, such as; preparing catering, delivering equipment, or re-arranging the room into a certain layout.
|
Visit Entity
A visit is a single date in time when a visitor will be attending a RICOH Spaces location. The visit will also include information about the visitor that the visit is for.
|
Conclusion
WebHooks provides a way for RICOH Spaces customers to enhance the RICOH Spaces product with their own custom functionality, whether it be developing their own integration or consuming the data to execute custom reporting. By consuming webhooks properly, you can handle event-driven updates smoothly, ensuring your systems stay in sync and perform actions based on live data.