# How to fetch tax savings reports
## Overview
This guide explains how to fetch reports of tax savings for employees in the personnel ticket system. 
Reports of taxable amounts for the previous month are automatically calculated on the first day of each month.
The monthly tax reports must be retrieved and reported to the tax authorities by the employer.

## Fetching a tax savings report
To fetch a report of tax savings, use

::endpoint[personnel-tickets/getTaxSavingsReportAsCsvFile]

It fetches a tax savings report for a given company, month and year.

It accepts the following query parameters:

| Param Name | Required | Type    | Description                                                                                                                       | Default       |
|------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------|---------------|
| companyId  | Yes      | integer | Internal company ID in the personnel ticket system. This is different from your organisations ID in Enturs organisation registry. |               |
| year       | No       | integer | Year from 2021                                                                                                                    | Current year  |
| month      | No       | string  | Month (1–12)                                                                                                                      | Current month |

---

## Responses

- 200 OK

**Example CSV Response**

```csv
companyId,employeeNo,ssn,saving,fromDate,toDate,employeeStatus
3,1234,14104512345,230.00,2020-02-01,2020-02-29,P
3,1233,23047854321,1102.00,2020-02-01,2020-02-29,A
```
- 404 Not Found - No report exists for the given parameters


---

## Field descriptions

| Field          | Format                  | Meaning                                                                                                                           | Comment                                            |
|----------------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|
| companyId      | int                     | Internal company ID in the personnel ticket system. This is different from your organisations ID in Enturs organisation registry. | Useful for clients with multiple companies         |
| employeeNo     | string                  | Employee number provided by company                                                                                               | May be reused; can be negative or 0 for pensioners |
| ssn            | string (11 digits)      | Social security number                                                                                                            |                                                    |
| saving         | string (xxxxx.xx)       | Savings for the given month                                                                                                       | Refunds are included, so may be a negative number  |
| fromDate       | ISO string (yyyy-MM-dd) | First date in report (inclusive)                                                                                                  |                                                    |
| toDate         | ISO string (yyyy-MM-dd) | Last date in report (inclusive)                                                                                                   |                                                    |
| employeeStatus | "P", "A", or "E"        | Pensioner, Active employee or Bereaved (Etterlatt)                                                                                | The value is based on termination code             |


