Documentation

X12 Resources

Article author
Admin
  • Updated

EDI API defines X12 resources for all X12 core items, such as control segments, interchange, group, transaction, and the validation/operation result, that are represented by JSON.

 

X12Interchange

X12Interchange object represents an X12 interchange, ISA/IEA block. You get an array of X12 interchanges as part of the Read operation when translating an X12 file to JSON. The Read operation supports X12 files that contain multiple interchanges, that's why the response is an array. In most situations, the array will contain only a single item.

The X12Interchange object can be used with the Write operation, to translate it into an X12 file, with the Validate operation, to validate that the interchange is compliant, and with the Ack operation, to generate 997, 999, and/or TA1 acknowledgment.

 

Endpoints

POST /x12/read Response
POST /x12/write Request
POST /x12/validate Request
POST /x12/ack Request and Response

 

Example

{
    "SegmentDelimiter": "~",
    "DataElementDelimiter": "*",
    "ISA": {
        "AuthorizationInformationQualifier_1": "00",
        "AuthorizationInformation_2": "          ",
        "SecurityInformationQualifier_3": "00",
        "SecurityInformation_4": "          ",
        "SenderIDQualifier_5": "16",
        "InterchangeSenderID_6": "SENDER1        ",
        "ReceiverIDQualifier_7": "14",
        "InterchangeReceiverID_8": "RECEIVER1      ",
        "InterchangeDate_9": "071216",
        "InterchangeTime_10": "1406",
        "InterchangeControlStandardsIdentifier_11": "U",
        "InterchangeControlVersionNumber_12": "00204",
        "InterchangeControlNumber_13": "000000263",
        "AcknowledgementRequested_14": "1",
        "UsageIndicator_15": "T",
        "ComponentElementSeparator_16": ">"
    },
    "Groups": [{
        "GS": {
            "CodeIdentifyingInformationType_1": "IN",
            "SenderIDCode_2": "SENDER1",
            "ReceiverIDCode_3": "RECEIVER1",
            "Date_4": "20071216",
            "Time_5": "1406",
            "GroupControlNumber_6": "000000001",
            "TransactionTypeCode_7": "X",
            "VersionAndRelease_8": "004010"
        },
        "Transactions": [{
            "ST": {
                "TransactionSetIdentifierCode_01": "850",
                "TransactionSetControlNumber_02": "0001"
            },
            "_comment": "... model specific content goes here ...",
            "SE": {
                "NumberofIncludedSegments_01": "15",
                "TransactionSetControlNumber_02": "0001"
            },
            "Model": "EdiNation.X12.ASC.004010"
        }],
        "GETrailers": [{
            "NumberOfIncludedSets_1": "1",
            "GroupControlNumber_2": "000000001"
        }]
    }],
    "IEATrailers": [{
        "NumberOfIncludedGroups_1": "1",
        "InterchangeControlNumber_2": "000000263"
    }],
    "Result": {
        "LastIndex": 19,
        "Details": [],
        "Status": "success"
    }
}

 

Attributes

  • SegmentDelimiter string

    The value of ISA16.

  • DataElementDelimiter string

    The value at position 4 in the ISA segment.

  • ISA ISA object

    The ISA segment.

  • TA1 TA1 object

    The TA1 segment. Included only when the X12Interchange is the result of an acknowledgment (997 or 999) operation.

  • Groups list of X12Group objects

    The list of functional groups.

  • IEATrailers list of IEA objects

    The list of interchange trailers. Always contains one item for valid interchanges.

  • Result OperationResult object

    The operation result.

 

ISA

ISA object is only used as part of the X12Interchange object and represents the standard X12 ISA segment, interchange header.

 

Example

{
  "AuthorizationInformationQualifier_1": "00",
  "AuthorizationInformation_2": "          ",
  "SecurityInformationQualifier_3": "00",
  "SecurityInformation_4": "          ",
  "SenderIDQualifier_5": "16",
  "InterchangeSenderID_6": "SENDER1        ",
  "ReceiverIDQualifier_7": "14",
  "InterchangeReceiverID_8": "RECEIVER1      ",
  "InterchangeDate_9": "071216",
  "InterchangeTime_10": "1406",
  "InterchangeControlStandardsIdentifier_11": "U",
  "InterchangeControlVersionNumber_12": "00204",
  "InterchangeControlNumber_13": "000000263",
  "AcknowledgementRequested_14": "1",
  "UsageIndicator_15": "T",
  "ComponentElementSeparator_16": ">"
}

 

Attributes

  • AuthorizationInformationQualifier_1 string

    Code identifying the type of information in the Authorization Information.

  • AuthorizationInformation_2 string

    Information used for additional identification or authorization of the interchange sender or the data in the interchange; the type of information is set by ISA1.

  • SecurityInformationQualifier_3 string

    Code identifying the type of information in the Security Information.

  • SecurityInformation_4 string

    This is used for identifying the security information about the interchange sender or the data in the interchange; the type of information is set by ISA4.

  • SenderIDQualifier_5 string

    Code indicating the system/method of code structure used to designate the sender or receiver ID element being qualified.

  • InterchangeSenderID_6 string

    Identification code published by the sender for other parties to use as the receiver ID to route data to them; the sender always codes this value in the sender ID element.

  • ReceiverIDQualifier_7 string

    Code indicating the system/method of code structure used to designate the sender or receiver ID element being qualified.

  • InterchangeReceiverID_8 string

    Identification code published by the receiver of the data; When sending, it is used by the sender as their sending ID, thus other parties sending to them will use this as a receiving ID to route data to them.

  • InterchangeDate_9 string

    Date of the interchange.

  • InterchangeTime_10 string

    Time of the interchange.

  • InterchangeControlStandardsIdentifier_11 string

    Type is not applicable; the repetition separator is a delimiter and not a data element; this field provides the delimiter used to separate repeated occurrences of a simple data element or a composite data structure; this value must be different than the data element separator, component element separator, and the segment terminator.

  • InterchangeControlVersionNumber_12 string

    Code specifying the version number of the interchange control segments.

  • InterchangeControlNumber_13 string

    A control number assigned by the interchange sender.

  • AcknowledgementRequested_14 string

    Code indicating the sender’s request for an interchange acknowledgment.

  • UsageIndicator_15 string

    Code indicating whether data enclosed by this interchange envelope is test, production, or information.

  • ComponentElementSeparator_16 string

    Type is not applicable; the component element separator is a delimiter and not a data element; this field provides the delimiter used to separate component data elements within a composite data structure; this value must be different than the data element separator and the segment terminator.

 

TA1

TA1 object is only used as part of the X12Interchange object when a TA1 acknowledgment is generated and represents the standard TA1 segment.

 

Example

{
  "InterchangeControlNumber_1": "810000263",
  "InterchangeDate_2": "071214",
  "InterchangeTime_3": "1406",
  "InterchangeAcknowledgmentCode_4": "A",
  "InterchangeNoteCode_5": "000"
}

 

Attributes

  • InterchangeControlNumber_1 string

    A control number assigned by the interchange sender.

  • InterchangeDate_2 string

    Date of the interchange.

  • InterchangeTime_3 string

    Time of the interchange.

  • InterchangeAcknowledgmentCode_4 string

    Code indicating the status of the receipt of the interchange control structure.

  • InterchangeNoteCode_5 string

    Code specifying the error found processing the interchange control structure.

 

X12Group

X12Group object represents an X12 functional group, GS/GE block. X12Group object is only used as part of the X12Interchange object.

 

Example

{
    "GS": {
        "CodeIdentifyingInformationType_1": "IN",
        "SenderIDCode_2": "SENDER1",
        "ReceiverIDCode_3": "RECEIVER1",
        "Date_4": "20071216",
        "Time_5": "1406",
        "GroupControlNumber_6": "000000001",
        "TransactionTypeCode_7": "X",
        "VersionAndRelease_8": "004010"
    },
    "Transactions": [{
        "ST": {
            "TransactionSetIdentifierCode_01": "850",
            "TransactionSetControlNumber_02": "0001"
        },
        "_comment": "... model specific content goes here ...",
        "SE": {
            "NumberofIncludedSegments_01": "15",
            "TransactionSetControlNumber_02": "0001"
        },
        "Model": "EdiNation.X12.ASC.004010"
    }],
    "GETrailers": [{
        "NumberOfIncludedSets_1": "1",
        "GroupControlNumber_2": "000000001"
    }]
}

 

Attributes

  • GS GS object

    The GS segment.

  • Transactions list of Transaction objects

    The list of transactions. This can be any type that represents a transaction which is also recognized as a model by EdiNation.

    The following transaction models are available as System models:

  • GETrailers list of GE objects

    The list of group trailers. It always contains one item for valid groups.

 

GS

GS object is only used as part of the X12Interchange object and represents the standard X12 GS segment, functional group header.

 

Example

{
  "CodeIdentifyingInformationType_1": "IN",
  "SenderIDCode_2": "SENDER1",
  "ReceiverIDCode_3": "RECEIVER1",
  "Date_4": "20071216",
  "Time_5": "1406",
  "GroupControlNumber_6": "000000001",
  "TransactionTypeCode_7": "X",
  "VersionAndRelease_8": "004010"
}

 

Attributes

  • CodeIdentifyingInformationType_1 string

    Code identifying a group of application-related transaction sets.

  • SenderIDCode_2 string

    Code identifying party sending transmission; codes agreed to by trading partners.

  • ReceiverIDCode_3 string

    Code identifying party receiving transmission; codes agreed to by trading partners.

  • Date_4 string

    Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year.

  • Time_5 string

    Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99).

  • GroupControlNumber_6 string

    Assigned number originated and maintained by the sender.

  • TransactionTypeCode_7 string

    Code identifying the issuer of the standard; this code is used in conjunction with Data Element 480.

  • VersionAndRelease_8 string

    Code indicating the version, release, sub release, and industry identifier of the EDI standard being used, including the GS and GE segments; if code in DE455 in GS segment is X, then in DE 480 positions 1-3 are the version number; positions 4-6 are the release and sub release, level of the version; and positions 7-12 are the industry or trade association identifiers (optionally assigned by the user); if code in DE455 in GS segment is T, then other formats are allowed.

 

GE

GE object is only used as part of the X12Interchange object and represents the standard X12 GE segment, functional group trailer.

 

Example

{
  "NumberOfIncludedSets_1": "1",
  "GroupControlNumber_2": "000000001"
}

 

Attributes

  • NumberOfIncludedSets_1 string

    The total number of transaction sets included in the functional group or interchange (transmission) group terminated by the trailer containing this data element.

  • GroupControlNumber_2 string

    Assigned number originated and maintained by the sender.

 

IEA

IEA object is only used as part of the X12Interchange object and represents the standard X12 IEA segment, interchange trailer.

 

Example

{
  "NumberOfIncludedGroups_1": "1",
  "InterchangeControlNumber_2": "000000263"
}

 

Attributes

  • NumberOfIncludedGroups_1 string

    A count of the number of functional groups included in an interchange.

  • InterchangeControlNumber_2 string

    A control number assigned by the interchange sender.

 

Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.