Amazon B2B Data Interchange Testing API

Test and validate mappings, parsing, and conversions

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

amazon-b2b-data-interchange-testing-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS B2B Data Interchange Capabilities Testing API
  description: AWS B2B Data Interchange automates the transformation and exchange of electronic data interchange (EDI) documents at cloud scale. It enables businesses to onboard trading partners, transform X12 EDI documents to and from JSON or XML, and manage capabilities, profiles, partnerships, and transformers with pay-as-you-go pricing.
  version: '2022-06-23'
  contact:
    url: https://aws.amazon.com/contact-us/
  termsOfService: https://aws.amazon.com/service-terms/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://b2bi.us-east-1.amazonaws.com
  description: US East (N. Virginia)
- url: https://b2bi.us-west-2.amazonaws.com
  description: US West (Oregon)
- url: https://b2bi.eu-west-1.amazonaws.com
  description: EU (Ireland)
security:
- aws_iam: []
tags:
- name: Testing
  description: Test and validate mappings, parsing, and conversions
paths:
  /mappings/generate:
    post:
      operationId: GenerateMapping
      summary: Generate Mapping
      description: Takes sample input and output documents and uses Amazon Bedrock to generate a mapping automatically. Depending on the accuracy and symmetry of the input and output documents, this can generate an accurate mapping. Additional iterations are needed to refine the generated mapping.
      tags:
      - Testing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateMappingRequest'
      responses:
        '200':
          description: Mapping generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateMappingResponse'
        '400':
          $ref: '#/components/responses/ValidationException'
        '403':
          $ref: '#/components/responses/AccessDeniedException'
        '429':
          $ref: '#/components/responses/ThrottlingException'
        '500':
          $ref: '#/components/responses/InternalServerException'
  /mappings/starter-template:
    post:
      operationId: CreateStarterMappingTemplate
      summary: Create Starter Mapping Template
      description: 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.
      tags:
      - Testing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStarterMappingTemplateRequest'
      responses:
        '200':
          description: Starter mapping template created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStarterMappingTemplateResponse'
        '400':
          $ref: '#/components/responses/ValidationException'
        '403':
          $ref: '#/components/responses/AccessDeniedException'
        '429':
          $ref: '#/components/responses/ThrottlingException'
        '500':
          $ref: '#/components/responses/InternalServerException'
  /mappings/test:
    post:
      operationId: TestMapping
      summary: Test Mapping
      description: Maps the specified sample file to a given JSONata or XSLT template.
      tags:
      - Testing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestMappingRequest'
      responses:
        '200':
          description: Mapping tested successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestMappingResponse'
        '400':
          $ref: '#/components/responses/ValidationException'
        '403':
          $ref: '#/components/responses/AccessDeniedException'
        '404':
          $ref: '#/components/responses/ResourceNotFoundException'
        '429':
          $ref: '#/components/responses/ThrottlingException'
        '500':
          $ref: '#/components/responses/InternalServerException'
  /parsings/test:
    post:
      operationId: TestParsing
      summary: Test Parsing
      description: Parses the input EDI (electronic data interchange) file. The input file has a specific file size limit of 250 MB.
      tags:
      - Testing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestParsingRequest'
      responses:
        '200':
          description: Parsing tested successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestParsingResponse'
        '400':
          $ref: '#/components/responses/ValidationException'
        '403':
          $ref: '#/components/responses/AccessDeniedException'
        '404':
          $ref: '#/components/responses/ResourceNotFoundException'
        '429':
          $ref: '#/components/responses/ThrottlingException'
        '500':
          $ref: '#/components/responses/InternalServerException'
  /conversions/test:
    post:
      operationId: TestConversion
      summary: Test Conversion
      description: This operation mimics the latter half of a typical inbound X12 EDI request. It takes an X12 EDI file as input, converts the file to JSON or XML, and returns the converted file.
      tags:
      - Testing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestConversionRequest'
      responses:
        '200':
          description: Conversion tested successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestConversionResponse'
        '400':
          $ref: '#/components/responses/ValidationException'
        '403':
          $ref: '#/components/responses/AccessDeniedException'
        '429':
          $ref: '#/components/responses/ThrottlingException'
        '500':
          $ref: '#/components/responses/InternalServerException'
components:
  schemas:
    TestMappingResponse:
      type: object
      properties:
        mappedFileContent:
          type: string
    ConversionSource:
      type: object
      properties:
        fileFormat:
          type: string
          enum:
          - JSON
          - XML
        inputFile:
          type: object
          properties:
            fileContent:
              type: string
    CreateStarterMappingTemplateRequest:
      type: object
      required:
      - mappingType
      properties:
        outputSampleLocation:
          $ref: '#/components/schemas/S3Location'
        mappingType:
          type: string
          enum:
          - JSONATA
          - XSLT
        templateDetails:
          type: object
          properties:
            x12:
              $ref: '#/components/schemas/X12Details'
    GenerateMappingResponse:
      type: object
      properties:
        mappingTemplate:
          type: string
        mappingAccuracy:
          type: number
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    TestConversionResponse:
      type: object
      properties:
        convertedFileContent:
          type: string
        validationMessages:
          type: array
          items:
            type: string
    TestParsingRequest:
      type: object
      required:
      - inputFile
      - fileFormat
      - ediType
      properties:
        inputFile:
          $ref: '#/components/schemas/S3Location'
        fileFormat:
          type: string
          enum:
          - XML
          - JSON
          - NOT_USED
        ediType:
          $ref: '#/components/schemas/EdiType'
    S3Location:
      type: object
      properties:
        bucketName:
          type: string
        key:
          type: string
    TestConversionRequest:
      type: object
      required:
      - source
      - target
      properties:
        source:
          $ref: '#/components/schemas/ConversionSource'
        target:
          $ref: '#/components/schemas/ConversionTarget'
    X12Details:
      type: object
      properties:
        transactionSet:
          type: string
          description: X12 transaction set identifier (e.g., X12_110, X12_850)
        version:
          type: string
          description: X12 version (e.g., VERSION_4010, VERSION_5010)
    TestParsingResponse:
      type: object
      properties:
        parsedFileContent:
          type: string
    GenerateMappingRequest:
      type: object
      required:
      - inputFileContent
      - outputFileContent
      - mappingType
      properties:
        inputFileContent:
          type: string
        outputFileContent:
          type: string
        mappingType:
          type: string
          enum:
          - JSONATA
          - XSLT
    EdiType:
      type: object
      properties:
        x12Details:
          $ref: '#/components/schemas/X12Details'
    TestMappingRequest:
      type: object
      required:
      - inputFileContent
      - mappingTemplate
      - fileFormat
      properties:
        inputFileContent:
          type: string
        mappingTemplate:
          type: string
        fileFormat:
          type: string
          enum:
          - XML
          - JSON
          - NOT_USED
    ConversionTarget:
      type: object
      properties:
        fileFormat:
          type: string
          enum:
          - X12
        formatDetails:
          type: object
          properties:
            x12:
              $ref: '#/components/schemas/X12Details'
        outputSampleFile:
          type: object
          properties:
            fileContent:
              type: string
    CreateStarterMappingTemplateResponse:
      type: object
      properties:
        mappingTemplate:
          type: string
  responses:
    ResourceNotFoundException:
      description: Occurs when the requested resource does not exist, or cannot be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ThrottlingException:
      description: The request was denied due to request throttling.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerException:
      description: This exception is thrown when an error occurs in the AWS B2B Data Interchange service.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    AccessDeniedException:
      description: You do not have sufficient access to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationException:
      description: The input fails to satisfy the constraints specified by an AWS service.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    aws_iam:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4 authentication
externalDocs:
  description: AWS B2B Data Interchange API Reference
  url: https://docs.aws.amazon.com/b2bi/latest/APIReference/api-welcome.html