Smart Pension Modeller Projections API

The ModellerProjections API from Smart Pension — 1 operation(s) for modellerprojections.

OpenAPI Specification

smart-pension-modellerprojections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keystone Modeller Projections API
  version: v12
  description: This is the endpoint description of Keystone API.
servers:
- url: https://api.sandbox.autoenrolment.co.uk
- url: /
tags:
- name: ModellerProjections
paths:
  /pension_forecast/modeller_projection:
    post:
      summary: PensionForecast/ModellerProjections/Create
      tags:
      - ModellerProjections
      security:
      - oAuth2:
        - employee
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              With valid params:
                value:
                  date_of_birth: '1963-05-05'
                  date_of_calculation: '2020-10-10'
                  date_of_retirement: '2022-05-05'
                  gender: Male
                  inflation_rate: 2.7
                  fund_values:
                  - value: 250
                    investment_returns:
                      long_term:
                        '0': 2
                      market_rates:
                        '0': 1
                    contribution_allocation_percentage: 100
                    annual_management_charge: 0
                  employee_contribution_salary: 24000
                  employer_contribution_salary: 24000
                  employee_contribution_salary_cap: 20000
                  employer_contribution_salary_cap: 20000
                  contribution_percentages:
                  - from: '1900-01-01'
                    employee_rate: 1
                    employer_rate: 1.5
                    avc_rate: 2.5
                  employee_amount_contribution: 600
                  contribution_charges:
                    employee: 0
                    employer: 0
                    other_avc: 0
                  fees: 0
                  increase_factors: {}
              Without inflation rate param:
                value:
                  date_of_birth: '1963-05-05'
                  date_of_calculation: '2020-10-10'
                  date_of_retirement: '2022-05-05'
                  gender: Male
                  fund_values:
                  - value: 250
                    investment_returns:
                      long_term:
                        '0': 2
                      market_rates:
                        '0': 1
                    contribution_allocation_percentage: 100
                    annual_management_charge: 0
                  employee_contribution_salary: 24000
                  employer_contribution_salary: 24000
                  employee_contribution_salary_cap: 20000
                  employer_contribution_salary_cap: 20000
                  contribution_percentages:
                  - from: '1900-01-01'
                    employee_rate: 1
                    employer_rate: 1.5
                    avc_rate: 2.5
                  employee_amount_contribution: 600
                  contribution_charges:
                    employee: 0
                    employer: 0
                    other_avc: 0
                  fees: 0
                  increase_factors: {}
              With invalid annuity param:
                value:
                  date_of_birth: '1963-05-05'
                  date_of_calculation: '2020-10-10'
                  date_of_retirement: '2022-05-05'
                  inflation_rate: 2.7
                  fund_values:
                  - value: 250
                    investment_returns:
                      long_term:
                        '0': 2
                      market_rates:
                        '0': 1
                    contribution_allocation_percentage: 100
                    annual_management_charge: 0
                  employee_contribution_salary: 24000
                  employer_contribution_salary: 24000
                  employee_contribution_salary_cap: 20000
                  employer_contribution_salary_cap: 20000
                  contribution_percentages:
                  - from: '1900-01-01'
                    employee_rate: 1
                    employer_rate: 1.5
                    avc_rate: 2.5
                  employee_amount_contribution: 600
                  contribution_charges:
                    employee: 0
                    employer: 0
                    other_avc: 0
                  fees: 0
                  increase_factors: {}
            schema:
              type: object
              properties:
                date_of_birth:
                  type: string
                gender:
                  type: string
              required:
              - date_of_birth
              - gender
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                limits:
                  age_min: 58
                  age_max: 60
                  value_min: 0
                  value_max: 4000
                values_per_age:
                - age: 58
                  value_in_real_terms: 1173.03
                  pension_in_real_terms: 50.18
                - age: 59
                  value_in_real_terms: 2698.65
                  pension_in_real_terms: 117.94
              schema:
                $ref: '#/components/schemas/response_pension_forecast_modeller_projection'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                Inflation rate param is missing:
                  value:
                    errors:
                    - code: 106
                      title: There was a problem within PensionForecast calculator.
                      detail: 'PensionForecast faced errors with passed inputs: Invalid inputs inflation_rate: is missing.'
                      form: null
                      attribute: base
                      error: pension_forecast_calculator_invalid_inputs
                      meta:
                        error_message: 'Invalid inputs inflation_rate: is missing'
                      source:
                        pointer: /base
                Annuity param is invalid:
                  value:
                    errors:
                    - code: 100001
                      title: Value can not be blank.
                      detail: Gender is a required field.
                      meta: {}
                      source:
                        pointer: /data/attributes/gender
components:
  schemas:
    response_pension_forecast_modeller_projection:
      type: object
      properties:
        limits:
          type: object
          properties:
            age_min:
              type:
              - integer
              - 'null'
            age_max:
              type:
              - integer
              - 'null'
            value_min:
              type:
              - integer
              - 'null'
            value_max:
              type:
              - integer
              - 'null'
        values_per_age:
          type:
          - array
          - 'null'
          items:
            type: object
            properties:
              age:
                type:
                - integer
                - 'null'
              value_in_real_terms:
                type:
                - number
                - 'null'
                format: float
              pension_in_real_terms:
                type:
                - number
                - 'null'
                format: float
  securitySchemes:
    oAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://id.sandbox.autoenrolment.co.uk/oauth/authorize
          tokenUrl: https://id.sandbox.autoenrolment.co.uk/oauth/token
          scopes:
            customer: 'Manage the customer''s company.

              - Create postponements

              - Create and import contributions

              - Edit company details

              - Add and edit employees'
            user: 'Manage all companies linked to the user''s adviser.

              - Manage adviser details

              - Add and edit adviser''s users

              - Create and import contributions for any company managed by the adviser'
            employee: 'Manage the employee account.

              - List employee contributions

              - Edit employee details and preferences'
x-samples-languages:
- curl
x-proxy-enabled: false