> ## Documentation Index
> Fetch the complete documentation index at: https://docs.intermezzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get pension membership history

> Returns the full version history of an employee's pension membership, ordered from the earliest to the most recent record. Each entry represents a status change (enrolment, opt-out, re-enrolment). Required for statutory audit trails as mandated by The Pensions Regulator. Returns 404 if no membership record exists yet.



## OpenAPI

````yaml /api-reference/preview.json get /gb/organizations/{organization_id}/employees/{employee_id}/pension/membership/history
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /gb/organizations/{organization_id}/employees/{employee_id}/pension/membership/history:
    get:
      tags:
        - Great Britain
        - Pension
      summary: Get pension membership history
      description: >-
        Returns the full version history of an employee's pension membership,
        ordered from the earliest to the most recent record. Each entry
        represents a status change (enrolment, opt-out, re-enrolment). Required
        for statutory audit trails as mandated by The Pensions Regulator.
        Returns 404 if no membership record exists yet.
      operationId: >-
        get_pension_membership_history_gb_organizations__organization_id__employees__employee_id__pension_membership_history_get
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
            title: Organization Id
        - name: employee_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
            title: Employee Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PensionMembershipHistoryEntryResponse'
                title: >-
                  Response Get Pension Membership History Gb Organizations 
                  Organization Id  Employees  Employee Id  Pension Membership
                  History Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerToken: []
components:
  schemas:
    PensionMembershipHistoryEntryResponse:
      properties:
        valid_from:
          type: string
          format: date
          title: Valid From
          description: Date from which this version of the membership record is effective
        valid_to:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Valid To
          description: >-
            Date on which this version expires (exclusive); null = current
            version. Set automatically when a new version is created
        employee_rate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Employee Rate
          description: >-
            Per-employee employee contribution rate override; null = use scheme
            default
        employer_rate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Employer Rate
          description: >-
            Per-employee employer contribution rate override; null = use scheme
            default
        employee_cap:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Employee Cap
          description: >-
            Per-employee maximum employee contribution per period; null = use
            scheme default
        employer_cap:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Employer Cap
          description: >-
            Per-employee maximum employer contribution per period; null = use
            scheme default
        tax_treatment:
          anyOf:
            - $ref: '#/components/schemas/PensionTaxTreatment'
            - type: 'null'
          description: >-
            Per-employee tax treatment override (e.g. RELIEF_AT_SOURCE for an
            employee whose scheme is SALARY_SACRIFICE); null = use scheme
            default
        wage_type_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Wage Type Code
          description: >-
            Per-employee wage type code override for the payslip deduction line;
            null = use scheme default. Required when tax_treatment override is
            set
        version:
          type: integer
          title: Version
          description: >-
            Sequential version number; 0 = initial record, incremented on each
            change
        status:
          $ref: '#/components/schemas/PensionMembershipStatus'
          description: >-
            Membership status at this version: ACTIVE, OPTED_OUT, or
            NOT_ENROLLED
        worker_category:
          anyOf:
            - $ref: '#/components/schemas/WorkerCategory'
            - type: 'null'
          description: >-
            AE worker category recorded at this version; null if not yet
            assessed
        entry_route:
          anyOf:
            - $ref: '#/components/schemas/PensionEntryRoute'
            - type: 'null'
          description: >-
            How the employee entered the scheme at this version: AUTO_ENROLLED,
            OPTED_IN, or JOINED; null if not enrolled
        enrolment_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enrolment Date
          description: Date enrolment took effect for this version; null if not enrolled
        opt_out_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Opt Out Date
          description: Date the employee opted out; null if not opted out at this version
        enrolment_communication_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enrolment Communication Date
          description: >-
            Date the statutory enrolment letter was sent; used for opt-out
            window validation
        scheme_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Scheme Id
          description: >-
            Pension scheme UUID at this version; null for pre-multi-scheme
            records
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when this version was created
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: User identifier who created this version; null if system-generated
      additionalProperties: true
      type: object
      required:
        - valid_from
        - version
        - status
        - worker_category
        - entry_route
        - enrolment_date
        - opt_out_date
        - enrolment_communication_date
        - scheme_id
        - created_at
        - created_by
      title: PensionMembershipHistoryEntryResponse
      description: >-
        A single version of the membership history record.


        The full history list is returned oldest-first (ascending version: 0, 1,
        2 …).

        Each entry represents a point-in-time snapshot; valid_from/valid_to form

        a contiguous, non-overlapping timeline of the employee's membership.

        Fields have the same semantics as PensionMembershipResponse.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PensionTaxTreatment:
      type: string
      enum:
        - NET_PAY
        - RELIEF_AT_SOURCE
        - SALARY_SACRIFICE
      title: PensionTaxTreatment
    PensionMembershipStatus:
      type: string
      enum:
        - ACTIVE
        - OPTED_OUT
        - NOT_ENROLLED
      title: PensionMembershipStatus
    WorkerCategory:
      type: string
      enum:
        - ELIGIBLE_JOBHOLDER
        - NON_ELIGIBLE_JOBHOLDER
        - ENTITLED_WORKER
        - EXCLUDED
      title: WorkerCategory
    PensionEntryRoute:
      type: string
      enum:
        - AUTO_ENROLLED
        - OPTED_IN
        - JOINED
      title: PensionEntryRoute
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerToken:
      type: oauth2
      flows:
        password:
          scopes:
            read:all: Read all
            write:all: Write all
            read:health_check: Read health check
            write:health_check: Write health check
            read:wage_types: Read wage types
            write:wage_types: Write wage types
          tokenUrl: >-
            https://auth-preview.intermezzo.ai/authorize?audience=api-preview.intermezzo.ai

````