openapi: 3.0.1
info:
  title: Access Token
  description: SEI's implementation of the oAuth 2.0 framework allows the application to obtain access to SEI APIs on behalf of the resource owner or on the behalf of the application itself in a secure and controlled fashion.
  version: v2
servers:
  - url: 'https://sandbox.api.seic.com/v2/'
    description: Sandbox Server with unmasked data.
  - url: 'https://test.api.seic.com/v2/'
    description: Test Server with unmasked data.
  - url: 'https://api.seic.com/v2/'
    description: Production Server with unmasked data.
  - url: 'https://sandbox.mtls.api.seic.com/v2/'
    description: Two-way SSL Sandbox Server for client use.
  - url: 'https://test.mtls.api.seic.com/v2/'
    description: Two-way SSL Test Server for client use.
  - url: 'https://mtls.api.seic.com/v2'
    description: Two-way SSL Production Server for client use.
  - url: 'https://swpdev.api.seic.com/v3'
    description: Internal Development Server with masked data.
  - url: 'https://seidevint.api.seic.com/v3'
    description: Internal Integration Server with masked data.
  - url: 'https://test.api.seic.com/v3'
    description: Test Server with unmasked data.
  - url: 'https://api.seic.com/v3'
    description: Production Server with unmasked data.
paths:
  /oauthtoken:
    post:
      tags:
      - Access Token
      summary: 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. The oAuth has a 60 minutes active TTL and 30 minutes inactive TTL. The oAuth obtained from client_credentials cannot be refreshed.
      parameters:
      - name: Authorization
        in: header
        description: The Base64 Encoded form of the AppKey:AppSecret provided during Application registration.
        required: true
        schema:
          type: string
      - name: Content-Type
        in: header
        description: Request content type. The valid values are application/xxx-form-urlencoded.
        required: true
        schema:
          type: string
      x-codeSamples:
        - lang: 'cURL'
          source: |
            curl --location --request POST \
            'https://{{HOST}}/oauthtoken' \
            --header 'Authorization: ADsgdnnkjnfdIKJN==' \
            --header 'Content-Type: application/x-www-form-urlencoded'
            --header 'AppKey: YOUR_APPKEY' \
            --data-urlencode 'grant_type=client_credentials' \
            --data-urlencode 'username=SiteminderUsername' \
            --data-urlencode 'password=SiteminderPassword'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                username:
                  type: string
                  description: "The Siteminder service account userid that is used to mint the OAuth Token."
                password:
                  type: string
                  description: "The Siteminder service account password that is used to mint the OAuth Token."
                grant_type:
                  type: string
                  description: "OAuth 2.0 grant types available depending on the characteristics of the authorization required.
                  client_credentials - For use for a Client/Server or Server/Server application.
                  refresh_token - The Apigee refresh token. The OAuth obtained from client_credentials cannot be refreshed.
                  sessionToken - The IDP Siteminder session token."
                  enum: [client_credentials, refresh_token, sessionToken]
      responses:
        200:
          description: OK- The request has succeeded and the response has been returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OauthResponse'
              examples:
                Response Example:
                  $ref: '#/components/examples/OauthResponseExample'
        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.
  /oauth/authorizationcode:
    get:
      tags:
      - Auth Code
      operationId: Auth Code
      parameters:
      - name: client_id
        in: query
        description: >-
          The App Key or Consumer Key provided during Application Registration'.
        required: true
        schema:
          type: string
      - name: response_type
        in: query
        description: >-
          The format in which Auth code is required.
        required: true
        schema:
          type: string
      - name: redirect_uri
        in: query
        description: >-
          The url to which the code needs to be re-directed.
        required: true
        schema:
          type: string
      - name: code_challenge
        in: query
        description: >-
          The value for code challenge encrypted in the format provided in 'code_challenge_method'.
        required: true
        schema:
          type: string
      - name: code_challenge_method
        in: query
        description: >-
          The encoding used to convert the 'code_challenge'.
        required: true
        schema:
          type: string
      - name: Content-Type
        in: header
        description: >-
           Request content type. The valid values are application/xxx-form-urlencoded.
        required: true
        schema:
          type: string
      responses:
        302:
          description: OK- The request has succeeded and the response has been returned.
        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:
  schemas:
    OauthResponse:
      type: object
      properties:
        refresh_token_expires_in:
          type: string
          description: This is the expiration in seconds of the refresh token.
        api_product_list:
          type: string
          description: This is the list of API products for which the user has access to.
        api_product_list_json:
          type: array
          items:
            type: string
        organization_name:
          type: string
          description: This is an identifier of the organization.
        developer.email:
          type: string
          description: The email of the developer who has registered the application in the SEI Developer Portal.
        token_type:
          type: string
          description: Identifies the type of token issued.
        issued_at:
          type: string
          description: The date the access token was issued. This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, Wed, 21 Aug 2013 19:16:47 UTC corresponds to the timestamp value of 1377112607413.
        client_id:
          type: string
          description: The AppKey Or Consumer Key.
        access_token:
          type: string
          description: The OAuth access token.
        application_name:
          type: string
          description: The registered application identifier.
        scope:
          type: string
          description: The list of available OAuth scopes.
        expires_in:
          type: string
          description: The lifespan or time-to-live (TTL) of the access token seconds.
        refresh_count:
          type: string
        status:
          type: string
          description: Defines the status for a specific pending transaction, such as 'Active' or 'Cancel'.
  examples:
    OauthResponseExample:
      value:
        refresh_token_expires_in: '0'
        api_product_list: '[Investors]'
        api_product_list_json:
          - Investors
        organization_name: sei
        developer.email: jdoe@seic.com
        token_type: BearerToken
        issued_at: '1529525648451'
        client_id: ADsgdnnkjnfdIKJN
        access_token: QxHKdx0nk2i
        application_name: 21c2fcd4-03ed-48815cf168
        scope: ''
        expires_in: '3599'
        refresh_count: '0'
        status: approved