Headout Booking Status Webhook
🔔 Headout Booking Status Webhook Handler
Receives real-time booking status updates from Headout API and synchronizes them with the local booking database.
📋 Webhook Payload
Based on Headout API documentation:
🔄 Status Mapping
🎯 Functionality
- ✅ Status Synchronization: Updates local booking status
- ✅ Timestamp Tracking: Records completion/cancellation times
- ✅ Idempotency: Handles duplicate webhook deliveries
- ✅ Error Handling: Graceful error responses
- ✅ Logging: Comprehensive webhook processing logs
🔒 Security
- Validates required payload fields
- Returns appropriate HTTP status codes
- Logs all webhook attempts for auditing
📊 Response Codes
- 200: Webhook processed successfully
- 400: Invalid payload or missing fields
- 500: Internal server error
Authentication
AuthorizationBearer
JWT token from @etera-ai/auth package (auth.etera.dev) - Format: Bearer <token>
Request
This endpoint expects an object.
bookingId
status
eventTimestamp
Response
Webhook processed successfully
success
message
bookingId
oldStatus
newStatus
headoutStatus
timestamp
Errors
400
Bad Request Error
500
Internal Server Error

