maas-schemas

response Schema

http://maasglobal.com/tsp/booking-read-by-id/response.json

Response schema for getting a specific booking with a TSP ID from a TSP adapter

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated No Develop No Forbidden Forbidden tsp/booking-read-by-id/response.json

Schema Hierarchy

response Properties

Property Type Required Nullable Defined by
cost cost Optional No response (this schema)
leg object Optional No response (this schema)
meta booking-meta Optional No response (this schema)
state enum Required No response (this schema)
terms terms Optional No response (this schema)
token object Optional No response (this schema)
tspId string Required No response (this schema)
tspProduct object Optional No response (this schema)

cost

cost

cost Type

leg

A leg delta, containing any subset of the valid properties

leg

leg Type

object with following properties:

Property Type Required
departureDelay   Optional
endTime   Optional
from   Optional
mode   Optional
startTime   Optional
to   Optional

departureDelay

departureDelay

departureDelay Type

endTime

endTime

endTime Type

from

from

from Type

mode

mode

mode Type

startTime

startTime

startTime Type

to

to

to Type

meta

meta

meta Type

state

The life-cycle state of a booking

state

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

state Known Values

Value Description
START  
PENDING  
PAID  
RESERVED  
CONFIRMED  
ARRIVED  
ACTIVATED  
ON_HOLD  
CANCELLED  
EXPIRED  
REJECTED  
FINISHED  
UNKNOWN  

terms

terms

terms Type

token

The validity token (such as booking ID, travel ticket etc.) that MaaS clients will display to validate the trip when starting the leg.

token

token Type

object with following properties:

Property Type Required
data object Optional
meta object Optional
validityDuration object Optional

data

Arbitrary ticket data for the client

data

data Type

object with following properties:

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

meta

Arbitrary metadata the TSP may pass along the ticket to the client (e.g. a booking code, base64 encoded binary)

meta

meta Type

object with following properties:

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

validityDuration

The rules that MaaS will interpret to schedule, re-validate or cancel the booking.

validityDuration

validityDuration Type

object with following properties:

Property Type Required
endTime   Optional
startTime   Optional

endTime

The finishing time the ticket is valid for

endTime

endTime Type

startTime

The starting time from which the ticket is valid

startTime

startTime Type

tspId

tspId

tspId Type

string

tspProduct

Defines what kind of TSP product the booking option represents.

tspProduct

tspProduct Type

object with following properties:

Property Type Required
id string Required

id

Unique identifier for the product

id

id Type

string