openapi: 3.0.1
info:
  title: 'Document conversion: API Specification'
  description: 'The Document conversion: API Specification'
  version: 1.0.61
servers:
- description: Generated server url
  url: https://api.uat.btx.fr.banqup.com/utils/conversion
- description: Generated server url
  url: https://api.uat.btx.eu.banqup.com/utils/conversion
security:
- oauth2: []
tags:
- name: Document validation
  description: These endpoints validate and detect the representation format of a
    document
paths:
  /v1/validate:
    post:
      tags:
      - Document validation
      summary: Validation document format
      description: 'This endpoint validates and detects the representation format
        of a document <br/> Scope: []'
      operationId: validateDocumentFormat
      requestBody:
        description: File Validate Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentValidateRequest'
        required: true
      responses:
        '200':
          description: Validated document and detected its representation format successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentValidateResponse'
              example:
                errors: []
                warnings: []
                status: valid
                document_type: FACTUR X/ZUGFERD
                namespace:
                profile: MINIMUM
        '400':
          description: Invalid or unsupported file's content type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Access to this resource is denied due to missing or invalid
            authentication credentials. Please provide valid credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
  /v1/files:convert:
    post:
      tags:
      - Document conversion
      summary: Convert document format
      description: 'This endpoint converts a document from one to another format <br/>
        Scope: []'
      operationId: convertDocumentFormat
      requestBody:
        description: File Convert Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentConvertRequest'
        required: true
      responses:
        '200':
          description: The output document has been uploaded to your outputUrl.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentConvertResponse'
              example:
                inputType: eu.cen.en16931:ubl:1.3.12
                outputType: com.unifiedpost.btx.datastore.json:invoice:2.0
        '400':
          description: Invalid or unsupported outputType
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Access to this resource is denied due to missing or invalid
            authentication credentials. Please provide valid credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
  /v1/outputTypes:
    get:
      tags:
      - Document conversion
      summary: Get list of valid output types.
      description: 'This endpoint provides a list of valid output types for conversion.
        <br/> Scope: []'
      operationId: getOutputDocumentTypes
      responses:
        '200':
          description: List of valid output types.
          content:
            application/json:
              schema:
                type: string
              example:
                inputType: eu.cen.en16931:ubl:1.3.12
                outputType: com.unifiedpost.btx.datastore.json:invoice:2.0
        '401':
          description: Access to this resource is denied due to missing or invalid
            authentication credentials. Please provide valid credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
  /v1/inputTypes:
    get:
      tags:
      - Document conversion
      summary: Get list of valid input types.
      description: 'This endpoint provides a list of valid input types for conversion.
        <br/> Scope: []'
      operationId: getInputDocumentTypes
      responses:
        '200':
          description: List of valid input types.
          content:
            application/json:
              schema:
                type: string
              example:
                inputType: eu.cen.en16931:ubl:1.3.12
                outputType: com.unifiedpost.btx.datastore.json:invoice:2.0
        '401':
          description: Access to this resource is denied due to missing or invalid
            authentication credentials. Please provide valid credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
components:
  schemas:
    DocumentValidateRequest:
      required:
      - inputUrl
      type: object
      properties:
        inputUrl:
          minLength: 1
          type: string
          description: The validation profile that should be applied to validate the
            input document
        validationProfile:
          type: string
          description: The validation profile that should be applied to validate the
            input document
    DocumentValidateResponse:
      required:
      - documentType
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
        status:
          type: string
        documentType:
          minLength: 1
          type: string
        namespace:
          type: string
        profile:
          type: string
    ApiErrorProblemDetail:
      required:
      - error
      - requestId
      - timestamp
      type: object
      properties:
        status:
          type: integer
          format: int32
        error:
          type: string
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        type:
          type: string
          format: uri
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
    NestedProblem:
      required:
      - detail
      - error
      - title
      type: object
      properties:
        error:
          type: string
        title:
          type: string
        detail:
          type: string
        type:
          type: string
          format: uri
    Address:
      type: object
      properties:
        streetName:
          type: string
          description: The street name
        house:
          type: string
          description: The house number
        buildingNumber:
          type: string
          description: The build number
        level:
          type: string
          description: The level of the building
        postCode:
          type: string
          description: The postal code
        city:
          type: string
          description: The city name
        state:
          type: string
          description: The state name
        room:
          type: string
        postBox:
          type: string
        townName:
          type: string
        country:
          type: string
          description: The country name
        countryCode:
          pattern: ^[a-zA-Z]{2}$
          type: string
          description: The country code
        department:
          type: string
        floor:
          type: string
      description: Address JSON schema
    Albania:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          al:vat:
            type: string
    Allowance:
      type: object
      properties:
        netAmount:
          type: string
        baseAmount:
          type: string
        percentage:
          type: string
        vatCategory:
          type: string
        vatPercentage:
          type: string
        description:
          type: string
        reasonCode:
          type: string
    Andorra:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ad:vat:
            type: string
    Attachment:
      type: object
      properties:
        contentType:
          type: string
          description: The mimeType of the document
        url:
          type: string
          description: The URL where the document can be downloaded
        filename:
          type: string
          description: The URL where the document can be downloaded
        description:
          type: string
          description: The URL where the document can be downloaded
      description: Attachments to be embedded in the output document
    Australia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          au:abn:
            type: string
    Austria:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          at:vat:
            type: string
          at:gov:
            type: string
          at:kur:
            type: string
    Bank:
      type: object
      properties:
        identifier:
          type: string
        scheme:
          type: string
    Belgium:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          be:vat:
            type: string
          be:en:
            type: string
    BosniaAndHerzegovina:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ba:vat:
            type: string
    Bulgaria:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          bg:vat:
            type: string
    Charge:
      type: object
      properties:
        netAmount:
          type: string
        baseAmount:
          type: string
        percentage:
          type: string
        vatCategory:
          type: string
        vatPercentage:
          type: string
        description:
          type: string
        reasonCode:
          type: string
    Croatia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          hr:vat:
            type: string
    CustomCategories:
      type: object
      properties:
        purchases:
          type: array
          items:
            type: string
    Customer:
      type: object
      properties:
        legalName:
          type: string
        tradeName:
          type: string
        address:
          $ref: '#/components/schemas/Address'
        globalIdentifiers:
          $ref: '#/components/schemas/GlobalIdentifiers'
    Cyprus:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          cy:vat:
            type: string
    CzechRepublic:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          cz:vat:
            type: string
          cz:ico:
            type: string
    Delivery:
      type: object
      properties:
        name:
          type: string
        address:
          $ref: '#/components/schemas/Address'
        deliveryDate:
          type: string
    Denmark:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          dk:p:
            type: string
          dk:digst:
            type: string
          dk:erst:
            type: string
          dk:vat:
            type: string
    Document:
      type: object
      properties:
        additionalProperties:
          type: object
          additionalProperties:
            type: object
        customCategories:
          $ref: '#/components/schemas/CustomCategories'
        metadata:
          $ref: '#/components/schemas/Metadata'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/Line'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
      description: Inline BTX Json for Document. This will be omitted if inputUrl
        is present in request.
    DocumentConvertOptions:
      type: object
      properties:
        extractAttachments:
          type: boolean
          description: Extract attachments from inbound FacturX and upload to GCS.
            Only applicable for FacturX to BTX JSON conversions.
          default: false
      description: Options for controlling conversion behavior
    DocumentConvertRequest:
      required:
      - inputType
      - outputType
      - outputUrl
      type: object
      properties:
        inputType:
          type: string
          description: Type (format) of the input document
          enum:
          - com.unifiedpost.btx.datastore.json
          - com.unifiedpost.btx.datastore.json:invoice
          - eu.peppol.bis3:creditnote
          - eu.peppol.bis3:creditnote:2024.5
          - eu.peppol.bis3:invoice
          - eu.peppol.bis3:invoice:2024.5
          - fr.factur-x:en16931:1.0.6
          - fr.factur-x:basic:1.0.6
          - fr.factur-x:minimum:1.0.6
          - fr.factur-x:basicwl:1.0.6
          - fr.factur-x:extended:1.0.6
          - fr.factur-x:en16931:1.0.7-2
          - fr.factur-x:basic:1.0.7-2
          - fr.factur-x:basicwl:1.0.7-2
          - fr.factur-x:extended:1.0.7-2
          - fr.factur-x:minimum:1.0.7-2
          - fr.factur-x
          - fr.factur-x:en16931
          - fr.factur-x:basic
          - fr.factur-x:minimum
          - fr.factur-x:basicwl
          - fr.factur-x:extended
          - fr.ctc:ubl-invoice
          - fr.ctc:ubl-creditnote
          - fr.ctc:extended-ubl-invoice
          - fr.ctc:extended-ubl-creditnote
          - fr.ctc:factur-x-extended
          - fr.ctc:factur-x-extended:1.3
          - fr.ctc:factur-x-en16931
          - fr.ctc:factur-x-en16931:1.3
          - fr.ctc:cii
          - fr.ctc:extended-cii
          - fr.ctc:ubl-invoice:1.3
          - fr.ctc:ubl-creditnote:1.3
          - fr.ctc:extended-ubl-invoice:1.3
          - fr.ctc:extended-ubl-creditnote:1.3
          - fr.ctc:cii:1.3
          - fr.ctc:extended-cii:1.3
          - eu.peppol.bis3.sg.ubl
          - eu.peppol.bis3.sg.ubl:creditnote
          - eu.peppol.bis3.sg.ubl:creditnote:2023.12
          - eu.peppol.bis3.sg.ubl:invoice
          - eu.peppol.bis3.sg.ubl:invoice:2023.12
        outputType:
          minLength: 1
          type: string
          description: Target format for the conversion output
          enum:
          - eu.peppol.bis3:creditnote
          - eu.peppol.bis3:creditnote:2024.5
          - eu.peppol.bis3:invoice
          - eu.peppol.bis3:invoice:2024.5
          - be.efff:creditnote
          - be.efff:creditnote:1.0
          - be.efff:creditnote:3.0.0
          - be.efff:invoice
          - be.efff:invoice:1.0
          - be.efff:invoice:3.0.0
          - com.unifiedpost.btx.datastore.json
          - com.unifiedpost.btx.datastore.json:thirdpartystatement:2.0
          - eu.cen.en16931:cii
          - com.unifiedpost.btx.pdf
          - be.febelfin:coda:2.6
          - org.cfonb:cfonb
          - org.cfonb:cfonb:1.0
          - es.aebanca:norma:43
          - org.iso20022:camt:053.001.02
          - com.unifiedpost.btx.aggregation.json:base:1.0
          - com.unifiedpost.btx.aggregation.json:multi:1.0
          - com.unifiedpost.btx.aggregation.pdf:emr:1.0
          - com.unifiedpost.btx.pdf
          - fr.factur-x
          - fr.factur-x:en16931
          - fr.factur-x:en16931:1.0.7-2
          - fr.factur-x:basic
          - fr.factur-x:basic:1.0.7-2
          - fr.factur-x:basicwl
          - fr.factur-x:basicwl:1.0.7-2
          - fr.factur-x:extended
          - fr.factur-x:extended:1.0.7-2
          - fr.factur-x:minimum
          - fr.factur-x:minimum:1.0.7-2
          - fr.ctc:ubl-invoice
          - fr.ctc:ubl-creditnote
          - fr.ctc:extended-ubl-invoice
          - fr.ctc:extended-ubl-creditnote
          - fr.ctc:factur-x-extended
          - fr.ctc:factur-x-extended:1.3
          - fr.ctc:factur-x-en16931
          - fr.ctc:factur-x-en16931:1.3
          - fr.ctc:cii
          - fr.ctc:extended-cii
          - fr.ctc:ubl-invoice:1.3
          - fr.ctc:ubl-creditnote:1.3
          - fr.ctc:extended-ubl-invoice:1.3
          - fr.ctc:extended-ubl-creditnote:1.3
          - fr.ctc:cii:1.3
          - fr.ctc:extended-cii:1.3
          - de.zugferd:en16931
          - de.zugferd:en16931:2.3.2
          - de.zugferd:basic
          - de.zugferd:basic:2.3.2
          - de.zugferd:basicwl
          - de.zugferd:basicwl:2.3.2
          - de.zugferd:minimum
          - de.zugferd:minimum:2.3.2
          - eu.peppol.bis3.sg.ubl
          - eu.peppol.bis3.sg.ubl:creditnote
          - eu.peppol.bis3.sg.ubl:creditnote:2023.12
          - eu.peppol.bis3.sg.ubl:invoice
          - eu.peppol.bis3.sg.ubl:invoice:2023.12
          - fr.einvoicingextract:base:1.0.7-2
        inputUrl:
          pattern: 
            ^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$
          type: string
          description: 'The URL where the original document can be downloaded. '
        input:
          $ref: '#/components/schemas/Document'
        outputUrl:
          minLength: 1
          pattern: 
            ^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$
          type: string
          description: The URL where the converted document should be uploaded to
        attachments:
          type: array
          description: Attachments to be embedded in the output document
          items:
            $ref: '#/components/schemas/Attachment'
        options:
          $ref: '#/components/schemas/DocumentConvertOptions'
    DocumentTotals:
      type: object
      properties:
        linesNetAmount:
          type: string
        allowancesNetAmount:
          type: string
        chargesNetAmount:
          type: string
        netAmount:
          type: string
        vatAmount:
          type: string
        grossAmount:
          type: string
        prepaidAmount:
          type: string
        roundingDifference:
          type: string
        payableAmount:
          type: string
        roundingAmount:
          type: string
    Estonia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ee:vat:
            type: string
          ee:rg:
            type: string
          ee:cc:
            type: string
    Eu16:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          eu:reid:
            type: string
    Eu27:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          eu:nal:
            type: string
    Finland:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          fi:ovt2:
            type: string
          fi:vat:
            type: string
    France:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          fr:siren:
            type: string
          fr:siret:
            type: string
          fr:vat:
            type: string
    Germany:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          de:lwid:
            type: string
          de:hrn:
            type: string
          de:ste:
            type: string
          de:vat:
            type: string
          de:widnr:
            type: string
    GlobalIdentifiers:
      type: object
      properties:
        gln:
          type: string
          writeOnly: true
        global:phoneNumber:
          type: array
          items:
            type: string
        global:email:
          type: array
          items:
            type: string
        global:participantId:
          type: string
        global:gln:
          type: array
          items:
            type: string
        global:tax_number:
          type: string
        additionalProperties:
          type: object
          additionalProperties:
            type: object
      oneOf:
      - $ref: '#/components/schemas/Andorra'
      - $ref: '#/components/schemas/Albania'
      - $ref: '#/components/schemas/Austria'
      - $ref: '#/components/schemas/Australia'
      - $ref: '#/components/schemas/BosniaAndHerzegovina'
      - $ref: '#/components/schemas/Belgium'
      - $ref: '#/components/schemas/Bulgaria'
      - $ref: '#/components/schemas/Switzerland'
      - $ref: '#/components/schemas/Cyprus'
      - $ref: '#/components/schemas/CzechRepublic'
      - $ref: '#/components/schemas/Germany'
      - $ref: '#/components/schemas/Denmark'
      - $ref: '#/components/schemas/Estonia'
      - $ref: '#/components/schemas/Spain'
      - $ref: '#/components/schemas/Eu16'
      - $ref: '#/components/schemas/Eu27'
      - $ref: '#/components/schemas/Finland'
      - $ref: '#/components/schemas/France'
      - $ref: '#/components/schemas/UnitedKingdom'
      - $ref: '#/components/schemas/Greece'
      - $ref: '#/components/schemas/Croatia'
      - $ref: '#/components/schemas/Hungary'
      - $ref: '#/components/schemas/Ireland'
      - $ref: '#/components/schemas/Iceland'
      - $ref: '#/components/schemas/Italy'
      - $ref: '#/components/schemas/Japan'
      - $ref: '#/components/schemas/Liechtenstein'
      - $ref: '#/components/schemas/Lithuania'
      - $ref: '#/components/schemas/Luxembourg'
      - $ref: '#/components/schemas/Latvia'
      - $ref: '#/components/schemas/Morocco'
      - $ref: '#/components/schemas/Monaco'
      - $ref: '#/components/schemas/Montenegro'
      - $ref: '#/components/schemas/Macedonia'
      - $ref: '#/components/schemas/Malta'
      - $ref: '#/components/schemas/Malaysia'
      - $ref: '#/components/schemas/Netherlands'
      - $ref: '#/components/schemas/Norway'
      - $ref: '#/components/schemas/Poland'
      - $ref: '#/components/schemas/Portugal'
      - $ref: '#/components/schemas/Romania'
      - $ref: '#/components/schemas/Serbia'
      - $ref: '#/components/schemas/Sweden'
      - $ref: '#/components/schemas/Singapore'
      - $ref: '#/components/schemas/Slovenia'
      - $ref: '#/components/schemas/Slovakia'
      - $ref: '#/components/schemas/SanMarino'
      - $ref: '#/components/schemas/Tunisia'
      - $ref: '#/components/schemas/Turkey'
      - $ref: '#/components/schemas/UnitedStatesAmerica'
      - $ref: '#/components/schemas/HolySee'
      - $ref: '#/components/schemas/VietNam'
    Greece:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          gr:vat:
            type: string
          gr:gemi:
            type: string
    HolySee:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          va:vat:
            type: string
    Hungary:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          hu:ltn:
            type: string
          hu:vat:
            type: string
          hu:ceg:
            type: string
    Iceland:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          is:ktnr:
            type: string
    InvoiceReference:
      type: object
      properties:
        invoiceReference:
          type: string
        issueDate:
          type: string
        invoiceType:
          type: string
        invoiceNumber:
          type: string
    Ireland:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ie:vat:
            type: string
    Italy:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          it:fti:
            type: string
          it:sia:
            type: string
          it:seceti:
            type: string
          it:cuuo:
            type: string
          it:cod:
            type: string
          it:cfi:
            type: string
          it:iva:
            type: string
    Japan:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          jp:sst:
            type: string
          jp:iin:
            type: string
    Latvia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          lv:vat:
            type: string
          lv:urn:
            type: string
    Liechtenstein:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          li:vat:
            type: string
    Line:
      type: object
      properties:
        quantity:
          type: string
        unit:
          type: string
        netAmount:
          type: string
        currency:
          type: string
        metadata:
          $ref: '#/components/schemas/LineMetadata'
        pricing:
          $ref: '#/components/schemas/Pricing'
        vatDetails:
          $ref: '#/components/schemas/VatDetail'
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
    LineMetadata:
      type: object
      properties:
        externalLineId:
          type: string
        buyerAccountingReference:
          type: string
        notes:
          type: array
          items:
            $ref: '#/components/schemas/Note'
        allowances:
          type: array
          items:
            $ref: '#/components/schemas/Allowance'
        charges:
          type: array
          items:
            $ref: '#/components/schemas/Charge'
        invoiceReferences:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceReference'
    Lithuania:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          lt:vat:
            type: string
          lt:lec:
            type: string
    Luxembourg:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          lu:vat:
            type: string
          lu:rcs:
            type: string
    Macedonia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          mk:vat:
            type: string
    Malaysia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          my:eif:
            type: string
    Malta:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          mt:vat:
            type: string
    Metadata:
      type: object
      properties:
        startDate:
          type: string
        endDate:
          type: string
        buyerAccountingReference:
          type: string
        documentNumber:
          type: string
        issueDate:
          type: string
        invoiceType:
          type: string
        currencyCode:
          type: string
        dueDate:
          type: string
        buyerReference:
          type: string
        contractReference:
          type: string
        purchaseOrderReference:
          type: string
        paymentTerms:
          type: string
        notes:
          type: array
          items:
            $ref: '#/components/schemas/Note'
        invoiceReferences:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceReference'
        supplier:
          $ref: '#/components/schemas/Supplier'
        customer:
          $ref: '#/components/schemas/Customer'
        delivery:
          $ref: '#/components/schemas/Delivery'
        prepaid:
          $ref: '#/components/schemas/Prepaid'
        paymentMeans:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMean'
        allowances:
          type: array
          items:
            $ref: '#/components/schemas/Allowance'
        charges:
          type: array
          items:
            $ref: '#/components/schemas/Charge'
        documentTotals:
          $ref: '#/components/schemas/DocumentTotals'
        vatDetails:
          type: array
          items:
            $ref: '#/components/schemas/VatDetail'
        uploadId:
          type: string
        vatChargeableMethod:
          type: string
        vatAlreadyDeclared:
          type: boolean
        processControl:
          $ref: '#/components/schemas/ProcessControl'
        externalLineId:
          type: string
        supplierCategory:
          $ref: '#/components/schemas/SupplierCategory'
        profileID:
          type: string
    Monaco:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          mc:vat:
            type: string
    Montenegro:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          me:vat:
            type: string
    Morocco:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ma:ice:
            type: string
          ma:vat:
            type: string
    Netherlands:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          nl:vat:
            type: string
          nl:kvk:
            type: string
          nl:oino:
            type: string
    Norway:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          no:org:
            type: string
          no:vat:
            type: string
    Note:
      type: object
      properties:
        code:
          type: string
        text:
          type: string
    PaymentAccount:
      type: object
      properties:
        identifier:
          type: string
        scheme:
          type: string
        country:
          type: string
        currency:
          type: string
        bank:
          $ref: '#/components/schemas/Bank'
    PaymentMandate:
      type: object
      properties:
        identifier:
          type: string
        payerFinancialAccount:
          $ref: '#/components/schemas/PaymentAccount'
    PaymentMean:
      type: object
      properties:
        code:
          type: string
        text:
          type: string
        paymentReference:
          $ref: '#/components/schemas/PaymentReference'
        paymentAccount:
          $ref: '#/components/schemas/PaymentAccount'
        paymentLink:
          type: string
        paymentMandate:
          $ref: '#/components/schemas/PaymentMandate'
    PaymentReference:
      type: object
      properties:
        value:
          type: string
        type:
          type: string
        scheme:
          type: string
    Poland:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          pl:vat:
            type: string
          pl:nip:
            type: string
          pl:regon:
            type: string
          pl:krs:
            type: string
    Portugal:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          pt:vat:
            type: string
          pt:nif:
            type: string
    Prepaid:
      type: object
      properties:
        paymentDate:
          type: string
        code:
          type: string
        text:
          type: string
        paymentReference:
          $ref: '#/components/schemas/PaymentReference'
    Pricing:
      type: object
      properties:
        itemNetPrice:
          type: string
        itemGrossPrice:
          type: string
        itemPriceQuantity:
          type: string
        itemPriceDiscount:
          type: string
    ProcessControl:
      type: object
      properties:
        businessProcess:
          type: string
    ProductIdentifiers:
      type: object
      properties:
        itemId:
          type: string
        itemCategory:
          type: string
        itemDescription:
          type: string
        itemName:
          type: string
    Romania:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ro:vat:
            type: string
          ro:onr:
            type: string
    SanMarino:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          sm:vat:
            type: string
    Serbia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          rs:vat:
            type: string
          rs:mb:
            type: string
    Singapore:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          sg:uen:
            type: string
    Slovakia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          sk:vat:
            type: string
          sk:ico:
            type: string
    Slovenia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          si:vat:
            type: string
    Spain:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          es:vat:
            type: string
          es:cif:
            type: string
    Supplier:
      type: object
      properties:
        legalName:
          type: string
        tradeName:
          type: string
        address:
          $ref: '#/components/schemas/Address'
        globalIdentifiers:
          $ref: '#/components/schemas/GlobalIdentifiers'
    SupplierCategory:
      type: object
      properties:
        code:
          type: string
        reason:
          type: string
    Sweden:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          se:orgnr:
            type: string
          se:vat:
            type: string
    Switzerland:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          ch:vat:
            type: string
          ch:uidb:
            type: string
    Tunisia:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          tn:uci:
            type: string
          tn:vat:
            type: string
    Turkey:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          tr:vat:
            type: string
    UnitedKingdom:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          gb:vat:
            type: string
          gb:crn:
            type: string
    UnitedStatesAmerica:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          us:ein:
            type: string
    VatDetail:
      type: object
      properties:
        vatCategory:
          type: string
        vatPercentage:
          type: string
        netAmount:
          type: string
        vatAmount:
          type: string
        exemptionReason:
          type: string
        exemptionReasonCode:
          type: string
    VietNam:
      type: object
      allOf:
      - $ref: '#/components/schemas/GlobalIdentifiers'
      - type: object
        properties:
          vn:mst:
            type: string
          vn:vat:
            type: string
    DocumentConvertResponse:
      type: object
      properties:
        inputType:
          type: string
        outputType:
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.uat.btx.fr.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.uat.btx.fr.banqup.com/oauth2/auth
          tokenUrl: https://api.uat.btx.fr.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
