maas-schemas

terms Schema

http://maasglobal.com/core/components/terms.json

MaaS booking terms and condition for its business engine

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated Yes Develop No Forbidden Permitted core/components/terms.json

terms Definitions

Property Type Group
amendable boolean http://maasglobal.com/core/components/terms.json#/definitions/amendment
amount number http://maasglobal.com/core/components/terms.json#/definitions/surcharge
cancellable boolean http://maasglobal.com/core/components/terms.json#/definitions/cancellation
coach multiple http://maasglobal.com/core/components/terms.json#/definitions/seat
cost cost http://maasglobal.com/core/components/terms.json#/definitions/amendment
currency currency http://maasglobal.com/core/components/terms.json#/definitions/surcharge
fare fare http://maasglobal.com/core/components/terms.json#/definitions/amendment
isChargedUpfront boolean http://maasglobal.com/core/components/terms.json#/definitions/surcharge
maxAmount number http://maasglobal.com/core/components/terms.json#/definitions/surcharge
minAmount number http://maasglobal.com/core/components/terms.json#/definitions/surcharge
number multiple http://maasglobal.com/core/components/terms.json#/definitions/seat
percentage number http://maasglobal.com/core/components/terms.json#/definitions/surcharge
refunded boolean http://maasglobal.com/core/components/terms.json#/definitions/cancellation
route string http://maasglobal.com/core/components/terms.json#/definitions/seat

amendable

A flag indicating whether this booking can be amended

amendable

amendable Type

boolean

amount

The amount in currency

amount

amount Type

number

cancellable

A flag indicating whether this booking can be cancelled in ‘RESERVED’ state

cancellable

cancellable Type

boolean

coach

coach

coach Type

Either one of:

cost

cost

cost Type

currency

currency

currency Type

fare

fare

fare Type

isChargedUpfront

Whether this is charged upfront or during reconciliation phase

isChargedUpfront

isChargedUpfront Type

boolean

maxAmount

The maximum amount in currency

maxAmount

maxAmount Type

number

minAmount

The minimum amount in currency

minAmount

minAmount Type

number

number

number

number Type

Either one of:

percentage

Surcharge percentage over the original fee

percentage

percentage Type

number

refunded

Whether this part of the booking has been refunded

refunded

refunded Type

boolean

route

The leg’s route number that this seat info belongs

route

route Type

string

terms Properties

Property Type Required Nullable Defined by
amendment object Optional No terms (this schema)
cancellation object Optional No terms (this schema)
fareRates object[] Optional No terms (this schema)
reconcilable boolean Optional No terms (this schema)
restrictions object Optional No terms (this schema)
reusable boolean Optional No terms (this schema)
seatings seat Optional No terms (this schema)
surcharges object Optional No terms (this schema)
type string Optional No terms (this schema)
validity object Optional No terms (this schema)
* any Additional Yes this schema allows additional properties

amendment

amendment

amendment Type

object with following properties:

Property Type Required
outward   Optional
return   Optional

outward

outward

outward Type

return

return

return Type

cancellation

cancellation

cancellation Type

object with following properties:

Property Type Required
cancellationFormActionUrl string Optional
outward   Optional
return   Optional

cancellationFormActionUrl

User will fill in this form to cancel their ticket should programmed cancellation does not function. Edge case support

cancellationFormActionUrl

cancellationFormActionUrl Type

string

All instances must conform to this regular expression (test examples here):

^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$

outward

outward

outward Type

return

return

return Type

fareRates

fareRates

fareRates Type

Array type: object[]

All items must be of the type: object with following properties:

Property Type Required
amount number Required
currency   Required
startAt number Optional
timeInterval number Optional
type   Optional

amount

amount

amount Type

number

currency

currency

currency Type

startAt

Amount of seconds after this fare rate should be applied to

startAt

startAt Type

number

timeInterval

Amount of seconds that fare rate is applied to

timeInterval

timeInterval Type

number

type

type

The value of this property must be equal to one of the known values below.

type Known Values
Value Description
maxRate  
missedReturnPenalty  
extra  

Booking fare rate

reconcilable

A flag indicating whether this booking will be reconciled once the trip has finished

reconcilable

reconcilable Type

boolean

restrictions

Booking restrictions

restrictions

restrictions Type

object with following properties:

Property Type Required
freeTicket object Optional
singleDevice boolean Optional
skipRestrictionCheck boolean Optional

freeTicket

A JSON schema object which defines restriction rules for free ticket

freeTicket

freeTicket Type

object with following properties:

| Property | Type | Required | | ——– | —- | ——– |

singleDevice

A flag indicating whether this booking can be viewed in multiple devices at the same time

singleDevice

singleDevice Type

boolean

skipRestrictionCheck

A flag indicating whether restriction check should be run

skipRestrictionCheck

skipRestrictionCheck Type

boolean

reusable

A flag indicating whether this booking can be reused for another trip within the validity period

reusable

reusable Type

boolean

seatings

In 1 booking for a journey, it can be valid for many of the journey’s leg. Each item of seating is a seat on 1 specific route

seatings

seatings Type

Array type: seat

All items must be of the type:

surcharges

Surcharges that have been added to the cost/fare of the booking under certain conditions

surcharges

surcharges Type

object with following properties:

Property Type Required
midnight   Optional
pickup   Optional

midnight

Fee for booking during night time

midnight

midnight Type

pickup

Fee for pickup, usually for TAXI bookings

pickup

pickup Type

type

A type of ticket/product that this booking is valid for - should be unique within a given region, e.g. ‘Single ticket / Lähiseutu 2’. When reusing the tickets in maas-backend, the ‘type’ field is checked for equality.

type

type Type

string

validity

Booking validity conditions

validity

validity Type

object with following properties:

Property Type Required
endTime integer Required
endTimeReturn integer Optional
startTime integer Required
startTimeReturn integer Optional

endTime

Epoch when the outbound ticket will be invalid

endTime

endTime Type

integer

endTimeReturn

Epoch when the return ticket will be invalid

endTimeReturn

endTimeReturn Type

integer

startTime

Epoch when the outbound ticket will be valid

startTime

startTime Type

integer

startTimeReturn

Epoch when the return ticket will be valid

startTimeReturn

startTimeReturn Type

integer