http://maasglobal.com/tsp/booking-create/response.json
Response schema for creating a booking through a TSP adapter
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|---|---|---|---|---|---|---|
| Can be instantiated | No | Develop | No | Forbidden | Forbidden | tsp/booking-create/response.json |
http://maasglobal.com/tsp/booking-create/response.json
http://maasglobal.com/core/booking.jsonhttp://maasglobal.com/core/components/state.jsonhttp://maasglobal.com/core/booking-option.jsonhttp://maasglobal.com/core/booking-meta.jsonhttp://maasglobal.com/core/components/configurator.jsonhttp://maasglobal.com/core/components/customerSelection.json{
"leg": {
"from": {
"name": "Siltasaarenkatu 1, Helsinki",
"address": "streetName:Siltasaarenkatu|streetNumber:1|city:Helsinki|zipCode:00530|country:Suomi",
"lat": 60.177252,
"lon": 24.950388
},
"to": {
"name": "Ida Aalbergin tie 3, Helsinki",
"address": "streetName:Ida%20Aalbergin%20tie|streetNumber:1|city:Helsinki|zipCode:00400|country:Suomi",
"lat": 60.231538,
"lon": 24.892568
},
"startTime": 1572440451838,
"endTime": 1572441571838,
"mode": "TAXI",
"departureDelay": 900000
},
"customer": {
"email": "test@example.com",
"phone": "+358400001010",
"locale": "en",
"clientId": "whim",
"lastName": "Tester",
"opaqueId": "cafecaca",
"firstName": "Test"
},
"state": "RESERVED",
"tspId": "deadbeefdeadbeefdeadcafebeef",
"terms": {
"reusable": false,
"validity": {
"endTime": 1572355249017,
"startTime": 1572355193128
},
"reconcilable": false
},
"tspProduct": {
"id": "testtaxi1-product1"
},
"meta": {
"MODE_TAXI": {
"driver": {},
"taxiCenter": {
"name": "Taksi Test1",
"phone": "+358400001010"
},
"vehicleType": "any"
}
},
"cost": {
"amount": 22,
"currency": "EUR"
},
"tspProductId": "testtaxi1-product1",
"token": {}
}
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| configurator | configurator | Optional | No | response (this schema) |
| cost | cost | Optional | No | response (this schema) |
| customer | customer | Optional | No | response (this schema) |
| customerSelection | customerSelection | Optional | No | response (this schema) |
| leg | object |
Optional | No | response (this schema) |
| meta | booking-meta | Required | No | response (this schema) |
| state | enum |
Required | No | response (this schema) |
| terms | terms | Required | No | response (this schema) |
| token | object |
Required | No | response (this schema) |
| tspId | string |
Required | No | response (this schema) |
| tspProduct | object |
Required | No | response (this schema) |
configurator
http://maasglobal.com/core/components/configurator.jsoncost
http://maasglobal.com/core/components/cost.jsonMaaS booking customer
customer
http://maasglobal.com/core/customer.jsoncustomerSelection
http://maasglobal.com/core/components/customerSelection.jsonA subset of the standard leg (../core/leg.json)
leg
objectobject with following properties:
| Property | Type | Required |
|---|---|---|
agencyId |
Optional | |
departureDelay |
Optional | |
endTime |
Required | |
from |
Required | |
mode |
Required | |
startTime |
Required | |
to |
Required |
agencyId
http://maasglobal.com/core/components/common.json#/definitions/agencyIddepartureDelay
http://maasglobal.com/core/components/units.json#/definitions/durationendTime
http://maasglobal.com/core/components/units.json#/definitions/timeStarting location’s lat and lon pair of this request
from
http://maasglobal.com/core/components/place.jsonmode
http://maasglobal.com/core/components/travel-mode.jsonstartTime
http://maasglobal.com/core/components/units.json#/definitions/timeto
http://maasglobal.com/core/components/place.jsonmeta
http://maasglobal.com/core/booking-meta.jsonThe 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 |
terms
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
Defines what kind of TSP product the booking option represents.
tspProduct
objectobject with following properties:
| Property | Type | Required |
|---|---|---|
id |
string | Required |
Unique identifier for the product
id
stringstring