openapi: 3.0.1
info:
  title: Network Api
  version: v1
servers:
- description: Generated server url
  url: https://api.btx.fr.banqup.com/network
- description: Generated server url
  url: https://api.btx.eu.banqup.com/network
paths:
  /intake/v1/spaces/{spaceId}/uploads/{folder}/{documentType}:
    post:
      tags:
      - Intake Api
      summary: Upload
      operationId: upload
      parameters:
      - name: spaceId
        in: path
        description: Unique id of the Space
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Whether is a receiving (inbox) or sending (outbox) document
        required: true
        schema:
          type: string
          enum:
          - INBOX
          - OUTBOX
      - name: documentType
        in: path
        required: true
        schema:
          type: string
          enum:
          - INVOICES
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - file
              type: object
              properties:
                file:
                  type: string
                  description: File to be uploaded
                  format: binary
                attachments:
                  type: array
                  description: Attachments to be uploaded. Optional
                  items:
                    type: string
                    format: binary
      responses:
        '201':
          description: Created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IntakeResponse'
      deprecated: true
components:
  schemas:
    IntakeResponse:
      type: object
      properties:
        uploadId:
          type: integer
          format: int64
    AddConnectorRequest:
      required:
      - entityId
      - spaceId
      type: object
      properties:
        spaceId:
          type: string
          description: Space Id
          format: uuid
          example: 12edcc6b-adec-4bf3-bdb6-dfc9f53f24c7
        entityId:
          type: string
          description: Entity Id
          format: uuid
          example: b168f25b-af6a-4c5e-bf8d-20f2de73b903
    SearchRequest:
      required:
      - connectionId
      - spaceId
      type: object
      properties:
        spaceId:
          title: Space Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: A unique identifier for the space. This is typically a UUID
            used to specify the space where the search is conducted.
          format: uuid
          example: 12edcc6b-adec-4bf3-bdb6-dfc9f53f24c7
        connectionId:
          title: Connection Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: A unique identifier for the connection. This UUID is used to
            identify the specific connection for which the search is performed.
          format: uuid
          example: b168f25b-af6a-4c5e-bf8d-20f2de73b903
    SearchResponse:
      type: object
      properties:
        peppolParticipantIds:
          title: Peppol Participant Identifiers
          type: array
          description: A list of Peppol participant identifiers of the connection
            within Peppol Network
          example:
          - 0088:123456789
          - 0088:987654321
          items:
            title: Peppol Participant Identifiers
            type: string
            description: A list of Peppol participant identifiers of the connection
              within Peppol Network
            example: '["0088:123456789","0088:987654321"]'
    AddRequest:
      required:
      - entityId
      - extensionId
      - spaceId
      type: object
      properties:
        entityId:
          title: Entity Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: A unique identifier for the entity. This is typically a UUID
            used to specify the entity associated with the request.
          format: uuid
          example: 12edcc6b-adec-4bf3-bdb6-dfc9f53f24c7
        spaceId:
          title: Space Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: A unique identifier for the space. This is typically a UUID
            used to specify the space associated with the request.
          format: uuid
          example: 12edcc6b-adec-4bf3-bdb6-dfc9f53f24c7
        extensionId:
          title: Extension Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: A unique identifier for the extension. This UUID is used to
            specify the extension being referenced in the request.
          format: uuid
          example: b168f25b-af6a-4c5e-bf8d-20f2de73b903
        namespace:
          title: Connector namespace
          type: string
          description: The namespace of this connector
          example: com.unifiedpost.btx.connectors
        name:
          title: Connector name
          type: string
          description: The name of this connector
          example: email
    ProcessFileRequest:
      required:
      - fileId
      - spaceId
      type: object
      properties:
        spaceId:
          title: Space Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: Unique identifier for the space. This is typically a UUID that
            is used to specify the space in which the file is located.
          format: uuid
          example: 12edcc6b-adec-4bf3-bdb6-dfc9f53f24c7
        fileId:
          title: Space File Identifier
          maxLength: 36
          minLength: 36
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
          description: Unique identifier for the file. This is typically a UUID that
            represents the specific file being processed.
          format: uuid
          example: b168f25b-af6a-4c5e-bf8d-20f2de73b903
    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
