Getting the route-route transfer time
This API returns the transfer time between two routes.
In addition, it returns an alert if the transfer time exceeds the specified 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/route/{from_public_stop_id}/{from_route _id}/{to_public_stop_id}/{to_route_id}/
All path parameters are required.
The transfer is between two routes at a specified pair of transit stops.
- from_route_id is the ID of the first route.
- to_route_id is the ID of the second route.
- from_public_stop_id is the ID of the first transit stop. The from_public_stop_id must belong to the from_route_id.
- to_public_stop_id is the ID of the second transit stop. The to_public_stop_id must belong to the to_route_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. The 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 route-route 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/route/3382/280/3382/292?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: 1464334131
}
entity {
id: "1"
[transit_real time.transfer] {
from_trip_id: "924164"
to_trip_id: "924477"
transfer_time: 22640
alert: false
}
}