Whether your agency is utilizing our API or manually importing files, understanding the data file dimensions is crucial for successful schedule data imports. In this article, we'll define the elements of each file and list the requirements for creating files from scratch. You will find downloadable templates at the bottom of the article for your convenience.
Data Definitions
FareStaging
The following table lists the details of each field to be included in the FareStaging file.
Field | Type | Required | Comments |
---|---|---|---|
Timestamp | DateTime | Yes | Date and time that the fare record was created. Requested timestamp format: MM-DD-YYYY hh:mm:ss.sss (Ex: 07-22-2021 05:31:00.000) |
Vehicle | Integer | Yes |
Farebox ID of the Vehicle |
Operator | Integer | Yes | Farebox ID of the Operator |
Run_Id | Integer | Yes | Farebox ID of the Run |
Block_Id | Integer | Yes | Farebox ID of the Block |
Route_Id | Integer | Yes | Farebox ID of the Route |
Trip_Id | Integer | Yes | Farebox ID of the Trip |
Stop_Id | Integer | Yes | Farebox ID of the Stop |
Latitude | Float | No | Latitude position sent in when the fare was created |
Longitude | Float | No | Longitude position sent in when the fare was created |
Fareset_Id | Integer | Yes | Fareset ID that comes from the farebox input |
Fare_Source | String | No | Name of fare source where the data originated. Max characters: 50 |
Fare | String | No | Fare label/name. Displayed to user. Max characters: 50 |
Fare_Category | String | Yes |
Category of fare (Ex: Cash, Ticket, Token, Pass, Transfer, Surcharge). Max characters: 50 |
Fare_Type | String | No |
Type of fare related to recording. Max characters: 50 |
Ridership | Bitfield | Yes | Does this fare count as ridership? (1 = Yes, 0 = No) |
Fare_Count | Integer | Yes |
Count of fares recorded for this record |
Fare_Value | Float | Yes | Total value of fares collected for this record |
Probe_Date | DateTime | Yes | Date and time that fare data has been extracted from fare system (Vehicle, Mobile ticketing) |
Unclassified_Cash | Float | Yes |
Cash not related to the fare (Ex: Overpayment due to not having exact change) |
Bill_Count | Integer | Yes | Total count of bills related to the fare (Ones, Fives, Tens, etc.) |
Dump_Count | Integer | Yes | Number of times operator presses dump button on farebox (moves money to secure collection bin) |
Transaction_Type | String | No |
Optionally specified value for non-fare related transaction types. Generally should be left empty, especially if unknown. Max characters: 100 |
FareStagingCash
The following table lists the details of each field to be included in the FareStagingCase file.
Field | Type | Required | Comment |
---|---|---|---|
Probe_Date | DateTime | Yes | Date and time that fare data has been extracted from fare system (Ex: Vehicle, Mobile ticketing) |
Vehicle_Id | Integer | Yes | Farebox ID of the Vehicle |
Pennies | Integer | Yes | Count of pennies in the farebox when probing |
Nickels | Integer | Yes | Count of nickels in the farebox when probing |
Dimes | Integer | Yes | Count of dimes in the farebox when probing |
Quarters | Integer | Yes | Count of quarters in the farebox when probing |
Half_Dollars | Integer | Yes | Count of half dollars in the farebox when probing |
SBA_Dollars | Integer | Yes | Count of Susan B. Anthony dollars in the farebox when probing |
One_Dollar_Bills | Integer | Yes | Count of one-dollar bills in the farebox when probing |
Five_Dollar_Bills | Integer | Yes | Count of five-dollar bills in the farebox when probing |
Ten_Dollar_Bills | Integer | Yes | Count of ten-dollar bills in the farebox when probing |
Twenty_Dollar_Bills | Integer | Yes | Count of twenty-dollar bills in the farebox when probing |
Creating the CSV fare import data file
Utilizing our API is the most convenient and accurate way to import your fare data. However, if your fare vendor is unable to adhere to the CSV file layout as defined above, you can still utilize the manual fare import feature using one of the attached templates or by starting a file from scratch. Here are some important things to keep in mind when creating your file for manual import:
- The file must be properly formatted as CSV and saved using UTF-8 character encoding.
- All fields from the tables above must be listed in the order shown in the first row of the CSV file.
- Whether or not you are submitting data for a field, all fields must appear in the header row in the order they are listed in the tables above.
- Values may be left blank for any field listed as not required, however, the field name must remain in the header row.