Skip to main content

Events overview

Three event streams connect the order engine with the systems around it:

StreamDirectionHow
OutboxOrder engine → consumersConsumers poll GET /oms-ops/events by sequence.
Inbound status eventsSpecialist systems → order engineSystems (or the integration layer) send POST /order-orchestration/events.
Integration logBothEvery request the order engine sends to a specialist system and every status event it receives, readable with GET /order-orchestration/events.

The outbox​

Order operations write an event to the outbox in the same database transaction as the change itself, so an event is published if and only if the change committed. Payments, allocations, refunds, changes, groups, disruptions, mass changes, work items and service-recovery cases all publish events. The full list is in the event catalogue.

GET /api/journeys/v1/oms-ops/events?afterSeq=0&limit=200
FieldMeaning
seqPosition in the tenant's outbox. Strictly increasing.
eventIdUnique id of the event.
typeThe event type, for example oms.payment.recorded.
subjectRefWhat the event is about, for example trip:TRP-B2BD5A9771E4 or group:grp_GA-2026-582C6A.
dedupeKeyThe business key the event was written under; an event is written once per key.
payloadThe event data.
createdAtWhen the event was written.

Consuming the outbox​

  1. Store the highest seq you have processed, durably, per tenant.
  2. Poll with afterSeq=<stored seq>. Process events in order.
  3. After processing a batch, store the last seq. If you crash before storing it, you will receive the batch again, so process each event idempotently on eventId.
  4. When a poll returns a full page (limit events), poll again immediately; otherwise wait for your polling interval.

Filter with type or subjectRef when a consumer only needs part of the stream.

GET/oms-ops/eventsThe outbox after the end-to-end example
Request
curl -X GET "$BASE/oms-ops/events?afterSeq=0&limit=100" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0017"
Response
HTTP/1.1 200
X-Request-Id: req-0017
{
"events": [
{
"eventId": "0099457d-1c0b-465f-a154-aad00b8976c0",
"seq": 1,
"type": "oms.payment.recorded",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.recorded:pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"payload": {
"kind": "payment",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "TRP-B2BD5A9771E4",
"level": "trip"
},
"currency": "EUR",
"refundOf": null,
"scenario": "deposit",
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"amountMinor": 53760
},
"createdAt": "2026-11-02T09:09:19.000Z"
},
{
"eventId": "1af68428-86dc-4bd4-a8cc-11c3c1a72702",
"seq": 2,
"type": "oms.payment.allocated",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.allocated:pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0:run_f815e8c5-9bf7-4f60-ac7f-fcb897921a7a",
"payload": {
"legs": [
{
"lineId": "L-A610167BDD4D",
"amountMinor": 53760
}
],
"runId": "run_f815e8c5-9bf7-4f60-ac7f-fcb897921a7a",
"method": "sequential",
"ruleId": null,
"paymentId": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"unallocatedMinor": 0
},
"createdAt": "2026-11-02T09:09:19.000Z"
},
{
"eventId": "4486cad2-c5d6-419a-ab5d-8f95c79be693",
"seq": 3,
"type": "oms.payment.recorded",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "payment.recorded:pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"payload": {
"kind": "payment",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"currency": "EUR",
"refundOf": null,
"scenario": "ancillary_purchase",
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"amountMinor": 24700
},
"createdAt": "2026-11-02T09:09:56.000Z"
},
{
"eventId": "71e9be90-12eb-462a-a147-5268ab125ef5",
"seq": 4,
"type": "oms.payment.allocated",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "payment.allocated:pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b:run_d0b2777e-df22-4866-8747-3a51fb429c9a",
"payload": {
"legs": [
{
"lineId": "L-FDAF4DA2CF1A",
"amountMinor": 17800
},
{
"lineId": "L-93A9D925FCE1",
"amountMinor": 6900
}
],
"runId": "run_d0b2777e-df22-4866-8747-3a51fb429c9a",
"method": "proportional",
"ruleId": null,
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"unallocatedMinor": 0
},
"createdAt": "2026-11-02T09:09:56.000Z"
},
{
"eventId": "66d970d0-e797-4cc3-a4bc-250e18435614",
"seq": 6,
"type": "oms.payment.reallocated",
"subjectRef": "trips:TRP-B2BD5A9771E4",
"dedupeKey": "payment.reallocated:realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"payload": {
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
},
"runId": "realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"tripIds": [
"TRP-B2BD5A9771E4"
],
"appliedMinor": 0,
"releasedMinor": 24700
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "559a9b87-c7dc-44f4-a6a1-c10ce892368b",
"seq": 7,
"type": "oms.payment.recorded",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "payment.recorded:pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"payload": {
"kind": "refund",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"reason": "Guest changed shore plans",
"currency": "EUR",
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"scenario": "refund",
"paymentId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"amountMinor": 24700
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "f598a613-f978-4679-a6fa-cd12e1da75dc",
"seq": 8,
"type": "oms.refund.requested",
"subjectRef": "purchase_order:PO-71B4D4926EDD",
"dedupeKey": "refund.requested:pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"payload": {
"lines": [
{
"lineId": "L-FDAF4DA2CF1A",
"amountMinor": 17800
},
{
"lineId": "L-93A9D925FCE1",
"amountMinor": 6900
}
],
"method": "wallet",
"reason": "Guest changed shore plans",
"tripId": "TRP-B2BD5A9771E4",
"changeId": "chg_816c2c9911ef9df067ce",
"currency": "EUR",
"refundId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"amountMinor": 24700,
"externalRef": "PSP-AUTH-120931"
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "4b1d5267-3e86-4020-a3d9-76ab37019f40",
"seq": 9,
"type": "oms.change.applied",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "change.applied:3387b41a-0391-4bf1-ab15-94130a843671",
"payload": {
"actor": {
"id": "agent-0412",
"name": "Marco Bianchi",
"role": "care_agent",
"channel": "contact_centre"
},
"impact": {
"asOf": "2026-11-20T10:00:00Z",
"kind": "cancel_purchase_order",
"mode": "applied",
"lines": [
{
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-BB4F731FB7C8",
"changed": false,
"productKind": "beverage",
"newAmountMinor": 30800,
"oldAmountMinor": 30800,
"paidAfterMinor": 0,
"paidBeforeMinor": 0
},
{
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-A610167BDD4D",
"changed": false,
"productKind": "cruise",
"newAmountMinor": 238000,
"oldAmountMinor": 238000,
"paidAfterMinor": 53760,
"paidBeforeMinor": 53760
},
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-FDAF4DA2CF1A",
"changed": true,
"productKind": "excursion",
"newAmountMinor": 0,
"oldAmountMinor": 17800,
"paidAfterMinor": 0,
"paidBeforeMinor": 17800
},
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-93A9D925FCE1",
"changed": true,
"productKind": "excursion",
"newAmountMinor": 0,
"oldAmountMinor": 6900,
"paidAfterMinor": 0,
"paidBeforeMinor": 6900
}
],
"reason": "Guest changed shore plans",
"tripId": "TRP-B2BD5A9771E4",
"refunds": [
{
"refundOf": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"paymentId": "pay_8107cc9e-34c3-48ab-bd3b-0a00c4e42db2",
"amountMinor": 24700
}
],
"changeId": "chg_816c2c9911ef9df067ce",
"currency": "EUR",
"payments": [
{
"anchor": {
"ref": "PO-71B4D4926EDD",
"level": "purchase_order"
},
"scenario": "ancillary_purchase",
"heldMinor": 0,
"paymentId": "pay_f64cf55a-93e1-4f1e-bdbd-2f1ae6d5ee6b",
"refundMinor": 24700,
"releasedMinor": 24700,
"reappliedMinor": 0
}
],
"passengers": [
{
"units": [
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-FDAF4DA2CF1A",
"policy": {
"id": "refundable",
"tier": {
"feePercent": 0,
"minDaysBefore": 0,
"feeMinorPerPassenger": 0
},
"label": "Refundable before departure",
"source": "product_kind"
},
"feeMinor": 0,
"cancelled": true,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 8900,
"priceMinor": 8900,
"productKind": "excursion",
"refundMinor": 8900,
"passengerRef": "PAX-01",
"passengerName": null,
"retainedMinor": 0,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
}
],
"leaves": false,
"feeMinor": 0,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 8900,
"priceMinor": 8900,
"refundMinor": 8900,
"passengerRef": "PAX-01",
"passengerName": null,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
},
{
"units": [
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-FDAF4DA2CF1A",
"policy": {
"id": "refundable",
"tier": {
"feePercent": 0,
"minDaysBefore": 0,
"feeMinorPerPassenger": 0
},
"label": "Refundable before departure",
"source": "product_kind"
},
"feeMinor": 0,
"cancelled": true,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 8900,
"priceMinor": 8900,
"productKind": "excursion",
"refundMinor": 8900,
"passengerRef": "PAX-02",
"passengerName": null,
"retainedMinor": 0,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
},
{
"poId": "PO-71B4D4926EDD",
"lineId": "L-93A9D925FCE1",
"policy": {
"id": "refundable",
"tier": {
"feePercent": 0,
"minDaysBefore": 0,
"feeMinorPerPassenger": 0
},
"label": "Refundable before departure",
"source": "product_kind"
},
"feeMinor": 0,
"cancelled": true,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 6900,
"priceMinor": 6900,
"productKind": "excursion",
"refundMinor": 6900,
"passengerRef": "PAX-02",
"passengerName": null,
"retainedMinor": 0,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
}
],
"leaves": false,
"feeMinor": 0,
"heldMinor": 0,
"openMinor": 0,
"paidMinor": 15800,
"priceMinor": 15800,
"refundMinor": 15800,
"passengerRef": "PAX-02",
"passengerName": null,
"reappliedInMinor": 0,
"reappliedOutMinor": 0
}
],
"departureAt": "2027-04-12T17:00:00Z",
"reappliedTo": [],
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"changed": false,
"cancelled": false,
"newTotalMinor": 268800,
"oldTotalMinor": 268800
},
{
"poId": "PO-71B4D4926EDD",
"changed": true,
"cancelled": true,
"newTotalMinor": 0,
"oldTotalMinor": 24700
}
],
"reconciliation": {
"trip": {
"balanced": true,
"offLinesMinor": 24700,
"paidAfterMinor": 53760,
"paidBeforeMinor": 78460,
"amountAfterMinor": 268800,
"amountBeforeMinor": 293500
},
"balanced": true,
"heldMinor": 0,
"paidMinor": 24700,
"refundMinor": 24700,
"receivedMinor": 0,
"reappliedMinor": 0,
"feesRetainedMinor": 0
},
"reallocationRunId": "realloc_6ba19cf0-316e-4e98-91d7-c3e88043ab26",
"daysBeforeDeparture": 143
},
"shares": [
{
"after": [
{
"cancelled": true,
"amountMinor": 0,
"passengerRef": "PAX-01"
},
{
"cancelled": true,
"amountMinor": 0,
"passengerRef": "PAX-02"
}
],
"before": [
{
"amountMinor": 8900,
"passengerRef": "PAX-01"
},
{
"amountMinor": 8900,
"passengerRef": "PAX-02"
}
],
"lineId": "L-FDAF4DA2CF1A"
},
{
"after": [
{
"cancelled": true,
"amountMinor": 0,
"passengerRef": "PAX-02"
}
],
"before": [
{
"amountMinor": 6900,
"passengerRef": "PAX-02"
}
],
"lineId": "L-93A9D925FCE1"
}
],
"idempotencyKey": "3387b41a-0391-4bf1-ab15-94130a843671"
},
"createdAt": "2026-11-02T09:06:42.000Z"
},
{
"eventId": "70f39b0a-7924-4934-a326-ab51451c48dd",
"seq": 10,
"type": "oms.payment.recorded",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.recorded:pay_55710c02-f20c-4099-a7ee-844561a5764f",
"payload": {
"kind": "refund",
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi",
"role": "booker"
},
"anchor": {
"ref": "TRP-B2BD5A9771E4",
"level": "trip"
},
"currency": "EUR",
"refundOf": "pay_6ac1a14d-7a36-4c41-b7bc-db35708558e0",
"scenario": "refund",
"paymentId": "pay_55710c02-f20c-4099-a7ee-844561a5764f",
"amountMinor": 5000
},
"createdAt": "2026-11-02T09:13:38.000Z"
},
{
"eventId": "a1420fbe-69bc-4eb7-a215-9582caf4f715",
"seq": 11,
"type": "oms.payment.allocated",
"subjectRef": "trip:TRP-B2BD5A9771E4",
"dedupeKey": "payment.allocated:pay_55710c02-f20c-4099-a7ee-844561a5764f:run_593bfe8a-a4a6-4d9f-a900-26a42dcd53b3",
"payload": {
"legs": [
{
"lineId": "L-A610167BDD4D",
"amountMinor": -5000
}
],
"runId": "run_593bfe8a-a4a6-4d9f-a900-26a42dcd53b3",
"method": "proportional",
"ruleId": null,
"paymentId": "pay_55710c02-f20c-4099-a7ee-844561a5764f",
"unallocatedMinor": 0
},
"createdAt": "2026-11-02T09:13:38.000Z"
}
]
}
Not available

Push delivery (webhooks with signed payloads, subscriptions per event type, retries and a dead-letter queue) is not available for the order engine. Consumers poll the outbox. See Webhooks.

Inbound status events​

Specialist systems report what happened to the requests the order engine sent them: a booking confirmed by the reservation system, a drinks package posted to the onboard account, an excursion fulfilled. They send these as inbound status events to one endpoint:

POST /api/journeys/v1/order-orchestration/events
{
"messageId": "rsv-evt-000184223",
"system": "reservation",
"type": "booking.confirmed",
"occurredAt": "2026-11-02T09:06:52Z",
"correlationId": "out-6c3e2a9b-1f40-4d7e-9b2a-0a7e5c1d9f33",
"refs": { "tripId": "TRP-B2BD5A9771E4", "externalRef": "RSV-66D6FC0F-000001" },
"data": { "nativeStatus": "CONFIRMED" }
}
RuleBehaviour
DeduplicationPer messageId. A repeat is answered with outcome duplicate and changes nothing.
MappingThe event type must be in the event catalogue and mapped for the sending system. The catalogue says which status dimension moves to which value.
MatchingThe event is matched to lines by refs (tripId, poId, lineIds, externalRef) or by correlationId (the id of the outbound request it answers).
OutcomeAlways 202 with an outcome: applied, unmatched, rejected (unknown system or type), duplicate or replayed.
RecoveryAn unmatched or rejected event is logged with its reason and can be replayed with POST /order-orchestration/events/{seq}/replay once the cause is fixed.
Missing feedbackWhen a system does not answer within the configured time, an alert is raised (see Monitoring).

Integration log​

Every outbound request and inbound event, newest first, with its outcome. In the end-to-end example: create requests to the reservation and onboard systems for the booking order, the reservation system's booking.confirmed, and create, modify and cancel requests to the excursion system for the add-on order.

GET/order-orchestration/eventsRead the orchestration integration log
Request
curl -X GET "$BASE/order-orchestration/events?limit=20" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0018"
Response
HTTP/1.1 200
X-Request-Id: req-0018
[
{
"seq": 6,
"messageId": "out-77a580a2-8a3a-4ac8-acf7-c8da9d825902",
"direction": "outbound",
"systemId": "excursions",
"eventType": "cancel.requested",
"correlationId": "cor-720792a2-e728-4208-ad38-c4bb1a87f0fb",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"lineId": null,
"outcome": "sent",
"payload": {
"ack": {
"delivery": "integration_log"
},
"error": null,
"lineIds": [
"L-FDAF4DA2CF1A",
"L-93A9D925FCE1"
],
"process": "cancel"
},
"occurredAt": "2026-11-02T09:12:24.000Z",
"loggedAt": "2026-11-02T09:06:00.106Z"
},
{
"seq": 5,
"messageId": "out-d3bc796a-d557-4395-a8bf-f8589fcbc6ac",
"direction": "outbound",
"systemId": "excursions",
"eventType": "modify.requested",
"correlationId": "cor-fde51857-dd28-4395-abb2-59fb077a2ce1",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"lineId": null,
"outcome": "sent",
"payload": {
"ack": {
"delivery": "integration_log"
},
"error": null,
"lineIds": [
"L-FDAF4DA2CF1A",
"L-93A9D925FCE1"
],
"process": "modify",
"revision": 1
},
"occurredAt": "2026-11-02T09:12:24.000Z",
"loggedAt": "2026-11-02T09:06:00.101Z"
},
{
"seq": 4,
"messageId": "out-fbe8aa8f-bea9-407b-a319-98065637dae0",
"direction": "outbound",
"systemId": "excursions",
"eventType": "create.requested",
"correlationId": "cor-b59755fc-96d6-443e-adb2-f0cb770608a8",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-71B4D4926EDD",
"lineId": null,
"outcome": "sent",
"payload": {
"ack": {
"delivery": "integration_log"
},
"error": null,
"lineIds": [
"L-FDAF4DA2CF1A",
"L-93A9D925FCE1"
],
"process": "create"
},
"occurredAt": "2026-11-02T09:08:42.000Z",
"loggedAt": "2026-11-02T09:06:00.046Z"
},
{
"seq": 3,
"messageId": "cb-dfcd6128-4cc1-4294-a8e5-b3a8b0025995",
"direction": "inbound",
"systemId": "reservation",
"eventType": "booking.confirmed",
"correlationId": "cor-9c0695a0-8c2e-46f7-ad60-5d4ad99a7ce6",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-A610167BDD4D",
"outcome": "applied",
"payload": {
"data": {},
"refs": {
"poId": "PO-5BEE8AAD2A57",
"lineIds": [
"L-A610167BDD4D"
],
"externalRef": "RSV-66D6FC0F-000001"
},
"type": "booking.confirmed",
"system": "reservation",
"messageId": "cb-dfcd6128-4cc1-4294-a8e5-b3a8b0025995",
"occurredAt": "2026-11-02T09:06:42.000Z",
"correlationId": "cor-9c0695a0-8c2e-46f7-ad60-5d4ad99a7ce6"
},
"occurredAt": "2026-11-02T09:06:42.000Z",
"loggedAt": "2026-11-02T09:06:00.028Z"
},
{
"seq": 2,
"messageId": "out-0cb13e31-9a5f-4709-a58d-5d33ac3c964a",
"direction": "outbound",
"systemId": "onboard",
"eventType": "create.requested",
"correlationId": "cor-f55fc69f-6a75-41f0-a1ac-7585af08b98a",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-BB4F731FB7C8",
"outcome": "sent",
"payload": {
"ack": {
"delivery": "integration_log"
},
"error": null,
"lineIds": [
"L-BB4F731FB7C8"
],
"process": "create"
},
"occurredAt": "2026-11-02T09:06:51.000Z",
"loggedAt": "2026-11-02T09:06:00.000Z"
},
{
"seq": 1,
"messageId": "out-878b0dd8-2759-460a-a264-45185e5ce1cc",
"direction": "outbound",
"systemId": "reservation",
"eventType": "create.requested",
"correlationId": "cor-9c0695a0-8c2e-46f7-ad60-5d4ad99a7ce6",
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-A610167BDD4D",
"outcome": "sent",
"payload": {
"ack": {
"status": "ACCEPTED",
"gateway": "mock",
"messageId": "ack-6ccff010-49d0-43de-a5f3-c43efd55cfbd"
},
"error": null,
"lineIds": [
"L-A610167BDD4D"
],
"process": "create"
},
"occurredAt": "2026-11-02T09:06:51.000Z",
"loggedAt": "2026-11-02T09:06:00.000Z"
}
]