---
title: "Import attendance data"
method: POST
path: "/attendance/import/{importMethod}"
tags: ["Attendance"]
---

# Import attendance data

`POST /attendance/import/{importMethod}`

This endpoint allows you to import attendance punches (entries) for employees.

**Before using this endpoint**:

*   Explore [Import attendance punches into Bob via Public API](https://help.hibob.com/hc/en-us/articles/8108619113745) for detailed information about this endpoint.
*   It's important to fully understand how to use this endpoint correctly to avoid errors in the import process.

## Path parameters

- `importMethod` 'aggregate' | 'immediate', required

## Request body

- ImportAttendanceData
  - `idType` string, required — The ID type used to identify the employee. Can be one of: "bobId", "email", "idInCompany", or a custom field.<br/>For <b>custom fields</b> a forward slash separator should be used.<br/>In order to use a specific custom field to identify an employee, for example a custom field called "Payroll integration ID":<ul><li>Query the field name via the <a href='https://apidocs.hibob.com/reference/get_company-people-fields'>"Get all company fields"</a></li><li>In the response the name will look like <b>"identification.custom.Payroll Integration ID_1RNhIIf"</b></li><li>The value to use should be: <b>"/identification/custom/Payroll Integration ID_1RNhI"</b></li></ul>
  - `requests` ImportAttendanceEvent[], required — List of attendance events
    - `id` string, required — The id value to identify the customer by. Will fetch the employee based on the field (type) selected in <i>idType</i>.
    - `clockIn` string — The timestamp to log as a clock-in date-time in local time
    - `clockOut` string — The timestamp to log as a clock-out date-time in local time.
    - `entryType` string — The entry type can be either "work" or "break". If not passed, "work" type will be assumed.<br> **Important**: Break entries are supported only with 'immediate' import method. To learn more, see <a href="https://help.hibob.com/hc/en-us/articles/8108619113745" target="_blank">Import attendance punches into Bob via Public API</a>.
  - `dateTimeFormat` string — Allows to set custom date format for the date-time values sent in the requests

## Response `200`

Records imported

- ImportAttendanceResponse
  - `status` 'success' | 'failed' | 'partial_success' — Import status
  - `total` number — Total number of clock-in and clock-out events received
  - `imported` number — Number of clock-in/clock-out events imported
  - `notImported` number — Number of clock-in/clock-out events which were not imported
  - `errors` string[] — List of all errors received in the process

## Other responses

- `400` — Bad request, see error description.
- `403` — Forbidden. Authorization is implemented using a service user with attendance management permissions.

---

[API](https://skmtc.net/hibob/apis/employee-data-api.md) · [All operations](https://skmtc.net/hibob/apis/employee-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hibob/employee-data-api/versions/0781ebbdda91/schema)
