maas-schemas

response Schema

http://maasglobal.com/tsp/booking-cancel/response.json

Response schema for canceling 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-cancel/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 subset of the standard leg (../core/leg.json)

leg

leg Type

object with following properties:

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

agencyId

agencyId

agencyId Type

departureDelay

departureDelay

departureDelay Type

endTime

endTime

endTime Type

from

Starting location’s lat and lon pair of this request

from

from Type

mode

mode

mode Type

startTime

startTime

startTime Type

to

to

to Type

meta

meta

meta Type

state

For normal full cancellation, end state would be CANCELLED. For booking that has multi tickets, if not all of them are cancelled, response state will be RESERVED

state

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

state Known Values

Value Description
CANCELLED  
RESERVED  

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