Event Lifecycle & Status Tracking
Every booking event — whether from Mosler Direct or a PMS integration — is persisted and transitions through a well-defined set of statuses. You can poll these statuses to confirm a booking was processed, without relying on any callback.
Status states
| Status | Meaning |
|---|---|
RECEIVED | Event accepted by the webhook service; not yet queued. Transient — normally advances to QUEUED within milliseconds. |
QUEUED | Published to the queue. The worker will pick it up shortly. |
PROCESSING | Worker has dequeued the event and is executing business logic. |
COMPLETED | Booking created/updated/cancelled and device access provisioned successfully. |
FAILED | Processing failed after all retries. See message for the reason. |
DEAD_LETTER | Permanently failed after 3 retry attempts. Requires manual intervention. |
DUPLICATE | Identical event (same referenceId + action within 60 s) was already received. Stored for audit; not reprocessed. |
Lifecycle flow
Event received
│
▼
RECEIVED ──────── queue publish fails ──────► FAILED
│ │
│ publish OK (retry 1, 2, 3)
▼ 3rd fail ▼
QUEUED DEAD_LETTER
│
│ Worker picks up
▼
PROCESSING
│
├─── Success ──────────────────────► COMPLETED
│
└─── Error → retry (up to 3) ──────► DEAD_LETTER
Retry behaviour
The worker uses the queue's dead-letter exchange for automatic retries. On a processing error, the message is re-queued with an incrementing retry_count. After 3 failed attempts, the event moves permanently to DEAD_LETTER and is removed from the active queue. Failed events can also be manually retried via the admin endpoint (below).
Get event status
Poll an event by the eventId returned in the webhook response.
GET https://webhook.mosler.in/webhook/events/:eventId
curl https://webhook.mosler.in/webhook/events/a3f9d2e1-84c7-4b56-9f13-0d2e4c8a1b7f \
-H "apikey: YOUR_MOSLER_API_KEY"
{
"success": true,
"eventId": "a3f9d2e1-84c7-4b56-9f13-0d2e4c8a1b7f",
"status": "COMPLETED",
"message": null
}
| Field | Type | Description |
|---|---|---|
success | boolean | false if the event ID was not found |
eventId | string | The event identifier |
status | string | Current lifecycle status |
message | string | null | Error message if status is FAILED or DEAD_LETTER; otherwise null |
Get events by reference ID
Retrieve every event for a booking reference — useful for auditing a reservation's history.
GET https://webhook.mosler.in/webhook/events/reference/:referenceId
{
"success": true,
"count": 2,
"events": [
{
"event_id": "a3f9d2e1-84c7-4b56-9f13-0d2e4c8a1b7f",
"event_type": "BOOKING_CREATE",
"status": "COMPLETED",
"reference_id": "RES-20250718-001",
"received_at": "2025-07-18T09:12:44.000Z",
"updated_at": "2025-07-18T09:12:46.812Z"
},
{
"event_id": "b4e8c3f2-95d8-5c67-a024-1e3f5d9b2c8g",
"event_type": "BOOKING_CANCEL",
"status": "COMPLETED",
"reference_id": "RES-20250718-001",
"received_at": "2025-07-19T14:33:11.000Z",
"updated_at": "2025-07-19T14:33:12.441Z"
}
]
}
List events (paginated)
GET https://webhook.mosler.in/webhook/events
Results are always scoped to the company of the authenticated apikey — there is no cross-company access.
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
pageSize | number | Results per page (default: 20, max: 100) |
status | string | Filter by lifecycle status |
referenceId | string | Filter by booking reference ID |
{
"success": true,
"events": [],
"pagination": { "page": 1, "pageSize": 50, "total": 3, "totalPages": 1 }
}
Retry failed events (admin)
Manually re-queue all events currently in FAILED status.
POST https://webhook.mosler.in/webhook/retry
{
"success": true,
"retried": 2,
"failed": 1
}
| Field | Description |
|---|---|
retried | Events successfully re-queued |
failed | Events that failed again (approaching DEAD_LETTER) |