> ## 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.

# Get p45list finalised 1



## OpenAPI

````yaml /api-reference/specs/hmrc-p-forms.yaml get /p45/list/{payrollConfigId}/{taxYear}/finalised
openapi: 3.0.1
info:
  title: HmrcPForms Service
  description: HMRC P Forms API for FlowPayroll (P45, P60, P32)
  contact:
    name: FlowPayroll
    email: support@flowpayroll.com
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/hmrc-p-forms
security:
  - X-Auth-Token: []
    X-Org-Id: []
paths:
  /p45/list/{payrollConfigId}/{taxYear}/finalised:
    get:
      tags:
        - P45
      operationId: ListP45FinalisedForPayrollConfigYear
      parameters:
        - name: payrollConfigId
          in: path
          required: true
          schema:
            type: string
        - name: taxYear
          in: path
          required: true
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: string
        - name: paginationToken
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P45ModelListResponseBody'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
components:
  schemas:
    P45ModelListResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/P45ModelListContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ObjectResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ObjectContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      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
    P45ModelListContentResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/P45Model'
          nullable: true
        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
    ObjectContentResponse:
      type: object
      properties:
        data:
          nullable: true
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
          nullable: true
        value:
          nullable: true
      additionalProperties: false
    P45Model:
      type: object
      properties:
        organisationId:
          type: string
          nullable: true
        employeeId:
          type: string
          nullable: true
        taxYear:
          type: integer
          format: int32
        status:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
        contentType:
          type: string
          nullable: true
        fileSize:
          type: integer
          format: int64
        eTag:
          type: string
          nullable: true
        versionId:
          type: string
          nullable: true
        generationVersion:
          type: integer
          format: int32
        payrollConfigId:
          type: string
          nullable: true
        finalisedDate:
          type: string
          nullable: true
        finalisedBy:
          type: string
          nullable: true
        replacementCount:
          type: integer
          format: int32
        previousS3Keys:
          type: array
          items:
            type: string
          nullable: true
        employeeDetails:
          $ref: '#/components/schemas/P45EmployeeModel'
        employerDetails:
          $ref: '#/components/schemas/P45EmployerModel'
        taxDetails:
          $ref: '#/components/schemas/P45TaxModel'
        createdDate:
          type: string
          nullable: true
        createdBy:
          type: string
          nullable: true
        updatedDate:
          type: string
          nullable: true
        updatedBy:
          type: string
          nullable: true
        lastEmailedAt:
          type: string
          nullable: true
        lastEmailedTo:
          type: string
          nullable: true
        lastEmailedBy:
          type: string
          nullable: true
        lastEmailedStatus:
          type: string
          nullable: true
        lastEmailError:
          type: string
          nullable: true
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
          nullable: true
        dateTimeFormat:
          type: string
          nullable: true
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
    P45EmployeeModel:
      type: object
      properties:
        id:
          type: string
          nullable: true
        payrollId:
          type: string
          nullable: true
        nationalInsuranceNumber:
          type: string
          nullable: true
        department:
          type: string
          nullable: true
        jobTitle:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        name:
          $ref: '#/components/schemas/EmployeeNameDto'
        hasStudentLoanDeductions:
          type: boolean
        hasPostGraduateLoanDeductions:
          type: boolean
        address:
          $ref: '#/components/schemas/AddressDto'
        birthGender:
          type: string
          nullable: true
        birthDate:
          type: string
          nullable: true
        employeeLeaverDetails:
          $ref: '#/components/schemas/EmployeeLeaverDetailsDto'
      additionalProperties: false
    P45EmployerModel:
      type: object
      properties:
        id:
          type: string
          nullable: true
        name:
          $ref: '#/components/schemas/OrganisationNameDto'
        taxReferenceNumbers:
          $ref: '#/components/schemas/TaxReferenceNumbersDto'
        address:
          $ref: '#/components/schemas/AddressDto'
      additionalProperties: false
    P45TaxModel:
      type: object
      properties:
        taxCodeAtLeavingDate:
          type: string
          nullable: true
        taxCodeWeek1Month1:
          type: boolean
        totalPayToDate:
          type: number
          format: double
        totalTaxToDate:
          type: number
          format: double
        totalPayInThisEmployment:
          type: number
          format: double
        totalTaxInThisEmployment:
          type: number
          format: double
        weekNumber:
          type: integer
          format: int32
          nullable: true
        monthNumber:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    EmployeeNameDto:
      type: object
      properties:
        title:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        initials:
          type: string
          nullable: true
        middleName:
          type: string
          nullable: true
      additionalProperties: false
    AddressDto:
      type: object
      properties:
        line1:
          type: string
          nullable: true
        line2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        postcode:
          type: string
          nullable: true
        countryCode:
          type: string
          nullable: true
      additionalProperties: false
    EmployeeLeaverDetailsDto:
      type: object
      properties:
        leavingDate:
          type: string
          nullable: true
        reason:
          type: string
          nullable: true
        issuedBy:
          type: string
          nullable: true
        reportedToHmrc:
          type: boolean
      additionalProperties: false
    OrganisationNameDto:
      type: object
      properties:
        legalName:
          type: string
          nullable: true
        tradingName:
          type: string
          nullable: true
      additionalProperties: false
    TaxReferenceNumbersDto:
      type: object
      properties:
        employerPayeReference:
          $ref: '#/components/schemas/PayeReferenceNumberDto'
        accountsOfficeReference:
          type: string
          nullable: true
        selfAssessmentUniqueTaxpayerReference:
          type: string
          nullable: true
        corporationTaxReferenceUniqueTaxpayerReference:
          type: string
          nullable: true
      additionalProperties: false
    PayeReferenceNumberDto:
      type: object
      properties:
        officeNumber:
          type: string
          nullable: true
        referenceNumber:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: Authentication token for API access
      name: X-Auth-Token
      in: header
    X-Org-Id:
      type: apiKey
      description: >-
        Organisation to scope the request to. Required when the principal can
        access more than one organisation; optional for single-organisation
        principals (the authorizer resolves it automatically).
      name: X-Org-Id
      in: header

````