http://maasglobal.com/core/booking.json
The base booking object with all fields, to be inherited
Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
---|---|---|---|---|---|---|
Can be instantiated | Yes | Develop | No | Forbidden | Permitted | core/booking.json |
http://maasglobal.com/core/booking.json
http://maasglobal.com/core/components/state.json
http://maasglobal.com/core/components/state-log.json
http://maasglobal.com/core/components/fare.json
http://maasglobal.com/core/booking-meta.json
http://maasglobal.com/core/product.json
http://maasglobal.com/core/components/common.json
http://maasglobal.com/core/components/customerSelection.json
{
"id": "12345678-ABCD-1234-ABCD-123456789ABC",
"state": "EXPIRED",
"leg": {
"to": {
"lat": 60.184333,
"lon": 24.835972,
"name": "Otaranta 6, Espoo",
"address": "streetName:Otaranta|streetNumber:6|city:Espoo|zipCode:02150|country:Suomi"
},
"from": {
"lat": 60.168442,
"lon": 24.932205,
"name": "Urho Kekkosen katu 1, Helsinki",
"address": "streetName:Urho Kekkosen katu|streetNumber:1|city:Helsinki|zipCode:00100|country:Suomi"
},
"mode": "TAXI",
"endTime": 1553092978009,
"agencyId": "Valopilkku",
"startTime": 1553092978009,
"departureDelay": 123456
},
"token": {
"type": "SECURITY_CODE",
"value": "12345"
},
"terms": {
"reusable": false,
"validity": {
"endTime": 1553092978009,
"startTime": 1553092978009
},
"reconcilable": false
},
"meta": {
"raw": {
"data": {
"lat": 60.168442,
"lon": 24.932205,
"vehicle_id": "123"
},
"order_id": 12345,
"timestamp": "2019-03-20T10:10:12+00:00",
"localized_description": "Tilaus on valmis."
},
"MODE_TAXI": {
"vehicleId": "123",
"taxiCenter": {
"name": "Lähitaksi",
"phone": "+3581007300"
},
"vehicleType": "any",
"vehicleLocation": {
"lat": 60.245254,
"lon": 24.989604
}
},
"timestamp": 1553092978009,
"valopilkku": {
"prepaid": true,
"locations": [
{
"type": "pickup",
"address": {
"city": "Helsinki",
"street_address": "Urho Kekkosen katu 1"
},
"contacts": [
{
"name": "John Doe",
"passenger_count": 1,
"provider_order_id": "MaaS-12345"
}
],
"coordinate": {
"lat": 60.168442,
"lon": 24.932205
},
"passenger_count": 1
},
{
"type": "destination",
"address": {
"city": "Espoo",
"street_address": "Otaranta 6"
},
"drop_off": ["MaaS-12345"],
"coordinate": {
"lat": 60.184333,
"lon": 24.835972
},
"passenger_count": 1
}
],
"submitted": "2019-03-21T11:13:19.753Z"
},
"description": "Tilaus on valmis."
},
"created": "2019-03-20 10:10:12.123456",
"modified": "2019-03-20 18:30:12.123456",
"cost": {
"amount": 0,
"currency": "EUR"
},
"stateLog": [
{
"reason": {},
"invalid": false,
"newState": "PENDING",
"oldState": "START",
"timestamp": 1553092178009
},
{
"reason": {},
"invalid": false,
"newState": "PAID",
"oldState": "PENDING",
"timestamp": 1553092278009
},
{
"reason": {},
"invalid": false,
"newState": "RESERVED",
"oldState": "PAID",
"timestamp": 1553092378009
},
{
"reason": {},
"invalid": false,
"newState": "CONFIRMED",
"oldState": "RESERVED",
"timestamp": 1553092478009
},
{
"reason": {},
"invalid": false,
"newState": "ACTIVATED",
"oldState": "CONFIRMED",
"timestamp": 1553092578009
},
{
"reason": {},
"invalid": false,
"newState": "EXPIRED",
"oldState": "ACTIVATED",
"timestamp": 1553092678009
}
],
"productId": "valopilkku-any",
"fares": [
{
"type": "charge",
"amount": 1000,
"currency": "WMP",
"productionAmount": 1234
}
],
"cancelling": false,
"customer": {
"identityId": "eu-west-1:4828507e-683f-41bf-9d87-689808fbf958"
}
}
Property | Type | Group |
---|---|---|
agencyId | agencyId | http://maasglobal.com/core/booking.json#/definitions/leg |
arrivalDelay | arrivalDelay | http://maasglobal.com/core/booking.json#/definitions/leg |
data | object |
http://maasglobal.com/core/booking.json#/definitions/token |
departureDelay | departureDelay | http://maasglobal.com/core/booking.json#/definitions/leg |
distance | distance | http://maasglobal.com/core/booking.json#/definitions/leg |
endTime | endTime | http://maasglobal.com/core/booking.json#/definitions/leg |
from | from | http://maasglobal.com/core/booking.json#/definitions/leg |
legGeometry | legGeometry | http://maasglobal.com/core/booking.json#/definitions/leg |
mode | mode | http://maasglobal.com/core/booking.json#/definitions/leg |
productOption | productOption | http://maasglobal.com/core/booking.json#/definitions/leg |
route | route | http://maasglobal.com/core/booking.json#/definitions/leg |
routeLongName | routeLongName | http://maasglobal.com/core/booking.json#/definitions/leg |
routeShortName | routeShortName | http://maasglobal.com/core/booking.json#/definitions/leg |
startTime | startTime | http://maasglobal.com/core/booking.json#/definitions/leg |
stops | stops | http://maasglobal.com/core/booking.json#/definitions/leg |
to | to | http://maasglobal.com/core/booking.json#/definitions/leg |
tspProduct | tspProduct | http://maasglobal.com/core/booking.json#/definitions/leg |
validityDuration | object |
http://maasglobal.com/core/booking.json#/definitions/token |
agencyId
http://maasglobal.com/core/leg.json#/definitions/agencyId
arrivalDelay
http://maasglobal.com/core/leg.json#/definitions/arrivalDelay
Arbitrary ticket data for the client
data
object
object
with following properties:
| Property | Type | Required | | ——– | —- | ——– |
departureDelay
http://maasglobal.com/core/leg.json#/definitions/departureDelay
distance
http://maasglobal.com/core/leg.json#/definitions/distance
endTime
http://maasglobal.com/core/leg.json#/definitions/endTime
from
http://maasglobal.com/core/leg.json#/definitions/from
legGeometry
http://maasglobal.com/core/leg.json#/definitions/legGeometry
mode
http://maasglobal.com/core/leg.json#/definitions/mode
productOption
http://maasglobal.com/core/leg.json#/definitions/productOption
route
http://maasglobal.com/core/leg.json#/definitions/route
routeLongName
http://maasglobal.com/core/leg.json#/definitions/routeLongName
routeShortName
http://maasglobal.com/core/leg.json#/definitions/routeShortName
startTime
http://maasglobal.com/core/leg.json#/definitions/startTime
stops
http://maasglobal.com/core/leg.json#/definitions/stops
to
http://maasglobal.com/core/leg.json#/definitions/to
tspProduct
http://maasglobal.com/core/leg.json#/definitions/tspProduct
The rules that MaaS will interpret to schedule, re-validate or cancel the booking.
validityDuration
object
object
with following properties:
Property | Type | Required |
---|---|---|
endTime |
Optional | |
startTime |
Optional |
The finishing time the ticket is valid for
endTime
http://maasglobal.com/core/components/units.json#/definitions/time
The starting time from which the ticket is valid
startTime
http://maasglobal.com/core/components/units.json#/definitions/time
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
configurator | configurator | Optional | No | booking (this schema) |
cost | cost | Optional | No | booking (this schema) |
customer | complex | Required | No | booking (this schema) |
customerSelection | customerSelection | Optional | No | booking (this schema) |
fares | fare | Optional | No | booking (this schema) |
id | id | Required | No | booking (this schema) |
leg | object |
Required | No | booking (this schema) |
meta | booking-meta | Required | No | booking (this schema) |
product | product | Optional | No | booking (this schema) |
signature | string |
Optional | No | booking (this schema) |
state | enum |
Required | No | booking (this schema) |
stateLog | state-log | Optional | No | booking (this schema) |
terms | terms | Required | No | booking (this schema) |
token | object |
Required | No | booking (this schema) |
tspId | string |
Optional | No | booking (this schema) |
* |
any | Additional | Yes | this schema allows additional properties |
configurator
http://maasglobal.com/core/components/configurator.json
cost
http://maasglobal.com/core/components/cost.json
MaaS booking customer
customer
All of the following requirements need to be fulfilled.
http://maasglobal.com/core/customer.json
customerSelection
http://maasglobal.com/core/components/customerSelection.json
fares
Array type: fare
All items must be of the type:
http://maasglobal.com/core/components/fare.json
id
http://maasglobal.com/core/components/units.json#/definitions/uuid
MaaS response may return any subset of legCore
leg
object
object
with following properties:
Property | Type | Required |
---|---|---|
agencyId |
Optional | |
arrivalDelay |
Optional | |
departureDelay |
Optional | |
distance |
Optional | |
endTime |
Optional | |
from |
Optional | |
legGeometry |
Optional | |
mode |
Optional | |
productOption |
Optional | |
route |
Optional | |
routeLongName |
Optional | |
routeShortName |
Optional | |
signature |
Optional | |
startTime |
Optional | |
state |
Optional | |
stops |
Optional | |
to |
Optional | |
tspProduct |
Optional |
agencyId
http://maasglobal.com/core/leg.json#/definitions/agencyId
arrivalDelay
http://maasglobal.com/core/leg.json#/definitions/arrivalDelay
departureDelay
http://maasglobal.com/core/leg.json#/definitions/departureDelay
distance
http://maasglobal.com/core/leg.json#/definitions/distance
endTime
http://maasglobal.com/core/leg.json#/definitions/endTime
from
http://maasglobal.com/core/leg.json#/definitions/from
legGeometry
http://maasglobal.com/core/leg.json#/definitions/legGeometry
mode
http://maasglobal.com/core/leg.json#/definitions/mode
productOption
http://maasglobal.com/core/leg.json#/definitions/productOption
route
http://maasglobal.com/core/leg.json#/definitions/route
routeLongName
http://maasglobal.com/core/leg.json#/definitions/routeLongName
routeShortName
http://maasglobal.com/core/leg.json#/definitions/routeShortName
signature
http://maasglobal.com/core/components/common.json#/definitions/signature
startTime
http://maasglobal.com/core/leg.json#/definitions/startTime
state
http://maasglobal.com/core/leg.json#/definitions/state
stops
http://maasglobal.com/core/leg.json#/definitions/stops
to
http://maasglobal.com/core/leg.json#/definitions/to
tspProduct
http://maasglobal.com/core/leg.json#/definitions/tspProduct
meta
http://maasglobal.com/core/booking-meta.json
product
http://maasglobal.com/core/product.json
Signature of a signed object
signature
string
string
The life-cycle state of a booking
state
enum
The value of this property must be equal to one of the known values below.
Value | Description |
---|---|
START |
|
PENDING |
|
PAID |
|
RESERVED |
|
CONFIRMED |
|
ARRIVED |
|
ACTIVATED |
|
ON_HOLD |
|
CANCELLED |
|
EXPIRED |
|
REJECTED |
|
FINISHED |
|
UNKNOWN |
stateLog
http://maasglobal.com/core/components/state-log.json
terms
http://maasglobal.com/core/components/terms.json
The validity token (such as booking ID, travel ticket etc.) that MaaS clients will display to validate the trip when starting the leg.
token
object
object
with following properties:
Property | Type | Required |
---|---|---|
data |
object | Optional |
meta |
object | Optional |
validityDuration |
object | Optional |
Arbitrary ticket data for the client
data
object
object
with following properties:
| Property | Type | Required | | ——– | —- | ——– |
Arbitrary metadata the TSP may pass along the ticket to the client (e.g. a booking code, base64 encoded binary)
meta
object
object
with following properties:
| Property | Type | Required | | ——– | —- | ——– |
The rules that MaaS will interpret to schedule, re-validate or cancel the booking.
validityDuration
object
object
with following properties:
Property | Type | Required |
---|---|---|
endTime |
Optional | |
startTime |
Optional |
The finishing time the ticket is valid for
endTime
http://maasglobal.com/core/components/units.json#/definitions/time
The starting time from which the ticket is valid
startTime
http://maasglobal.com/core/components/units.json#/definitions/time
tspId
string
string