Raw schema
{
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": [
"train",
"flight",
"tfl"
],
"description": "Which kind of check the claim came from."
},
"train": {
"anyOf": [
{
"type": "object",
"properties": {
"ticket_price_pence": {
"type": "integer",
"minimum": 1,
"maximum": 1000000,
"description": "Total fare paid in pence for the whole booking. £62.00 = 6200."
},
"ticket_type": {
"type": "string",
"enum": [
"single",
"return",
"open_return",
"advance",
"anytime",
"off_peak",
"super_off_peak",
"season",
"other"
],
"description": "Ticket type as printed. For \"return\" and \"open_return\" the single fare is half the price paid; every other type uses the full price as the single fare."
},
"booking_reference": {
"type": [
"string",
"null"
],
"description": "Booking reference if available, otherwise null."
},
"legs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"operator_toc_code": {
"type": "string",
"enum": [
"VT",
"CC",
"CH",
"EM",
"GX",
"GN",
"GW",
"LE",
"NT",
"SW",
"SE",
"SN",
"TL",
"TP",
"AW",
"LM",
"LN",
"XC",
"GR",
"SR",
"LD",
"HT",
"CS"
],
"description": "National Rail two-letter operator code for this journey: VT=Avanti West Coast, CC=c2c, CH=Chiltern Railways, EM=East Midlands Railway, GX=Gatwick Express, GN=Great Northern, GW=Great Western Railway, LE=Greater Anglia, NT=Northern Trains, SW=South Western Railway, SE=Southeastern, SN=Southern, TL=Thameslink, TP=TransPennine Express, AW=Transport for Wales, LM=West Midlands Railway, LN=London Northwestern Railway, XC=CrossCountry, GR=LNER, SR=ScotRail, LD=Lumo, HT=Hull Trains, CS=Caledonian Sleeper"
},
"departure_station": {
"type": "string",
"minLength": 1,
"description": "Full departure station name, e.g. \"London Kings Cross\"."
},
"arrival_station": {
"type": "string",
"minLength": 1,
"description": "Full arrival station name, e.g. \"Edinburgh Waverley\"."
},
"scheduled_departure": {
"type": "string",
"description": "Scheduled departure as ISO 8601 datetime."
},
"scheduled_arrival": {
"type": "string",
"description": "Scheduled arrival as ISO 8601 datetime."
},
"delay_minutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1440
},
{
"type": "null"
}
],
"description": "Optional. Delay at arrival for this journey, in minutes, if known. When left out, Untap looks it up in National Rail records."
},
"actual_arrival": {
"type": [
"string",
"null"
],
"description": "Optional. Actual arrival for this journey as an ISO 8601 datetime, if known. When left out, Untap looks it up."
},
"was_cancelled": {
"type": [
"boolean",
"null"
],
"description": "Optional. True when this journey was cancelled. When set, no National Rail lookup is made."
}
},
"required": [
"operator_toc_code",
"departure_station",
"arrival_station",
"scheduled_departure",
"scheduled_arrival"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 8,
"description": "Each journey on this booking, in travel order: one for a single, two for a return (outward first), more for a multi-stop booking. Untap works out Delay Repay for each journey and adds them up."
}
},
"required": [
"ticket_price_pence",
"ticket_type",
"booking_reference",
"legs"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "For category \"train\": the train booking, in the shape a train check returns in save_claim.arguments.train, with ticket_price_pence set."
},
"flight": {
"anyOf": [
{
"type": "object",
"properties": {
"airline_iata": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"description": "Two-letter IATA airline code, e.g. \"BA\" for British Airways, \"U2\" for easyJet."
},
"flight_number": {
"type": "string",
"description": "Flight number including the airline prefix, e.g. \"BA2551\"."
},
"departure_iata": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Three-letter IATA departure airport code, e.g. \"LHR\"."
},
"arrival_iata": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Three-letter IATA arrival airport code, e.g. \"BCN\"."
},
"scheduled_departure": {
"type": "string",
"description": "Scheduled departure as ISO 8601 datetime."
},
"scheduled_arrival": {
"type": "string",
"description": "Scheduled arrival as ISO 8601 datetime."
},
"ticket_price_pence": {
"type": "integer",
"minimum": 1,
"maximum": 50000000,
"description": "Total fare paid in pence."
},
"booking_reference": {
"type": [
"string",
"null"
],
"description": "PNR / airline booking reference if available, otherwise null."
},
"passenger_name": {
"type": [
"string",
"null"
],
"description": "Passenger name as printed on the ticket, or null if not visible."
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"on_time",
"delayed",
"cancelled",
"denied_boarding"
]
},
{
"type": "null"
}
],
"description": "Optional. What happened to the flight, if known. When left out, Untap looks the flight up in AeroDataBox flight-status records."
},
"actual_arrival": {
"type": [
"string",
"null"
],
"description": "Optional. Actual arrival as an ISO 8601 datetime, if known."
},
"delay_minutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 2880
},
{
"type": "null"
}
],
"description": "Optional. Arrival delay in minutes, if known."
}
},
"required": [
"airline_iata",
"flight_number",
"departure_iata",
"arrival_iata",
"scheduled_departure",
"scheduled_arrival",
"ticket_price_pence",
"booking_reference",
"passenger_name"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "For category \"flight\": the flight, in the shape a flight check returns in save_claim.arguments.flight, with ticket_price_pence set."
},
"tfl": {
"anyOf": [
{
"type": "object",
"properties": {
"card_last4": {
"type": [
"string",
"null"
],
"description": "Last 4 digits of the contactless card, if shown."
},
"period_start": {
"type": [
"string",
"null"
],
"description": "Statement period start date YYYY-MM-DD."
},
"period_end": {
"type": [
"string",
"null"
],
"description": "Statement period end date YYYY-MM-DD."
},
"journeys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Journey date as YYYY-MM-DD."
},
"start_time": {
"type": [
"string",
"null"
],
"description": "Tap-in time as HH:MM, or null."
},
"end_time": {
"type": [
"string",
"null"
],
"description": "Tap-out time as HH:MM, or null."
},
"mode": {
"type": "string",
"enum": [
"tube",
"bus",
"overground",
"elizabeth",
"dlr",
"tram",
"cable_car",
"thameslink",
"unknown"
],
"description": "Transport mode for this row, or \"unknown\" when the statement does not say."
},
"from_location": {
"type": [
"string",
"null"
],
"description": "Tap-in station / stop name, or null if not shown."
},
"to_location": {
"type": [
"string",
"null"
],
"description": "Tap-out station / stop name, or null for incomplete journeys."
},
"bus_route": {
"type": [
"string",
"null"
],
"description": "Bus route number for bus rows, otherwise null."
},
"fare_pence": {
"type": "integer",
"minimum": 0,
"maximum": 100000,
"description": "Charge for this row in pence. £2.20 = 220."
},
"is_max_fare": {
"type": "boolean",
"description": "True if the statement labels this as a max-fare charge for a failed revenue inspection."
},
"is_incomplete": {
"type": "boolean",
"description": "True if this journey has no tap-out recorded (e.g. label \"Incomplete\" or \"No exit\")."
},
"is_hopper_free": {
"type": [
"boolean",
"null"
],
"description": "Optional. True when the statement shows this fare as a free Hopper fare (a second bus or tram within 60 minutes)."
},
"is_auto_corrected": {
"type": [
"boolean",
"null"
],
"description": "Optional. True when the statement says TfL has already corrected this journey (for example \"Auto-completed\" or \"Adjusted\")."
},
"is_daily_cap_hit": {
"type": [
"boolean",
"null"
],
"description": "Optional. True when the statement marks this row as the one where the daily cap was reached."
},
"is_weekly_cap_hit": {
"type": [
"boolean",
"null"
],
"description": "Optional. True when the statement marks this row as the one where the weekly cap was reached."
},
"intended_destination": {
"anyOf": [
{
"type": "string",
"maxLength": 80
},
{
"type": "null"
}
],
"description": "Optional, for an incomplete journey with no touch out: the station the person was travelling to. With it, the refund is estimated as the fare charged minus the usual fare to that station. Without it, the figure is an upper limit equal to the whole charge."
}
},
"required": [
"date",
"start_time",
"end_time",
"mode",
"from_location",
"to_location",
"bus_route",
"fare_pence",
"is_max_fare",
"is_incomplete"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500,
"description": "Every journey on the statement. Up to 500 per call."
}
},
"required": [
"card_last4",
"period_start",
"period_end",
"journeys"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "For category \"tfl\": the journeys, in the shape a TfL check returns in save_claim.arguments.tfl."
}
},
"required": [
"category"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}