Trip#
Trip#
A Trip is the transportation of Rider(s) in a vehicle, from an origin to a destination. A Trip is ordered by a Customer, and it happens within a Service Area.
A Trip can be:
cancelled by Customer or by Integrator
Trip Semantics#
State#
At any point in time, a Trip is in a specific state. A Trip transitions between states depending on many factors. This is what we call the lifecycle of a Trip.
The states for the happy path of a Trip are as follows:
When a Trip is ordered, it is instantiated in the system with state
Ordered
.When the first vehicle assignment is found for the Trip, it becomes
Accepted
.When the Rider is picked up, the Trip becomes
PickedUp
.Finally, when the Rider is dropped off, the Trip becomes
DroppedOff
.
Some events might take the Trip out of the happy path.
A Trip can be Rejected
by the system, after becoming Ordered
.
A Trip can be Terminated
by the system, after the Trip was Accepted
or PickedUp
.
A Trip can be Cancelled
, by the Customer or by the Integrator, after it was Ordered
or Accepted
.
And finally, a Trip can be NoShow
if the Customer did not show up at the pick-up location.
All these states and transitions are shown in the following diagram:
Load#
A Load represents a single Rider with all large physical objects that should be transported in the vehicle when taking the Trip. A vehicle is matched based on the specified Load, ensuring it meets all the necessary requirements for transport.
When requesting Offers, a list of Load must be provided in the request.
Each Load can be classified as either an Adult or a Child.
Adult: may include a
Wheelchair
.Child: may include a
ChildSeat
orWheelchair
.
Examples#
Two Adults without the need of a Wheelchair accessible vehicle.
{
...
"load": [
{
"adult":
{
"wheelchair": "WHEELCHAIR_NOT_NEEDED"
}
},
{
"adult":
{
"wheelchair": "WHEELCHAIR_NOT_NEEDED"
}
}
]
}
One Adult that requires a Wheelchair assessible vehicle, one Child that requires a ChildSeat of booster type.
{
...
"load": [
{
"adult":
{
"wheelchair": "WHEELCHAIR_NEEDED"
}
},
{
"child":
{
"child_seat": "CHILD_SEAT_BOOSTER",
"wheelchair": "WHEELCHAIR_NOT_NEEDED"
}
}
]
}
One Adult, one Child that requires a Wheelchair accessible vehicle.
{
...
"load": [
{
"adult":
{
"wheelchair": "WHEELCHAIR_NOT_NEEDED"
}
},
{
"child":
{
"wheelchair": "WHEELCHAIR_NEEDED",
"child_seat": "CHILD_SEAT_NOT_NEEDED"
}
}
]
}
Service Class#
Every Offer and Trip is assigned to a Service Class indicated by the attribute service_class_id
in an Offer
or Trip
.
The Service Class defines which type of service is offered to the Customer and has an impact on the following aspects of an Offer and Trip:
comfort level (times, stops),
price,
vehicle.
The Service Classes available to a Customer depend on the Service Areas in which they want to take a Trip. It is up to the Customers to choose a Service Class by ordering a corresponding Offer. The Service Classes available to an Integrator depend on the Service Areas they are assigned to.
Note
To receive more information about the Service Classes and their characteristics, please reach out to your Service Configuration Manager.