v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1430193167.6 KB

Takes sample input and output documents and uses Amazon Bedrock to generate a mapping automatically. Depending on the accuracy and other factors, you can then edit the mapping for your needs.

Before you can use the AI-assisted feature for Amazon Web Services B2B Data Interchange you must enable models in Amazon Bedrock. For details, see AI-assisted template mapping prerequisites in the Amazon Web Services B2B Data Interchange User guide.

To generate a mapping, perform the following steps:

  1. Start with an X12 EDI document to use as the input.

  2. Call TestMapping using your EDI document.

  3. Use the output from the TestMapping operation as either input or output for your GenerateMapping call, along with your sample file.

post/#X-Amz-Target=B2BI.GenerateMapping

Headers

X-Amz-Target'B2BI.GenerateMapping' required

Request body

inputFileContentstring required

Provide the contents of a sample X12 EDI file, either in JSON or XML format, to use as a starting point for the mapping.

outputFileContentstring required

Provide the contents of a sample X12 EDI file, either in JSON or XML format, to use as a target for the mapping.

mappingType'JSONATA' | 'XSLT' required

Specify the mapping type: either <code>JSONATA</code> or <code>XSLT.</code>

Response

Success

mappingTemplatestring required

Returns a mapping template based on your inputs.

mappingAccuracynumber float

Returns a percentage that estimates the accuracy of the generated mapping.