# Attendance

The employees' electronic record of working hours (LFT art. 132, required from 2027): each employee's attendance for a period, with their double and triple overtime, and the punches that come from another time clock.

## Endpoints

- [Get a period's attendance](https://fiscalisto.com/en/docs/api/referencia/asistencia/get-attendance.md): `GET /v1/attendance`
- [Record a punch](https://fiscalisto.com/en/docs/api/referencia/asistencia/create-attendance-mark.md): `POST /v1/attendance/marks`
- [Remove a punch](https://fiscalisto.com/en/docs/api/referencia/asistencia/void-attendance-mark.md): `POST /v1/attendance/marks/{id}/void`
- [Authorize or reject overtime](https://fiscalisto.com/en/docs/api/referencia/asistencia/approve-attendance-overtime.md): `POST /v1/attendance/overtime`
- [List shifts](https://fiscalisto.com/en/docs/api/referencia/asistencia/list-attendance-shifts.md): `GET /v1/attendance/shifts`
- [Create a shift](https://fiscalisto.com/en/docs/api/referencia/asistencia/create-attendance-shift.md): `POST /v1/attendance/shifts`
- [Update a shift](https://fiscalisto.com/en/docs/api/referencia/asistencia/update-attendance-shift.md): `POST /v1/attendance/shifts/{id}`
- [List shift rotations](https://fiscalisto.com/en/docs/api/referencia/asistencia/list-attendance-rotations.md): `GET /v1/attendance/rotations`
- [Create a shift rotation](https://fiscalisto.com/en/docs/api/referencia/asistencia/create-attendance-rotation.md): `POST /v1/attendance/rotations`
- [Update a shift rotation](https://fiscalisto.com/en/docs/api/referencia/asistencia/update-attendance-rotation.md): `POST /v1/attendance/rotations/{id}`
- [Get the shift calendar](https://fiscalisto.com/en/docs/api/referencia/asistencia/get-attendance-calendar.md): `GET /v1/attendance/calendar`
- [Put shifts on the calendar](https://fiscalisto.com/en/docs/api/referencia/asistencia/set-attendance-calendar.md): `POST /v1/attendance/calendar`

## The AttendanceReport object

A period's attendance, per employee: hours against their schedule, absences, late arrivals and double and triple overtime per week, like Nómina › Asistencia › Registro.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"attendance_report"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…), the employer. |
| `from` | string | yes | First day of the period, YYYY-MM-DD. |
| `to` | string | yes | Last day of the period, YYYY-MM-DD. |
| `overtime_approval` | boolean | yes | true: overtime only counts up to what the company authorized each day. |
| `overtime_policy` | `approval`, `all`, `none` | yes | How overtime reaches payroll: approval (needs authorization), all (all of it counts) or none (there is no overtime: it stays on the record and never counts). |
| `ordinary_week_hours` | integer | yes | The ordinary working week on the last day of the period: the legal one (48 in 2026, 46 in 2027, 44 in 2028, 42 in 2029 and 40 from 2030; LFT art. 59 and second transitory article of the DOF 01-05-2026 decree) or the company's if it is shorter. Hours worked beyond it in the week are overtime. (from -9007199254740991 to 9007199254740991) |
| `weekly_hours` | integer or null | yes | The weekly working hours the company set in Horario y reglas, or null if it follows the legal ones. |
| `daily_jornada` | `agreed`, `law` | yes | From when a day gives overtime: agreed, past each person's agreed schedule (LFT art. 58); law, past the legal jornada for their shift (art. 61). |
| `employees` | array of object | yes | Each employee of the issuer in the period. |
| `employees[].employee` | string | yes | The employee (emp_…). |
| `employees[].name` | string | yes | Its name. |
| `employees[].number` | string or null | yes | Their employee number, or null. |
| `employees[].place` | string or null | yes | Where they clock, or null (any place). |
| `employees[].worked_minutes` | integer | yes | Minutes worked in the period. (from -9007199254740991 to 9007199254740991) |
| `employees[].scheduled_minutes` | integer | yes | Minutes of their schedule in the period. (from -9007199254740991 to 9007199254740991) |
| `employees[].absences` | integer | yes | Absences: working days without clock entries or a note. (from -9007199254740991 to 9007199254740991) |
| `employees[].disability_days` | integer | yes | Days with a sick-leave note. (from -9007199254740991 to 9007199254740991) |
| `employees[].vacation_days` | integer | yes | Days with a vacation note. (from -9007199254740991 to 9007199254740991) |
| `employees[].late_count` | integer | yes | How many days they arrived late. (from -9007199254740991 to 9007199254740991) |
| `employees[].late_minutes` | integer | yes | Total minutes late. (from -9007199254740991 to 9007199254740991) |
| `employees[].incomplete_days` | integer | yes | Days with a clock entry missing its pair (no clock-out). (from -9007199254740991 to 9007199254740991) |
| `employees[].flagged_marks` | integer | yes | Clock entries with a note to review (flags). (from -9007199254740991 to 9007199254740991) |
| `employees[].overtime_double_minutes` | integer | yes | Overtime paid double: up to 9 per week in 2026 and 2027, 10 in 2028, 11 in 2029 and 12 from 2030 (LFT art. 66 and fourth transitory article of the DOF 01-05-2026 decree). (from -9007199254740991 to 9007199254740991) |
| `employees[].overtime_triple_minutes` | integer | yes | Overtime paid triple: hours beyond the week's double ones, up to 4 per week (LFT art. 68). (from -9007199254740991 to 9007199254740991) |
| `employees[].overtime_minutes` | integer | yes | All extra minutes on the record, authorized or not. (from -9007199254740991 to 9007199254740991) |
| `employees[].week_excess_minutes` | integer | yes | Of the double and triple ones, the minutes of their schedule beyond the week's ordinary working hours (ordinary_week_hours, LFT art. 59): a 48-hour schedule in 2027 gives 2 hours of overtime each week. (from -9007199254740991 to 9007199254740991) |
| `employees[].unapproved_overtime_minutes` | integer | yes | Extra minutes nobody authorized: they stay on the record and don't count for payroll. (from -9007199254740991 to 9007199254740991) |
| `employees[].rejected_overtime_minutes` | integer | yes | Extra minutes the company rejected: they stay on the record, don't count for payroll and are no longer pending authorization. (from -9007199254740991 to 9007199254740991) |
| `employees[].rest_days_worked` | integer | yes | Rest days on which they worked. (from -9007199254740991 to 9007199254740991) |
| `employees[].holidays_worked` | integer | yes | Public holidays on which they worked. (from -9007199254740991 to 9007199254740991) |
| `employees[].weeks_confirmed` | integer | yes | Weeks the employee confirmed in their link. (from -9007199254740991 to 9007199254740991) |
| `employees[].weeks_disputed` | array of object | yes | The weeks the employee disagrees with. |
| `employees[].weeks_disputed[].week` | string | yes | The Monday of the week, YYYY-MM-DD. |
| `employees[].weeks_disputed[].text` | string | yes | What the employee said doesn't match. |
| `employees[].days` | array of object or null | yes | Each day of the period, only when an employee is requested; otherwise null. |
| `employees[].marks` | array of object or null | yes | Their clock entries, removed ones included, only when an employee is requested; otherwise null. |

Example:

```json
{
  "object": "attendance_report",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "from": "2027-01-04",
  "to": "2027-01-10",
  "overtime_approval": true,
  "overtime_policy": "approval",
  "ordinary_week_hours": 46,
  "weekly_hours": null,
  "daily_jornada": "agreed",
  "employees": [
    {
      "employee": "emp_OufpKqnrvx9p1",
      "name": "Ana López Ruiz",
      "number": "12",
      "place": "Sucursal Centro",
      "worked_minutes": 2490,
      "scheduled_minutes": 2400,
      "absences": 0,
      "disability_days": 0,
      "vacation_days": 0,
      "late_count": 1,
      "late_minutes": 12,
      "incomplete_days": 0,
      "flagged_marks": 0,
      "overtime_double_minutes": 90,
      "overtime_triple_minutes": 0,
      "overtime_minutes": 120,
      "week_excess_minutes": 0,
      "unapproved_overtime_minutes": 30,
      "rejected_overtime_minutes": 0,
      "rest_days_worked": 0,
      "holidays_worked": 0,
      "weeks_confirmed": 1,
      "weeks_disputed": [],
      "days": null,
      "marks": null
    }
  ]
}
```

## The AttendanceMark object

A clock-in or clock-out entry from Asistencia (electronic record of working hours, LFT art. 132).

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"attendance_mark"` | yes | What kind of object it is («invoice», «customer»…). |
| `employee` | string | yes | The employee (emp_…). |
| `kind` | `in`, `out` | yes | in: clock-in; out: clock-out. |
| `at` | string (date-time) | yes | When they clocked (UTC). |
| `date` | string | yes | The day it counts toward, YYYY-MM-DD in local time. |
| `time` | string | yes | The local time, HH:MM. |
| `method` | `kiosk_qr`, `kiosk_pin`, `printed_qr`, `remote`, `manual`, `api` | yes | How they clocked: kiosk_qr (the time clock's code), kiosk_pin (number and PIN on the time clock), printed_qr (the printed QR), remote (away from the branch, with their location), manual (correction in the app), api. |
| `place` | string or null | yes | The place where they clocked, or null. |
| `distance_m` | number or null | yes | How many meters from the place they were, if they shared their location; otherwise null. |
| `flags` | array of `no_location`, `far`, `imprecise`, `remote`, `new_device`, `offline`, `code_time` | yes | Notes to review (the mark is never rejected for them): no_location (didn't share their location), far (far from the place), imprecise (imprecise location), remote (outside the branch), new_device (a new phone), offline (made without a connection and arrived later; at is when it was made, corrected by the phone's clock), code_time (offline, with a checador code from another time). |
| `reason` | string or null | yes | Why it was added, in a correction or from the API (the employee sees it); null if they made it themselves. |
| `created_by` | string or null | yes | Who added it, in a correction; null if they made it themselves. |
| `voided` | boolean | yes | true if it was removed: it stays struck through, doesn't count, and shows with its reason. |
| `void_reason` | string or null | yes | Why it was removed, or null. |
| `voided_by` | string or null | yes | Who removed it, or null. |
| `voided_at` | string (date-time) or null | yes | When it was removed, or null. |

Example:

```json
{
  "id": "atm_OufpKqnrvx9p1",
  "object": "attendance_mark",
  "livemode": false,
  "employee": "emp_OufpKqnrvx9p1",
  "kind": "in",
  "at": "2027-01-04T15:02:00.000Z",
  "date": "2027-01-04",
  "time": "09:02",
  "method": "api",
  "place": "Sucursal Centro",
  "distance_m": null,
  "flags": [],
  "reason": "Registrada por la API",
  "created_by": "API",
  "voided": false,
  "void_reason": null,
  "voided_by": null,
  "voided_at": null
}
```

## The AttendanceOvertime object

The overtime the company authorized or rejected for one day of an employee, before or after that day.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"attendance_overtime"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `employee` | string | yes | The employee (emp_…). |
| `date` | string | yes | The day, YYYY-MM-DD. |
| `minutes` | integer or null | yes | Up to how many minutes of that day's overtime count for payroll (0 if they were rejected); null: no decision. |
| `rejected` | boolean | yes | true: the company rejected that day's overtime. |
| `comment` | string or null | yes | Why, or null. |

Example:

```json
{
  "object": "attendance_overtime",
  "livemode": false,
  "employee": "emp_OufpKqnrvx9p1",
  "date": "2027-01-08",
  "minutes": 120,
  "rejected": false,
  "comment": "Cierre de inventario"
}
```

## The AttendanceShift object

A shift of Asistencia › Turnos: when people start and end, in one to three segments, and its legal jornada.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"attendance_shift"` | yes | What kind of object it is («invoice», «customer»…). |
| `name` | string | yes | Its name. |
| `color` | `teal`, `blue`, `violet`, `amber`, `rose`, `slate` | yes | Its color on the calendar. |
| `segments` | array of object | yes | Its segments: one, or two or three in a split shift. |
| `segments[].start` | string | yes | Segment start, HH:MM. |
| `segments[].end` | string | yes | Segment end, HH:MM (before the start: the next day). |
| `break_minutes` | integer | yes | Break minutes within the shift. (from -9007199254740991 to 9007199254740991) |
| `break_paid` | boolean | yes | true: the break counts as working time (LFT art. 64). |
| `minutes` | integer | yes | Working minutes of the shift. (from -9007199254740991 to 9007199254740991) |
| `jornada` | `diurna`, `nocturna`, `mixta` | yes | The legal jornada (LFT art. 60): diurna (between 6:00 and 20:00), nocturna (between 20:00 and 6:00) or mixta (with less than 3 h 30 min of night; with more it's nocturna). Its maximum is 8 h, 7 h and 7 h 30 min (art. 61). |
| `overnight` | boolean | yes | true: it ends the next day. |
| `warnings` | array of string | yes | What the law says about this shift: it exceeds the art. 61 jornada, or lacks the half-hour break of art. 63. |
| `archived` | boolean | yes | true: archived, no longer put on new days or rotations. |

Example:

```json
{
  "id": "ats_OufpKqnrvx9p1",
  "object": "attendance_shift",
  "livemode": false,
  "name": "Nocturno",
  "color": "violet",
  "segments": [
    {
      "start": "22:00",
      "end": "06:00"
    }
  ],
  "break_minutes": 30,
  "break_paid": true,
  "minutes": 480,
  "jornada": "nocturna",
  "overnight": true,
  "warnings": [
    "La jornada nocturna es de 7 h (artículo 61). Este turno tiene 8 h: necesita el acuerdo del trabajador para repartir las horas así (artículo 58)."
  ],
  "archived": false
}
```

## The AttendanceRotation object

A shift rotation: shifts and rest days that repeat in a cycle (4×4, week on week off).

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"attendance_rotation"` | yes | What kind of object it is («invoice», «customer»…). |
| `name` | string | yes | Its name. |
| `days` | array of string or null | yes | The cycle in order: each day a shift (ats_…) or null for a rest day. |
| `week_minutes` | integer | yes | Average minutes per week over the cycle. (from -9007199254740991 to 9007199254740991) |
| `warning` | string or null | yes | If more than six working days in a row go by without rest (LFT art. 69), it says so; otherwise null. |
| `archived` | boolean | yes | true: archived, no longer assigned to anyone else. |

Example:

```json
{
  "id": "atr_OufpKqnrvx9p1",
  "object": "attendance_rotation",
  "livemode": false,
  "name": "4×4",
  "days": [
    "ats_OufpKqnrvx9p2",
    "ats_OufpKqnrvx9p2",
    "ats_OufpKqnrvx9p2",
    "ats_OufpKqnrvx9p2",
    null,
    null,
    null,
    null
  ],
  "week_minutes": 1680,
  "warning": null,
  "archived": false
}
```

## The AttendanceCalendar object

A month's shift calendar, like Nómina › Asistencia › Turnos: each employee's shift each day and where it comes from.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"attendance_calendar"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…). |
| `month` | string | yes | The month, YYYY-MM. |
| `from` | string | yes | First day, YYYY-MM-DD. |
| `to` | string | yes | Last day, YYYY-MM-DD. |
| `daily_jornada` | `agreed`, `law` | yes | From when a day gives overtime: agreed, past each person's agreed schedule (LFT art. 58); law, past the legal jornada for their shift (art. 61). |
| `employees` | array of object | yes | Each employee of the issuer who records attendance. |
| `employees[].employee` | string | yes | The employee (emp_…). |
| `employees[].name` | string | yes | Its name. |
| `employees[].number` | string or null | yes | Their employee number, or null. |
| `employees[].rotation` | string or null | yes | Their shift rotation (atr_…), or null. |
| `employees[].warning` | string or null | yes | More than six working days in a row without rest in the month (LFT art. 69). |
| `employees[].days` | array of object | yes | Each day of the month. |
| `employees[].days[].date` | string | yes | YYYY-MM-DD. |
| `employees[].days[].source` | `calendar`, `rotation`, `week` | yes | Where it comes from: calendar (a change put on the calendar), rotation (their shift rotation) or week (their weekly schedule). |
| `employees[].days[].shift` | string or null | yes | The shift (ats_…), or null. |
| `employees[].days[].start` | string or null | yes | Start time, HH:MM; null if it's a rest day. |
| `employees[].days[].end` | string or null | yes | End time, HH:MM, or null. |
| `employees[].days[].segments` | array of object or null | yes | Its segments, or null if it's a rest day. |
| `employees[].days[].minutes` | integer | yes | Working minutes. (from -9007199254740991 to 9007199254740991) |
| `employees[].days[].jornada` | `diurna`, `nocturna`, `mixta` or null | yes | Their legal jornada (LFT art. 60): diurna, nocturna or mixta; null on a rest day. |
| `employees[].days[].note` | `vacaciones`, `incapacidad`, `permiso_con_goce`, `permiso_sin_goce`, `descanso`, `festivo`, `falta` or null | yes | The day's note the company added, or null. |

Example:

```json
{
  "object": "attendance_calendar",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "month": "2027-01",
  "from": "2027-01-01",
  "to": "2027-01-31",
  "daily_jornada": "agreed",
  "employees": [
    {
      "employee": "emp_OufpKqnrvx9p1",
      "name": "Ana López Ruiz",
      "number": "12",
      "rotation": "atr_OufpKqnrvx9p1",
      "warning": null,
      "days": [
        {
          "date": "2027-01-01",
          "source": "rotation",
          "shift": "ats_OufpKqnrvx9p2",
          "start": "07:00",
          "end": "19:00",
          "segments": [
            {
              "start": "07:00",
              "end": "19:00"
            }
          ],
          "minutes": 660,
          "jornada": "diurna",
          "note": "festivo"
        },
        {
          "date": "2027-01-02",
          "source": "calendar",
          "shift": "ats_OufpKqnrvx9p1",
          "start": "22:00",
          "end": "06:00",
          "segments": [
            {
              "start": "22:00",
              "end": "06:00"
            }
          ],
          "minutes": 480,
          "jornada": "nocturna",
          "note": null
        }
      ]
    }
  ]
}
```

## The AttendanceCalendarChange object

What changed on the shift calendar.

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"attendance_calendar_change"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…). |
| `employees` | integer | yes | How many employees. (from -9007199254740991 to 9007199254740991) |
| `days` | integer | yes | How many days for each. (from -9007199254740991 to 9007199254740991) |
| `shift` | string or null | yes | The shift that was put (ats_…), or null: rest day or removed. |
| `cleared` | boolean | yes | true: what was on the calendar was removed and those days go back to their rotation or schedule. |

Example:

```json
{
  "object": "attendance_calendar_change",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "employees": 2,
  "days": 3,
  "shift": "ats_OufpKqnrvx9p1",
  "cleared": false
}
```
