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

# HMRC P-forms API overview

> Retrieve the statutory forms Flow Payroll generates — P45s for leavers, P60s at tax year end, and the P32 employer payment record — as data or PDFs, and send them to employees in bulk.

The HMRC P-forms API serves the statutory forms Flow Payroll generates from your payroll data: P45s for employees who leave, P60s for each tax year, and the P32 employer payment record. Use it to fetch an individual form as structured data or a ready-to-issue PDF, list forms across an organisation or a single payroll, and notify employees in bulk when their forms are available.

All endpoints sit under the `/v1/hmrc-p-forms` base path, relative to the environment base URLs documented on the [API reference introduction](/api-reference/introduction).

## Key concepts

* **P45** — the form a leaver receives, summarising their pay and tax in the tax year up to their leaving date. Flow Payroll produces it as part of the leaver process — see the [leavers guide](/guides/people/leavers).
* **P60** — the end-of-year summary produced for each employee for a tax year. P60s exist as previews before they are finalised, and separate endpoints list each state.
* **P32** — the employer payment record for a tax month, covering income tax, National Insurance, statutory payment recoveries, and the apprenticeship levy.
* **Bulk send job** — the asynchronous job created when you send P45 or P60 notifications. The response returns a `jobId` you poll for the job's status and counts.

## API structure

### P45s

Fetch a leaver's P45 as data with `GET /p45/{employeeId}` or as a PDF with `GET /p45/{employeeId}/file`, and render a preview PDF ahead of time with `GET /p45/{employeeId}/preview` (a `leavingDate` query parameter is required). List finalised P45s for a tax year across the organisation (`GET /p45/list/{taxYear}/finalised`) or for one payroll (`GET /p45/list/{payrollConfigId}/{taxYear}/finalised`), and discover which tax years hold P45 data with `GET /p45/tax-years`. `POST /p45/{employeeId}/replacements` issues a replacement P45, and `POST /p45/send-notification` notifies a list of employees in bulk.

### P60s

Fetch an employee's P60 for a tax year as data (`GET /p60/{employeeId}/{taxYear}`) or as a PDF (`GET /p60/{employeeId}/{taxYear}/file`), and regenerate it with `POST /p60/{employeeId}/{taxYear}/regenerate`. List preview P60s (`GET /p60/list/{taxYear}/preview`) or finalised P60s for the organisation or a single payroll, and discover available years with `GET /p60/tax-years`, `GET /p60/{employeeId}/preview-years`, and `GET /p60/{employeeId}/finalised-years`. `POST /p60/send-notification` notifies a list of employees in bulk.

### P32 employer payment record

Retrieve the P32 for a tax month as data with `GET /p32/{year}/{month}` (month 1–12) or as a PDF with `GET /p32/{year}/{month}/pdf`, or fetch every month in a year with `GET /p32/{year}`.

### Bulk send jobs

The two send-notification endpoints respond with `202 Accepted` and a `jobId`. Poll `GET /pforms/send-notification/jobs/{jobId}` to track the job's form type, tax year, status, and counts.

<Note>
  PDF endpoints return `application/pdf` with a `Content-Disposition` header carrying a suggested filename, for example `P45-2025-2026-Doe-Jane.pdf`.
</Note>

## Typical workflow

1. Find the tax years that hold form data with `GET /p45/tax-years` or `GET /p60/tax-years`.
2. List the finalised forms for a year — `GET /p45/list/{taxYear}/finalised` or `GET /p60/list/{taxYear}/finalised` — passing `pageSize` and following `paginationToken` until it is no longer returned.
3. Download an individual form as a PDF with `GET /p45/{employeeId}/file` or `GET /p60/{employeeId}/{taxYear}/file`.
4. Notify employees that their forms are available with `POST /p45/send-notification` or `POST /p60/send-notification`, then poll `GET /pforms/send-notification/jobs/{jobId}` until the job completes.
5. When reconciling what the organisation owes HMRC, fetch the month's P32 with `GET /p32/{year}/{month}`.

## Authentication

Every request must carry a valid token in the `X-Auth-Token` header, and multi-organisation credentials must also send `X-Org-Id` — see [Authentication](/api-reference/authentication). JSON responses use the shared envelope described in [Response format](/api-reference/response-format).
