B2BI / Client / test_conversion
test_conversion#
- B2BI.Client.test_conversion(**kwargs)#
This operation mimics the latter half of a typical Outbound EDI request. It takes an input JSON/XML in the B2Bi shape as input, converts it to an X12 EDI string, and return that string.
See also: AWS API Documentation
Request Syntax
response = client.test_conversion( source={ 'fileFormat': 'JSON'|'XML', 'inputFile': { 'fileContent': 'string' } }, target={ 'fileFormat': 'X12', 'formatDetails': { 'x12': { 'transactionSet': 'X12_110'|'X12_180'|'X12_204'|'X12_210'|'X12_211'|'X12_214'|'X12_215'|'X12_259'|'X12_260'|'X12_266'|'X12_269'|'X12_270'|'X12_271'|'X12_274'|'X12_275'|'X12_276'|'X12_277'|'X12_278'|'X12_310'|'X12_315'|'X12_322'|'X12_404'|'X12_410'|'X12_417'|'X12_421'|'X12_426'|'X12_810'|'X12_820'|'X12_824'|'X12_830'|'X12_832'|'X12_834'|'X12_835'|'X12_837'|'X12_844'|'X12_846'|'X12_849'|'X12_850'|'X12_852'|'X12_855'|'X12_856'|'X12_860'|'X12_861'|'X12_864'|'X12_865'|'X12_869'|'X12_870'|'X12_940'|'X12_945'|'X12_990'|'X12_997'|'X12_999'|'X12_270_X279'|'X12_271_X279'|'X12_275_X210'|'X12_275_X211'|'X12_276_X212'|'X12_277_X212'|'X12_277_X214'|'X12_277_X364'|'X12_278_X217'|'X12_820_X218'|'X12_820_X306'|'X12_824_X186'|'X12_834_X220'|'X12_834_X307'|'X12_834_X318'|'X12_835_X221'|'X12_837_X222'|'X12_837_X223'|'X12_837_X224'|'X12_837_X291'|'X12_837_X292'|'X12_837_X298'|'X12_999_X231', 'version': 'VERSION_4010'|'VERSION_4030'|'VERSION_5010'|'VERSION_5010_HIPAA' } }, 'outputSampleFile': { 'fileLocation': { 'bucketName': 'string', 'key': 'string' } } } )
- Parameters:
source (dict) –
[REQUIRED]
Specify the source file for an outbound EDI request.
fileFormat (string) – [REQUIRED]
The format for the input file: either JSON or XML.
inputFile (dict) – [REQUIRED]
File to be converted
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
fileContent
.fileContent (string) –
Specify the input contents, as a string, for the source of an outbound transformation.
target (dict) –
[REQUIRED]
Specify the format (X12 is the only currently supported format), and other details for the conversion target.
fileFormat (string) – [REQUIRED]
Currently, only X12 format is supported.
formatDetails (dict) –
A structure that contains the formatting details for the conversion target.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
x12
.x12 (dict) –
A structure that contains the X12 transaction set and version. The X12 structure is used when the system transforms an EDI (electronic data interchange) file.
Note
If an EDI input file contains more than one transaction, each transaction must have the same transaction set and version, for example 214/4010. If not, the transformer cannot parse the file.
transactionSet (string) –
Returns an enumerated type where each value identifies an X12 transaction set. Transaction sets are maintained by the X12 Accredited Standards Committee.
version (string) –
Returns the version to use for the specified X12 transaction set.
outputSampleFile (dict) –
Customer uses this to provide a sample on what should file look like after conversion X12 EDI use case around this would be discovering the file syntax
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
fileLocation
.fileLocation (dict) –
Specifies the details for the Amazon S3 file location that is being used with Amazon Web Services B2B Data Interchange. File locations in Amazon S3 are identified using a combination of the bucket and key.
bucketName (string) –
Specifies the name of the Amazon S3 bucket.
key (string) –
Specifies the Amazon S3 key for the file location.
- Return type:
dict
- Returns:
Response Syntax
{ 'convertedFileContent': 'string', 'validationMessages': [ 'string', ] }
Response Structure
(dict) –
convertedFileContent (string) –
Returns the converted file content.
validationMessages (list) –
Returns an array of strings, each containing a message that Amazon Web Services B2B Data Interchange generates during the conversion.
(string) –
Exceptions
B2BI.Client.exceptions.AccessDeniedException
B2BI.Client.exceptions.ValidationException
B2BI.Client.exceptions.ThrottlingException
B2BI.Client.exceptions.ResourceNotFoundException
B2BI.Client.exceptions.InternalServerException