Skip to main content

Data model

The domain objects the Journeys API works with, their fields, and how they map to the underlying Kaptio platform concepts. Two groups:

  • Catalog objects — read-only browse data (trips, categories, rooms/cabins, activities)
  • Commerce objects — mutable session state (basket, travellers, pricing, payments, booking)
Trip (Voyage wire type) ──has──► departureDates

└─ RoomCategory ──contains──► RoomOption Activity
│ │
▼ ▼
Basket ──contains──► BasketComponent ──holds──► ComponentSelection
├──── Traveller[]
├──── promotions: string[]
├──── BasketPricing (computed)
├──── PaymentSchedule[] (computed)
├──── PaymentRequest[]

└──checkout──► BookingResult ──lands as──► Salesforce Itinerary

Catalog objects

Trip (Voyage wire type)

A sellable trip — one Kaptio package departure with its from-prices. Returned by the neutral GET /catalog/trips route or the backward-compatible /catalog/voyages alias. The type and field names retain voyage terminology for wire compatibility.

FieldTypeDescription
voyageCodestringPackage external code — stable across environments
voyageNamestringDisplay name
regionstringDestination region grouping
durationDaysnumberTrip length
shipNamestringVessel operating a cruise trip; empty for touring
departureDatesarray{ label, date } per departure — date is ISO 8601
fromPricenumber | nullLowest lead-in price in the tenant's default currency. null when no valid price resolved — never 0
currencystringCurrency of fromPrice
fromPriceUSDfromPriceCADnumber | nullLead-in price per configured currency (live.from_price_currencies)
sellingStatusstringe.g. Open, Sold Out, On Request
voyageSeasonstringSeason grouping; for touring this can be the departure year

RoomCategory (CabinCategory wire type)

A room or cabin grade grouped into display tiers configured in journey.yamlcatalog.category_tiers. Cruise examples include Balcony Stateroom; touring examples include Twin Room and Single Room. Returned by GET /catalog/categories.

FieldTypeDescription
kaptioNamestringCanonical category name in Kaptio — the key used when requesting rooms
labelstringDisplay label
tierstringTier name from category_tiers
tierGroupstringHigher-level grouping for UI sections
isSolobooleanSingle-occupancy category
isPopularbooleanUI hint for a "most popular" badge
sortOrdernumberDisplay ordering

RoomOption (Cabin wire type)

A bookable room selection with live availability and price. Returned by GET /catalog/rooms or the backward-compatible /catalog/cabins alias. Cruise rows can represent a physical cabin; touring rows represent a priced package room option.

FieldTypeDescription
idnumber | stringCabin row identifier
cabinNumberstringPhysical cabin number in cruise, or room-option display name in touring
decknumberDeck number in cruise; neutral value in touring
locationstringCruise location such as Forward, Midship, Aft; empty in touring
priceAmountnumberPrice in the requested currency
priceCurrencystringISO 4217
priceBasisstringe.g. per person
berthsAvailablenumberRemaining berths
componentIdstringSelection context — the package component this cabin belongs to
optionIdnumberSelection context — component option
itemOptionIdstringSelection context — item option
cabinTypeIdstringSelection context — cabin type

Selection-context fields are opaque to the UI: pass the values returned for the row back verbatim in a ComponentSelection. Cruise responses can include all four fields; touring selections use the package component, option, and item-option context.

Activity

An optional package add-on for a trip. Returned by GET /catalog/activities. Externally quoted ancillaries use a separate Journeys-owned selection model and are not Basket Service components.

FieldTypeDescription
activityNamestringDisplay name
priceAmountnumberPrice in the requested currency
priceCurrencystringISO 4217
unitsAvailablenumberRemaining capacity

Commerce objects

Basket

The commerce session — everything selected so far, who is travelling, and which promotions apply. Created by POST /baskets.

FieldTypeDescription
idstringBasket ID — used in all subsequent calls
tenant_idstringOwning tenant. Enforced on every read/write
channel_idstringJourney channel the session started in
package_idstringSelected package
departure_idstringSelected departure
currency_codestringSession currency
occupancyOccupancy[]Party shape, one entry per room or cabin
componentsBasketComponent[]Package components and their selections
travellersTraveller[]Passenger details
promotionsstring[]Applied promotion codes
statusstringopenpricedbooked
created_atstringISO 8601

Occupancy

FieldTypeDescription
adultsnumberAdults in the room or cabin
childrennumberChildren in the room or cabin

BasketComponent

A configurable slot in the package (e.g. a room/cabin component or an activities component).

FieldTypeDescription
component_idstringPackage component ID
selectionsComponentSelection[]Chosen options — empty until the guest selects

ComponentSelection

One chosen option within a component — e.g. a touring room configuration, a specific cruise cabin, or an activity.

FieldTypeRequiredDescription
option_idstringYesComponent option (from the cabin/activity selection context)
item_option_idstringYesItem option (from the selection context)
cabin_idstringNoSpecific cabin identifier when the cruise inventory model requires it
travellersnumber[]NoTraveller indexes the selection applies to
roomsnumber[]NoRoom indexes (multi-room baskets)
unitsnumber[]NoUnit counts where applicable

Traveller

FieldTypeRequiredDescription
idstringYesStable index within the basket ("1", "2", …)
first_namestringYes
last_namestringYes
emailstringYes
phonestringNo
date_of_birthstringNoISO 8601 date
contactbooleanNoMarks the lead passenger

BasketPricing

Computed by the platform pricing engine from the basket's current state. Returned by GET /baskets/:id/prices.

FieldTypeDescription
subtotalnumberBefore taxes
taxesnumberTax total per the tenant's tax profile
totalnumberGrand total
currencystringISO 4217
deposit_amountnumberAmount due now
deposit_percentagenumberDeposit rule applied
balance_duenumberRemaining after deposit
balance_due_datestringISO 8601 date
commission_amountnumberOptional aggregate reseller commission; omitted when no positive applicable_to: reseller_commission lines are returned
commission_linesarrayOptional commission lines grouped as { label, amount, currency } from the same KTAPI lines
external_ancillary_linesarrayOptional signed external selections shown separately from the Kaptio basket total
external_ancillary_totalnumberOptional total of validated external selections
presentation_totalnumberDisplay-only total + external_ancillary_total; not a Basket Service amount
line_itemsarrayAggregated customer sales lines as { label, amount, currency }

commission_amount and commission_lines are informational and do not change total. commission_lines groups by display label; it does not allocate commission to individual customer line_items. The underlying KTAPI response can contain separate price lines with applicable_to: sales, supplier, or reseller_commission.

Payment-method surcharges are not part of BasketPricing. Edge Pay calculates method previews from the selected method's payment.yaml surcharge_percent and returns them on the embed session. An itinerary-level KTAPI Fee line remains part of itinerary pricing and is not the same as a payment surcharge.

PaymentSchedule

A payment option for the basket. Returned by GET /baskets/:id/payment-schedules.

FieldTypeDescription
idstringSchedule rule ID — referenced when creating a payment request
labelstringDisplay label
amountnumberAmount for this schedule
due_datestringISO 8601 date
typestringdeposit or balance

PaymentRequest

A payment being collected. Created by POST /baskets/:id/payment-requests.

FieldTypeDescription
idstringPayment request ID
basket_idstringOwning basket
amountnumberAmount to collect
currencystringISO 4217
statusstringpendingcompleted | failed
payment_urlstringHosted payment page URL, when applicable
surcharge_breakdownobjectEdge Pay surcharge amount; authoritative only on a completed payment

EmbedSession

The Edge Pay hosted-payment handoff returned by POST /baskets/:id/payment-requests/:paymentRequestId/embed-session.

FieldTypeDescription
session_idstringEdge Pay session ID
embed_urlstringHosted payment URL
expires_atstringSession expiry timestamp
surcharge_optionsarrayOptional method-specific previews calculated by Edge Pay from current tenant config

AdvisorAccount

Returned by POST /advisors/lookup for B2B channels.

FieldTypeDescription
account_idstringSalesforce account ID
agency_namestringAgency display name
iata_numberstringAccreditation number matched
emailstringAdvisor email matched
countrystringAgency country

BookingResult

The outcome of checkout. Returned by POST /baskets/:id/bookings.

FieldTypeDescription
itinerary_idstringSalesforce itinerary record ID
booking_referencestringHuman-readable booking number
statusstringItinerary status after creation

Mapping to platform concepts

Journeys objectKaptio platform concept
Trip (Voyage)Package + Package Departure (KTAPI)
RoomCategory / RoomOption (CabinCategory / Cabin)Cruise: package component options over cabin inventory. Touring: required PriceCategories package options over room inventory.
ActivityOptional package component priced per unit
BasketBasket Service session — the staged commercial state before booking
BasketPricingKTAPI pricing engine result (customer sales lines, promotions, and optional aggregate reseller commission)
Promotion codeKTAPI promotion validated for combinability and eligibility
PaymentScheduleKaptio payment schedule rules for the itinerary-to-be
BookingResultItinerary record created in the tenant's Salesforce org

This mapping is why the same data model works for any channel — web, advisor portal, call centre, or an AI agent driving the API directly: every object above is a stable projection of the platform's core commerce model, not a UI-specific construct.

Externally provided ancillaries are intentionally outside this mapping: Journeys keeps a tenant-scoped, tamper-resistant selection, includes the quoted amount in pricing presentation, and orchestrates an ad-hoc itinerary item during checkout. Basket Service does not store that external selection. See Extending journeys with third-party services.