Getting the time for transfers
This API returns the time elapsed and additional details to accomplish a predefined transfer or all predefined transfers.
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/predefined
Request parameters
Parameter | Required | Description |
---|---|---|
format | NO | Response format. It can be bytes or text. The default is bytes. |
transfer_id | NO | ID of the transfer. |
timeStamp |
NO |
Reference timestamp used to compute the transfer time. The default is now. |
alert |
NO |
Boolean value (TRUE / FALSE) by which only transfers with an alert are returned, and it is valid only if transfer_id is not specified. The default is FALSE. |
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. |
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 information about predefined transfers.
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/predefined
Response status
HTTP status | Description |
---|---|
200 OK |
The processing request has been accepted. |
Response content-type
text/plain
Response output
header {
gtfs_realtime_version: "1.0"
timestamp: 1749465820
}
entity {
id: "1"
[transit_realtime.transfer] {
id: "predefined_transfer_1"
from_trip_id: "trip1"
to_trip_id: "trip2"
transfer_time: 280
alert: false
stop_from: "101020"
stop_to: "102021"
route_from: "6"
route_to: "3"
threshold: 300
transfer_time_min: 100
transfer_time_planned: 280
waiting_time: 20
time_from {
seconds: 1395911280
}
time_to {
seconds: 1395911400
}
}
}