B2BI / Client / create_starter_mapping_template

create_starter_mapping_template#

B2BI.Client.create_starter_mapping_template(**kwargs)#

Amazon Web Services B2B Data Interchange uses a mapping template in JSONata or XSLT format to transform a customer input file into a JSON or XML file that can be converted to EDI.

If you provide a sample EDI file with the same structure as the EDI files that you wish to generate, then the service can generate a mapping template. The starter template contains placeholder values which you can replace with JSONata or XSLT expressions to take data from your input file and insert it into the JSON or XML file that is used to generate the EDI.

If you do not provide a sample EDI file, then the service can generate a mapping template based on the EDI settings in the templateDetails parameter.

Currently, we only support generating a template that can generate the input to produce an Outbound X12 EDI file.

See also: AWS API Documentation

Request Syntax

response = client.create_starter_mapping_template(
    outputSampleLocation={
        'bucketName': 'string',
        'key': 'string'
    },
    mappingType='JSONATA'|'XSLT',
    templateDetails={
        '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'
        }
    }
)
Parameters:
  • outputSampleLocation (dict) –

    Specify the location of the sample EDI file that is used to generate the mapping template.

    • bucketName (string) –

      Specifies the name of the Amazon S3 bucket.

    • key (string) –

      Specifies the Amazon S3 key for the file location.

  • mappingType (string) –

    [REQUIRED]

    Specify the format for the mapping template: either JSONATA or XSLT.

  • templateDetails (dict) –

    [REQUIRED]

    Describes the details needed for generating the template. Specify the X12 transaction set and version for which the template is used: currently, we only support X12.

    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.

Return type:

dict

Returns:

Response Syntax

{
    'mappingTemplate': 'string'
}

Response Structure

  • (dict) –

    • mappingTemplate (string) –

      Returns a string that represents the mapping template.

Exceptions

  • B2BI.Client.exceptions.AccessDeniedException

  • B2BI.Client.exceptions.ValidationException

  • B2BI.Client.exceptions.ResourceNotFoundException

  • B2BI.Client.exceptions.InternalServerException