OperationResult

The OperationResult object represents the outcome and details of an operation. The API will contain all translation and validation errors and will report them back as OperationResult.

The OperationResult object is always included in the response from the Read operation, to report back any read errors, such as corrupt EDI file, unrecognized EDI transaction, unsupported EDI transaction where no transaction model exists or unparseable transaction, which was only processed partially. The OperationResult will also report any read warnings, such as when a transaction was translated with a secondary model.

The OperationResult object is always included as the response from the Validate operation, to report back the overall validation result as well as any validation errors. The OperationResult reports some control segment data validation as "non-critical".

 

Endpoints

POST /x12/read In Response
POST /x12/validate Response
POST /edifact/read In Response
POST /edifact/validate Response

 

Example Success

{
  "LastIndex": 46,
  "Details": [],
  "Status": "success"
}

 

Example Error

{
  "LastIndex": 19,
  "Details": [
    {
      "Index": 10,
      "TransactionIndex": 2,
      "TransactionRef": "0001",
      "SegmentId": "PO1",
      "Value": "P",
      "Message": "Invalid EDI code P - permitted codes are: AA,AB,AP",
      "Status": "error"
    }
  ],
  "Status": "error"
}

 

Attributes


LastIndex integer

The index of the last segment in the interchange, starting from the ISA. When multiple interchanges are present, the index starts from the first ISA of the first interchange. It is 1 based.


Status enumeration

The status of the Read or Validation operation.

The available values are:

Value Description
success The interchange(s) was translated successfully or are valid
warning Some transactions were translated using secondary model
error Some transactions were partially translated or are invalid

Details list of OperationDetail objects

The list of validation or translation errors and warnings if any.

Was this article helpful?
0 out of 0 found this helpful