Skip to main content

Trips

The trip is the container for one customer journey. It holds one anchor product (the cruise), the quotations that led to it and every purchase order sold into it.

OperationEndpoint
List tripsGET /order-orchestration/trips
Open a tripPOST /order-orchestration/trips
Read a tripGET /order-orchestration/trips/{tripId}
Close a tripPOST /order-orchestration/trips/{tripId}/close
Read the trip viewGET /order-orchestration/trips/{tripId}/view

List trips​

GET/order-orchestration/trips

Newest first. Returns a JSON array without a pagination envelope.

Parameters

NameInRequiredNotes
customerRefqueryOnly trips of this customer.
limitqueryMaximum trips returned. Default 50, maximum 200.; integer

Response 200

GET/order-orchestration/tripsList trips for a customer
Request
curl -X GET "$BASE/order-orchestration/trips?customerRef=CUST-20419" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0019"
Response
HTTP/1.1 200
X-Request-Id: req-0019
[
{
"endAt": "2027-04-19T08:00:00Z",
"anchor": {
"market": "IT",
"unitRef": "BALCONY-B2",
"returnAt": "2027-04-19T08:00:00Z",
"productId": "MED7-2027-04-12",
"departureAt": "2027-04-12T17:00:00Z",
"productType": "cruise",
"reservationRef": "RSV-1306C259-000001"
},
"status": "booked",
"tripId": "TRP-0D3CE7B16625",
"changes": [
{
"at": "2026-11-02T09:06:51.000Z",
"data": {
"moment": "booking",
"channel": "web",
"totalMinor": 268800
},
"kind": "purchase_order_added",
"poId": "PO-75EB654AFFAC",
"summary": "standard order on web at booking: 2 line(s)"
},
{
"at": "2026-11-02T09:07:28.000Z",
"kind": "anchored",
"poId": "PO-75EB654AFFAC",
"summary": "anchored to reservation RSV-1306C259-000001 (reservation)"
},
{
"at": "2026-11-02T09:08:42.000Z",
"data": {
"moment": "pre_trip",
"channel": "app",
"totalMinor": 24700
},
"kind": "purchase_order_added",
"poId": "PO-516C330693E2",
"summary": "standard order on app at pre_trip: 2 line(s)"
},
{
"at": "2026-11-02T09:12:24.000Z",
"data": {
"revision": 1,
"proposalId": "chg_74c05f50b1fa56fe3e6b:PO-516C330693E2",
"newTotalMinor": 0,
"oldTotalMinor": 24700
},
"kind": "order_change",
"poId": "PO-516C330693E2",
"summary": "cancel_purchase_order: 24700 → 0 EUR minor (by Marco Bianchi)"
},
{
"at": "2026-11-02T09:12:24.000Z",
"kind": "purchase_order_status",
"poId": "PO-516C330693E2",
"summary": "booked → cancelled: Guest changed shore plans"
}
],
"startAt": "2027-04-12T17:00:00Z",
"version": 7,
"tenantId": "meridian",
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:12:24.000Z",
"customerRef": "CUST-20419",
"quotationRefs": [
"QT-ED24E0954262"
],
"purchaseOrderIds": [
"PO-75EB654AFFAC",
"PO-516C330693E2"
]
}
]
Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404not_enabledOrder orchestration is not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Open a trip​

POST/order-orchestration/trips

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
anchorobjectyes
anchor.departureAtstring (date-time)yes
anchor.marketstringmax 60 chars
anchor.productIdstringyes1–200 chars
anchor.productTypestringyesmin 1 chars
anchor.reservationRefstringmax 200 chars
anchor.returnAtstring (date-time)yes
anchor.unitRefstringmax 200 chars
customerRefstringmax 200 chars
groupRefstringmax 200 chars
statusenum: lead, quotation, option, bookeddefault "lead"

Schema: apps/journeys/src/order-orchestration/contracts.ts (OpenTripInputSchema)

Response 201

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404not_enabledOrder orchestration is not enabled for the tenant.
409anchor_takenAnother trip already uses this reservation reference.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422not_an_anchorThe product type may not anchor a trip.
422invalid_datesThe return date is not after the departure date.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Read a trip​

GET/order-orchestration/trips/{tripId}

Parameters

NameInRequiredNotes
tripIdpathyes

Response 200

GET/order-orchestration/trips/TRP-B2BD5A9771E4Read the trip after the change
Request
curl -X GET "$BASE/order-orchestration/trips/TRP-B2BD5A9771E4" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0015"
Response
HTTP/1.1 200
X-Request-Id: req-0015
{
"endAt": "2027-04-19T08:00:00Z",
"anchor": {
"market": "IT",
"unitRef": "BALCONY-B2",
"returnAt": "2027-04-19T08:00:00Z",
"productId": "MED7-2027-04-12",
"departureAt": "2027-04-12T17:00:00Z",
"productType": "cruise",
"reservationRef": "RSV-66D6FC0F-000001"
},
"status": "booked",
"tripId": "TRP-B2BD5A9771E4",
"changes": [
{
"at": "2026-11-02T09:06:51.000Z",
"data": {
"moment": "booking",
"channel": "web",
"totalMinor": 268800
},
"kind": "purchase_order_added",
"poId": "PO-5BEE8AAD2A57",
"summary": "standard order on web at booking: 2 line(s)"
},
{
"at": "2026-11-02T09:07:28.000Z",
"kind": "anchored",
"poId": "PO-5BEE8AAD2A57",
"summary": "anchored to reservation RSV-66D6FC0F-000001 (reservation)"
},
{
"at": "2026-11-02T09:08:42.000Z",
"data": {
"moment": "pre_trip",
"channel": "app",
"totalMinor": 24700
},
"kind": "purchase_order_added",
"poId": "PO-71B4D4926EDD",
"summary": "standard order on app at pre_trip: 2 line(s)"
},
{
"at": "2026-11-02T09:12:24.000Z",
"data": {
"revision": 1,
"proposalId": "chg_816c2c9911ef9df067ce:PO-71B4D4926EDD",
"newTotalMinor": 0,
"oldTotalMinor": 24700
},
"kind": "order_change",
"poId": "PO-71B4D4926EDD",
"summary": "cancel_purchase_order: 24700 → 0 EUR minor (by Marco Bianchi)"
},
{
"at": "2026-11-02T09:12:24.000Z",
"kind": "purchase_order_status",
"poId": "PO-71B4D4926EDD",
"summary": "booked → cancelled: Guest changed shore plans"
}
],
"startAt": "2027-04-12T17:00:00Z",
"version": 7,
"tenantId": "meridian",
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:12:24.000Z",
"customerRef": "CUST-20419",
"quotationRefs": [
"QT-E419E9088B0D"
],
"purchaseOrderIds": [
"PO-5BEE8AAD2A57",
"PO-71B4D4926EDD"
]
}
Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404not_foundThe trip, purchase order, quotation or configuration item does not exist.
404not_enabledOrder orchestration is not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Close a trip​

POST/order-orchestration/trips/{tripId}/close

Parameters

NameInRequiredNotes
tripIdpathyes

Headers: Idempotency-Key, plus X-Request-Id.

Request body

FieldTypeRequiredNotes
reasonstringyesmin 1 chars

Response 200

Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404not_foundThe trip, purchase order, quotation or configuration item does not exist.
404not_enabledOrder orchestration is not enabled for the tenant.
409orders_openThe trip still has purchase orders that are not cancelled or closed.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry after the Retry-After interval.
422idempotency_key_reusedThe Idempotency-Key was used for a different request.
500internalUnexpected failure. Retry with the same Idempotency-Key.

Read the trip view​

GET/order-orchestration/trips/{tripId}/view

The read model a console uses. Trip, purchase orders with lines, quotations, a status roll-up, pending status feedback, open alerts and the integration timeline.

Parameters

NameInRequiredNotes
tripIdpathyes

Response 200

GET/order-orchestration/trips/TRP-B2BD5A9771E4/viewRead the trip after the reservation system confirms
Request
curl -X GET "$BASE/order-orchestration/trips/TRP-B2BD5A9771E4/view" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0005"
Response
HTTP/1.1 200
X-Request-Id: req-0005
{
"trip": {
"endAt": "2027-04-19T08:00:00Z",
"anchor": {
"market": "IT",
"unitRef": "BALCONY-B2",
"returnAt": "2027-04-19T08:00:00Z",
"productId": "MED7-2027-04-12",
"departureAt": "2027-04-12T17:00:00Z",
"productType": "cruise",
"reservationRef": "RSV-66D6FC0F-000001"
},
"status": "booked",
"tripId": "TRP-B2BD5A9771E4",
"changes": [
{
"at": "2026-11-02T09:06:51.000Z",
"data": {
"moment": "booking",
"channel": "web",
"totalMinor": 268800
},
"kind": "purchase_order_added",
"poId": "PO-5BEE8AAD2A57",
"summary": "standard order on web at booking: 2 line(s)"
},
{
"at": "2026-11-02T09:07:28.000Z",
"kind": "anchored",
"poId": "PO-5BEE8AAD2A57",
"summary": "anchored to reservation RSV-66D6FC0F-000001 (reservation)"
}
],
"startAt": "2027-04-12T17:00:00Z",
"version": 4,
"tenantId": "meridian",
"createdAt": "2026-11-02T09:05:37.000Z",
"updatedAt": "2026-11-02T09:07:28.000Z",
"customerRef": "CUST-20419",
"quotationRefs": [
"QT-E419E9088B0D"
],
"purchaseOrderIds": [
"PO-5BEE8AAD2A57"
]
},
"rollup": {
"commercial": {
"booked": 2
},
"payment": {
"not_due": 2
},
"fulfilment": {
"confirmed": 1,
"requested": 1
},
"billing": {
"not_billed": 2
}
},
"purchaseOrders": [
{
"poId": "PO-5BEE8AAD2A57",
"type": "standard",
"lines": [
{
"lineId": "L-A610167BDD4D",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "confirmed"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 1,
"ownership": {
"ruleId": "anchor-reservation",
"process": "create"
},
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"externalRef": "RSV-66D6FC0F-000001",
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteLineRef": "q-line-1",
"sourceSystem": "reservation",
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineId": "L-BB4F731FB7C8",
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quantity": 2,
"ownership": {
"ruleId": "beverage-phase1",
"process": "create"
},
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [],
"quoteLineRef": "q-line-2",
"sourceSystem": "onboard"
}
],
"payer": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"terms": {},
"booker": {
"ref": "CUST-20419",
"kind": "customer",
"displayName": "Giulia Rossi"
},
"market": "IT",
"moment": "booking",
"origin": {
"channel": "web",
"actorRef": "CUST-20419"
},
"status": {
"billing": "not_billed",
"payment": "not_due",
"commercial": "booked",
"fulfilment": "requested"
},
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"version": 4,
"currency": "EUR",
"sequence": 1,
"createdAt": "2026-11-02T09:06:51.000Z",
"revisions": [],
"updatedAt": "2026-11-02T09:07:28.000Z",
"totalMinor": 268800,
"attribution": {},
"fullPayment": false,
"finalisation": {
"at": "2026-11-02T09:06:51.000Z",
"channel": "web"
},
"quotationRef": "QT-E419E9088B0D",
"partiesLocked": true,
"frozenConditions": {
"document": {
"lines": [
{
"lineRef": "q-line-1",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 1,
"amountMinor": 238000,
"description": "7-night Western Mediterranean, balcony cabin, 2 guests",
"explanation": [
{
"flag": "public",
"mode": "select",
"basis": "passenger",
"input": 0,
"layer": "base",
"reason": {
"key": "layer.base",
"params": {}
},
"ruleId": "base-balcony",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": 264400,
"runningTotal": 264400
},
{
"flag": "public",
"mode": "adjust",
"basis": "booking",
"input": 264400,
"layer": "promotion",
"reason": {
"key": "layer.promotion",
"params": {}
},
"ruleId": "EARLY-BOOKING-10",
"source": {
"kind": "store",
"version": 14,
"timestamp": "2026-10-30T00:00:00Z"
},
"contribution": -26400,
"runningTotal": 238000
}
],
"productCode": "MED7-2027-04-12",
"productType": "cruise",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": [
"EARLY-BOOKING-10"
],
"sellingConditions": {
"refundable": true,
"depositPercent": 20
}
},
{
"lineRef": "q-line-2",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 2,
"amountMinor": 30800,
"description": "Classic drinks package, 7 nights",
"explanation": [],
"productCode": "DRINKS-CLASSIC-7N",
"productType": "beverage",
"passengerIds": [
"PAX-01",
"PAX-02"
],
"promotionIds": []
}
],
"market": "IT",
"channel": "web",
"currency": "EUR",
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"promotions": [
{
"version": 3,
"promotionId": "EARLY-BOOKING-10",
"postBookingPolicy": "keep"
}
],
"totalMinor": 268800,
"customerRef": "CUST-20419",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
},
"frozenAt": "2026-11-02T09:04:00Z",
"quoteRef": "Q-2027-58213",
"quoteVersion": 2,
"storeVersion": 14,
"configVersion": 9
}
}
],
"quotations": [
{
"quote": {
"offerId": "ALL-INCLUSIVE-2027",
"currency": "EUR",
"quoteRef": "Q-2027-58213",
"totalMinor": 268800,
"validUntil": "2026-11-09T23:59:59Z",
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteVersion": 2
},
"market": "IT",
"status": "converted",
"tripId": "TRP-B2BD5A9771E4",
"channel": "web",
"intentId": "INT-E7814BE45E5F",
"agencyRef": null,
"createdAt": "2026-11-02T09:05:37.000Z",
"createdBy": {
"kind": "customer",
"actorRef": "CUST-20419"
},
"updatedAt": "2026-11-02T09:06:51.000Z",
"conversion": {
"poId": "PO-5BEE8AAD2A57",
"convertedAt": "2026-11-02T09:06:51.000Z",
"convertedBy": "CUST-20419"
},
"passengers": 2,
"customerRef": "CUST-20419",
"productCode": "MED7-2027-04-12",
"quotationRef": "QT-E419E9088B0D",
"lastAccessedAt": "2026-11-02T09:06:14.000Z"
}
],
"pendingFeedback": [
{
"expectationId": "EXP-A50419D6B81C",
"correlationId": "cor-f55fc69f-6a75-41f0-a1ac-7585af08b98a",
"systemId": "onboard",
"ruleId": "onboard-create",
"expectedEvents": [
"onboard.posted"
],
"tripId": "TRP-B2BD5A9771E4",
"poId": "PO-5BEE8AAD2A57",
"lineId": "L-BB4F731FB7C8",
"status": "pending",
"dueAt": "2026-11-02T10:06:51.000Z",
"createdAt": "2026-11-02T09:06:51.000Z",
"resolvedAt": null,
"resolution": null
}
],
"openAlerts": [],
"timeline": [
{
"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"
}
]
}
Errors
StatusCodeMeaning
400invalid_requestThe request failed validation. The message names the first failing field; oms-ops and group surfaces also return every issue in details.
401unauthenticatedThe bearer token is missing, invalid, expired or minted for another purpose.
403scope_forbiddenThe token is scoped to an agency or an access scope; this surface requires an unscoped tenant token.
404not_foundThe trip, purchase order, quotation or configuration item does not exist.
404not_enabledOrder orchestration is not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.