Association Records
Associations are relationships between two schedules (i.e. a main train and an associated train.) Association records are contained within the SCHEDULE data feed, and provide information about the possible associations between train schedules. These can list the service that forms a given schedule and / or the service that a given schedule goes on to form.
For further details, see the Common Interface Format file specification.
Record Layout
Association records are encoded as a JSON hash with a key of "JsonAssociationV1" and a value containing the association data, in the following layout:
JsonAssociationV1: transaction_type main_train_uid assoc_train_uid assoc_start_date assoc_end_date assoc_days category date_indicator location base_location_suffix assoc_location_suffix diagram_type CIF_stp_indicator
Example JSON record
{ "JsonAssociationV1": { "transaction_type": "Create", "main_train_uid": "C30123", "assoc_train_uid": "C42949", "assoc_start_date": "2024-06-03T00:00:00Z", "assoc_end_date": "2024-06-21T00:00:00Z", "assoc_days": "1111100", "category": "NP", "date_indicator": "S", "location": "YORK", "base_location_suffix": null, "assoc_location_suffix": null, "diagram_type": "T", "CIF_stp_indicator": "P" } }
Association Record Fields
Field | Description |
---|---|
transaction_type | create or delete. A full snapshot file will only contain create records. Daily updates may contain either. |
main_train_uid | UID of one train in the association |
assoc_train_uid | UID of the other train in the association |
assoc_start_date | Start date of the association (in YYMMDD format). In JSON files, this is an ISO8601 format timestamp at UTC. |
assoc_end_date | End date for the association (in YYMMDD format). In JSON files, this is an ISO8601 format timestamp at UTC. |
assoc_days | A seven-character field; character 1 represents Monday, character 7 represents Sunday. A 1 in a character position means that the service runs on that day, while a 0 means that it does not. |
category | The type of association
This may also be blank (two spaces) to override the permanent value in overlays and cancellations. |
date_indicator | Date relationship of the association
This may also be blank (one spaces) to override the permanent value in overlays and cancellations. |
location | TIPLOC of the location where the association applies |
base_location_suffix | Together with the TIPLOC, identifies the event on the base UID |
assoc_location_suffix | Together with the TIPLOC, identifies the event on the associated UID |
diagram_type | Constant value, "T"
|
CIF_stp_indicator | STP (short-term planning) schedule indicator
|
Network Rail Open Data Feeds | |
---|---|
Data Feeds | About the Feeds • Account States • Durable Subscriptions • Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced Uses • FAQ • 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 • TIPLOC Records • 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 (BPLAN) |