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.jsonhttp://maasglobal.com/core/components/state-log.jsonhttp://maasglobal.com/core/components/fare.jsonhttp://maasglobal.com/core/booking-meta.jsonhttp://maasglobal.com/core/product.jsonhttp://maasglobal.com/core/components/common.jsonhttp://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/agencyIdarrivalDelay
http://maasglobal.com/core/leg.json#/definitions/arrivalDelayArbitrary ticket data for the client
data
objectobject with following properties:
| Property | Type | Required | | ——– | —- | ——– |
departureDelay
http://maasglobal.com/core/leg.json#/definitions/departureDelaydistance
http://maasglobal.com/core/leg.json#/definitions/distanceendTime
http://maasglobal.com/core/leg.json#/definitions/endTimefrom
http://maasglobal.com/core/leg.json#/definitions/fromlegGeometry
http://maasglobal.com/core/leg.json#/definitions/legGeometrymode
http://maasglobal.com/core/leg.json#/definitions/modeproductOption
http://maasglobal.com/core/leg.json#/definitions/productOptionroute
http://maasglobal.com/core/leg.json#/definitions/routerouteLongName
http://maasglobal.com/core/leg.json#/definitions/routeLongNamerouteShortName
http://maasglobal.com/core/leg.json#/definitions/routeShortNamestartTime
http://maasglobal.com/core/leg.json#/definitions/startTimestops
http://maasglobal.com/core/leg.json#/definitions/stopsto
http://maasglobal.com/core/leg.json#/definitions/totspProduct
http://maasglobal.com/core/leg.json#/definitions/tspProductThe rules that MaaS will interpret to schedule, re-validate or cancel the booking.
validityDuration
objectobject 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/timeThe 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.jsoncost
http://maasglobal.com/core/components/cost.jsonMaaS booking customer
customer
All of the following requirements need to be fulfilled.
http://maasglobal.com/core/customer.jsoncustomerSelection
http://maasglobal.com/core/components/customerSelection.jsonfares
Array type: fare
All items must be of the type:
http://maasglobal.com/core/components/fare.jsonid
http://maasglobal.com/core/components/units.json#/definitions/uuidMaaS response may return any subset of legCore
leg
objectobject 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/agencyIdarrivalDelay
http://maasglobal.com/core/leg.json#/definitions/arrivalDelaydepartureDelay
http://maasglobal.com/core/leg.json#/definitions/departureDelaydistance
http://maasglobal.com/core/leg.json#/definitions/distanceendTime
http://maasglobal.com/core/leg.json#/definitions/endTimefrom
http://maasglobal.com/core/leg.json#/definitions/fromlegGeometry
http://maasglobal.com/core/leg.json#/definitions/legGeometrymode
http://maasglobal.com/core/leg.json#/definitions/modeproductOption
http://maasglobal.com/core/leg.json#/definitions/productOptionroute
http://maasglobal.com/core/leg.json#/definitions/routerouteLongName
http://maasglobal.com/core/leg.json#/definitions/routeLongNamerouteShortName
http://maasglobal.com/core/leg.json#/definitions/routeShortNamesignature
http://maasglobal.com/core/components/common.json#/definitions/signaturestartTime
http://maasglobal.com/core/leg.json#/definitions/startTimestate
http://maasglobal.com/core/leg.json#/definitions/statestops
http://maasglobal.com/core/leg.json#/definitions/stopsto
http://maasglobal.com/core/leg.json#/definitions/totspProduct
http://maasglobal.com/core/leg.json#/definitions/tspProductmeta
http://maasglobal.com/core/booking-meta.jsonproduct
http://maasglobal.com/core/product.jsonSignature of a signed object
signature
stringstring
The life-cycle state of a booking
state
enumThe 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.jsonterms
http://maasglobal.com/core/components/terms.jsonThe validity token (such as booking ID, travel ticket etc.) that MaaS clients will display to validate the trip when starting the leg.
token
objectobject with following properties:
| Property | Type | Required |
|---|---|---|
data |
object | Optional |
meta |
object | Optional |
validityDuration |
object | Optional |
Arbitrary ticket data for the client
data
objectobject 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
objectobject with following properties:
| Property | Type | Required | | ——– | —- | ——– |
The rules that MaaS will interpret to schedule, re-validate or cancel the booking.
validityDuration
objectobject 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/timeThe starting time from which the ticket is valid
startTime
http://maasglobal.com/core/components/units.json#/definitions/timetspId
stringstring