RahalCorporate
OrdersReference

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.

FieldValue
Event TypeORDER_CREATED
WhenOrder creation
SignificanceStart 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.

FieldValue
Event TypeORDER_CANCELED_DUE_TO_NO_ACTIVITY
WhenCron job (24h after creation)
SignificanceOrder timeout

Event Data: Empty object {}

ORDER_REFUNDED

Logged when an order is refunded.

FieldValue
Event TypeORDER_REFUNDED
WhenRefund processed
SignificanceFinancial transaction

Event Data:

{
  "refundAmount": 500000,
  "currency": "IQD",
  "reason": "Customer requested cancellation"
}

Payment Events

ORDER_PAYMENT_VERIFIED_TO_BE_PAID

Logged when payment is confirmed.

FieldValue
Event TypeORDER_PAYMENT_VERIFIED_TO_BE_PAID
WhenPayment confirmation
SignificanceOrder can proceed

Event Data: Empty object {}

ORDER_FINALIZED_BY_CONFIRMING_BNPL_TRANSACTION

Logged when BNPL payment is confirmed.

FieldValue
Event TypeORDER_FINALIZED_BY_CONFIRMING_BNPL_TRANSACTION
WhenBNPL confirmation
SignificanceInstallment plan active

Event Data:

{
  "instalmentId": "inst_123",
  "plan": "3_months"
}

Reservation Events

ORDER_RESERVATION_CREATED

Logged when a reservation is created with the supplier.

FieldValue
Event TypeORDER_RESERVATION_CREATED
WhenBooking confirmed
SignificanceExternal booking exists

Event Data:

{
  "reservationId": "12345678"
}

ORDER_RESERVATION_TICKET_ISSUED

Logged when a flight ticket is issued.

FieldValue
Event TypeORDER_RESERVATION_TICKET_ISSUED
WhenTicket issuance
SignificanceE-ticket generated

Event Data:

{
  "reservationId": "12345678"
}

ORDER_RESERVATION_CANCELED

Logged when a reservation is cancelled.

FieldValue
Event TypeORDER_RESERVATION_CANCELED
WhenCancellation processed
SignificanceBooking no longer valid

Event Data:

{
  "reservationId": "12345678",
  "reason": "Customer request"
}

ORDER_RESERVATION_SWITCHED_TO_CREDIT

Logged when hotel payment is switched to credit.

FieldValue
Event TypeORDER_RESERVATION_SWITCHED_TO_CREDIT
WhenPayment method change
SignificanceBilling update

Event Data:

{
  "reservationId": "12345678",
  "previousMethod": "prepaid",
  "newMethod": "credit"
}

ORDER_RESERVATION_RESOLVED_OUTSIDE_APP

Logged when a reservation is resolved externally.

FieldValue
Event TypeORDER_RESERVATION_RESOLVED_OUTSIDE_APP
WhenManual resolution
SignificanceExternal 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.

FieldValue
Event TypeORDER_RESERVATION_UPDATED_OUTSIDE_APP
WhenExternal update
SignificanceData 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.

FieldValue
Event TypeORDER_STATUS_MANUALLY_CHANGED
WhenAdmin action
SignificanceManual intervention

Event Data:

{
  "previousStatus": "FAILED",
  "newStatus": "FINALIZED",
  "reason": "Ticket confirmed manually"
}

ORDER_MANUALLY_RESOLVED

Logged when an admin manually resolves an issue.

FieldValue
Event TypeORDER_MANUALLY_RESOLVED
WhenAdmin resolution
SignificanceIssue resolved

Event Data:

{
  "resolution": "Contacted supplier, confirmed booking exists",
  "ticketNumber": "123-4567890123"
}

Error Events

ORDER_ENCOUNTERED_ERROR

Logged when an error occurs during processing.

FieldValue
Event TypeORDER_ENCOUNTERED_ERROR
WhenProcessing failure
SignificanceRequires attention
Dashboard DisplayRed 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_ERROR

Filter events by order:

GET /admin/events?entityId=order_abc123

On this page