Difference between revisions of "TOC Codes"

From Open Rail Data Wiki
Jump to navigation Jump to search
m (Update the numeric code to read 'sector code')
m (Add Network Rail business codes for routes)
(33 intermediate revisions by 7 users not shown)
Line 4: Line 4:
 
* ''Business Code'' is a two-character code used within the TRUST system.  It is used in the names of the individual [[Train_Movements | train movement feeds]].
 
* ''Business Code'' is a two-character code used within the TRUST system.  It is used in the names of the individual [[Train_Movements | train movement feeds]].
 
* ''Sector Code'' is the sector code used to represent the TOC in [[Train_Movements | TRUST messages]].   
 
* ''Sector Code'' is the sector code used to represent the TOC in [[Train_Movements | TRUST messages]].   
* ''ATOC Code'' is a two-character code used to representing the TOC in the [[SCHEDULE]] feed. Freight trains are represented by an ATOC code of ''ZZ''.
+
* ''ATOC Code'' is a two-character code used to representing the TOC in the [[SCHEDULE]] feed. Non-passenger operators are represented by an ATOC code of ''ZZ'' and are subject to obfuscation in the SCHEDULE feed (with the exception of GB Railfreight services).
 +
* ''Whitelisted'' means that the sector code is 'whitelisted' and TRUST messages are published for these operators without obfuscation. Sector codes which are not whitelisted will be obfuscated and TRUST messages are published for these operators with sector code ''00''.
 +
 
 +
Network Rail also have a set of business codes for each of their routes, listed at the bottom.
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
Line 10: Line 13:
 
!Company Name
 
!Company Name
 
!Business Code
 
!Business Code
!Numeric Code
+
!Sector Code
 
!ATOC Code
 
!ATOC Code
 +
!Whitelisted
 +
|-
 +
|Virtual European Paths
 +
|EU
 +
|?
 +
|EU
 +
|?
 +
|-
 +
|Alliance Rail
 +
|ZB
 +
|14
 +
|AR
 +
|N
 +
|-
 +
|Northern
 +
|ED
 +
|23
 +
|NT
 +
|Y
 
|-
 
|-
|Arriva Trains Wales
+
|Transport for Wales
 
|HL
 
|HL
 
|71
 
|71
 
|AW
 
|AW
 +
|Y
 
|-
 
|-
 
|c2c
 
|c2c
Line 22: Line 45:
 
|79
 
|79
 
|CC
 
|CC
 +
|Y
 +
|-
 +
|Caledonian Sleeper
 +
|ES
 +
|35
 +
|CS
 +
|Y
 
|-
 
|-
 
|Chiltern Railway
 
|Chiltern Railway
Line 27: Line 57:
 
|74
 
|74
 
|CH
 
|CH
 +
|Y
 
|-
 
|-
 
|CrossCountry
 
|CrossCountry
Line 32: Line 63:
 
|27
 
|27
 
|XC
 
|XC
 +
|Y
 
|-
 
|-
|Devon and Cornwall Railway
+
|DC Rail
|EN
+
|PO
 
|34
 
|34
|DC
+
|ZZ
 +
|Y
 
|-
 
|-
|East Midlands Trains
+
|East Midlands Railway
 
|EM
 
|EM
 
|28
 
|28
 
|EM
 
|EM
|-
+
|Y
|East Coast
 
|HB
 
|61
 
|GR
 
 
|-
 
|-
 
|Eurostar
 
|Eurostar
Line 52: Line 81:
 
|06
 
|06
 
|ES
 
|ES
 +
|Y
 
|-
 
|-
|First Capital Connect
+
|Unmapped (was First Capital Connect)
 
|EG
 
|EG
 
|26
 
|26
 
|FC
 
|FC
 +
|Y
 
|-
 
|-
|First Great Western
+
|Hull Trains
|EF
 
|25
 
|GW
 
|-
 
|First Hull Trains
 
 
|PF
 
|PF
 
|55
 
|55
 
|HT
 
|HT
 +
|Y
 
|-
 
|-
|First Scotrail
+
|Unmapped (was Gatwick Express)
|HA
 
|60
 
|SR
 
|-
 
|First Transpennine Express
 
|EA
 
|20
 
|TP
 
|-
 
|Gatwick Express
 
 
|HV
 
|HV
 
|81
 
|81
 
|GX
 
|GX
 +
|Y
 +
|-
 +
|GB Railfreight
 +
|PE
 +
|54
 +
|ZZ
 +
|Y
 +
|-
 +
|Govia Thameslink Railway (Great Northern)
 +
|ET
 +
|88
 +
|GN
 +
|Y
 +
|-
 +
|Govia Thameslink Railway (Thameslink)
 +
|ET
 +
|88
 +
|TL
 +
|Y
 
|-
 
|-
 
|Grand Central
 
|Grand Central
Line 87: Line 123:
 
|22
 
|22
 
|GC
 
|GC
 +
|Y
 +
|-
 +
|Grand Central North West
 +
|?
 +
|?
 +
|LN
 +
|?
 +
|-
 +
|Great Western Railway
 +
|EF
 +
|25
 +
|GW
 +
|Y
 +
|-
 +
|Greater Anglia
 +
|EB
 +
|21
 +
|LE
 +
|Y
 
|-
 
|-
 
|Heathrow Connect
 
|Heathrow Connect
Line 92: Line 147:
 
|24
 
|24
 
|HC
 
|HC
 +
|Y
 
|-
 
|-
 
|Heathrow Express
 
|Heathrow Express
Line 97: Line 153:
 
|86
 
|86
 
|HX
 
|HX
 +
|Y
 
|-
 
|-
 
|Island Lines
 
|Island Lines
Line 102: Line 159:
 
|85
 
|85
 
|IL
 
|IL
 +
|Y
 
|-
 
|-
|London Midland
+
|Locomotive Services
 +
|LS
 +
|89
 +
|LS
 +
|N
 +
|-
 +
|West Midlands Trains
 
|EJ
 
|EJ
 
|29
 
|29
 
|LM
 
|LM
 +
|Y
 
|-
 
|-
 
|London Overground
 
|London Overground
Line 112: Line 177:
 
|30
 
|30
 
|LO
 
|LO
 +
|Y
 
|-
 
|-
 
|LUL Bakerloo Line
 
|LUL Bakerloo Line
Line 117: Line 183:
 
|91
 
|91
 
|LT
 
|LT
 +
|Y
 +
|-
 +
|LUL District Line – Richmond
 +
|XE
 +
|93
 +
|LT
 +
|Y
 
|-
 
|-
 
|LUL District Line – Wimbledon
 
|LUL District Line – Wimbledon
Line 122: Line 195:
 
|90
 
|90
 
|LT
 
|LT
|-
+
|Y
|LUL District Line – Richmond
 
|XE
 
|93
 
|LT
 
 
|-
 
|-
 
|Merseyrail
 
|Merseyrail
Line 132: Line 201:
 
|64
 
|64
 
|ME
 
|ME
 +
|Y
 
|-
 
|-
|Greater Anglia
+
|Network Rail (On-Track Machines)
|EB
+
|LR
|21
+
|15
|LE
+
|LR
 +
|N
 
|-
 
|-
 
|Nexus (Tyne & Wear Metro)
 
|Nexus (Tyne & Wear Metro)
Line 142: Line 213:
 
|56
 
|56
 
|TW
 
|TW
 +
|Y
 
|-
 
|-
 
|North Yorkshire Moors Railway
 
|North Yorkshire Moors Railway
Line 147: Line 219:
 
|51
 
|51
 
|NY
 
|NY
 +
|Y
 
|-
 
|-
|Northern Rail
+
|ScotRail
|ED
+
|HA
|23
+
|60
|NT
+
|SR
 +
|Y
 
|-
 
|-
|South West Trains
+
|South Western Railway
 
|HY
 
|HY
 
|84
 
|84
 
|SW
 
|SW
 +
|Y
 +
|-
 +
|South Yorkshire Supertram
 +
|SJ
 +
|19
 +
|SJ
 +
|N
 
|-
 
|-
 
|Southeastern
 
|Southeastern
Line 162: Line 243:
 
|80
 
|80
 
|SE
 
|SE
 +
|Y
 
|-
 
|-
 
|Southern
 
|Southern
 
|HW
 
|HW
|82
+
|88
 
|SN
 
|SN
 +
|Y
 +
|-
 +
|Swanage Railway
 +
|SP
 +
|18
 +
|SP
 +
|N
 
|-
 
|-
|Virgin Trains
+
|TfL Rail
 +
|EX
 +
|33
 +
|XR
 +
|Y
 +
|-
 +
|TransPennine Express
 +
|EA
 +
|20
 +
|TP
 +
|Y
 +
|-
 +
|Avanti West Coast
 
|HF
 
|HF
 
|65
 
|65
 
|VT
 
|VT
 +
|Y
 
|-
 
|-
|West Coast Railway Co.
+
|London North Eastern Railway
 +
|HB
 +
|61
 +
|GR
 +
|Y
 +
|-
 +
|West Coast Railways
 
|PA
 
|PA
 
|50
 
|50
 
|WR
 
|WR
 +
|Y
 +
|-
 +
|JSD Rail Research & Development
 +
|RR
 +
|02
 +
|ZZ
 +
|N
 +
|-
 +
|Victa Westlink Rail (defunct)
 +
|PV
 +
|03
 +
|ZZ
 +
|N
 +
|-
 +
|DB Cargo Charters
 +
|WA
 +
|04
 +
|ZZ
 +
|N
 +
|-
 +
|DB Cargo Freight
 +
|WA
 +
|05
 +
|ZZ
 +
|N
 +
|-
 +
|Rail Operations Group
 +
|PH
 +
|07
 +
|ZZ
 +
|N
 +
|-
 +
|DB Cargo International
 +
|DA
 +
|08
 +
|ZZ
 +
|N
 +
|-
 +
|Freightliner
 +
|DB
 +
|09
 +
|ZZ
 +
|N
 +
|-
 +
|Serco Rail Operations
 +
|SD
 +
|10
 +
|ZZ
 +
|N
 +
|-
 +
|Freightliner Heavy Haul
 +
|DH
 +
|11
 +
|ZZ
 +
|N
 +
|-
 +
|Freight Europe (defunct)
 +
|PN
 +
|12
 +
|ZZ
 +
|N
 +
|-
 +
|Europorte Channel
 +
|PT
 +
|13
 +
|ZZ
 +
|N
 +
|-
 +
|LORAM
 +
|LC
 +
|16
 +
|ZZ
 +
|N
 +
|-
 +
|Network Rail (Internal use only)
 +
|QA
 +
|17
 +
|ZZ
 +
|N
 +
|-
 +
|Network Rail Virtual Freight Company
 +
|QJ
 +
|31
 +
|ZZ
 +
|N
 +
|-
 +
|Wrexham and Shropshire (defunct)
 +
|EI
 +
|32
 +
|WS
 +
|Y
 +
|-
 +
|Vintage Trains
 +
|TY
 +
|36
 +
|TY
 +
|N
 +
|-
 +
|Seco Rail (defunct)
 +
|RU
 +
|37
 +
|ZZ
 +
|N
 +
|-
 +
|Carillion Rail CTRL (Phase 1) (defunct)
 +
|RQ
 +
|38
 +
|ZZ
 +
|N
 +
|-
 +
|Harsco
 +
|RT
 +
|39
 +
|ZZ
 +
|N
 +
|-
 +
|Balfour Beatty Rail
 +
|RZ
 +
|40
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|41
 +
|
 +
|N
 +
|-
 +
|Colas Rail
 +
|RG
 +
|42
 +
|ZZ
 +
|N
 +
|-
 +
|Amey Fleet Services
 +
|RE
 +
|43
 +
|ZZ
 +
|N
 +
|-
 +
|Carillion Rail
 +
|RB
 +
|44
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|45
 +
|
 +
|N
 +
|-
 +
|SB (Swietelsky Babcock) Rail
 +
|RD
 +
|46
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|47
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|48
 +
|
 +
|N
 +
|-
 +
|VolkerRail
 +
|RH
 +
|49
 +
|ZZ
 +
|N
 +
|-
 +
|Pre Metro Operations
 +
|PK
 +
|52
 +
|ZZ
 +
|N
 +
|-
 +
|SNCF Freight Services
 +
|PS
 +
|53
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|57
 +
|
 +
|N
 +
|-
 +
|Unmapped (was Advenza Freight)
 +
|PI
 +
|58
 +
|ZZ
 +
|N
 +
|-
 +
|On Route Logistics
 +
|PM
 +
|59
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|62
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|63
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|66
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|67
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|68
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|69
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|70
 +
|
 +
|N
 +
|-
 +
|Legge Infrastructure Services
 +
|LG
 +
|72
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|73
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|75
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|76
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|77
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|78
 +
|
 +
|N
 +
|-
 +
|Unmapped (was Southern)
 +
|HW
 +
|82
 +
|SN
 +
|Y
 +
|-
 +
|Unmapped
 +
|
 +
|83
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|87
 +
|
 +
|N
 +
|-
 +
|Network Rail Reserved Pathings (non-QJ)
 +
|NR
 +
|92
 +
|ZZ
 +
|N
 +
|-
 +
|Ffestiniog Railway
 +
|XJ
 +
|94
 +
|
 +
|Y
 +
|-
 +
|Unmapped
 +
|
 +
|95
 +
|
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|96
 +
|
 +
|N
 +
|-
 +
|Direct Rail Services
 +
|XH
 +
|97
 +
|ZZ
 +
|N
 +
|-
 +
|Internal Testing
 +
|RM
 +
|98
 +
|ZZ
 +
|N
 +
|-
 +
|Unmapped
 +
|
 +
|99
 +
|
 +
|N
 +
|-
 +
|}
 +
 +
Network Rail business codes are as follows:
 +
 +
{| class="wikitable sortable"
 +
|-
 +
!Network Rail Route
 +
!Business Code
 +
|-
 +
|HQ Functions
 +
|QA
 +
|-
 +
|Sussex
 +
|QB
 +
|-
 +
|Wessex
 +
|QC
 +
|-
 +
|Western
 +
|QD
 +
|-
 +
|Central
 +
|QE
 +
|-
 +
|North West
 +
|QF
 +
|-
 +
|North East
 +
|QG
 +
|-
 +
|Anglia
 +
|QH
 +
|-
 +
|East Coast
 +
|QI
 +
|-
 +
|Scotland
 +
|QL
 +
|-
 +
|Kent
 +
|QM
 +
|-
 +
|High Speed 1
 +
|QQ
 +
|-
 +
|East Midlands
 +
|QV
 
|-
 
|-
 +
|Wales
 +
|QW
 
|}
 
|}
  

Revision as of 19:03, 29 January 2020

This table lists the codes used to identify Train Operating Companies (TOCs) in the various data feeds available from Network Rail. Different feeds use different sets of codes to refer to the same company.

  • Company Name is the name of the Train Operating Company
  • Business Code is a two-character code used within the TRUST system. It is used in the names of the individual train movement feeds.
  • Sector Code is the sector code used to represent the TOC in TRUST messages.
  • ATOC Code is a two-character code used to representing the TOC in the SCHEDULE feed. Non-passenger operators are represented by an ATOC code of ZZ and are subject to obfuscation in the SCHEDULE feed (with the exception of GB Railfreight services).
  • Whitelisted means that the sector code is 'whitelisted' and TRUST messages are published for these operators without obfuscation. Sector codes which are not whitelisted will be obfuscated and TRUST messages are published for these operators with sector code 00.

Network Rail also have a set of business codes for each of their routes, listed at the bottom.

Company Name Business Code Sector Code ATOC Code Whitelisted
Virtual European Paths EU ? EU ?
Alliance Rail ZB 14 AR N
Northern ED 23 NT Y
Transport for Wales HL 71 AW Y
c2c HT 79 CC Y
Caledonian Sleeper ES 35 CS Y
Chiltern Railway HO 74 CH Y
CrossCountry EH 27 XC Y
DC Rail PO 34 ZZ Y
East Midlands Railway EM 28 EM Y
Eurostar GA 06 ES Y
Unmapped (was First Capital Connect) EG 26 FC Y
Hull Trains PF 55 HT Y
Unmapped (was Gatwick Express) HV 81 GX Y
GB Railfreight PE 54 ZZ Y
Govia Thameslink Railway (Great Northern) ET 88 GN Y
Govia Thameslink Railway (Thameslink) ET 88 TL Y
Grand Central EC 22 GC Y
Grand Central North West ? ? LN ?
Great Western Railway EF 25 GW Y
Greater Anglia EB 21 LE Y
Heathrow Connect EE 24 HC Y
Heathrow Express HM 86 HX Y
Island Lines HZ 85 IL Y
Locomotive Services LS 89 LS N
West Midlands Trains EJ 29 LM Y
London Overground EK 30 LO Y
LUL Bakerloo Line XC 91 LT Y
LUL District Line – Richmond XE 93 LT Y
LUL District Line – Wimbledon XB 90 LT Y
Merseyrail HE 64 ME Y
Network Rail (On-Track Machines) LR 15 LR N
Nexus (Tyne & Wear Metro) PG 56 TW Y
North Yorkshire Moors Railway PR 51 NY Y
ScotRail HA 60 SR Y
South Western Railway HY 84 SW Y
South Yorkshire Supertram SJ 19 SJ N
Southeastern HU 80 SE Y
Southern HW 88 SN Y
Swanage Railway SP 18 SP N
TfL Rail EX 33 XR Y
TransPennine Express EA 20 TP Y
Avanti West Coast HF 65 VT Y
London North Eastern Railway HB 61 GR Y
West Coast Railways PA 50 WR Y
JSD Rail Research & Development RR 02 ZZ N
Victa Westlink Rail (defunct) PV 03 ZZ N
DB Cargo Charters WA 04 ZZ N
DB Cargo Freight WA 05 ZZ N
Rail Operations Group PH 07 ZZ N
DB Cargo International DA 08 ZZ N
Freightliner DB 09 ZZ N
Serco Rail Operations SD 10 ZZ N
Freightliner Heavy Haul DH 11 ZZ N
Freight Europe (defunct) PN 12 ZZ N
Europorte Channel PT 13 ZZ N
LORAM LC 16 ZZ N
Network Rail (Internal use only) QA 17 ZZ N
Network Rail Virtual Freight Company QJ 31 ZZ N
Wrexham and Shropshire (defunct) EI 32 WS Y
Vintage Trains TY 36 TY N
Seco Rail (defunct) RU 37 ZZ N
Carillion Rail CTRL (Phase 1) (defunct) RQ 38 ZZ N
Harsco RT 39 ZZ N
Balfour Beatty Rail RZ 40 ZZ N
Unmapped 41 N
Colas Rail RG 42 ZZ N
Amey Fleet Services RE 43 ZZ N
Carillion Rail RB 44 ZZ N
Unmapped 45 N
SB (Swietelsky Babcock) Rail RD 46 ZZ N
Unmapped 47 N
Unmapped 48 N
VolkerRail RH 49 ZZ N
Pre Metro Operations PK 52 ZZ N
SNCF Freight Services PS 53 ZZ N
Unmapped 57 N
Unmapped (was Advenza Freight) PI 58 ZZ N
On Route Logistics PM 59 ZZ N
Unmapped 62 N
Unmapped 63 N
Unmapped 66 N
Unmapped 67 N
Unmapped 68 N
Unmapped 69 N
Unmapped 70 N
Legge Infrastructure Services LG 72 ZZ N
Unmapped 73 N
Unmapped 75 N
Unmapped 76 N
Unmapped 77 N
Unmapped 78 N
Unmapped (was Southern) HW 82 SN Y
Unmapped 83 N
Unmapped 87 N
Network Rail Reserved Pathings (non-QJ) NR 92 ZZ N
Ffestiniog Railway XJ 94 Y
Unmapped 95 N
Unmapped 96 N
Direct Rail Services XH 97 ZZ N
Internal Testing RM 98 ZZ N
Unmapped 99 N

Network Rail business codes are as follows:

Network Rail Route Business Code
HQ Functions QA
Sussex QB
Wessex QC
Western QD
Central QE
North West QF
North East QG
Anglia QH
East Coast QI
Scotland QL
Kent QM
High Speed 1 QQ
East Midlands QV
Wales QW


Network Rail Open Data Feeds
Data Feeds About the Feeds Account States Durable Subscriptions Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced UsesFAQ Release Notes
RTPPM RTPPM Feed
Train Movements Train Movements Feed Train Activation Train Cancellation Train Movement Train Reinstatement Change of Origin Change of Identity Change of Location TSPEED Field Planned Cancellations Cancellation Codes
TD TD Feed C-Class Messages S-Class Messages Train Describers TD Berths
VSTP VSTP Feed
TSR TSR Feed Route Codes
SCHEDULE SCHEDULE Feed Schedule and Location Records Association Records CIF Codes How Scheduling Works Allowances
Reference Data Reference Data Feed TOC Codes CIF Codes Delay Attribution Codes Identifying Locations (STANOX, TIPLOC, NLC and 3-Alpha Codes) STANOX Geographical Areas Train Planning data