openapi: 3.0.1
info:
  description: The Afnor Connector API
  title: Afnor Connector API
  version: 1.8.2
servers:
- description: Generated server url
  url: https://api.cve.btx.eu.banqup.com/network/documents
security:
- oauth2: []
paths: {}
components:
  schemas:
    Acknowledgement:
      type: object
      properties:
        details:
          $ref: '#/components/schemas/AcknowledgementDetails'
        status:
          type: string
          enum:
          - Pending
          - Ok
          - Error
      required:
      - status
    AcknowledgementDetail:
      type: object
      properties:
        item:
          type: string
        level:
          type: string
          enum:
          - Error
          - Warning
        reasonCode:
          $ref: '#/components/schemas/ReasonCode'
        reasonMessage:
          type: string
    AcknowledgementDetails:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AcknowledgementDetail'
    Error:
      type: object
      properties:
        errorCode:
          type: string
        errorMessage:
          type: string
    Flow:
      type: object
      properties:
        acknowledgement:
          $ref: '#/components/schemas/Acknowledgement'
        flowDirection:
          type: string
          enum:
          - In
          - Out
        flowId:
          type: string
          description: Unique identifier supporting UUID but not only, for flexibility
            purpose
          maxLength: 36
        flowProfile:
          type: string
          enum:
          - Basic
          - CIUS
          - Extended-CTC-FR
        flowSyntax:
          type: string
          enum:
          - CII
          - UBL
          - Factur-X
          - CDAR
          - FRR
        flowType:
          type: string
          enum:
          - CustomerInvoice
          - SupplierInvoice
          - StateInvoice
          - CustomerInvoiceLC
          - SupplierInvoiceLC
          - StateCustomerInvoiceLC
          - StateSupplierInvoiceLC
          - AggregatedCustomerTransactionReport
          - UnitaryCustomerTransactionReport
          - AggregatedCustomerPaymentReport
          - UnitaryCustomerPaymentReport
          - UnitarySupplierTransactionReport
          - MultiFlowReport
        processingRule:
          type: string
          enum:
          - B2B
          - B2BInt
          - B2C
          - OutOfScope
          - ArchiveOnly
          - NotApplicable
        processingRuleSource:
          type: string
          enum:
          - Input
          - Computed
        submittedAt:
          type: string
          format: date-time
        trackingId:
          type: string
          description: Unique identifier supporting UUID but not only, for flexibility
            purpose
          maxLength: 36
        updatedAt:
          type: string
          format: date-time
    FlowInfo:
      type: object
      properties:
        flowProfile:
          type: string
          enum:
          - Basic
          - CIUS
          - Extended-CTC-FR
        flowSyntax:
          type: string
          enum:
          - CII
          - UBL
          - Factur-X
          - CDAR
          - FRR
        name:
          type: string
          maxLength: 255
          minLength: 0
        processingRule:
          type: string
          enum:
          - B2B
          - B2BInt
          - B2C
          - OutOfScope
          - ArchiveOnly
          - NotApplicable
        sha256:
          type: string
          pattern: ^[a-f0-9]{64}$
        trackingId:
          type: string
          description: Unique identifier supporting UUID but not only, for flexibility
            purpose
          maxLength: 36
      required:
      - flowSyntax
    FullFlowInfo:
      type: object
      properties:
        flowId:
          type: string
          description: Unique identifier supporting UUID but not only, for flexibility
            purpose
          maxLength: 36
          minLength: 0
        flowProfile:
          type: string
          enum:
          - Basic
          - CIUS
          - Extended-CTC-FR
        flowSyntax:
          type: string
          enum:
          - CII
          - UBL
          - Factur-X
          - CDAR
          - FRR
        name:
          type: string
          maxLength: 255
          minLength: 0
        processingRule:
          type: string
          enum:
          - B2B
          - B2BInt
          - B2C
          - OutOfScope
          - ArchiveOnly
          - NotApplicable
        sha256:
          type: string
          pattern: ^[a-f0-9]{64}$
        submittedAt:
          type: string
          format: date-time
        trackingId:
          type: string
          description: Unique identifier supporting UUID but not only, for flexibility
            purpose
          maxLength: 36
      required:
      - flowSyntax
    ReasonCode:
      type: object
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
      required:
      - type
    SearchFlowFilters:
      type: object
      properties:
        ackStatus:
          type: string
          enum:
          - Pending
          - Ok
          - Error
        flowDirection:
          type: array
          items:
            type: string
            enum:
            - In
            - Out
        flowType:
          type: array
          items:
            type: string
            enum:
            - CustomerInvoice
            - SupplierInvoice
            - StateInvoice
            - CustomerInvoiceLC
            - SupplierInvoiceLC
            - StateCustomerInvoiceLC
            - StateSupplierInvoiceLC
            - AggregatedCustomerTransactionReport
            - UnitaryCustomerTransactionReport
            - AggregatedCustomerPaymentReport
            - UnitaryCustomerPaymentReport
            - UnitarySupplierTransactionReport
            - MultiFlowReport
        processingRule:
          type: array
          items:
            type: string
            enum:
            - B2B
            - B2BInt
            - B2C
            - OutOfScope
            - ArchiveOnly
            - NotApplicable
        trackingId:
          type: string
          description: Unique identifier supporting UUID but not only, for flexibility
            purpose
          maxLength: 36
        updatedAfter:
          type: string
          format: date-time
        updatedBefore:
          type: string
          format: date-time
    SearchFlowParams:
      type: object
      properties:
        limit:
          type: integer
          format: int32
          maximum: 100
        where:
          $ref: '#/components/schemas/SearchFlowFilters'
      required:
      - where
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.cve.btx.eu.banqup.com/oauth2/auth
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
