Attendance (registro horario): list/get/create/update/delete shift records, clock_in, clock_out and status for live clocking, gaps and audit to find days that do not match the contract, log_range / log_days to enter many days at once, and list_edit_requests / create_edit_request for days whose timesheet has already been signed off. Without date and time, clock_in and clock_out record the current moment; given both, they record the declared moment instead, for someone who forgot to clock and knows when they started or stopped. A declared moment in the future is refused before anything is sent, and clock_out with a declared moment is refused if nothing is open or if it would close a shift before it started. Bulk writes, writes for another employee and edit requests preview first: the call returns a plan and a confirmation_token, and nothing is written until the identical call is repeated with that token within 15 minutes. audit, gaps and every preview begin with a Data read line saying how much of the window was actually read; audit reports a day Factorial returned nothing for as no_contract_data, and log_range never writes such a day (log_days, which takes explicit dates, will). Times are HH:MM in company local time, applied by Factorial in the company zone; the server never converts.
Declared time versus entry time: a shift carries two independent sets of timestamps. The declared working time is date, clock_in, clock_out and, for a shift that crosses midnight, reference_date; these are inputs, and they are what the attendance sheet and the hour totals show. Separately, Factorial sets created_at, updated_at, in_source and out_source on the server to record when and how the record was entered; they are read-only through this API and no action here can set or change them. For example, a record written on 2026-09-07 for 2024-01-02 09:59 comes back with date: 2024-01-02, clock_in: 09:59, created_at of 2026-09-07 and in_source: api; that is the correct and only correct outcome. Both facts are true at once: a backfilled record shows the real working day on the attendance sheet while Factorial's activity log shows it was entered later through the API.