openapi: 3.0.1
info:
  description: The Peppol Connector API
  title: Peppol Connector API
  version: 1.10.0
servers:
- description: Generated server url
  url: https://api.uat.btx.eu.banqup.com/connectors/peppol
- description: Generated server url
  url: https://api.uat.btx.fr.banqup.com/connectors/peppol
security:
- oauth2: []
paths:
  /v1/spaces/connectors/peppol/configurationUI:
    post:
      description: "\tRetrieves a list of Peppol participant IDs that can be registered
        on the Peppol network\n\tbased on the configured identifiers within a given
        space.\n\n\t- The UI should display this information in the Peppol Connector
        configuration screen.\n\t- A participant ID is eligible for registration/un-registration
        if it is registered on another platform. \n\n <br/> Scope: space_read"
      operationId: configurationUI
      parameters:
      - in: query
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PeppolParticipantInformation'
          description: Success - List of address lines.
        '400':
          content:
            application/json: {}
          description: Bad Request - Invalid input data.
      security:
      - oauth2:
        - space_read
      summary: Retrieve Peppol participant registration eligibility
      tags:
      - Peppol Connector API
  /v1/spaces/connectors/peppol/lookup:
    post:
      description: 'Checks Peppol status and National Directory presence for identifiers
        before a client space is created. <br/> Scope: []'
      operationId: lookupConfiguration
      requestBody:
        content:
          application/json:
            example:
              be:en: '0888837427'
              fr:siret: '33856698600012'
              global:gln:
              - '7182913726182'
              - '9182534172619'
            schema:
              type: object
              additionalProperties:
                type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PeppolParticipantInformation'
          description: Success - List of address lines.
        '400':
          content:
            application/json: {}
          description: Bad Request - Invalid input data.
      summary: Partner-level identifier lookup by identifiers (No Space context)
      tags:
      - Peppol Connector API
components:
  schemas:
    AcceptDesignationPdpRequest:
      type: object
      properties:
        authorizingSpaceId:
          type: string
          format: uuid
        spaces:
          type: array
          items:
            $ref: '#/components/schemas/AcceptDesignationPdpSpace'
          minItems: 1
      required:
      - spaces
    AcceptDesignationPdpSpace:
      type: object
      properties:
        identifiers:
          type: array
          items:
            type: string
        spaceId:
          type: string
          format: uuid
      required:
      - spaceId
    ConfigureExtensionRequest:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        extensionId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        namespace:
          type: string
          minLength: 1
        settings:
          $ref: '#/components/schemas/ConnectorConfigurationSettings'
        spaceId:
          type: string
          format: uuid
      required:
      - entityId
      - extensionId
      - name
      - namespace
      - spaceId
    ConnectorConfigurationSettings:
      type: object
    DocumentValidationRequest:
      type: object
      properties:
        documentId:
          type: string
          format: uuid
        spaceId:
          type: string
          format: uuid
        validationId:
          type: string
          format: uuid
      required:
      - documentId
      - spaceId
      - validationId
    ExtensionActivateRequest:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        extensionId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        namespace:
          type: string
          minLength: 1
        spaceId:
          type: string
          format: uuid
      required:
      - entityId
      - extensionId
      - name
      - namespace
      - spaceId
    ExtensionAddRequest:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        extensionId:
          type: string
          format: uuid
        spaceId:
          type: string
          format: uuid
      required:
      - entityId
      - extensionId
      - spaceId
    ExtensionDeactivateRequest:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        extensionId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        namespace:
          type: string
          minLength: 1
        spaceId:
          type: string
          format: uuid
      required:
      - entityId
      - extensionId
      - name
      - namespace
      - spaceId
    ExtensionUpdateConfigureDetailResult:
      type: object
      properties:
        enabled:
          type: boolean
        identifier:
          type: string
        message:
          type: string
        success:
          type: boolean
    ExtensionUpdateConfigureResult:
      type: object
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionUpdateConfigureDetailResult'
        totalFailure:
          type: integer
          format: int64
        totalSuccess:
          type: integer
          format: int64
    ExtensionUpgradeRequest:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        extensionId:
          type: string
          format: uuid
        spaceId:
          type: string
          format: uuid
      required:
      - entityId
      - extensionId
      - spaceId
    PDPInfo:
      type: object
      description: PDP information (optional)
      example: {}
      properties:
        endDate:
          type: string
        peppolNetworkUrl:
          type: string
        startDate:
          type: string
    PeppolDirectorySearchRequest:
      type: object
      properties:
        connectionId:
          type: string
          format: uuid
        spaceId:
          type: string
          format: uuid
      required:
      - connectionId
      - spaceId
    PeppolDocumentAddRequest:
      type: object
      properties:
        deliveryId:
          type: string
        description:
          type: string
        documentNumber:
          type: string
        documentTypeCode:
          type: string
        documentTypeId:
          type: string
        entityId:
          type: string
          format: uuid
        invoiceIssueDate:
          type: string
        invoiceReceiverCountryCode:
          type: string
        originalReceiver:
          type: string
        originalReceiverCountryCode:
          type: string
        originalSender:
          type: string
        originalSenderCountryCode:
          type: string
        processId:
          type: string
        senderLegalName:
          type: string
        spaceId:
          type: string
          format: uuid
        ublFile:
          type: string
          format: binary
      required:
      - deliveryId
      - entityId
      - spaceId
      - ublFile
    PeppolDocumentAddResult:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        fileId:
          type: string
        message:
          type: string
        spaceId:
          type: string
          format: uuid
        status:
          type: boolean
    PeppolDocumentSendRequest:
      type: object
      properties:
        documentIds:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
        spaceId:
          type: string
          format: uuid
      required:
      - documentIds
      - spaceId
    PeppolMessageResult:
      type: object
      properties:
        message:
          type: string
        messageId:
          type: string
    PeppolParticipantInformation:
      type: object
      properties:
        inNationalDirectory:
          type: boolean
          description: True if found in the country's National Directory (France only)
        isDefault:
          type: boolean
          description: True if this is the default identifier for the space
        participantId:
          type: string
          description: The Peppol participant ID
          example: 0208:0417497106
          minLength: 1
        pdpInfo:
          $ref: '#/components/schemas/PDPInfo'
        platform:
          type: string
          description: The platform name (optional)
          example: banqup
        registered:
          type: boolean
          description: Indicates if the participant already registered
          example: true
        registrable:
          type: boolean
          description: Indicates if the participant can be registered/unregistered
          example: true
        schemaId:
          type: string
          description: The scheme identifier for the participant
          example: '0208'
          minLength: 1
        sendOnly:
          type: boolean
      required:
      - participantId
      - registered
      - registrable
      - schemaId
    PeppolSearchDocumentType:
      type: object
      properties:
        scheme:
          type: string
        value:
          type: string
    PeppolSearchParticipantId:
      type: object
      properties:
        scheme:
          type: string
        value:
          type: string
    PeppolSearchResponse:
      type: object
      properties:
        name:
          type: string
        settings:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/PeppolSearchSetting'
    PeppolSearchSetting:
      type: object
      properties:
        docTypes:
          type: array
          items:
            $ref: '#/components/schemas/PeppolSearchDocumentType'
        participantId:
          $ref: '#/components/schemas/PeppolSearchParticipantId'
    ProblemDetail:
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
          format: uri
        properties:
          type: object
          additionalProperties:
            type: object
        status:
          type: integer
          format: int32
        title:
          type: string
        type:
          type: string
          format: uri
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.uat.btx.eu.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.uat.btx.eu.banqup.com/oauth2/auth
          tokenUrl: https://api.uat.btx.eu.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
