Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions deliverables/1 search offers/Animal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Animal:
allOf:
- $ref: .\TravellingEntity.yaml
- type: object
additionalProperties: false
description: ANIMAL — an animal travelling alongside its owner.
required:
- entityType
- type
properties:
entityType:
type: string
const: animal
type:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could be interesting to indicate the size of the animal. Particularly if it fits in a basket or not (possibly not the same price).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be precice: "Animal on a leash and muzzled, or in a carrier bag".

type: string
description: Category of animal (operator-defined, e.g. dog, cat, other).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not operator-defined. We can propose categories, and if organisations want to extend it, they can, after notifying the OTI governance body.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also be a categorisation by size of the animal as it often as more impact of the footprint of a travelling entity

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Categorizations need to be descriptive (e.g. animals carried in a handbag), no one will measure or weight animals when entering a train.

x-extensible-enum:
- dog
- cat
- other
assistant:
type: boolean
description: Whether this animal is a registered assistance animal.

16 changes: 16 additions & 0 deletions deliverables/1 search offers/EntitlementRight.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
EntitlementRight:
type: object
additionalProperties: false
description: ENTITLEMENT RIGHT — a credential held by a travelling entity that may qualify for reduced fares or additional offers (loyalty card, discount card, company card, concession, etc.).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where to give information on NFC smartcard held by a passenger. It is not a mean to get reduced or additional offer. thus:

  • either generalize this area with any object held by a traveller that could impact the distribution (not only a mean to get a reduced or additional offer).
  • or create a dedicated object around fulfilment device held by the traveller (NFC card, ID of a enrolled smartphone)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support card based and account based ticketing the card details are necessary from the beginning, optionally also including the card content.

CardReference:
type: object
additionalProperties: false
description: |
Number and issuer are needed to identify a travel account, the code identifies a reduction card.
required:
- type
properties:
code:
description: |
Code of the card type according to issuer.
type: string
nullable: true
number:
description: |
Number identifying the travel account, need issuer to be unique.
type: string
nullable: true
issuer:
$ref: '#/components/schemas/CompanyRef'
type:
$ref: '#/components/schemas/TravelAccountType'
chipCardContentFormat:
type: string
x-extensible-enum:
- CALYPSO-ABT
- CALYPSO-CBT
chipCardContent:
description: |
base64 encoded content of the chip card. This is in some scenarios needed to validate whether the new ticket will be compatible with the tickets already on the card.
type: string
format: byte
maxLength: 4194304
nullable: true

The travel account number need to be split into a personal account id and the account agreement id to cover separate account ids like using a credit card hash as account id.

required:
- entitlementType

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 'code' is required as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you clarify what you mean by 'code' here? I would suggest adding something more explicit such as 'entitlementReference'

properties:
issuer:
type: string
description: Issuing authority or scheme name.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An optional identifier could be added (like RICS code)

entitlementType:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need two types, one to indicate the category (LOYALTY_CARD, REDUCTION_CARD, CORPORATE_CODE, ...) and one to indicate the entitlement type in the context of the category and issuer (BAHNCARD_50_CLASS_1, ...).

type: string
description: Type of entitlement (operator-defined lookup value, e.g. loyaltyCard, discountCard, concession).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for animals, we can propose categories

code:
type: string
description: Instance identifier such as a card number or voucher code.
45 changes: 45 additions & 0 deletions deliverables/1 search offers/Luggage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Luggage:
allOf:
- $ref: .\TravellingEntity.yaml
- type: object
additionalProperties: false
description: LUGGAGE — a bulky item a traveller brings that may affect offer availability, space allocation, or price.
required:
- entityType
- type
properties:
entityType:
type: string
const: luggage
type:
type: string
description: Category of item.
x-extensible-enum:
- bicycle
- pram
- luggage
- wheelchair
- skis
- snowboard
- musicalInstrument
- other
length:
type: number
format: double
minimum: 0.0
description: Length in meters.
width:
type: number
format: double
minimum: 0.0
description: Width in meters.
height:
type: number
format: double
minimum: 0.0
description: Height in meters.
weight:
type: number
format: double
minimum: 0.0
description: Weight in kilograms.
52 changes: 52 additions & 0 deletions deliverables/1 search offers/PassengerVehicle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
PassengerVehicle:
allOf:
- $ref: .\TravellingEntity.yaml
- type: object
additionalProperties: false
description: PASSENGER VEHICLE — a traveller-owned vehicle to be transported (e.g. on a ferry or car-train).
required:
- entityType
- type
properties:
entityType:
type: string
const: vehicle
type:
type: string
description: Vehicle category.
x-extensible-enum:
- car
- motorhome
- caravan
- motorcycle
- bicycle
- trailerOnly
length:
type: number
format: double
minimum: 0.0
description: Total length of the vehicle in meters.
width:
type: number
format: double
minimum: 0.0
description: Width of the vehicle in meters.
height:
type: number
format: double
minimum: 0.0
description: Height of the vehicle in metres.
weight:
type: number
format: double
minimum: 0.0
description: Total weight of the vehicle in kilograms.
trailer:
description: Details of a towed trailer, if applicable.
$ref: .\PassengerVehicle.yaml
vehicleRacks:
type: array
maxItems: 2
description: Vehicle racks (e.g. bike racks) mounted on the vehicle.
items:
$ref: .\VehicleRack.yaml
35 changes: 35 additions & 0 deletions deliverables/1 search offers/Traveller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Traveller:
allOf:
- $ref: .\TravellingEntity.yaml
- type: object
additionalProperties: false
description: TRAVELLER — a human traveller for whom offers are sought.
required:
- entityType
properties:
entityType:
type: string
const: traveller
age:
type: integer
minimum: 0
description: Age in years at the start time of travel.
gender:
type: string
description: Gender of the traveller
enum:
- male
- female
- other
- not_specified
assistant:
type: boolean
description: Whether this traveller acts as an assistant to another traveller.
externalReference:
type: string
description: Caller-assigned external reference for this traveller.
personalNeeds:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could split between 'personalNeeds' & 'assistanceNeeds' with the 2nd one referring to specific services

type: array
description: Accessibility or personal needs types (operator-defined lookup values, see GET /personal-needs or GET /collections/personal-needs/items).
items:
type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
TravellerQualifyingCharacteristics:
Comment thread
edwinvandenbelt marked this conversation as resolved.
type: object
additionalProperties: false
description: TRAVELLER QUALIFYING CHARACTERISTICS — demographic and eligibility data used for fare calculation. May contain GDPR-sensitive personal data; transmit only when required.
properties:
fullName:
type: string
description: Full name of the traveller.
nationality:
type: string
description: Nationality (ISO 3166-1 alpha-2 country code).
residency:
type: string
description: Country of residency (ISO 3166-1 alpha-2) for domestic vs. international fare eligibility.
dateOfBirth:
Comment thread
edwinvandenbelt marked this conversation as resolved.
type: string
format: date
description: Date of birth. (TBD — final field name pending.)
licenseTypes:
type: array
description: License types held by this traveller that may affect offer availability.
items:
type: string
25 changes: 25 additions & 0 deletions deliverables/1 search offers/TravellingEntity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
TravellingEntity:
type: object
description: TRAVELLING ENTITY — base class for all entities taking part in a journey. Use the entityType discriminator to select the concrete sub-type.
required:
- entityType
- travellingEntityId
properties:
travellingEntityId:
type: string
description: Stable caller-assigned identifier for this entity. Must be unique within the request.
entityType:
type: string
enum:
- traveller
- vehicle
- animal
- luggage
description: Discriminator identifying the concrete type of this entity.
entitlementRights:
type: array
description: ENTITLEMENT RIGHTs held by this entity that may qualify for reduced fares or additional offers.
items:
$ref: .\EntitlementRight.yaml
example:
Comment thread
edwinvandenbelt marked this conversation as resolved.
{ "travellingEntityId": "TE-123", "entityType": "traveller", "entitlementRights": [ { "entitlementRightId": "ER-456", "description": "Senior citizen discount" } ] }
41 changes: 41 additions & 0 deletions deliverables/1 search offers/VehicleRack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
VehicleRack:
type: object
additionalProperties: false
description: VEHICLE RACK — a rack or carrier mounted on a passenger vehicle (e.g. roof rack, bike carrier).
properties:
type:
type: string
description: Type of rack.
x-extensible-enum:
- roofRack
- bikeCarrier
- skiCarrier
- towbarCarrier
- other
mounting:
type: string
description: How the rack is mounted on the vehicle.
enum:
- roof
- towbar
- rear
length:
type: number
format: double
minimum: 0.0
description: Length of the rack in meters.
width:
type: number
format: double
minimum: 0.0
description: Width of the rack in meters.
height:
type: number
format: double
minimum: 0.0
description: Height of the rack in meters.
weight:
type: number
format: double
minimum: 0.0
description: Weight of the rack (including load) in kilograms.