maas-schemas

itinerary Schema

http://maasglobal.com/core/itinerary.json

OpenTripPlanner itinerary, augmented with leg bookings per leg

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated Yes Develop No Forbidden Forbidden core/itinerary.json

Schema Hierarchy

itinerary Properties

Property Type Required Nullable Defined by
bookings booking Optional No itinerary (this schema)
co2 number Optional No itinerary (this schema)
endTime integer Required No itinerary (this schema)
fares fare Optional No itinerary (this schema)
id id Optional No itinerary (this schema)
identityId complex Optional No itinerary (this schema)
isOvertaken boolean Optional No itinerary (this schema)
legs leg Required No itinerary (this schema)
productOptions product-option Optional No itinerary (this schema)
signature string Optional No itinerary (this schema)
sourcePlanId string Optional No itinerary (this schema)
startTime integer Required No itinerary (this schema)
state enum Optional No itinerary (this schema)
type enum Optional No itinerary (this schema)

bookings

bookings

bookings Type

Array type: booking

All items must be of the type:

co2

Grams of CO2 as a byproduct by the trip

co2

co2 Type

number

endTime

POSIX time in milliseconds, https://en.wikipedia.org/wiki/Unix_time

endTime

endTime Type

integer

fares

fares

fares Type

Array type: fare

All items must be of the type:

id

id

id Type

identityId

identityId

identityId Type

Any following options needs to be fulfilled.

Option 1

string

All instances must conform to this regular expression

^[aepus]{2}-[\w]{4}-\d:[a-f\d]{8}(-[a-f\d]{4}){3}-[a-f\d]{12}$

Option 2

string

All instances must conform to this regular expression

^[A-Fa-f0-9]{8}(-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}$

identityId Examples

"eu-west-1:4828507e-683f-41bf-9d87-689808fbf958"
"4828507e-683f-41bf-9d87-689808fbf958"

isOvertaken

isOvertaken

isOvertaken Type

boolean

legs

legs

legs Type

Array type: leg

All items must be of the type:

productOptions

productOptions

productOptions Type

Array type: product-option

All items must be of the type:

signature

Signature of a signed object

signature

signature Type

string

sourcePlanId

Universally unique identifier, see https://en.wikipedia.org/wiki/Universally_unique_identifier

sourcePlanId

sourcePlanId Type

string

All instances must conform to this regular expression

^[A-Fa-f0-9]{8}(-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}$

sourcePlanId Example

"4828507e-683f-41bf-9d87-689808fbf958"

startTime

POSIX time in milliseconds, https://en.wikipedia.org/wiki/Unix_time

startTime

startTime Type

integer

state

The life-cycle state of an itinerary

state

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

state Known Values

Value Description
START  
PLANNED  
PAID  
ACTIVATED  
CANCELLED  
CANCELLED_WITH_ERRORS  
FINISHED  

type

type

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

type Known Values

Value Description
outward  
return