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 |
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 |
A flag indicating whether this booking can be amended
amendable
boolean
boolean
The amount in currency
amount
number
number
0
0.01
A flag indicating whether this booking can be cancelled in ‘RESERVED’ state
cancellable
boolean
boolean
coach
Either one of:
string
number
cost
http://maasglobal.com/core/components/cost.json
currency
http://maasglobal.com/core/components/units.json#/definitions/currency
fare
http://maasglobal.com/core/components/fare.json
Whether this is charged upfront or during reconciliation phase
isChargedUpfront
boolean
boolean
The maximum amount in currency
maxAmount
number
number
0
0.01
The minimum amount in currency
minAmount
number
number
0
0.01
number
Either one of:
string
number
Surcharge percentage over the original fee
percentage
number
number
Whether this part of the booking has been refunded
refunded
boolean
boolean
The leg’s route number that this seat info belongs
route
string
string
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
object
object
with following properties:
Property | Type | Required |
---|---|---|
outward |
Optional | |
return |
Optional |
outward
#/definitions/amendment
return
#/definitions/amendment
cancellation
object
object
with following properties:
Property | Type | Required |
---|---|---|
cancellationFormActionUrl |
string | Optional |
outward |
Optional | |
return |
Optional |
User will fill in this form to cancel their ticket should programmed cancellation does not function. Edge case support
cancellationFormActionUrl
string
All instances must conform to this regular expression (test examples here):
^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$
outward
#/definitions/cancellation
return
#/definitions/cancellation
fareRates
object[]
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
number
number
0
0.01
currency
http://maasglobal.com/core/components/units.json#/definitions/currency
Amount of seconds after this fare rate should be applied to
startAt
number
number
0
1
Amount of seconds that fare rate is applied to
timeInterval
number
number
1
1
type
enum
The value of this property must be equal to one of the known values below.
Value | Description |
---|---|
maxRate |
|
missedReturnPenalty |
|
extra |
Booking fare rate
A flag indicating whether this booking will be reconciled once the trip has finished
reconcilable
boolean
boolean
Booking restrictions
restrictions
object
object
with following properties:
Property | Type | Required |
---|---|---|
freeTicket |
object | Optional |
singleDevice |
boolean | Optional |
skipRestrictionCheck |
boolean | Optional |
A JSON schema object which defines restriction rules for free ticket
freeTicket
object
object
with following properties:
| Property | Type | Required | | ——– | —- | ——– |
A flag indicating whether this booking can be viewed in multiple devices at the same time
singleDevice
boolean
boolean
A flag indicating whether restriction check should be run
skipRestrictionCheck
boolean
boolean
A flag indicating whether this booking can be reused for another trip within the validity period
reusable
boolean
boolean
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
Array type: seat
All items must be of the type:
#/definitions/seat
Surcharges that have been added to the cost/fare of the booking under certain conditions
surcharges
object
object
with following properties:
Property | Type | Required |
---|---|---|
midnight |
Optional | |
pickup |
Optional |
Fee for booking during night time
midnight
#/definitions/surcharge
Fee for pickup, usually for TAXI bookings
pickup
#/definitions/surcharge
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
string
string
Booking validity conditions
validity
object
object
with following properties:
Property | Type | Required |
---|---|---|
endTime |
integer | Required |
endTimeReturn |
integer | Optional |
startTime |
integer | Required |
startTimeReturn |
integer | Optional |
Epoch when the outbound ticket will be invalid
endTime
integer
1451606400
9007199254740991
Epoch when the return ticket will be invalid
endTimeReturn
integer
1451606400
9007199254740991
Epoch when the outbound ticket will be valid
startTime
integer
1451606400
9007199254740991
Epoch when the return ticket will be valid
startTimeReturn
integer
1451606400
9007199254740991