Smart Pension Contribution API

The Contribution API from Smart Pension — 1 operation(s) for contribution.

OpenAPI Specification

smart-pension-contribution-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keystone Contribution API
  version: v12
  description: This is the endpoint description of Keystone API.
servers:
- url: https://api.sandbox.autoenrolment.co.uk
- url: /
tags:
- name: Contribution
paths:
  /companies/{company_id}/contributions:
    get:
      summary: Companies/Contributions/List with Historical Employee Data
      tags:
      - Contribution
      security:
      - oAuth2:
        - user
        - customer
      parameters:
      - name: company_id
        in: path
        required: true
        example: 144
        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:
            state:
              type: array
              items:
                type: string
            period_type:
              type: array
              items:
                type: string
            starts_on:
              type: array
              items:
                type: string
            ends_on:
              type: array
              items:
                type: string
            pensionable_earnings:
              type: array
              items:
                type: number
            employee_amount:
              type: array
              items:
                type: number
            employee_percentage:
              type: array
              items:
                type: number
            company_amount:
              type: array
              items:
                type: number
            company_percentage:
              type: array
              items:
                type: number
            voluntary_amount:
              type: array
              items:
                type: number
            employee_id:
              type: array
              items:
                type: integer
            employee:
              type: object
              properties:
                forename:
                  type: string
                surname:
                  type: string
            assessment:
              type: object
              properties:
                category:
                  type: string
            ni_rebate_amount:
              type: array
              items:
                type: number
            total_employee_amount:
              type: array
              items:
                type: number
            employee_sal_sac_amount:
              type: array
              items:
                type: number
            scheme:
              type: object
              properties:
                external_id:
                  type: string
        required: false
        style: deepObject
      - name: include[]
        in: query
        schema:
          type: array
          items:
            enum:
            - assessment
            - employee
            - scheme
        required: false
        example: include%5B%5D=employee
      - name: operator
        in: query
        schema:
          type: string
          enum:
          - or
          - and
        required: false
      responses:
        '200':
          description: Success with historical employee data
          content:
            application/json:
              example:
                limit: 50
                offset: 0
                total: 2
                links:
                - rel: self
                  title: self
                  href: http://api.host.com/companies/144/contributions?include%5B%5D=employee
                - rel: first
                  title: first
                  href: http://api.host.com/companies/144/contributions?include%5B%5D=employee&offset=0&limit=50
                - rel: last
                  title: last
                  href: http://api.host.com/companies/144/contributions?include%5B%5D=employee&offset=0&limit=50
                contributions:
                - is_not_editable: true
                  id: 12
                  category: Eligible jobholders
                  employee_id: 34
                  period_type: Weekly
                  gross_qualifying_earnings: 1000
                  second_gross_qualifying_earnings_amount: null
                  pensionable_earnings: 200
                  employee_pensionable_earnings_amount: null
                  employer_pensionable_earnings_amount: null
                  company_percentage: 10
                  employee_percentage: 10
                  avc_percentage: null
                  state: created
                  created_at: '2026-08-05T12:58:39.000+01:00'
                  updated_at: '2026-08-05T12:58:39.000+01:00'
                  contribute_if_entitled: true
                  company_amount: 4
                  employee_amount: 6
                  voluntary_amount: 0
                  total_amount: 10
                  currency: GBP
                  works_in_uk: true
                  starts_on: '2026-08-01'
                  ends_on: '2026-08-08'
                  lower_level: null
                  upper_level: null
                  trigger_level: null
                  pensionable_earning_type: banded
                  contribution_type: regular
                  uuid: 837020c6-c62d-467c-9d2b-a8823c7922a1
                  company_name: diam id 205
                  contribution_amounts:
                  - id: 35
                    display_name: RegularContribution_ER
                    amount: 6
                    currency: GBP
                    source_type: employee
                    state: created
                  - id: 34
                    display_name: RegularContribution_ER
                    amount: 4
                    currency: GBP
                    source_type: employer
                    state: created
                  - id: 36
                    display_name: RegularContribution_ER
                    amount: 0
                    currency: GBP
                    source_type: other_avc
                    state: created
                  links:
                  - rel: employee
                    title: employee
                    href: https://api.host.com/companies/144/employees/34
                  employee:
                    updatable: true
                    id: 34
                    email: employee_33@example.com
                    forename: John
                    surname: Doe
                    date_of_birth: '2001-08-05'
                    national_insurance_number: AB123456C
                    gender: Female
                    telephone: null
                    identity_person_id: null
                    reset_password_sent_at: null
                    remember_created_at: null
                    last_sign_in_at: null
                    slug: RUf0roZr
                    created_at: '2026-08-05T12:58:38.000+01:00'
                    updated_at: '2026-08-05T12:58:38.000+01:00'
                    confirmation_token: null
                    gauth_enabled: false
                    gauth_tmp: null
                    title: Captain
                    authentication_token: null
                    group_id: null
                    line2: null
                    city: Ojai
                    region: null
                    country: United Kingdom of Great Britain and Northern Ireland
                    postcode: 64809-9549
                    line1: 342 Meadow Valley Trail
                    works_in_uk: true
                    starts_on: '2016-08-05'
                    authentication_token_generated_at: null
                    company_percentage: null
                    company_percentage_matched: 0
                    company_match: false
                    percentage: null
                    avc_percentage: null
                    total_employee_percentage: 0
                    total_contribution_percentage: 0
                    contribute_if_entitled: true
                    enforce_password: true
                    ends_on: null
                    exit_reason: null
                    onboarded_at: null
                    opt_out_on: null
                    opt_state: ignition
                    opt_in_on: null
                    opt_out_window_starts_on: null
                    opt_out_window_ends_on: null
                    subject_to_money_purchase_annual_allowance: null
                    money_purchase_annual_allowance_effective_on: null
                    active_special_cases: []
                    company_id: 144
                    automatically_enrolled: false
                    contractually_enrolled: false
                    external_id: null
                    customer_id: null
                    referral_clicks: 0
                    retirement_age: 65
                    target_retirement_age: null
                    retirement_date: '2066-08-05'
                    target_retirement_date: null
                    secondary_email: null
                    middle_name: null
                    civil_status: null
                    country_code: GB
                    benefit_group_id: null
                    online_login_disabled: false
                    line3: null
                    uuid: 3850aed6-7c8f-4588-9214-7706ebab2651
                    eligible_for_modeller_projection: false
                    can_manage_contribution_rates: true
                    active_payroll_configuration: null
                    employment_type: null
                    tax_residency_status_name: null
                    salary_sacrifice_signed: false
                    links:
                    - rel: company
                      title: company
                      href: https://api.host.com/companies/144
                    banned_params: []
                    intercom_user_id: emp34
                    intercom_user_id_hash: 897feac58212fa442cf61f0b393c6493865142ca7ec283dec724fc6352ab8e75
                - id: 13
                  category: Eligible jobholders
                  employee_id: 35
                  period_type: Weekly
                  gross_qualifying_earnings: 1000
                  second_gross_qualifying_earnings_amount: null
                  pensionable_earnings: 400
                  employee_pensionable_earnings_amount: null
                  employer_pensionable_earnings_amount: null
                  company_percentage: 10
                  employee_percentage: 10
                  avc_percentage: null
                  state: created
                  created_at: '2026-08-05T12:58:39.000+01:00'
                  updated_at: '2026-08-05T12:58:39.000+01:00'
                  contribute_if_entitled: true
                  company_amount: 8
                  employee_amount: 12
                  voluntary_amount: 0
                  total_amount: 20
                  currency: GBP
                  works_in_uk: true
                  starts_on: '2026-08-01'
                  ends_on: '2026-08-08'
                  lower_level: null
                  upper_level: null
                  trigger_level: null
                  pensionable_earning_type: banded
                  contribution_type: regular
                  uuid: ee45bc85-6ca8-4cbe-8019-56c2740e7c97
                  company_name: diam id 205
                  contribution_amounts:
                  - id: 38
                    display_name: RegularContribution_ER
                    amount: 12
                    currency: GBP
                    source_type: employee
                    state: created
                  - id: 37
                    display_name: RegularContribution_ER
                    amount: 8
                    currency: GBP
                    source_type: employer
                    state: created
                  - id: 39
                    display_name: RegularContribution_ER
                    amount: 0
                    currency: GBP
                    source_type: other_avc
                    state: created
                  links:
                  - rel: employee
                    title: employee
                    href: https://api.host.com/companies/144/employees/35
                  employee:
                    updatable: true
                    id: 35
                    email: employee_34@example.com
                    forename: Jane
                    surname: Smith
                    date_of_birth: '2001-08-05'
                    national_insurance_number: XY987654Z
                    gender: Female
                    telephone: null
                    identity_person_id: null
                    reset_password_sent_at: null
                    remember_created_at: null
                    last_sign_in_at: null
                    slug: gq3rA3qdf
                    created_at: '2026-08-05T12:58:38.000+01:00'
                    updated_at: '2026-08-05T12:58:38.000+01:00'
                    confirmation_token: null
                    gauth_enabled: false
                    gauth_tmp: null
                    title: Mrs
                    authentication_token: null
                    group_id: null
                    line2: null
                    city: San Marino
                    region: null
                    country: United Kingdom of Great Britain and Northern Ireland
                    postcode: 87712-8208
                    line1: 95 Hagan Road
                    works_in_uk: true
                    starts_on: '2016-08-05'
                    authentication_token_generated_at: null
                    company_percentage: null
                    company_percentage_matched: 0
                    company_match: false
                    percentage: null
                    avc_percentage: null
                    total_employee_percentage: 0
                    total_contribution_percentage: 0
                    contribute_if_entitled: true
                    enforce_password: true
                    ends_on: null
                    exit_reason: null
                    onboarded_at: null
                    opt_out_on: null
                    opt_state: ignition
                    opt_in_on: null
                    opt_out_window_starts_on: null
                    opt_out_window_ends_on: null
                    subject_to_money_purchase_annual_allowance: null
                    money_purchase_annual_allowance_effective_on: null
                    active_special_cases: []
                    company_id: 144
                    automatically_enrolled: false
                    contractually_enrolled: false
                    external_id: null
                    customer_id: null
                    referral_clicks: 0
                    retirement_age: 65
                    target_retirement_age: null
                    retirement_date: '2066-08-05'
                    target_retirement_date: null
                    secondary_email: null
                    middle_name: null
                    civil_status: null
                    country_code: GB
                    benefit_group_id: null
                    online_login_disabled: false
                    line3: null
                    uuid: 000fc0a4-7210-43c8-912c-9153f32972dd
                    eligible_for_modeller_projection: false
                    can_manage_contribution_rates: true
                    active_payroll_configuration: null
                    employment_type: null
                    tax_residency_status_name: null
                    salary_sacrifice_signed: false
                    links:
                    - rel: company
                      title: company
                      href: https://api.host.com/companies/144
                    banned_params: []
                    intercom_user_id: emp35
                    intercom_user_id_hash: e2cc6f1fa26e50ec80f612adb1081106934fbd51e9d84f95dbeebdf65291d5c7
              schema:
                type: object
                properties:
                  limit:
                    type:
                    - integer
                    - 'null'
                  offset:
                    type:
                    - integer
                    - 'null'
                  total:
                    type:
                    - integer
                    - 'null'
                  links:
                    type: array
                    items:
                      $ref: '#/components/schemas/link'
                  contributions:
                    type:
                    - array
                    - 'null'
                    items:
                      $ref: '#/components/schemas/response_contribution'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      description: 'Lists contributions for a company. When the ''exited_employees_visibility'' feature flag is enabled,

        contributions for employees who exited more than 6 weeks ago will display historical employee data

        (forename, surname, and national_insurance_number as they were at the time of exit) instead of current data.

        '
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'
        country_code:
          type:
          - string
          - 'null'
        uuid:
          type: string
        preferred_locale:
          type:
          - string
          - 'null'
        smart_analytics_access_permitted:
          type:
          - boolean
          - 'null'
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
        company:
          $ref: '#/components/schemas/response_company'
        employee:
          $ref: '#/components/schemas/response_employee'
        shortcut:
          $ref: '#/components/schemas/response_customer_shortcut'
        marketing_preference:
          $ref: '#/components/schemas/response_marketing_preference'
    response_payment:
      type: object
      properties:
        id:
          type: integer
        state:
          type: string
        amount:
          type:
          - number
          - 'null'
          format: float
        description:
          type:
          - string
          - 'null'
        invoice_name:
          type:
          - string
          - 'null'
        paid_at:
          type:
          - string
          - 'null'
          format: date-time
        charge_on:
          type:
          - string
          - 'null'
          format: date
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        invoice_url:
          type:
          - string
          - 'null'
        invoice_details_url:
          type:
          - string
          - 'null'
        invoice_details_file_name:
          type:
          - string
          - 'null'
        source_of_funds:
          type:
          - string
          - 'null'
    response_employee_plan_participation:
      type: object
      properties:
        id:
          type: integer
        in_waiting_period:
          type:
          - boolean
          - 'null'
        next_state:
          type:
          - string
          - 'null'
        updated_at:
          type: string
          format: date-time
        state:
          type: string
    response_letter:
      type: object
      properties:
        id:
          type: integer
        subject:
          type:
          - string
          - 'null'
        name:
          type:
          - string
          - 'null'
        employee_id:
          type:
          - integer
          - 'null'
        read:
          type:
          - boolean
          - 'null'
        file_url:
          type:
          - string
          - 'null'
        file_file_name:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        cancelled_at:
          type:
          - string
          - 'null'
          format: date-time
        created_by_id:
          type:
          - integer
          - 'null'
        created_by_type:
          type:
          - string
          - 'null'
        send_employee_temporary_password_notification:
          type:
          - boolean
          - 'null'
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
        employee:
          $ref: '#/components/schemas/response_employee'
    response_base_payroll_configuration:
      type: object
      properties:
        id:
          type: integer
        company_id:
          type: integer
        description:
          type:
          - string
          - 'null'
        frequency:
          type: string
        name:
          type: string
        salary_rate:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        uuid:
          type: string
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
    response_company_tax_relief:
      type: object
      properties:
        id:
          type: integer
        basis_type:
          type: string
    response_beneficiary:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        name:
          type: string
        email:
          type:
          - string
          - 'null'
        address:
          type: string
        postcode:
          type:
          - string
          - 'null'
        relation:
          type: string
        percentage:
          type: number
          format: float
        born_on:
          type: string
          format: date
        type:
          type: string
    response_benefit_check_result:
      type: object
      properties:
        id:
          type: integer
        benefit_id:
          type: integer
        state:
          type: string
        redirect_url:
          type:
          - string
          - 'null'
        has_redirect_url:
          type:
          - boolean
          - 'null'
        returned_back_at:
          type:
          - string
          - 'null'
          format: date-time
        comment:
          type:
          - string
          - 'null'
          format: text
        automated_checks_available:
          type: boolean
    response_provider_scheme_migration:
      type: object
      properties:
        id:
          type: integer
        state:
          type: string
    response_adviser_import:
      type: object
      properties:
        id:
          type: integer
        status_code:
          typ

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