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 and within Service Hours.

A Trip can be:

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:

  1. When a Trip is ordered, it is instantiated in the system with state Ordered.

  2. When a Trip is expected to take place, it becomes Accepted.

  3. When the Rider is picked up, the Trip becomes PickedUp.

  4. 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. This is an exceptional case. Trips that have reached Accepted are expected to take place. 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:

        stateDiagram-v2
    direction TB

    classDef sad_path fill:#d00000,color:white

    class Cancelled, Rejected, NoShow, Terminated sad_path

    [*] --> Ordered
    Ordered --> Accepted : Trip expected to take place
    Ordered --> Rejected: Trip cannot be accepted
    Ordered --> Cancelled: cancelled by Customer or Integrator
    Accepted --> Cancelled: cancelled by Customer or Integrator
    Rejected --> [*]
    Cancelled --> [*]
    Accepted --> NoShow : Rider does not show up
    Accepted --> PickedUp : pick up Rider
    PickedUp --> Terminated : internal service problem
    Accepted --> Terminated : internal service problem
    PickedUp --> DroppedOff : drop off Rider
    NoShow --> [*]
    DroppedOff --> [*]
    Terminated --> [*]
    

Trip lifecycle#

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 or Wheelchair.

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.

Price Parts#

The price parts enable Integrators to display a meaningful price breakdown to Customers. Each price is accompanied by a list of price parts, which can be presented to Customers in applications and on invoices.

All price parts represent gross amounts, including taxes and other regulatory fees.

Note

For more information about the available price parts, please reach out to your Service Configuration Manager.

Tags#

The tags attribute is a collection of strings attached to an Offer. These tags provide additional information about the Offer, and are used for Integrator-specific purposes. The exact values of the tags are specific per Integrator and are not standardized globally.

Note

For more information about the available tags, please reach out to your Service Configuration Manager.

Examples#

Tags are part of the Offer.

{
  ...

  "tags": ["tag1", "tag2"]
}