Ticket data model

We recommend the ticket system to support the localised use of the following fields described in the table below. As tickets are sold and displayed in 3rd party services, it is important that the end users can be served with comprehensive ticket data.

Please see version management of this content below the table.

Ticket data field name

Filed type

Example value

Description

GTFS equivalent

Ticket data field name

Filed type

Example value

Description

GTFS equivalent

1

agency.logo

string (image)

PHN2ZyB3aWR0aD0iNzExL...

base64 encoded image of the logo

 

2

agency.name

string

 

 

agency_name

3

agency.url

string (url)

 

 

agency_url

4

created_at

string (datetime)

2020-06-25T13:00:00.000Z

Timestamp when ticket is created

 

5

customer_type.description

string

Student ticket is for students only. Valid student card must be presented on ticket inspection.

Description of agency specific customer type

rider_category_description

6

customer_type.name

string

adult

Agency specific customer type eg. "adult", "senior", "student"

rider_category_name

7

html

string

...ticket...

Ticket in HTML format

 

8

id

string

be78e1f9-e4a4-48d2-b9fe-50aa335e5371

Unifying identifier for a single ticket. Can be used to reference a single ticket of a booking.

 

9

locale

string

fi

The locale that has been used to render the ticket and fetch descriptions,instructions etc. eg. "fi", "sv", "en"

see GTFS feed translations.txt

10

maas_operator_id

string

be78e1f9-e4a4-48d2-b9fe-50aa335e5371

ID of the MaaS operator that executed the purchase requests of the booking originally provided by the MaaS API

 

11

price.amount_excluding_vat

number

8.5

Price amount excluding VAT

 

12

price.amount_total

number

10

Price amount including VAT

price (fare_rider_categories)

13

price.currency

string

EUR

Price currency

currency (fare_rider_categories)

14

price.vat_amount

number

1.5

VAT amount

 

15

price.vat_percentage

string

15%

VAT percentage

 

16

qr_code

string (image)

data:image/png;base64,iVBORw0KGg...

base64 encoded image of the qr code

 

17

receipt_number

string

1A2B3C4D5E6F7G8H

Generated by ticket system

 

18

refresh_at

string (date)

2020-06-25T13:00:00.000Z

For the use of HSL-style animated tickets to be inspected manually

 

19

route.description

string

This describes the route

Route description

route_description

20

route.legs

array

[{ stops: [ ... ] }]

All the legs of the route a an array

 

21

route.legs.stops

array

[{ name: "...", location: { ... }, stopTime: "..." }]

All the stops of a leg as an array

 

22

route.legs.stops.location.lat

string (coordinate)

60.16783393799385

Latitude of the stop

stop_lat

23

route.legs.stops.location.lon

string (coordinate)

24.952470228154326

Longitude of the stop

stop_lon

24

route.legs.stops.name

string

Kauppatori, Lyypekinlaituri

Name of the stop

stop_name

25

route.legs.stops.stop_time

string (datetime)

2020-09-30T12:00:00.000Z

Departure time of the vessel from a particular stop

departure_time

26

route.name

string

Kauppatori-Lonna-Suomenlinna

Route name

route_name

27

schema_version

number

1

Version of the ticket data model schema to be used

 

28

status

string (enum)

CONFIRMED

Status of a single ticket. Valid values for this fields will be finalized soon.

 

29

terms_url

string

http://www.terms.and.conditions.fi

Link to Terms of use declaration page on providers web site

 

30

ticket_type.description

string

Ticket allows unrestricted travel between islands xx, xx, xx in hop-on-hop-off style within the same day as ticket has been validated for the first time.

 

fare_description

31

ticket_type.instructions

string

  • Ticket is valid until 03.00 AM.

  • Ticket is read and activated when boarding the vessel.

  • Please arrive 15 minutes prior the departure

Ticket rules and special instructions for using the ticket

fare_instructions

32

ticket_type.name

string

single

Agency specific ticket type eg. single, return, day-ticket

fare_name

33

validity.activated_at

string (datetime)

2020-08-15T00:00:00.000Z

Timestamp when ticket is activated (depends on the case whether this happens on first ticket scan or at moment of purchase)

 

34

validity.deactivates_at

string (datetime)

2020-08-15T00:00:00.000Z

Depending on the ticket type and set rules. Can be set when ticket is activated. If the field is undefined, expiry can't resolved by MaaS operator.

 

35

validity.ends_at

string (datetime)

2020-09-30T00:00:00.000Z

Ticket validity end date & time. Ticket cannot be active after this. For open tickets this the end of the time frame that ticket has to be used.

 

36

validity.starts_at

string (datetime)

2020-05-01T12:00:00.000Z

Ticket validity start date & time. Ticket cannot be active before this. For open tickets this is the time frame that ticket has to be used.

 

 

 

Version, date

Change log

Name/ handle

Version, date

Change log

Name/ handle

Version 1.0. This version has been published 10.5.2021

-

 

 

 

 

 

Vesiliikenteen MaaS -hanke - Maritime MaaS project
Marite MaaS API documentation 2021-2022
Forum Virium Helsinki & City of Helsinki