---
updatedAt: 2025-12-22T13:47:50.000Z
---

Fetch the complete documentation index at: https://apidocs.hibob.com/llms.txt. Use this file to discover all available pages before exploring further.

# Import attendance data

<p>This endpoint allows you to import attendance punches (entries) for employees.  <p><b>Before using this endpoint</b>:</p> <ul> <li>Explore <a href="https://help.hibob.com/hc/en-us/articles/8108619113745" target="_blank">Import attendance punches into Bob via Public API</a> for detailed information about this endpoint. </li> <li>It's important to fully understand how to use this endpoint correctly to avoid errors in the import process.</li>

# OpenAPI definition

```json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Attendance API",
    "contact": {
      "name": "Hi Bob, Inc."
    },
    "description": "Public API for importing attendance entries and managing attendance projects, tasks, and clients. Supports detailed field metadata and flexible filtering.",
    "license": {
      "name": "Proprietary",
      "url": "https://apidocs.hibob.com/docs/api-terms-of-use"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.hibob.com/v1",
      "description": "Production"
    },
    {
      "url": "https://api.sandbox.hibob.com/v1",
      "description": "Sandbox"
    }
  ],
  "x-readme": {
    "metrics-enabled": false
  },
  "tags": [
    {
      "name": "Attendance",
      "description": "Access attendance entries"
    }
  ],
  "paths": {
    "/attendance/import/{importMethod}": {
      "post": {
        "operationId": "post_attendance-import-importmethod",
        "tags": [
          "Attendance"
        ],
        "summary": "Import attendance data",
        "description": "<p>This endpoint allows you to import attendance punches (entries) for employees.  <p><b>Before using this endpoint</b>:</p> <ul> <li>Explore <a href=\"https://help.hibob.com/hc/en-us/articles/8108619113745\" target=\"_blank\">Import attendance punches into Bob via Public API</a> for detailed information about this endpoint. </li> <li>It's important to fully understand how to use this endpoint correctly to avoid errors in the import process.</li>",
        "parameters": [
          {
            "name": "importMethod",
            "in": "path",
            "description": "Indicates if the provided data should be processed via an aggregation engine or immediately. <ul>Aggregate - will add the logs to a temporary location, and an aggregation job will process the data asynchronously.</ul><ul>Immediate - will insert the records as-is.</ul>",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "aggregate",
                "immediate"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportAttendanceData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Records imported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportAttendanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request, see error description.",
            "content": {}
          },
          "403": {
            "description": "Forbidden. Authorization is implemented using a service user with attendance management permissions.",
            "content": {}
          }
        },
        "security": [
          {
            "basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basic": {
        "type": "http",
        "scheme": "basic",
        "description": "Basic HTTP authentication using service user credentials"
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth 2.0",
        "description": "OAuth 2.0 authentication using an Access Token is available for registered partners only.  Try It! does not support the full HiBob OAuth flow. You can follow <a href=\"https://apidocs.hibob.com/reference/oauth-20#testing-from-the-public-api-reference\" target=\"_blank\">these steps</a> to complete the OAuth 2.0 flow in Postman and then paste the token here."
      }
    },
    "schemas": {
      "ImportAttendanceData": {
        "required": [
          "idType",
          "requests"
        ],
        "type": "object",
        "properties": {
          "idType": {
            "type": "string",
            "description": "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": {
            "type": "array",
            "description": "List of attendance events",
            "items": {
              "$ref": "#/components/schemas/ImportAttendanceEvent"
            }
          },
          "dateTimeFormat": {
            "type": "string",
            "description": "Allows to set custom date format for the date-time values sent in the requests",
            "example": "yyyy-MM-dd hh:mm a"
          }
        }
      },
      "ImportAttendanceEvent": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id value to identify the customer by. Will fetch the employee based on the field (type) selected in <i>idType</i>.",
            "example": "12356733644"
          },
          "clockIn": {
            "type": "string",
            "description": "The timestamp to log as a clock-in date-time in local time",
            "example": "2022-06-12T08:00"
          },
          "clockOut": {
            "type": "string",
            "description": "The timestamp to log as a clock-out date-time in local time.",
            "example": "2022-06-12T17:00"
          },
          "entryType": {
            "type": "string",
            "description": "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>.",
            "example": "work"
          }
        },
        "description": "An event indicating clock-in, clock-out or both, and the entry type"
      },
      "ImportAttendanceResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Import status",
            "enum": [
              "success",
              "failed",
              "partial_success"
            ]
          },
          "total": {
            "type": "number",
            "description": "Total number of clock-in and clock-out events received",
            "example": 140
          },
          "imported": {
            "type": "number",
            "description": "Number of clock-in/clock-out events imported",
            "example": 137
          },
          "notImported": {
            "type": "number",
            "description": "Number of clock-in/clock-out events which were not imported",
            "example": 3
          },
          "errors": {
            "type": "array",
            "description": "List of all errors received in the process",
            "example": [
              "Clock-In at 2022-04-07T07:00 for employee ID 2686495591877312534 is invalid",
              "Invalid employee Id: ABCD12345567",
              "Cannot find employee for id 5986745"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
```