Converts an X12 EDI string into a JSON document, using the provided guideId.

Example

Use a bare-bones client and the command you need to make an API call.

import { EDITranslateClient, TranslateX12ToJsonCommand } from "@stedi/sdk-client-edi-translate"; // ES Modules import
// const { EDITranslateClient, TranslateX12ToJsonCommand } = require("@stedi/sdk-client-edi-translate"); // CommonJS import
const client = new EDITranslateClient(config);
const input = { // TranslateX12ToJsonInput
guideId: "STRING_VALUE",
input: "STRING_VALUE", // required
inputOptions: { // TranslateX12ToJsonInputOptions
guidelessInputOptions: { // TranslateX12ToJsonGuidelessInputOptions
x12Release: "STRING_VALUE",
delimiters: { // X12Delimiters
element: "STRING_VALUE", // required
composite: "STRING_VALUE", // required
repetition: "STRING_VALUE", // required
segment: "STRING_VALUE", // required
},
},
},
outputOptions: { // TranslateX12ToJsonOutputOptions
ignoreErrors: [ // IgnoreErrors
"validations" || "invalid_relational_condition" || "pattern_mismatch" || "incorrect_length" || "missing_required_element" || "invalid_enumeration" || "invalid_date" || "invalid_time" || "invalid_number" || "value_out_of_range",
],
},
};
const command = new TranslateX12ToJsonCommand(input);
const response = await client.send(command);
// { // TranslateX12ToJsonOutput
// output: { // Parsed
// transactionSets: [ // TransactionSets
// "DOCUMENT_VALUE",
// ],
// envelope: { // ParsedEnvelope
// interchangeHeader: { // ParsedInterchangeHeader
// senderQualifier: "01" || "02" || "03" || "04" || "07" || "08" || "09" || "10" || "11" || "12" || "13" || "14" || "15" || "16" || "17" || "18" || "19" || "20" || "21" || "22" || "23" || "24" || "25" || "26" || "27" || "28" || "29" || "30" || "31" || "32" || "33" || "34" || "35" || "36" || "37" || "38" || "AM" || "NR" || "SA" || "SN" || "ZZ",
// senderId: "STRING_VALUE",
// receiverQualifier: "01" || "02" || "03" || "04" || "07" || "08" || "09" || "10" || "11" || "12" || "13" || "14" || "15" || "16" || "17" || "18" || "19" || "20" || "21" || "22" || "23" || "24" || "25" || "26" || "27" || "28" || "29" || "30" || "31" || "32" || "33" || "34" || "35" || "36" || "37" || "38" || "AM" || "NR" || "SA" || "SN" || "ZZ",
// receiverId: "STRING_VALUE",
// controlNumber: "STRING_VALUE",
// authorizationInformationQualifier: "00" || "01" || "02" || "03" || "04" || "05" || "06" || "07" || "08",
// authorizationInformation: "STRING_VALUE",
// securityQualifier: "00" || "01",
// securityInformation: "STRING_VALUE",
// date: "STRING_VALUE",
// time: "STRING_VALUE",
// repetitionSeparator: "STRING_VALUE",
// acknowledgementRequestedCode: "0" || "1" || "2" || "3",
// usageIndicatorCode: "I" || "T" || "P",
// componentSeparator: "STRING_VALUE",
// controlVersionNumber: "STRING_VALUE",
// },
// groupHeader: { // ParsedGroupHeader
// functionalIdentifierCode: "AA" || "AB" || "AC" || "AD" || "AE" || "AF" || "AG" || "AH" || "AI" || "AK" || "AL" || "AM" || "AN" || "AO" || "AP" || "AQ" || "AR" || "AS" || "AT" || "AU" || "AV" || "AW" || "AX" || "AY" || "AZ" || "BA" || "BB" || "BC" || "BD" || "BE" || "BF" || "BG" || "BL" || "BS" || "CA" || "CB" || "CC" || "CD" || "CE" || "CF" || "CH" || "CI" || "CJ" || "CK" || "CL" || "CM" || "CN" || "CO" || "CP" || "CQ" || "CR" || "CS" || "CT" || "CU" || "CV" || "CW" || "D3" || "D4" || "D5" || "DA" || "DD" || "DF" || "DI" || "DM" || "DS" || "DX" || "EC" || "ED" || "EI" || "EN" || "EO" || "EP" || "ER" || "ES" || "EV" || "EX" || "FA" || "FB" || "FC" || "FG" || "FR" || "FT" || "GC" || "GE" || "GF" || "GL" || "GP" || "GR" || "GT" || "HB" || "HC" || "HI" || "HN" || "HP" || "HR" || "HS" || "HU" || "HV" || "IA" || "IB" || "IC" || "ID" || "IE" || "IF" || "IG" || "IH" || "IJ" || "IM" || "IN" || "IO" || "IR" || "IS" || "JB" || "KM" || "LA" || "LB" || "LI" || "LN" || "LR" || "LS" || "LT" || "MA" || "MC" || "MD" || "ME" || "MF" || "MG" || "MH" || "MI" || "MJ" || "MK" || "MM" || "MN" || "MO" || "MP" || "MQ" || "MR" || "MS" || "MT" || "MV" || "MW" || "MX" || "MY" || "MZ" || "NC" || "NL" || "NP" || "NR" || "NT" || "OC" || "OG" || "OR" || "OW" || "PA" || "PB" || "PC" || "PD" || "PE" || "PF" || "PG" || "PH" || "PI" || "PJ" || "PK" || "PL" || "PN" || "PO" || "PQ" || "PR" || "PS" || "PT" || "PU" || "PV" || "PW" || "PY" || "QG" || "QM" || "QO" || "RA" || "RB" || "RC" || "RD" || "RE" || "RF" || "RG" || "RH" || "RI" || "RJ" || "RK" || "RL" || "RM" || "RN" || "RO" || "RP" || "RQ" || "RR" || "RS" || "RT" || "RU" || "RV" || "RW" || "RX" || "RY" || "RZ" || "SA" || "SB" || "SC" || "SD" || "SE" || "SF" || "SH" || "SI" || "SJ" || "SL" || "SM" || "SN" || "SO" || "SP" || "SQ" || "SR" || "SS" || "ST" || "SU" || "SV" || "SW" || "TA" || "TB" || "TD" || "TE" || "TF" || "TI" || "TJ" || "TM" || "TN" || "TO" || "TP" || "TR" || "TT" || "TU" || "TX" || "UA" || "UB" || "UC" || "UD" || "UI" || "UP" || "UW" || "VA" || "VB" || "VC" || "VD" || "VE" || "VH" || "VI" || "VS" || "WA" || "WB" || "WG" || "WI" || "WL" || "WR" || "WT",
// applicationSenderCode: "STRING_VALUE",
// applicationReceiverCode: "STRING_VALUE",
// controlNumber: "STRING_VALUE",
// date: "STRING_VALUE",
// time: "STRING_VALUE",
// agencyCode: "T" || "X",
// release: "STRING_VALUE",
// },
// groupTrailer: { // ParsedGroupTrailer
// numberOfTransactions: "STRING_VALUE",
// controlNumber: "STRING_VALUE",
// },
// interchangeTrailer: { // ParsedInterchangeTrailer
// numberOfFunctionalGroups: "STRING_VALUE",
// controlNumber: "STRING_VALUE",
// },
// },
// delimiters: { // X12Delimiters
// element: "STRING_VALUE", // required
// composite: "STRING_VALUE", // required
// repetition: "STRING_VALUE", // required
// segment: "STRING_VALUE", // required
// },
// },
// warnings: [ // EdiWarnings
// { // EdiWarning
// mark: { // Mark
// start: { // Index
// line: Number("int"), // required
// column: Number("int"), // required
// },
// end: {
// line: Number("int"), // required
// column: Number("int"), // required
// },
// },
// message: "STRING_VALUE", // required
// context: "DOCUMENT_VALUE",
// },
// ],
// };

Param

TranslateX12ToJsonCommandInput

Returns

TranslateX12ToJsonCommandOutput

See

Throws

ValidationException (client fault) A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

Throws

BadRequestException (client fault) The server cannot process the request due to an apparent client error.

Throws

SerializationException (client fault) The server response when attempting to serialize the request.

Throws

EdiTranslationError (client fault)

Throws

AccessDeniedException (client fault) The server response for authorization failure.

Throws

GatewayTimeoutException (server fault) The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

Throws

InternalFailureException (server fault) The server response when an unexpected error occurred while processing request.

Throws

NotAcceptableException (client fault) The server response when the requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.

Throws

NotImplementedException (server fault) The server either does not recognize the request method, or it lacks the ability to fulfil the request.

Throws

QuotaExceededException (client fault) The server response for the usage plan quota exceeded error.

Throws

RequestTooLargeException (client fault) The server response for the request too large error.

Throws

ResourceConflictException (client fault) The server could not process the request because of conflict in the current state of the resource.

Throws

ResourceNotFoundException (client fault) The server response when the specified resource cannot be found after an API request passes authentication and authorization.

Throws

ResponseTooLargeException (client fault) The server response for the request too large error.

Throws

ServiceUnavailableException (server fault) The server cannot handle the request due to technical reasons.

Throws

ThrottlingException (client fault) The server response when usage plan or account-level throttling limits exceeded.

Throws

UnauthorizedException (client fault) The server response when the authorizer failed to authenticate the caller.

Throws

UnknownOperationException (client fault) The server response when the operation specified could not be found.

Throws

UnsupportedMediaTypeException (client fault) The server response when a payload is of an unsupported media type.

Throws

EDITranslateServiceException

Base exception class for all service exceptions from EDITranslate service.

Hierarchy

Constructors

Properties

Constructors

Properties