maas-schemas

remote-request Schema

http://maasglobal.com/tsp/webhooks-bookings-update/remote-request.json

Remote request schema, e.g. how TSP should call MaaS-backend

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated No Develop No Forbidden Forbidden tsp/webhooks-bookings-update/remote-request.json

Schema Hierarchy

remote-request Properties

Property Type Required Nullable Defined by
cost cost Optional No remote-request (this schema)
leg object Optional No remote-request (this schema)
meta booking-meta Optional No remote-request (this schema)
reason object Optional No remote-request (this schema)
state enum Required No remote-request (this schema)
terms terms Optional No remote-request (this schema)
token object Optional No remote-request (this schema)
tspId string Required No remote-request (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

reason

MaaS error reason definition

A data structure to convey information about issues, rejections or service denial to the clients

reason

reason Type

object with following properties:

Property Type Required
errorCode string Optional
text string Optional

errorCode

errorCode

errorCode Type

string

text

text

text Type

string

state

state

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

state Known Values

Value Description
RESERVED  
CONFIRMED  
ACTIVATED  
EXPIRED  
CANCELLED  
REJECTED  

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