Skip to main content

Order lines

The order line projection used by payments, allocation, changes and operations. Lines are projected from purchase orders automatically.

OperationEndpoint
Upsert order lines in the projectionPOST /oms-ops/lines
List a trip's order linesGET /oms-ops/trips/{tripId}/lines

Upsert order lines in the projection​

POST/oms-ops/lines

Lines from purchase orders reach the projection automatically. This write exists for order sources other than the order engine. Send one line or { lines }.

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

Request body

FieldTypeRequiredNotes
amountMinorintegeryes≥ 0
attributesmap of object
categoryRefone of several shapes
channelone of several shapes
currencystringyespattern ^[A-Z]{3}$
departureRefone of several shapes
expectedVersioninteger> 0
lineIdstringyes1–200 chars
marketone of several shapes
poIdstringyes1–200 chars
productKindstringyes1–60 chars
productRefstringyes1–200 chars
rolesobjectdefault {"travellers":[]}
roles.bookerobject
roles.booker.contactstringmax 320 chars
roles.booker.namestringmax 200 chars
roles.booker.refstringyes1–200 chars
roles.payerobject
roles.payer.contactstringmax 320 chars
roles.payer.namestringmax 200 chars
roles.payer.refstringyes1–200 chars
roles.travellersarray of object
roles.travellers[].contactstringmax 320 chars
roles.travellers[].namestringmax 200 chars
roles.travellers[].refstringyes1–200 chars
statusstringyes1–60 chars
tripIdstringyes1–200 chars

Schema: apps/journeys/src/oms-ops/contracts.ts (UpsertLineSchema)

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.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
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.

List a trip's order lines​

GET/oms-ops/trips/{tripId}/lines

Parameters

NameInRequiredNotes
tripIdpathyes

Response 200

GET/oms-ops/trips/TRP-0D3CE7B16625/linesOrder lines of the trip
Request
curl -X GET "$BASE/oms-ops/trips/TRP-0D3CE7B16625/lines" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Request-Id: req-0022"
Response
HTTP/1.1 200
X-Request-Id: req-0022
{
"lines": [
{
"lineId": "L-9F197F515BFD",
"tripId": "TRP-0D3CE7B16625",
"poId": "PO-75EB654AFFAC",
"groupId": null,
"productKind": "beverage",
"productRef": "DRINKS-CLASSIC-7N",
"departureRef": "MED7-2027-04-12",
"categoryRef": null,
"channel": "web",
"market": "IT",
"amountMinor": 30800,
"currency": "EUR",
"status": "booked",
"roles": {
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"booker": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"travellers": [
{
"ref": "PAX-01"
},
{
"ref": "PAX-02"
}
]
},
"attributes": {
"poType": "standard",
"source": "order_orchestration",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 2,
"poSequence": 1,
"departureAt": "2027-04-12T17:00:00Z",
"orderVersion": 4,
"promotionIds": [],
"quoteLineRef": "q-line-2",
"sourceSystem": "onboard",
"billingStatus": "not_billed",
"paymentStatus": "not_due",
"reservationRef": "RSV-1306C259-000001",
"tripCustomerRef": "CUST-20419",
"fulfilmentStatus": "requested"
},
"lineVersion": 3,
"updatedAt": "2026-11-02T09:06:42.000Z"
},
{
"lineId": "L-490ECF37928C",
"tripId": "TRP-0D3CE7B16625",
"poId": "PO-75EB654AFFAC",
"groupId": null,
"productKind": "cruise",
"productRef": "MED7-2027-04-12",
"departureRef": "MED7-2027-04-12",
"categoryRef": "BALCONY-B2",
"channel": "web",
"market": "IT",
"amountMinor": 238000,
"currency": "EUR",
"status": "booked",
"roles": {
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"booker": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"travellers": [
{
"ref": "PAX-01"
},
{
"ref": "PAX-02"
}
]
},
"attributes": {
"poType": "standard",
"source": "order_orchestration",
"offerId": "ALL-INCLUSIVE-2027",
"quantity": 1,
"poSequence": 1,
"departureAt": "2027-04-12T17:00:00Z",
"externalRef": "RSV-1306C259-000001",
"orderVersion": 4,
"promotionIds": [
"EARLY-BOOKING-10"
],
"quoteLineRef": "q-line-1",
"sourceSystem": "reservation",
"billingStatus": "not_billed",
"paymentStatus": "not_due",
"reservationRef": "RSV-1306C259-000001",
"tripCustomerRef": "CUST-20419",
"fulfilmentStatus": "confirmed"
},
"lineVersion": 3,
"updatedAt": "2026-11-02T09:06:42.000Z"
},
{
"lineId": "L-246E4D13D7E2",
"tripId": "TRP-0D3CE7B16625",
"poId": "PO-516C330693E2",
"groupId": null,
"productKind": "excursion",
"productRef": "EXC-NAP-POMPEII",
"departureRef": "MED7-2027-04-12",
"categoryRef": null,
"channel": "app",
"market": "IT",
"amountMinor": 0,
"currency": "EUR",
"status": "cancelled",
"roles": {
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"booker": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"travellers": [
{
"ref": "PAX-01"
},
{
"ref": "PAX-02"
}
]
},
"attributes": {
"poType": "standard",
"source": "order_orchestration",
"quantity": 2,
"poSequence": 2,
"departureAt": "2027-04-12T17:00:00Z",
"serviceDate": "2027-04-14T08:30:00Z",
"orderVersion": 4,
"promotionIds": [],
"sourceSystem": "excursions",
"billingStatus": "not_billed",
"paymentStatus": "not_due",
"reservationRef": "RSV-1306C259-000001",
"passengerShares": [
{
"ref": "PAX-01",
"cancelled": true,
"amountMinor": 0
},
{
"ref": "PAX-02",
"cancelled": true,
"amountMinor": 0
}
],
"tripCustomerRef": "CUST-20419",
"fulfilmentStatus": "cancelled"
},
"lineVersion": 3,
"updatedAt": "2026-11-02T09:06:42.000Z"
},
{
"lineId": "L-A94EBCF306F0",
"tripId": "TRP-0D3CE7B16625",
"poId": "PO-516C330693E2",
"groupId": null,
"productKind": "excursion",
"productRef": "EXC-BCN-SAGRADA",
"departureRef": "MED7-2027-04-12",
"categoryRef": null,
"channel": "app",
"market": "IT",
"amountMinor": 0,
"currency": "EUR",
"status": "cancelled",
"roles": {
"payer": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"booker": {
"ref": "CUST-20419",
"name": "Giulia Rossi"
},
"travellers": [
{
"ref": "PAX-02"
}
]
},
"attributes": {
"poType": "standard",
"source": "order_orchestration",
"quantity": 1,
"poSequence": 2,
"departureAt": "2027-04-12T17:00:00Z",
"serviceDate": "2027-04-17T09:00:00Z",
"orderVersion": 4,
"promotionIds": [],
"sourceSystem": "excursions",
"billingStatus": "not_billed",
"paymentStatus": "not_due",
"reservationRef": "RSV-1306C259-000001",
"passengerShares": [
{
"ref": "PAX-02",
"cancelled": true,
"amountMinor": 0
}
],
"tripCustomerRef": "CUST-20419",
"fulfilmentStatus": "cancelled"
},
"lineVersion": 3,
"updatedAt": "2026-11-02T09:06:42.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.
404oms_ops_not_enabledOrder operations are not enabled for the tenant.
500internalUnexpected failure. Retry with the same Idempotency-Key.