Getting the trip-trip-transfer time
This API returns the transfer time between two trips.
In addition, it returns an alert if the real-time transfer time computed exceeds the schedule by a specific threshold.
Authentication phase
Before using the endpoint, you must run the authentication phase (→ Login).
After the authentication, a session opens and a valid session token persists until:
- The end of the session time-out, that is set through the parameter sessionTimeout (→ OptimaWSI configuration > OptimaAuth section).
- An explicit Logout call (→ Logout).

Request
GET
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-put/transfer/trip/{from_public_stop_id}/{from_trip _id}/{to_public_stop_id}/{to_trip _id}/
All path parameters are required.
The transfer is between two trips at a specified pair of transit stops.
- from_trip_id is the ID of the first trip.
- to_trip_id is the ID of the second trip.
- from_public_stop_id is the ID of the first transit stop. The from_public_stop_id must belong to the route of the from_trip_id.
- to_public_stop_id is the ID of the second transit stop. The to_public_stop_id must belong to the route of the to_trip_id.
If you need additional details, see → Transfer alert service.
Request parameters
Parameter | Required | Description |
---|---|---|
format |
NO |
Response format. It can be bytes or text. The default is bytes. |
timeStamp |
NO |
Reference timestamp used to compute the transfer time. Default is now. |
minTransferTime |
YES |
Minimum transfer time in seconds. It must be a positive number. |
alertThreshold |
YES |
The alert threshold must be a positive number. The API returns an alert in the response if: trr − trs > alertThreshold with:
The unit is [s]. |
Request content-type
Not applicable.
Request body (payload)
Not applicable.

Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. |
400 Bad request |
Several conditions can be classified under this code. Generally, when the API has been called with wrong arguments. In particular, the service returns this code whenever a path parameter or a request parameter is not consistent with the declared rules. |
Response content-type
If in the request:
- format=bytes, the format of the response is application/x-google-protobuf.
- format=text, the format of the response is text/plain.
Response output
Text containing all information about the trip-trip transfer.
In case of a bad request, a text message is returned, explaining what has caused the problem.

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-put/transfer/trip/3382/924164/3382/924459?minTransferTime=100&alertThreshold=300&timeStamp=2016-05-27T00:00:00&format=text
Response status
HTTP status | Description |
---|---|
200 OK |
The processing request has been accepted. |
Response content-type
text/plain
Response output
header {
gtfs_real time_version: "1.0"
timestamp: 1464333698
}
entity {
id: "1"
[transit_real time.transfer] {
from_trip_id: "924164"
to_trip_id: "924459"
transfer_time: 65252
alert: false
}
}