EdifactInterchange object represents an EDIFACT interchange, UNB/UNZ block. You get an array of EDIFACT interchanges as part of the Read operation when translating an EDIFACT file to JSON. The Read operation supports EDIFACT 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 EdifactInterchange object can be used with the Write operation, to translate it into an EDIFACT file, with the Validate operation, to validate that the interchange is compliant, and with the Ack operation, to generate technical and/or functional CONTRL acknowledgment.
Endpoints
POST /edifact/read | Response |
POST /edifact/write | Request |
POST /edifact/validate | Request |
POST /edifact/ack | Request and Response |
Example
{
"UNB": {
"SYNTAXIDENTIFIER_1": {
"SyntaxIdentifier_1": "UNOB",
"SyntaxVersionNumber_2": "1"
},
"INTERCHANGESENDER_2": {
"InterchangeSenderIdentification_1": "SENDER1",
"IdentificationCodeQualifier_2": "14",
"InterchangeSenderInternalIdentification_3": "ZZUK"
},
"INTERCHANGERECIPIENT_3": {
"InterchangeRecipientIdentification_1": "RECEIVER1",
"IdentificationCodeQualifier_2": "1",
"InterchangeRecipientInternalIdentification_3": "ZZUK"
},
"DATEANDTIMEOFPREPARATION_4": {
"Date_1": "071101",
"Time_2": "1701"
},
"InterchangeControlReference_5": "131",
"ApplicationReference_7": "ORDERS",
"AcknowledgementRequest_9": "1",
"TestIndicator_11": "1"
},
"Groups": [{
"Transactions": [{
"UNH": {
"MessageReferenceNumber_01": "000000101",
"MessageIdentifier_02": {
"MessageType_01": "ORDERS",
"MessageVersionNumber_02": "D",
"MessageReleaseNumber_03": "96A",
"ControllingAgencyCoded_04": "UN"
}
},
"_comment": "... model specific content goes here ...",
"UNT": {
"NumberofSegmentsinaMessage_01": "38",
"MessageReferenceNumber_02": "000000101"
},
"Model": "EdiNation.Edifact.UN.D96A"
}]
}],
"UNZTrailers": [{
"InterchangeControlCount_1": "1",
"InterchangeControlReference_2": "131"
}],
"Result": {
"LastIndex": 40,
"Details": [],
"Status": "success"
}
}
Attributes
UNA UNA object
The UNA segment. Included only when the EdifactInterchange uses at least one non-default delimiter or service character.
UNB UNB object
The UNB segment.
Groups list of EdifactGroup objects
The list of functional groups.
UNZTrailers list of UNZ objects
The list of interchange trailers. Always contains one item for valid interchanges.
Result OperationResult object
The operation result.