Darwin Cancel Reasons
This endpoint presents the current reasons why a train has been cancelled as seen by the Darwin system.
Please make certain you have read the Conditions of use before using this API.
All Late reasons
Sending an HTTP GET to http://api.area51.onl/rail/1/ref/darwin/cancel which will return a JSON array of all cancel codes.
- id
- The ID used within Darwin
- name
- The cancel reason
When used for display the name must be used as-is to maintain uniformity between all systems that use the Darwin data.
$ curl -s http://api.area51.onl/rail/1/ref/darwin/cancel | jq '.' | head [ { "id": 100, "name": "This train has been cancelled because of a broken down train" }, { "id": 101, "name": "This train has been cancelled because of a delay on a previous journey" }, ... ]
Retrieving a code by id
Simply append /id to the url to perform a lookup on just that id: and a JSON object will be returned. If no entry exists then null is returned
$ curl -s http://api.area51.onl/rail/1/ref/darwin/cancel/560 | jq '.' { "id": 560, "name": "This train has been cancelled because of a boat colliding with a bridge" } $ curl -s http://api.area51.onl/rail/1/ref/darwin/cancel/42 | jq '.' null