Add a train booking
add_train_journeyAdds a UK train booking to the person’s Untap account and works out Delay Repay for it. One booking per call, with each journey in legs (one for a single, two for a return, in travel order). Untap checks National Rail’s Historical Service Performance records for each journey; the delay, actual arrival and cancellation fields are optional, and when left out Untap looks them up. Operators accept one journey per claim form, so a return with both directions late means two claims. A train journey that is already saved is returned as it is, not saved twice. Requires sign-in to Untap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | 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. | |
| season_type | No | Season tickets only: how long the season runs. The operator divides the season price into single journeys (for example annual 464, monthly 40, weekly 10, flexi 16) and pays a share of one journey. When left out, the result gives the percentage and the method but no amount. | |
| ticket_type | Yes | Ticket type as printed. For "return" and "open_return" the single fare is half the price paid; for "season" the amount is a share of one journey value (see season_type); every other type uses the full price as the single fare. | |
| booking_reference | Yes | Booking reference if available, otherwise null. | |
| ticket_price_pence | Yes | Total fare paid in pence for the whole booking. £62.00 = 6200. |