Need Help with “What Can I Do with My Ticket” Webservice

19 views
Skip to first unread message

liam gregory

unread,
Jul 1, 2024, 7:33:55 AM (2 days ago) Jul 1
to A gathering place for the Open Rail Data community

I’m trying to use the “What Can I Do with My Ticket” Webservice by National Rail to get fare information, but I’m encountering an error saying “No Fares Matched”. I’m looking for an off-peak day single fare, so I expect quite a few services to match. Here’s the JSON I’m sending:


{
  "origin": {
    "crsCode": "MKC"
  },
  "destination": {
    "crsCode": "EUS"
  },
  "ticketPrice": 23.10,
  "fareMatchingCriteria": {
    "fareSetter": "LBR",
    "fareOrigin": "1378",
    "fareDestination": "1444",
    "routeCode": "00000",
    "ticketTypeCode": "CDS",
    "railcardCode": null
  },
  "startDate": "2024-07-01T11:27:00.000Z",
  "returnDate": null,
  "fareClass": "STANDARD",
  "passengerType": "ADULT"
}


The error message returned is:


{
    "status": "ERROR",
    "payload": {
        "type": "java.lang.IllegalArgumentException",
        "message": "No Fares Matched",
        "code": "203#2024-07-01-10-51-53-455"
    }
}


I’ve checked the CRS codes, fare codes, and the date format, but I’m still getting this error. Can anyone spot what might be wrong or suggest any solutions?


Thanks in advance!






Peter Hicks (Poggs)

unread,
Jul 1, 2024, 7:40:05 AM (2 days ago) Jul 1
to A gathering place for the Open Rail Data community
Hi Liam

On 1 Jul 2024, at 11:34, liam gregory <liam.g...@bizie.com> wrote:

I’m trying to use the “What Can I Do with My Ticket” Webservice by National Rail to get fare information, but I’m encountering an error saying “No Fares Matched”. I’m looking for an off-peak day single fare, so I expect quite a few services to match. Here’s the JSON I’m sending:

[snip]

I’ve checked the CRS codes, fare codes, and the date format, but I’m still getting this error. Can anyone spot what might be wrong or suggest any solutions?

What happens if you make a similar request, but with just the minimal set of information included in section 10.1.1 of the WCMTWS User Guide, e.g.

{
 "origin": {
    "crsCode": "MAN",
    "nlcCode": null
  },
  "destination": {
    "crsCode": "EUS",
    "nlcCode": null
  },
  "ticketPrice": 81.4,
  "startDate": "2016-09-07T13:51:15.041Z",
  "returnDate": null,
  "fareClass": "STANDARD",
  "passengerType": "ADULT"
}

I’m also wondering if the NLC for fareDestination is correct - I think this should be 1072 London Terminals, not 1444 London Euston.


Peter
Reply all
Reply to author
Forward
0 new messages