openapi: 3.0.1
info:
  description: >-
    Reference data endpoints are used to obtain data related to the financial
    asset available risk profiles, tax wrappers and asset classes.
  title: Assets reference data
  version: '5.1'
servers:
  - url: https://api.envizage.me
paths:
  /scenarios/reference/assets/financial/classes:
    get:
      description: >-
        Asset classes are configured for each client independently and can be
        retrieved using this end-point.<br /><br />An asset class is a group of
        instruments which have similar financial characteristics and behave
        similarly in the marketplace.<br /><br />Each asset class has its own
        forward-looking mean and standard deviation (variance). Each asset class
        has a correlation (or co-variance) relative to itself (always 1.0) and
        relative to each other asset class. Taken together, these form a set of
        internally consistent assumptions that define an economic scenario.<br
        /><br />The asset classes are configurable and can be configured in the
        admin panel for each client.
      operationId: get_4
      parameters:
        - description: Zero-based page index (0..N)
          in: query
          name: page
          schema:
            type: integer
            default: 0
        - description: The size of the page to be returned
          in: query
          name: size
          schema:
            type: integer
            default: 20
        - description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          in: query
          name: sort
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageFinancialAssetClassDescriptorDto'
          description: OK
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - authentication:
            - scenarios:full
            - scenarios:read
      summary: Retrieve all
      tags:
        - Available Asset Classes
  /scenarios/reference/assets/financial/profiles:
    get:
      description: >-
        The available risk profiles can be obtained at the following
        end-point.<br /><br />A risk profile identifies the acceptable level of
        risk an individual is prepared and able to accept. The risk profile for
        an individual determines that person's willingness and ability to take
        on risk.<br /><br />Risk is the trade-off between risk and return, which
        is to say the trade-off between earning a higher return or having a
        lower chance of losing money in a portfolio.
      operationId: get_2
      parameters:
        - description: Zero-based page index (0..N)
          in: query
          name: page
          schema:
            type: integer
            default: 0
        - description: The size of the page to be returned
          in: query
          name: size
          schema:
            type: integer
            default: 20
        - description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          in: query
          name: sort
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageFinancialAssetProfileDescriptorDto'
          description: OK
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - authentication:
            - scenarios:full
            - scenarios:read
      summary: Retrieve all
      tags:
        - Available Risk Profiles
  /scenarios/reference/assets/financial/wrappers:
    get:
      description: >-
        A Tax Wrapper wraps around a pot of financial assets and applies certain
        taxation rules on it.<br /><br />Tax wrappers are configured for each
        client independently and can be retrieved using this end-point. The
        resulting list will contain all the usable asset classes for that
        client.
      operationId: get_1
      parameters:
        - description: Zero-based page index (0..N)
          in: query
          name: page
          schema:
            type: integer
            default: 0
        - description: The size of the page to be returned
          in: query
          name: size
          schema:
            type: integer
            default: 20
        - description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          in: query
          name: sort
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageFinancialAssetWrapperDescriptorDto'
          description: OK
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - authentication:
            - scenarios:full
            - scenarios:read
      summary: Retrieve all
      tags:
        - Available Wrappers
components:
  schemas:
    FinancialAssetClassDescriptorDto:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the asset class is active for the client.
          example: true
        country:
          type: string
          description: The country in which this asset class is usable.
          example: GLOBAL
        description:
          type: string
          description: Description of the resource.
          example: My resource's description
        id:
          type: string
          description: The id of the resource.
          example: '1'
        name:
          type: string
          description: The name of the resource.
          example: My resource
        type:
          type: string
          description: Any of the supported types (CASH, BOND, EQUITY, REAL, OTHER).
          enum:
            - CASH
            - BOND
            - EQUITY
            - REAL
            - OTHER
          example: BOND
      required:
        - type
    FinancialAssetProfileDescriptorDto:
      type: object
      properties:
        allocation:
          type: array
          description: >-
            The <a
            href='/category/assets-reference/available-risk-profiles'>risk
            profile</a> of the portfolio.
          example: low
          items:
            type: number
            format: double
            description: >-
              The <a
              href='/category/assets-reference/available-risk-profiles'>risk
              profile</a> of the portfolio.
        description:
          type: string
          description: Description of the resource.
          example: My resource's description
        id:
          type: string
          description: The id of the resource.
          example: '1'
        name:
          type: string
          description: The name of the resource.
          example: My resource
      required:
        - allocation
    FinancialAssetWrapperDescriptorDto:
      type: object
      properties:
        active:
          type: boolean
          description: Any of the supported types (CASH, BOND, EQUITY, REAL, OTHER).
          example: false
        country:
          type: string
          description: Any of the supported types (CASH, BOND, EQUITY, REAL, OTHER).
          example: BOND
        description:
          type: string
          description: Description of the resource.
          example: My resource's description
        id:
          type: string
          description: The id of the resource.
          example: '1'
        incurringCGT:
          type: boolean
          description: Any of the supported types (CASH, BOND, EQUITY, REAL, OTHER).
          example: false
        name:
          type: string
          description: The name of the resource.
          example: My resource
        type:
          type: string
          description: Any of the supported types (CASH, BOND, EQUITY, REAL, OTHER).
          enum:
            - GENERAL
            - TAX_ADVANTAGED
            - PENSION
          example: BOND
      required:
        - type
    PageFinancialAssetClassDescriptorDto:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/FinancialAssetClassDescriptorDto'
        empty:
          type: boolean
        first:
          type: boolean
        last:
          type: boolean
        number:
          type: integer
          format: int32
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
    PageFinancialAssetProfileDescriptorDto:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/FinancialAssetProfileDescriptorDto'
        empty:
          type: boolean
        first:
          type: boolean
        last:
          type: boolean
        number:
          type: integer
          format: int32
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
    PageFinancialAssetWrapperDescriptorDto:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/FinancialAssetWrapperDescriptorDto'
        empty:
          type: boolean
        first:
          type: boolean
        last:
          type: boolean
        number:
          type: integer
          format: int32
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
    PageableObject:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        paged:
          type: boolean
        sort:
          $ref: '#/components/schemas/SortObject'
        unpaged:
          type: boolean
    SortObject:
      type: object
      properties:
        empty:
          type: boolean
        sorted:
          type: boolean
        unsorted:
          type: boolean
  securitySchemes:
    authentication:
      bearerFormat: JWT
      openIdConnectUrl: https://id.envizage.me/realms/:realmId/protocol/openid-connect
      scheme: Bearer
      type: openIdConnect
