1

X12 File Naming Standards Quick Guide

Electronic Data Interchange (EDI) -  X12 File Naming Standards Quick Guide

This guide should only be used by trading partners who submit batch transactions in the ANSI national standard X12N.

Standardized file naming conventions are required for trading partners who are submitting X12N files.

 

File Naming Standard Components Required by Trading Partners

Below are the required standardized file naming convention components that must be used to name all files before they are uploaded. 

File names MUST be structured as follows: TPID-TransactionType-yyyymmddhhmmssSSS-1of1.X12

  1. TPID: The TP ID is the value in the ISA06.

The file name must include ‘TP’ in front of the ID number (ex.:  TP12345). Do not include special characters such as hyphens (-) or underscores ( _ ) between TP and the number.

  1. Transaction Type: The Transaction Type is the number for the transaction. 

837 Transaction Types must include an I, P, or D (ex.: 270, 276, 837P, 837I, 837D).

  1. Time Stamp (yyyymmddhhmmssSSS): The Time Stamp is the time Trading Partners generate the file. 

Military time (24-hour) and Mountain Time (MT) are required. The time stamp must include the four-digit year, two-digit month, two-digit day, two-digit hour, two-digit minutes, two-digit seconds, and three-digit millisecond (ex.: 20250926132243505). 

Users are reminded to include all 17 digits of the Time Stamp, including all three (3) milliseconds (ex.: XXXXXXXXXXXXXX505).

  1. 1of1: This is a required value.

The only accepted value is “1of1”. Trading Partners cannot enter 1of2, 1of3 or any text other than 1of1. 

  1. File Extension (File Type): Required value is .x12. 

Trading Partners should only name files with the extension .x12, however trading partners may receive response or acknowledgement files with different extensions (ex.: .html, .x12, .txt).

Notes:

  • File names are not case sensitive.
  • Hyphens (-) are required to delineate sections within a file name (ex.: TP12345-270-yyyymmddhhmmssSSS-1of1.x12). Underscores ( _) or other special characters are not allowed. 

Below are examples for each transaction that Trading Partners may submit: 

TransactionFile Name Example
270tp12345-270-yyyymmddhhmmssSSS-1of1.x12
276tp12345-276-yyyymmddhhmmssSSS-1of1.x12
837Ptp12345-837P-yyyymmddhhmmssSSS-1of1.x12
837Itp12345-837I-yyyymmddhhmmssSSS-1of1.x12
837Dtp12345-837D-yyyymmddhhmmssSSS-1of1.x12


Below are the constraints around file naming conventions: 

ConstraintDetails
Max File Name Length255 Characters
Hyphens (-)Only allowed between components (e.g., tp2345-270)
Special CharactersNo special characters are allowed other than hyphens (-) and periods (.).

 

Acknowledgement and Response Files

Below are the standardized file naming convention components for Acknowledgement and Response files received by Trading Partners. 

Acknowledgement Files are structured as follows:

  • TP12345-<270>_ M123456-yyyymmddhhmmssSSS-1of1_999.x12
  • TP12345-<270>_ M123456-yyyymmddhhmmssSSS-1of1_TA1.x12
  • TP12345-<270>_ M123456-yyyymmddhhmmssSSS-1of1_rpt.html 

Response Files are structured as follows:

  • TP12345-<271>_ M123456-yyyymmddhhmmssSSS-1of1.x12
  • TP12345-<277>_ M123456-yyyymmddhhmmssSSS-1of1.x12
  • TP12345-<820>_ M123456-yyyymmddhhmmssSSS-1of1.x12
  • TP12345-<834>_ M123456-yyyymmddhhmmssSSS-1of1.x12
  • TP12345-<835>_ M123456-yyyymmddhhmmssSSS-1of1.x12
  • TP12345-<ENCR>_ M123456-yyyymmddhhmmssSSS-1of1_rsp.txt
  • TP12345-<ENCR>_ M123456-yyyymmddhhmmssSSS-1of1_rpt.txt
     
  1. TPID: The TP ID is the value in the ISA06. 

The file name includes ‘TP’ in front of the ID number (ex.: TP12345). 

  1. Transaction Type: The Transaction Type is the number for the transaction (ex.: 270, 271, 277, 820, 834, 835 and ENCR).
     
  2. Tracking ID: The Tracking ID is created by the processing system once a file is retrieved by the source system. 

It is a unique system-generated value containing ten alphanumeric characters (i.e., 0-9), preceded by a “M” or “E” which indicates the source system that generated the file. 

  1. Time Stamp (yyyymmddhhmmssSSS): The Time Stamp is the time the processing system generated the file.

It is defined to the millisecond and is formatted as military time (24-hour) in Mountain Time (MT). 

  1. 1of1: “1of1” indicates file sequence and is the only accepted value.
     
  2. File Extension (File Type): This is the file type extension.

Trading Partners may receive response or acknowledgement files with different extensions (ex.: .html, .x12, .txt).
 

Need Assistance?

Contact the Provider Services Call Center with any questions. 


 Electronic Data Interchange (EDI) Support web page