Integrate with the Trainline Partner API to search rail routes and create a confirmed booking

domain: developer.thetrainline.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with the Trainline Partner API using your partner credentials to obtain a session token for the booking flow
  2. Submit a journey search request with origin and destination station codes, outbound date/time, and passenger details; receive a set of journey options with fares
  3. Select a journey and fare combination, then call the basket or offer selection endpoint to reserve the offer and initiate the booking session
  4. Provide passenger details, contact information, and delivery method (e-ticket, print-at-home, or collection reference); call the payment endpoint with the card or payment token
  5. On successful payment, retrieve the booking confirmation with booking reference and ticket delivery details; store the booking reference for post-sale management

Known gotchas

Related routes

Implement a Trainline partner API booking flow for UK and European rail with split-ticketing awareness
thetrainline.com · 6 steps · unrated
Search and book a tour or activity via the Viator Partner API
viator · 6 steps · unrated
Integrate with the Glovo Partner API
glovoapp.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans