---
title: "Import historical payroll data from CSV"
method: POST
path: "/payrolls/{payroll}/import"
tags: ["Payrolls"]
---

# Import historical payroll data from CSV

`POST /payrolls/{payroll}/import`

Imports historical or correction payroll data from a CSV file. The CSV should be generated
using the template from the generate import endpoint, filled in with the appropriate values.

Send the CSV as a `multipart/form-data` request with the file in a field named `import_file`
(a `.csv` file).

The payroll must be a historical or correction payroll in draft status.

On success, the pay stub line items are populated with the imported data. On failure, the error
response format depends on the `Accept` header: `text/csv` returns the original CSV with an added
validation column containing inline error messages, while `application/json` returns a standard
JSON validation error response.

## Path parameters

- `payroll` string, required

## Response `200`

OK

- unknown

---

[API](https://skmtc.net/nmbr/apis/nmbr-api.md) · [All operations](https://skmtc.net/nmbr/apis/nmbr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nmbr/nmbr-api/versions/01cd9c45a923/schema)
