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

# List one employee's pension letters

> Needs permission pension:read.

Every statutory pension letter the employee is owed or has been given, by the same rules as /auto-enrolment/enrolment-information/outstanding and /sent: still owed first (failed, overdue, due), then given. isScheduled says a letter will go by itself when the employee's next pay run is finalised. Letters still owed are left out for an organisation that has declared it issues the information itself; letters Flow sent are always shown.



## OpenAPI

````yaml /api-reference/specs/pension-v2.json get /employee-pension/{employeeId}/letters
openapi: 3.0.4
info:
  title: FlowPayroll Pension API
  version: v2
servers:
  - url: https://api.sandbox.flowpayroll.ai/v2/pension
security: []
tags:
  - name: Pension providers
    description: >-
      Look up the pension providers available to your organisation. Providers
      are set up in the product, so the API exposes them read-only.
  - name: Pension schemes
    description: >-
      Your organisation's arrangements with providers. Scheme endpoints use the
      /pension-schema path.
  - name: Pension groups
    description: >-
      Contribution rule sets within a scheme: pension type, contribution basis,
      and employee and employer factors.
  - name: Employee enrolment
    description: >-
      Associate employees with pension groups, remove associations, and send
      enrolment letters.
  - name: Pension information
    description: >-
      An employee's full pension picture in one call: composition, latest
      assessment, and postponement.
  - name: Auto-enrolment
    description: >-
      Assessment results per pay run, employees with outstanding or no
      auto-enrolment, and a stateless assessment preview.
  - name: Postponement
    description: Defer auto-enrolment per employee, overriding the organisation defaults.
  - name: Organisation defaults
    description: >-
      The organisation's default pension group, postponement definitions, and
      auto-enrolment mode.
  - name: Pension calculations
    description: >-
      Per-period contribution amounts, the contributions CSV, and provider
      export files.
  - name: Provider submissions
    description: >-
      Send a completed pay run to its connected pension provider, approve the
      payment, and read back what the provider reported: opt-outs, stopped
      contributions, refunds and schedules.
paths:
  /employee-pension/{employeeId}/letters:
    get:
      tags:
        - Employee enrolment
      summary: List one employee's pension letters
      description: >-
        Needs permission pension:read.


        Every statutory pension letter the employee is owed or has been given,
        by the same rules as /auto-enrolment/enrolment-information/outstanding
        and /sent: still owed first (failed, overdue, due), then given.
        isScheduled says a letter will go by itself when the employee's next pay
        run is finalised. Letters still owed are left out for an organisation
        that has declared it issues the information itself; letters Flow sent
        are always shown.
      operationId: GetEmployeePensionLetters
      parameters:
        - name: employeeId
          in: path
          required: true
          schema:
            type: string
        - name: asOfDate
          in: query
          schema:
            type: string
            format: date
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/EnrolmentInformationDutyListModelResponseBody
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
components:
  schemas:
    EnrolmentInformationDutyListModelResponseBody:
      required:
        - message
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: >-
            #/components/schemas/EnrolmentInformationDutyListModelContentResponse
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          description: >-
            Deprecated: the same issues as `validationIssues` (`reasonText` is
            `reason`, `reasonId` is `reasonToken`, `reasonParameters` is
            `reasonTokenArguments`). Read `validationIssues`; this will be
            removed.
          nullable: true
          readOnly: true
          deprecated: true
        metadata:
          allOf:
            - $ref: '#/components/schemas/ContentMetadataResponse'
          description: >-
            Deprecated: the same values as `content.metadata`. Read that; this
            will be removed.
          deprecated: true
      additionalProperties: false
      description: >-
        The response envelope every FlowPayroll API answers with: a `message`,
        the

        `content`, and any `validationIssues`. `errors` and the top-level

        `metadata` are deprecated copies of `validationIssues` and

        `content.metadata`, and will be removed.
    ObjectResponseBody:
      required:
        - message
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ObjectContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          description: >-
            Deprecated: the same issues as `validationIssues` (`reasonText` is
            `reason`, `reasonId` is `reasonToken`, `reasonParameters` is
            `reasonTokenArguments`). Read `validationIssues`; this will be
            removed.
          nullable: true
          readOnly: true
          deprecated: true
        metadata:
          allOf:
            - $ref: '#/components/schemas/ContentMetadataResponse'
          description: >-
            Deprecated: the same values as `content.metadata`. Read that; this
            will be removed.
          deprecated: true
      additionalProperties: false
      description: >-
        The response envelope every FlowPayroll API answers with: a `message`,
        the

        `content`, and any `validationIssues`. `errors` and the top-level

        `metadata` are deprecated copies of `validationIssues` and

        `content.metadata`, and will be removed.
    ApiErrorResponse:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/ApiErrorMessage'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      required:
        - token
      type: object
      properties:
        text:
          type: string
          nullable: true
        token:
          type: string
          description: >-
            Stable snake_case key for the message, for clients that translate
            it.
          nullable: true
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
        textId:
          type: string
          description: >-
            Deprecated: the same value as `token`. Read that; this will be
            removed.
          nullable: true
          readOnly: true
          deprecated: true
        textParameters:
          type: array
          items:
            $ref: '#/components/schemas/Pair'
          description: >-
            Deprecated: the same values as `tokenArguments`. Read that; this
            will be removed.
          nullable: true
          readOnly: true
          deprecated: true
      additionalProperties: false
      description: >-
        What happened, as English `text` and a stable `token` to translate from.

        `textId` and `textParameters` are deprecated copies of `token` and
        `tokenArguments`.
    EnrolmentInformationDutyListModelContentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/EnrolmentInformationDutyListModel'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssue:
      type: object
      properties:
        field:
          type: string
          nullable: true
        reason:
          type: string
          nullable: true
        reasonToken:
          type: string
          nullable: true
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    Error:
      type: object
      properties:
        field:
          type: string
          nullable: true
        reasonText:
          type: string
          nullable: true
        reasonId:
          type: string
          nullable: true
        reasonParameters:
          type: array
          items:
            $ref: '#/components/schemas/Pair'
          nullable: true
      additionalProperties: false
      description: >-
        Deprecated: an entry of the old `errors` list. Read `validationIssues`
        instead.
      deprecated: true
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
          nullable: true
        dateTimeFormat:
          type: string
          nullable: true
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
    ObjectContentResponse:
      type: object
      properties:
        data:
          nullable: true
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ApiErrorMessage:
      type: object
      properties:
        text:
          type: string
          nullable: true
        token:
          type: string
          nullable: true
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
          nullable: true
        value:
          nullable: true
      additionalProperties: false
    Pair:
      type: object
      properties:
        key:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
      additionalProperties: false
      description: >-
        Deprecated: a key and value of the old `textParameters` and
        `reasonParameters`.
      deprecated: true
    EnrolmentInformationDutyListModel:
      required:
        - items
        - totalCount
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/EnrolmentInformationDutyModel'
          description: |-
            The members on this page, worst first: the send failed, then the six
            weeks have run out, then still in time.
          nullable: true
        paginationToken:
          type: string
          description: >-
            Deprecated: the same value as `content.metadata.paginationToken`.
            Read that; this will be removed.
          nullable: true
          deprecated: true
        totalCount:
          type: integer
          description: |-
            How many members are outstanding in total, across every page. What a
            screen shows as "N still to send", and what tells the reader whether
            the first page is the whole job or the start of it.
          format: int32
      additionalProperties: false
      description: One page of the members still owed their enrolment information.
    EnrolmentInformationDutyModel:
      required:
        - dueBy
        - employeeId
        - enrolmentDate
        - isAutoEnrolled
        - isScheduled
        - letterType
        - status
      type: object
      properties:
        employeeId:
          type: string
          nullable: true
        letterType:
          enum:
            - Enrolment
            - ReEnrolment
            - Postponement
            - OptInInformation
            - OptInConfirmation
            - JoinConfirmation
          type: string
          description: >-
            The letter that discharges this duty: Enrolment, ReEnrolment,
            Postponement, OptInInformation,

            OptInConfirmation or JoinConfirmation. Send it with

            `POST /employee-pension/letters/{letterType}`.
          nullable: true
        firstName:
          type: string
          description: Who this is. Absent only when the snapshot has not arrived yet.
          nullable: true
        lastName:
          type: string
          nullable: true
        enrolmentDate:
          type: string
          description: >-
            The date the six weeks are counted from: the enrolment or
            re-enrolment date; for a

            postponement notice, the starting day (whose six weeks begin the day
            after); for opt-in

            information, the day the worker was first assessed as able to opt in
            or join; for an opt-in

            or join confirmation, the day their membership starts.
          format: date
        dueBy:
          type: string
          description: >-
            The last day the information can be given without breaching the
            duty.
          format: date
        status:
          type: string
          description: >-
            "Failed" (the send failed, so it was never given), "Overdue" (the
            six weeks have run out) or

            "Due" (still inside them). A join confirmation is never "Overdue":
            the law sets it no deadline.
          nullable: true
        isAutoEnrolled:
          type: boolean
          description: >-
            Whether this membership came from automatic enrolment. That cohort
            holds

            the statutory opt-out right, whose clock does not start until the

            information is given, so they are the ones to chase first.
        lastAttemptedAt:
          type: string
          format: date-time
          nullable: true
        lastAttemptError:
          type: string
          nullable: true
        lastRefusalReason:
          type: string
          description: >-
            Why the letter was last refused for something the employer has to
            put right, as one of the

            job's failure reasons (NoOptOutContact, NoEnrolmentDate,
            NoJoiningRoute). Absent when it has not been refused

            since its last attempt; the next send attempt clears it.
          nullable: true
        lastRefusedAt:
          type: string
          description: When the letter was last refused. Absent with lastRefusalReason.
          format: date-time
          nullable: true
        lastAttemptStatus:
          enum:
            - Sending
            - Sent
            - Failed
          type: string
          description: >-
            What the last attempt is doing now: "Sending", "Sent" or "Failed".

            A member stays on this list until the letter is confirmed delivered,
            so

            "Sending" is how a send already on its way is told apart from one

            nobody has started. Absent when nothing has been tried.
          nullable: true
        isScheduled:
          type: boolean
          description: >-
            Flow will send this one itself when the pay run that enrolled the
            member

            is finalised, so nobody needs to act on it. Still listed, because
            the

            information has not been given yet and the six weeks are still
            running.
        sentDate:
          type: string
          description: >-
            The day the letter was given, on a duty that is met. Null on every
            outstanding one. For the

            enrolment and re-enrolment letters and the opt-in confirmation, the
            member's opt-out period

            runs from it (TPR detailed guidance 7, paragraphs 17-18).
          format: date
          nullable: true
        sentBy:
          type: string
          description: >-
            Who gave it: the person who sent it, or the system when Flow sent it
            as

            part of enrolling the member.
          nullable: true
      additionalProperties: false
      description: >-
        A letter a worker is owed, or was given, and how long the employer has
        left to give it: the

        enrolment or re-enrolment information, the postponement notice, the
        opt-in and joining

        information, or the confirmation for a worker who opted in or asked to
        join.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.