openapi: 3.0.1
info:
  title: IMTC API
  version: v1
paths:
  /api/Message/retrieveMessages:
    post:
      tags:
        - Message
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
          application/json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
          text/json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
          application/*+json:
            schema:
              $ref: '#/components/schemas/MessageFilterRequestEntity'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponseEntity'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponseEntity'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponseEntity'
        '500':
          description: Internal Server Error
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '204':
          description: No Content
  /api/Message/downloadAttachment:
    post:
      tags:
        - Message
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
          application/json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
          text/json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
          application/*+json:
            schema:
              $ref: '#/components/schemas/MessageDownloadFilterRequestEntity'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageDetailsResponseEntity'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageDetailsResponseEntity'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageDetailsResponseEntity'
components:
  schemas:
    MessageDetailsResponseEntity:
      type: object
      properties:
        messageId:
          type: string
          nullable: true
        accountName:
          type: string
          nullable: true
        accountNumber:
          type: string
          nullable: true
        activityAmount:
          type: string
          nullable: true
        activityType:
          type: string
          nullable: true
        postedDate:
          type: string
          nullable: true
        messageBody:
          type: string
          nullable: true
        strategyName:
          type: string
          nullable: true
        portfolioName:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
        messageFile:
          type: string
          format: byte
          nullable: true
        mContentType:
          type: string
          nullable: true
        taxableIndicator:
          type: string
          nullable: true
        messageInitiatorName:
          type: string
          nullable: true
        managerName:
          type: string
          nullable: true
        portfolioId:
          type: string
          nullable: true
        externalReferenceId:
          type: string
          nullable: true
      additionalProperties: false
    MessageDownloadFilterRequestEntity:
      type: object
      properties:
        messageId:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    MessageFilter:
      type: object
      properties:
        messageStatusFlag:
          type: string
          nullable: true
        firmName:
          type: string
          nullable: true
        activityName:
          type: string
          nullable: true
        fromDate:
          type: string
          nullable: true
        toDate:
          type: string
          nullable: true
        searchKeyword:
          type: string
          nullable: true
      additionalProperties: false
    MessageFilterRequestEntity:
      type: object
      properties:
        messageFilter:
          $ref: '#/components/schemas/MessageFilter'
        limit:
          type: integer
          format: int32
          nullable: true
        cursorId:
          type: string
          nullable: true
      additionalProperties: false
    MessageNotesEntity:
      type: object
      properties:
        noteCreateDate:
          type: string
          nullable: true
        notePostedBy:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
      additionalProperties: false
    MessageResponseEntity:
      type: object
      properties:
        messageId:
          type: string
          nullable: true
        firmName:
          type: string
          nullable: true
        postedDate:
          type: string
          nullable: true
        accountName:
          type: string
          nullable: true
        accountNumber:
          type: string
          nullable: true
        messageBody:
          type: string
          nullable: true
        activityName:
          type: string
          nullable: true
        activityAmount:
          type: string
          nullable: true
        taxableIndicator:
          type: string
          nullable: true
        messageReadTime:
          type: string
          nullable: true
        messageInitiatorName:
          type: string
          nullable: true
        strategyName:
          type: string
          nullable: true
        portfolioName:
          type: string
          nullable: true
        portfolioId:
          type: string
          nullable: true
        externalReferenceId:
          type: string
          nullable: true
        messageNotes:
          type: array
          items:
            $ref: '#/components/schemas/MessageNotesEntity'
          nullable: true
        isAttachmentAvailble:
          type: boolean
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: { }