Disabling a trip
This API creates an event to delete a trip.
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
POST
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-put/event/trip
Request parameters
Parameter | Required | Description |
---|---|---|
format |
NO |
Response format. It can be bytes or text. The default is bytes. |
Request content-type
text/plain or application/octet-stream
Request body (payload)
The payload is a JSON object containing the information to suppress a trip. A trip is CANCELED (schedule_relationship attribute) if it is scheduled at first, but removed at a second stage.
For more details, see the GTFS-RT feed information.

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
text/plain
Response output
The response is a text message:
Created N events
N is the number of events effectively created to satisfy the request of the user.

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-put/event/trip
Request content-type
text/plain
Request input
header {
gtfs_real time_version: "1.0"
incrementality: FULL_DATASET
timestamp: 1460994066
}
entity {
id: "1"
trip_update {
trip {
schedule_relationship: CANCELED
route_id: "371"
trip_id: "915422"
}
}
}
Response status
HTTP status | Description |
---|---|
200 OK |
The processing request has been accepted. |
Important: You can create as many events as you want when disabling the same trip; the system always answers with status code 200.