Smart Pension Portfolios API

The Portfolios API from Smart Pension — 2 operation(s) for portfolios.

OpenAPI Specification

smart-pension-portfolios-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keystone Portfolios API
  version: v12
  description: This is the endpoint description of Keystone API.
servers:
- url: https://api.sandbox.autoenrolment.co.uk
- url: /
tags:
- name: Portfolios
paths:
  /companies/{company_id}/employees/{employee_id}/portfolios:
    post:
      summary: Portfolios/Create
      tags:
      - Portfolios
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 778
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 393
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              portfolio:
                fund_splits:
                - fund_id: 117
                  percentage: 40
                - fund_id: 118
                  percentage: 60
                custom: false
              redirection_strategy: switch_and_redirect
            schema:
              type: object
              properties:
                portfolio:
                  type: object
                  required:
                  - fund_splits
                  properties:
                    fund_splits:
                      type: array
                      items:
                        type: object
                        properties:
                          fund_id:
                            type: integer
                          percentage:
                            type: number
                    custom:
                      type: boolean
                      default: true
                target_retirement_age:
                  type: integer
                  default: null
        required: true
      responses:
        '201':
          description: Creates a portfolio
          content:
            application/json:
              example:
                id: 45
                custom: false
                starts_on: '2026-08-05'
                ends_on: null
                money_in: true
                portfolio_composed_by_a_tdf: false
                subaccount_uuid: ac671f61-b844-42be-bd3b-ad0612e2bd02
                subaccount_name: 4PCUXa0hua
                subaccount_group: Uncrystallised
              schema:
                $ref: '#/components/schemas/response_portfolio'
        '403':
          description: Forbidden
        '422':
          description: Invalid parameters
    get:
      summary: Portfolios/List
      tags:
      - Portfolios
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 799
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 414
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
        required: false
      - name: offset
        in: query
        schema:
          type: integer
        required: false
      - name: sort
        in: query
        schema:
          type: string
        required: false
      - name: direction
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
        required: false
      - name: filter
        in: query
        schema:
          type: object
          properties:
            id:
              type: array
              items:
                type: integer
            starts_on:
              type: array
              items:
                type: string
            ends_on:
              type: array
              items:
                type: string
        required: false
        style: deepObject
        example: filter%5Bends_on%5D=2026-08-05
      - name: include[]
        in: query
        schema:
          type: array
          items:
            enum:
            - fund_splits
            - fund_splits.fund
        required: false
        example: include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund
      - name: operator
        in: query
        schema:
          type: string
          enum:
          - or
          - and
        required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                With valid params without filtering:
                  value:
                    limit: 50
                    offset: 0
                    total: 3
                    links:
                    - rel: self
                      title: self
                      href: http://api.host.com/companies/783/employees/398/portfolios
                    - rel: first
                      title: first
                      href: http://api.host.com/companies/783/employees/398/portfolios?offset=0&limit=50
                    - rel: last
                      title: last
                      href: http://api.host.com/companies/783/employees/398/portfolios?offset=0&limit=50
                    portfolios:
                    - id: 49
                      custom: false
                      starts_on: '2026-08-04'
                      ends_on: null
                      money_in: true
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 440e6fca-5cc7-4241-9890-4a375d5998b0
                      subaccount_name: 02dsJPCdf9
                      subaccount_group: Uncrystallised
                    - id: 50
                      custom: false
                      starts_on: '2026-08-03'
                      ends_on: '2026-08-04'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 440e6fca-5cc7-4241-9890-4a375d5998b0
                      subaccount_name: 02dsJPCdf9
                      subaccount_group: Uncrystallised
                    - id: 51
                      custom: false
                      starts_on: '2026-08-02'
                      ends_on: '2026-08-03'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 440e6fca-5cc7-4241-9890-4a375d5998b0
                      subaccount_name: 02dsJPCdf9
                      subaccount_group: Uncrystallised
                With including fund splits:
                  value:
                    limit: 50
                    offset: 0
                    total: 3
                    links:
                    - rel: self
                      title: self
                      href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits
                    - rel: first
                      title: first
                      href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=50
                    - rel: last
                      title: last
                      href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=50
                    portfolios:
                    - id: 52
                      custom: false
                      starts_on: '2026-08-04'
                      ends_on: null
                      money_in: true
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 21dc6aec-c5b4-4511-96cb-2e47b1d23e45
                      subaccount_name: rnRSrHoP84
                      subaccount_group: Uncrystallised
                      fund_splits:
                        limit: 10
                        offset: 0
                        total: 1
                        links:
                        - rel: self
                          title: self
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits
                        - rel: first
                          title: first
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=10
                        - rel: last
                          title: last
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=10
                        fund_splits:
                        - id: 66
                          fund_id: 126
                          investment_account_uuid: fdb29776-5056-4625-857e-a4cf9da90c21
                          percentage: 100
                    - id: 53
                      custom: false
                      starts_on: '2026-08-03'
                      ends_on: '2026-08-04'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 21dc6aec-c5b4-4511-96cb-2e47b1d23e45
                      subaccount_name: rnRSrHoP84
                      subaccount_group: Uncrystallised
                      fund_splits:
                        limit: 10
                        offset: 0
                        total: 1
                        links:
                        - rel: self
                          title: self
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits
                        - rel: first
                          title: first
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=10
                        - rel: last
                          title: last
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=10
                        fund_splits:
                        - id: 67
                          fund_id: 126
                          investment_account_uuid: 00414f77-23b5-49b0-beb2-b87e1cdfe84d
                          percentage: 100
                    - id: 54
                      custom: false
                      starts_on: '2026-08-02'
                      ends_on: '2026-08-03'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 21dc6aec-c5b4-4511-96cb-2e47b1d23e45
                      subaccount_name: rnRSrHoP84
                      subaccount_group: Uncrystallised
                      fund_splits:
                        limit: 10
                        offset: 0
                        total: 1
                        links:
                        - rel: self
                          title: self
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits
                        - rel: first
                          title: first
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=10
                        - rel: last
                          title: last
                          href: http://api.host.com/companies/787/employees/402/portfolios?include%5B%5D=fund_splits&offset=0&limit=10
                        fund_splits:
                        - id: 68
                          fund_id: 126
                          investment_account_uuid: 0f773a0e-7600-4f46-9273-87c17db214b3
                          percentage: 100
                With including fund splits and fund:
                  value:
                    limit: 50
                    offset: 0
                    total: 3
                    links:
                    - rel: self
                      title: self
                      href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund
                    - rel: first
                      title: first
                      href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=50
                    - rel: last
                      title: last
                      href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=50
                    portfolios:
                    - id: 55
                      custom: false
                      starts_on: '2026-08-04'
                      ends_on: null
                      money_in: true
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 34682a38-ee3a-44d6-a1c2-401bd00115cc
                      subaccount_name: t74c1iywUQ
                      subaccount_group: Uncrystallised
                      fund_splits:
                        limit: 10
                        offset: 0
                        total: 1
                        links:
                        - rel: self
                          title: self
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund
                        - rel: first
                          title: first
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=10
                        - rel: last
                          title: last
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=10
                        fund_splits:
                        - id: 69
                          fund_id: 127
                          investment_account_uuid: 6ae89923-e436-446f-9184-462451e0aca6
                          percentage: 100
                          fund:
                            id: 127
                            name: Fund-127
                            display_name: base display name
                            description: base description
                            fact_sheet_url: null
                            fund_provider: FundProvider 127
                    - id: 56
                      custom: false
                      starts_on: '2026-08-03'
                      ends_on: '2026-08-04'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 34682a38-ee3a-44d6-a1c2-401bd00115cc
                      subaccount_name: t74c1iywUQ
                      subaccount_group: Uncrystallised
                      fund_splits:
                        limit: 10
                        offset: 0
                        total: 1
                        links:
                        - rel: self
                          title: self
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund
                        - rel: first
                          title: first
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=10
                        - rel: last
                          title: last
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=10
                        fund_splits:
                        - id: 70
                          fund_id: 127
                          investment_account_uuid: 8563797a-58ad-4782-b8df-a10989628e3c
                          percentage: 100
                          fund:
                            id: 127
                            name: Fund-127
                            display_name: base display name
                            description: base description
                            fact_sheet_url: null
                            fund_provider: FundProvider 127
                    - id: 57
                      custom: false
                      starts_on: '2026-08-02'
                      ends_on: '2026-08-03'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 34682a38-ee3a-44d6-a1c2-401bd00115cc
                      subaccount_name: t74c1iywUQ
                      subaccount_group: Uncrystallised
                      fund_splits:
                        limit: 10
                        offset: 0
                        total: 1
                        links:
                        - rel: self
                          title: self
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund
                        - rel: first
                          title: first
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=10
                        - rel: last
                          title: last
                          href: http://api.host.com/companies/791/employees/406/portfolios?include%5B%5D=fund_splits&include%5B%5D=fund_splits.fund&offset=0&limit=10
                        fund_splits:
                        - id: 71
                          fund_id: 127
                          investment_account_uuid: 846140b1-32d3-4bcd-9332-08bf1fbd15bb
                          percentage: 100
                          fund:
                            id: 127
                            name: Fund-127
                            display_name: base display name
                            description: base description
                            fact_sheet_url: null
                            fund_provider: FundProvider 127
                With filtering by ends_on - previous portfolio:
                  value:
                    limit: 50
                    offset: 0
                    total: 1
                    links:
                    - rel: self
                      title: self
                      href: http://api.host.com/companies/795/employees/410/portfolios?filter%5Bends_on%5D=2026-08-04
                    - rel: first
                      title: first
                      href: http://api.host.com/companies/795/employees/410/portfolios?filter%5Bends_on%5D=2026-08-04&offset=0&limit=50
                    - rel: last
                      title: last
                      href: http://api.host.com/companies/795/employees/410/portfolios?filter%5Bends_on%5D=2026-08-04&offset=0&limit=50
                    portfolios:
                    - id: 59
                      custom: false
                      starts_on: '2026-08-03'
                      ends_on: '2026-08-04'
                      money_in: false
                      portfolio_composed_by_a_tdf: false
                      subaccount_uuid: 9e23b150-af83-4386-9eb5-e496a8b541fb
                      subaccount_name: gDQuvLU7Lw
                      subaccount_group: Uncrystallised
                With filtering by ends_on - empty list of portfolios:
                  value:
                    limit: 50
                    offset: 0
                    total: 0
                    links:
                    - rel: self
                      title: self
                      href: http://api.host.com/companies/799/employees/414/portfolios?filter%5Bends_on%5D=2026-08-05
                    - rel: first
                      title: first
                      href: http://api.host.com/companies/799/employees/414/portfolios?filter%5Bends_on%5D=2026-08-05&offset=0&limit=50
                    - rel: last
                      title: last
                      href: http://api.host.com/companies/799/employees/414/portfolios?filter%5Bends_on%5D=2026-08-05&offset=0&limit=50
                    portfolios: []
              schema:
                type: object
                properties:
                  limit:
                    type:
                    - integer
                    - 'null'
                  offset:
                    type:
                    - integer
                    - 'null'
                  total:
                    type:
                    - integer
                    - 'null'
                  links:
                    type: array
                    items:
                      $ref: '#/components/schemas/link'
                  portfolios:
                    type:
                    - array
                    - 'null'
                    items:
                      $ref: '#/components/schemas/response_portfolio'
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  limit:
                    type:
                    - integer
                    - 'null'
                  offset:
                    type:
                    - integer
                    - 'null'
                  total:
                    type:
                    - integer
                    - 'null'
                  links:
                    type: array
                    items:
                      $ref: '#/components/schemas/link'
                  portfolios:
                    type:
                    - array
                    - 'null'
                    items:
                      $ref: '#/components/schemas/response_portfolio'
  /companies/{company_id}/employees/{employee_id}/portfolios/{id}:
    get:
      summary: Companies/Employees/Portfolios/Get
      tags:
      - Portfolios
      security:
      - oAuth2:
        - employee
      parameters:
      - name: id
        in: path
        required: true
        example: 47
        schema:
          type: string
      - name: company_id
        in: path
        required: true
        example: 781
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 396
        schema:
          type: string
      - name: include[]
        in: query
        schema:
          type: array
          items:
            enum:
            - fund_splits
            - fund_splits.fund
        required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                id: 47
                custom: false
                starts_on: '2026-08-05'
                ends_on: null
                money_in: false
                portfolio_composed_by_a_tdf: false
                subaccount_uuid: 1e773a01-afbf-4581-a327-640e532d30b5
                subaccount_name: PYIL6ZYlYy
                subaccount_group: Uncrystallised
              schema:
                $ref: '#/components/schemas/response_portfolio'
        '404':
          description: Not Found
components:
  schemas:
    response_band:
      type: object
      properties:
        id:
          type: integer
        employee_minimum_percentage:
          type: number
          format: float
        employee_maximum_percentage:
          type:
          - number
          - 'null'
          format: float
        employer_percentage:
          type: number
          format: float
        starts_on:
          type: string
          format: date
        ends_on:
          type: string
          format: date
        range_min:
          type:
          - integer
          - 'null'
        range_max:
          type:
          - integer
          - 'null'
        default:
          type: boolean
    response_scheme_contribution_limit:
      type: object
      properties:
        minimum_one_off_contribution_amount:
          type: number
          format: float
        minimum_one_off_contribution_amount_currency:
          type: string
        maximum_one_off_contribution_amount:
          type: number
          format: float
        maximum_one_off_contribution_amount_currency:
          type: string
        minimum_recurring_contribution_amount:
          type: number
          format: float
        minimum_recurring_contribution_amount_currency:
          type: string
    response_adviser:
      type: object
      properties:
        intercom_user_id:
          type:
          - string
          - 'null'
        intercom_user_id_hash:
          type:
          - string
          - 'null'
        id:
          type: integer
        name:
          type:
          - string
          - 'null'
        type:
          type:
          - string
          - 'null'
        address:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        signup_start:
          type:
          - string
          - 'null'
          format: text
        signup_finish:
          type:
          - string
          - 'null'
          format: text
        agent_number:
          type:
          - string
          - 'null'
        broker_channel:
          type:
          - string
          - 'null'
        broker_role:
          type:
          - string
          - 'null'
        abilities:
          type:
          - array
          - 'null'
          items: {}
        companies:
          type: object
          properties:
            limit:
              type:
              - integer
              - 'null'
            offset:
              type:
              - integer
              - 'null'
            total:
              type:
              - integer
              - 'null'
            links:
              type: array
              items:
                $ref: '#/components/schemas/link'
            companies:
              type:
              - array
              - 'null'
              items:
                $ref: '#/components/schemas/response_company'
        imports:
          type: object
          properties:
            limit:
              type:
              - integer
              - 'null'
            offset:
              type:
              - integer
              - 'null'
            total:
              type:
              - integer
              - 'null'
            links:
              type: array
              items:
                $ref: '#/components/schemas/link'
            data:
              type:
              - array
              - 'null'
              items:
                $ref: '#/components/schemas/response_adviser_import'
        company_tax_reliefs:
          type: object
          properties:
            limit:
              type:
              - integer
              - 'null'
            offset:
              type:
              - integer
              - 'null'
            total:
              type:
              - integer
              - 'null'
            links:
              type: array
              items:
                $ref: '#/components/schemas/link'
            data:
              type:
              - array
              - 'null'
              items:
                $ref: '#/components/schemas/response_company_tax_relief'
        shortcut:
          $ref: '#/components/schemas/response_adviser_shortcut'
    response_salary:
      type: object
      properties:
        annual_earnings_1:
          type:
          - number
          - 'null'
          format: float
        annual_earnings_2:
          type:
          - number
          - 'null'
          format: float
        created_at:
          type: string
          format: date-time
        effective_on:
          type: string
          format: date
        employee_id:
          type: integer
        id:
          type: integer
        updated_at:
          type: string
          format: date-time
        employee:
          $ref: '#/components/schemas/response_employee'
    response_company_automation:
      type: object
      properties:
        id:
          type: integer
        letter:
          type: boolean
        company_id:
          type: integer
        postponement_period:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
    response_know_your_customer_data:
      type: object
      properties:
        id:
          type: integer
        state:
          type: string
        reference:
          type:
          - string
          - 'null'
    response_ultimate_beneficial_owner_configuration:
      type: object
      properties:
        id:
          type: integer
        company_id:
          type: integer
        exempt:
          type: boolean
        exemption_reason:
          type:
          - string
          - 'null'
        natural_person_ubo:
          type: boolean
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
    response_adviser_company:
      type: object
      properties:
        id:
          type: integer
        adviser_id:
          type: integer
        company_id:
          type: integer
        preferred_contact_user_id:
          type:
          - integer
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    response_customer:
      type: object
      properties:
        intercom_user_id:
          type:
          - string
          - 'null'
        intercom_user_id_hash:
          type:
          - string
          - 'null'
        id:
          type: integer
        email:
          type:
          - string
          - 'null'
        reset_password_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        remember_created_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sign_in_at:
          type:
          - string
          - 'null'
          format: date-time
        slug:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        gauth_enabled:
          type: boolean
        gauth_tmp:
          type:
          - string
          - 'null'
        forename:
          type:
          - string
          - 'null'
        surname:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        authentication_token:
          type:
          - string
          - 'null'
        date_of_birth:
          type:
          - string
          - 'null'
          format: date
        line2:
          type:
          - string
          - 'null'
        city:
          type:
          - string
          - 'null'
        county:
          type:
          - string
          - 'null'
        building_name:
          type:
          - string
          - 'null'
        postcode:
          type:
          - string
          - 'null'
        line1:
          type:
          - string
          - 'null'
        building_number:
          type:
          - string
          - 'null'
        telephone:
          type:
          - string
          - 'null'
        alternative_telephone:
          type:
          - string
          - 'null'
        referee_id:
          type:
          - integer
          - 'null'
        referee_type:
          type:
          - string
          - 'null'
        referral_state:
          type: string
        referral_clicks:
          type:
          - integer
          - 'null'
        referral_reward_name:
          type:
          - string
          - 'null'
        authentication_token_generated_at:
          type:
          - string
          - 'null'
          format: date-time
        gender:
          type:
          - string
          - 'null'
        role:
          type:
          - string
          - 'null'
        middlename:
          type:
          - string
          - 'null'
        envelope_state:
          type: string
        enforce_password:
          type:
          - boolean
          - 'null'
        company_id:
          type:
          - integer
          - 'null'
        cou

# --- truncated at 32 KB (89 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/smart-pension/refs/heads/main/openapi/smart-pension-portfolios-api-openapi.yml