Event Types
Complete catalog of order event types with their data payloads
Event Types
All events that can occur on an order, with their data structure and meaning.
Event Structure
Every event contains:
{
"id": "evt_abc123",
"entityId": "order_xyz",
"entityType": "ORDER",
"version": 1,
"eventType": "ORDER_CREATED",
"eventData": { ... },
"createdAt": "2024-06-15T10:30:00.000Z"
}Order Lifecycle Events
ORDER_CREATED
Logged when an order is created.
| Field | Value |
|---|---|
| Event Type | ORDER_CREATED |
| When | Order creation |
| Significance | Start of order lifecycle |
Event Data:
{
"flightReservationInformation": {
"origin": "BGW",
"destination": "DXB",
"departureDate": "2024-06-15",
"returnDate": "2024-06-20",
"cabinClass": "ECONOMY"
}
}ORDER_CANCELED_DUE_TO_NO_ACTIVITY
Logged when an unpaid order is automatically cancelled.
| Field | Value |
|---|---|
| Event Type | ORDER_CANCELED_DUE_TO_NO_ACTIVITY |
| When | Cron job (24h after creation) |
| Significance | Order timeout |
Event Data: Empty object {}
ORDER_REFUNDED
Logged when an order is refunded.
| Field | Value |
|---|---|
| Event Type | ORDER_REFUNDED |
| When | Refund processed |
| Significance | Financial transaction |
Event Data:
{
"refundAmount": 500000,
"currency": "IQD",
"reason": "Customer requested cancellation"
}Payment Events
ORDER_PAYMENT_VERIFIED_TO_BE_PAID
Logged when payment is confirmed.
| Field | Value |
|---|---|
| Event Type | ORDER_PAYMENT_VERIFIED_TO_BE_PAID |
| When | Payment confirmation |
| Significance | Order can proceed |
Event Data: Empty object {}
ORDER_FINALIZED_BY_CONFIRMING_BNPL_TRANSACTION
Logged when BNPL payment is confirmed.
| Field | Value |
|---|---|
| Event Type | ORDER_FINALIZED_BY_CONFIRMING_BNPL_TRANSACTION |
| When | BNPL confirmation |
| Significance | Installment plan active |
Event Data:
{
"instalmentId": "inst_123",
"plan": "3_months"
}Reservation Events
ORDER_RESERVATION_CREATED
Logged when a reservation is created with the supplier.
| Field | Value |
|---|---|
| Event Type | ORDER_RESERVATION_CREATED |
| When | Booking confirmed |
| Significance | External booking exists |
Event Data:
{
"reservationId": "12345678"
}ORDER_RESERVATION_TICKET_ISSUED
Logged when a flight ticket is issued.
| Field | Value |
|---|---|
| Event Type | ORDER_RESERVATION_TICKET_ISSUED |
| When | Ticket issuance |
| Significance | E-ticket generated |
Event Data:
{
"reservationId": "12345678"
}ORDER_RESERVATION_CANCELED
Logged when a reservation is cancelled.
| Field | Value |
|---|---|
| Event Type | ORDER_RESERVATION_CANCELED |
| When | Cancellation processed |
| Significance | Booking no longer valid |
Event Data:
{
"reservationId": "12345678",
"reason": "Customer request"
}ORDER_RESERVATION_SWITCHED_TO_CREDIT
Logged when hotel payment is switched to credit.
| Field | Value |
|---|---|
| Event Type | ORDER_RESERVATION_SWITCHED_TO_CREDIT |
| When | Payment method change |
| Significance | Billing update |
Event Data:
{
"reservationId": "12345678",
"previousMethod": "prepaid",
"newMethod": "credit"
}ORDER_RESERVATION_RESOLVED_OUTSIDE_APP
Logged when a reservation is resolved externally.
| Field | Value |
|---|---|
| Event Type | ORDER_RESERVATION_RESOLVED_OUTSIDE_APP |
| When | Manual resolution |
| Significance | External intervention |
Event Data:
{
"resolution": "Ticket reissued via supplier portal",
"resolvedBy": "admin@company.com"
}ORDER_RESERVATION_UPDATED_OUTSIDE_APP
Logged when a reservation is updated externally.
| Field | Value |
|---|---|
| Event Type | ORDER_RESERVATION_UPDATED_OUTSIDE_APP |
| When | External update |
| Significance | Data sync |
Event Data:
{
"update": "Flight time changed by airline",
"newDepartureTime": "14:30"
}Status Change Events
ORDER_STATUS_MANUALLY_CHANGED
Logged when an admin changes order status.
| Field | Value |
|---|---|
| Event Type | ORDER_STATUS_MANUALLY_CHANGED |
| When | Admin action |
| Significance | Manual intervention |
Event Data:
{
"previousStatus": "FAILED",
"newStatus": "FINALIZED",
"reason": "Ticket confirmed manually"
}ORDER_MANUALLY_RESOLVED
Logged when an admin manually resolves an issue.
| Field | Value |
|---|---|
| Event Type | ORDER_MANUALLY_RESOLVED |
| When | Admin resolution |
| Significance | Issue resolved |
Event Data:
{
"resolution": "Contacted supplier, confirmed booking exists",
"ticketNumber": "123-4567890123"
}Error Events
ORDER_ENCOUNTERED_ERROR
Logged when an error occurs during processing.
| Field | Value |
|---|---|
| Event Type | ORDER_ENCOUNTERED_ERROR |
| When | Processing failure |
| Significance | Requires attention |
| Dashboard Display | Red chip |
Event Data (Reservation Creation Failed):
{
"message": "Creating reservation for order failed.",
"reservationInformation": {
"searchResultKey": "abc123def456",
"supplier": "IRIX",
"origin": "BGW",
"destination": "DXB"
}
}Event Data (Ticket Issuance Failed):
{
"message": "Issuing reservation ticket for order failed.",
"reservationId": "12345678"
}Event Data (General Error):
{
"message": "Unknown error occurred while processing order.",
"errorDetails": "Connection timeout"
}Event Timeline Example
Successful flight order:
1. ORDER_CREATED (10:00:00)
2. ORDER_PAYMENT_VERIFIED_TO_BE_PAID (10:00:15)
3. ORDER_RESERVATION_CREATED (10:00:30)
4. ORDER_RESERVATION_TICKET_ISSUED (10:00:45)Failed order with resolution:
1. ORDER_CREATED (10:00:00)
2. ORDER_PAYMENT_VERIFIED_TO_BE_PAID (10:00:15)
3. ORDER_ENCOUNTERED_ERROR (10:00:30)
4. ORDER_STATUS_MANUALLY_CHANGED (12:30:00) [FAILED → FINALIZED]
5. ORDER_MANUALLY_RESOLVED (12:30:00)Querying Events
Filter events by type:
GET /admin/events?eventType=ORDER_ENCOUNTERED_ERRORFilter events by order:
GET /admin/events?entityId=order_abc123