PT OPS

Delay & Cancellation

Read live delay information and apply delays or cancellations to a train.

Last updated: October 8, 2026
GET /trains/:trainNumber/route/:locationCode/arrival/delay Public

Compares the live arrival time at a station against the scheduled arrival and returns the delay in minutes (negative = early). Returns 400 if the train is cancelled at that station.

Response (200 OK)

{ "delay": 3 }

404 if the train, the location in its current route, or the scheduled arrival is not found.

GET /trains/:trainNumber/route/:locationCode/departure/delay Public

Same as above, but for departure time at a station. Same errors apply.

Response (200 OK)

{ "delay": 0 }
GET /trains/:trainNumber/generalDelay Public

Returns the train's current overall delay in minutes, based on the last passed station, along with the full train document.

Response (200 OK)

{
  "delay": 4,
  "train": { "trainNumber": "301", "operator": "PTR", "...": "full train document" }
}

404 if the train doesn't exist, has no current route, or hasn't passed any station yet.

PATCH /trains/:trainNumber/delay Authentication required

Applies a delay (in minutes) to a train's remaining route.

{ "delay": 5, "editStopTimes": true }
PATCH /trains/:trainNumber/cancel Authentication required

Cancels a train entirely, or from a given location onward.

{ "startLocation": "SK" }

Omit startLocation (or send an empty body) to cancel the whole train.