An inventory webhook sends a request to your service whenever a room type needs syncing because its availability or price has changed, so you can keep external services synchronised with minimum delay. Set it up in Settings > Marketplace > Webhooks.
Quick Guide
- Go to Settings > Marketplace > Webhooks.
- Enter the public-facing URL that receives the request.
- Optionally, add headers.
- Make sure your service answers with an HTTP response code between 200 and 299.
Set up the webhook
- Go to Settings > Marketplace > Webhooks.
- Enter the public-facing URL to receive the request.
- Optionally, specify headers for authentication or other purposes. You can add your own data in the Custom Header field. Beds24 sends it as HTTP headers to the remote server with the webhook.
- Save.
Warning: You can't use template variables here, because this webhook operates on a room level. Template variables are only available in the context of a booking.
Expected result: Your URL receives a request each time a room type needs syncing.
What triggers the webhook
| Change | Triggers a webhook |
|---|---|
| New booking | Yes |
| Modification to booked dates | Yes |
| Cancellation | Yes |
| Inventory change on a room type | Yes |
| Price change on a room type | Yes |
| Restriction change, such as minimum stay | No |
Payload
The request body contains JSON data with the roomId that triggered the request. Typical JSON data posted by the webhook request:
{"roomId":"123456","propId":"12345","ownerId":"1234","action":"SYNC_ROOM"}
Troubleshooting
| Issue / Error | Likely cause | Resolution |
|---|---|---|
| The same request arrives several times | Your service didn't return an HTTP response code between 200 and 299. Beds24 retries a number of times over the next 30 minutes before giving up. | Return a 2xx response code as soon as you receive the request. |
| No webhook after a minimum stay change | Restriction changes don't trigger the webhook. | This is expected. Only the changes listed in What triggers the webhook send a request. |
| Template variables in the custom header aren't replaced | This webhook operates on a room level, not a booking. | Use fixed header values. |