openapi: 3.0.1
info:
  title: End Client Reporting
  version: v1
  description: |
    # Getting Started
    For more information on how to start using our APIs, please refer to the Getting
    Started guide. 
    ***
    # Servers
    SEI's API products have various environments available depending on your stage of integration. The server URL should correspond with the environment of your application. Please refer to the Getting Started guide for a list of all environments and URLs. 
    
    **Note** For all Client applications, the Two-way TLS URL must be used. This is essential in order for the client server making API calls to establish a successful Two-Way SSL communication with SEI.
    ***
servers:
  - url: 'https://test.mtls.api.seic.com'
    description: Two-way SSL Test Server.
  - url: 'https://mtls.api.seic.com'
    description: Two-way SSL Production Server.
  - url: 'https://build.api.seic.com'
    description: Integration Server with masked data.
  - url: 'https://sandbox.api.seic.com'
    description: Sandbox Server with masked data. 
  - url: 'https://test.api.seic.com'
    description: Test Server with unmasked data.
  - url: 'https://api.seic.com'
    description: Production Server with unmasked data.
paths:
  /v1/ecr/reports:
    post:
      security:
      - oauth2: []
        bearerAuth: []
        ApiKeyAuth: []
      tags:
      - Reports
      operationId: ECRReportsPOST
      summary: Kicks off the execution of desired reporting for the chosen fund(s) and reporting period(s). Returns a GET URL in the response for the user to poll and retrieve the functional data once report execution is completed.
      parameters:
      - name: category
        in: header
        description: Source System category - Investran(CEF)/Investier(OEF).
        required: true
        schema:
          type: string
      - name: content-type
        in: header
        description: Request content type. The valid value is application/json.
        required: true
        schema:
          type: string
      x-codeSamples:
        - lang: 'cURL'
          source: |
            curl --location --request POST \
            'https://api.seic.com/v1/ecr/reports' \
            --header 'Authorization: Bearer YOUR_ACCESSTOKEN' \
            --header 'AppKey: YOUR_APPKEY' \
            --header 'Content-Type: application/json' \
            --header 'category: oef' 
            --data-raw '{
              "fundExternalId": "FUND1",
              "fundId": 44783,
              "type": "Fund",
              "reportId": 6874,
              "startDate": "2017-01-01",
              "endDate": "2017-02-31",
              "asOfDate": "2021-01-13",
              "dynamicStartDate": "2021-01-13",
              "dynamicEndDate": "2021-01-13",
              "merge": "Yes",
              "mergeOutputFormat": "excel"
            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/reportsrequestDataPOST'
            examples:
              Response Example:
                $ref: '#/components/examples/reportsCompleterequestDataPOST'
        required: false
      responses:
        200:
          description: OK- The request has succeeded and the response has been returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/postReportsResponse'
              examples:
                Response Example:
                  $ref: '#/components/examples/postReportsResponseExample'
        400:
          description: Bad request - The server cannot or will not process the request
            due to an inaccurate request submitted by the client application.  Please
            resubmit the request after making the required corrections indicated in
            the error response.  For more Info on SEI Error Standards please refer
            to the API Standards FAQ under Support.
        401:
          description: Unauthorized - Invalid authentication details have been provided.  Also
            useful to trigger an authorization pop up if the API is used from a browser.
        403:
          description: Forbidden-The SEI Server understood the request but refuses
            to fulfill it.
        404:
          description: Not Found- The requested resource or the underlying resource
            does not exist.  Please resubmit the request after making the required
            corrections
        500:
          description: Internal Server Error - The server was unable to fulfill the
            request due to an unknown condition. Please contact SEI for support. For
            More Info please refer to the "Response & Errors" FAQ under support.
      x-codegen-request-body-name: requestPayload
    get:
      tags:
      - Reports
      security:
      - oauth2: []
        bearerAuth: []
        ApiKeyAuth: []
      operationId: ECRReportsGet
      summary: Once the POST request has been submitted, the user can keep polling this endpoint to obtain a status on the report request. Returns report dataset once the execution has been completed and data is available.
      parameters:
      - name: requestId
        in: query
        description: The unique identifer generated by the system to identify each request uniquely.
        required: true
        schema:
          type: string
      - name: category
        in: header
        description: Source System category - Investran(CEF)/Investier(OEF).
        required: true
        schema:
          type: string
      x-codeSamples:
        - lang: 'cURL'
          source: |
            curl --location --request GET \
            'https://api.seic.com/v1/ecr/reports?requestId=ABCzODA5NABCDMDE3LTAxLTAx' \
            --header 'Authorization: Bearer YOUR_ACCESSTOKEN' \
            --header 'AppKey: YOUR_APPKEY' \
            --header 'category: oef' 
      responses:
        200:
          description: OK- The request has succeeded and the response has been returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getReportsResults'
              examples:
                Response Example:
                  $ref: '#/components/examples/getReportsResultsExample'
        400:
          description: Bad request - The server cannot or will not process the request
            due to an inaccurate request submitted by the client application.  Please
            resubmit the request after making the required corrections indicated in
            the error response.  For more Info on SEI Error Standards please refer
            to the API Standards FAQ under Support.
        401:
          description: Unauthorized - Invalid authentication details have been provided.  Also
            useful to trigger an authorization pop up if the API is used from a browser.
        403:
          description: Forbidden-The SEI Server understood the request but refuses
            to fulfill it.
        404:
          description: Not Found- The requested resource or the underlying resource
            does not exist.  Please resubmit the request after making the required
            corrections.
        500:
          description: Internal Server Error - The server was unable to fulfill the
            request due to an unknown condition. Please contact SEI for support. For
            More Info please refer to the "Response & Errors" FAQ under support.
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: To access any API, first obtain an OAuth Token. Refer to the Access Token documentation for more information. The token has a 60 minutes active TTL and 30 minutes inactive TTL. An application making SEI API Requests from a Client/Server or Server/Server type of infrastructure will leverage the grant_type client_credentials while minting an OAuth from the Token API. 
      flows:
        clientCredentials:
          tokenUrl: /v2/oauthtoken
          scopes: {}
    bearerAuth:
      type: http
      scheme: bearer
      description: After successfully obtaining an OAuth token, pass the access_token value to the desired API endpoint by including the header parameter 'Authorization' with the value 'Bearer access_token'. 
    ApiKeyAuth:
      type: apiKey
      in: header
      name: AppKey
      description: Pass the header parameter 'AppKey' to the API endpoint to authenticate your application. This value can be found within the 'My Apps' page. This value uniquely identifies the registered application. 
  schemas:
    postReportsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/reportsresponseDataPOST'
        paging:
          $ref: '#/components/schemas/Paging'
    reportsresponseDataPOST:
      type: object
      properties:
        requestId:
          type: string
          description: The unique identifer generated by the system to identify each request uniquely. 
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        reportName:
          type: string
          description: Name of the report to be generated for the fund(s).
        format:
          type: string
          description: The format in which the requester wants to view the report. Valid values are CSV and JSON.
        status:
          type: string
          description:   Status is the result of the action with respect to the request made by the user.
    reportsrequestDataPOST:
      type: object
      properties:
        fundExternalId:
          type: string
          description: Unique business identifier that represents a fund entity recognized by SEI and a third party system or application.
        fundId:
          type: string
          description: The SEI code that identifies a fund uniquely.
        type:
          type: string
          description: Specifies the type of fund. Valid values are FUND, FUNDFAMILY, FUNDCOMPLEX,DEALFAMILY, BOOKS, SUBFUND.
        reportId:
          type: number
          description: The SEI code that identifies a report uniquely.
        startDate:
          type: string
          description:   The start date is the initial date for the report to be generated. It accepts the format as [YYYY/MM/DD].
        endDate:
          type: string
          description:   The end date is the last date for the report to be generated. It accepts the format as [YYYY/MM/DD].
        asOfDate:
          type: string
          description: As of business date of the reporting data in YYYY-MM-DD.
        dynamicStartDate:
          type: string
        dynamicEndDate:
          type: string
        merge:
          type: string
          description: It merges the reports of multiple funds. Valid values of "yes" and "No".
          enum: [Yes,No]
        mergeOutputFormat:
          type: string
          description: The format in which the requester wants to view the merged report. Valid values are "CSV" or "Excel".
          enum: [CSV,Excel]
      required:
        - fundExternalId
        - type
        - reportId
        - startDate
        - endDate
    getReportsResults:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ReportsResultRow'
        paging:
          $ref: '#/components/schemas/Paging'
    ReportsResultRow:
      type: object
      properties:
        status:
          type: string
          description: Status is the result of the action with respect to the request made by the user.
    Paging:
      type: object
      properties:
        totalCount:
          type: integer
          format: int32
          description: The total number of records.
          example: 10
        limit:
          type: integer
          format: int32
          description: Number of records per page. Many responses have a maximum of 50 records per page.
          example: 1
        first:
          type: string
          description: API URL for the first page of data with respect to the request context.
        last:
          type: string
          description: In pagination, this is the ID that points to the start of the last page. 
        previous:
          type: string
          description: API URL for the previous page of data with respect to the request context.
        next:
          type: string
          description: URL to the next page of records with respect to the API request.
        self:
          type: string
          description: Current Request URL.
    Link:
      type: object
      properties:
        rel:
          type: string
          description: The name of a link returned by the href URL. This is immutable.
        href:
          type: string
          description: Fully configured URL to obtain more information regarding an entity. Allows for easier navigation across products. These links should not be cached.
  examples:
    reportsRequiredrequestDataPOST:
      value:
        fundExternalId: FUND1
        type: Fund
        reportId: 6874
        startDate: "2017-01-01"
        endDate: "2017-02-31"
    reportsCompleterequestDataPOST:
      value:
        fundExternalId: FUND1
        fundId: 44783
        type: Fund
        reportId: 6874
        startDate: "2017-01-01"
        endDate: "2017-02-31"
        asOfDate: "2021-01-13"
        dynamicStartDate: "2021-01-13"
        dynamicEndDate: "2021-01-13"
        merge: Yes
        mergeOutputFormat: excel
    postReportsResponseExample:
      value:
        data:
          requestId: ABCzODA5NABCDMDE3LTAxLTAx
          links: 
            rel: Report
            href: https://api.seic.com/ecr/api/v1/report?requestId=ABCzODA5NABCDMDE3LTAxLTAx
          reportName: FUND1 Monthly Report
          format: CSV
          status: In-Progress
          paging: null
    getReportsResultsExample:
      value:
        data:
        - status: Report processing is in-progress. Please check after some time.
        paging: null