---
title: "Request a time entry correction"
method: POST
path: "/companies/{company}/time-corrections"
tags: ["Time Corrections"]
---

# Request a time entry correction

`POST /companies/{company}/time-corrections`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/time-corrections`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Request the correction of a time entry; it stays `pending` until a manager approves or rejects it. Returns 201 with a `Location` header.
- `time_entry_id`, `kind` (`add_missing_entry`/`adjust_time`/`remove_entry`), `reason` and `proposed` are required.
- A proposed time outside employment returns 422 `business_rule_violation`, subcode `clocking_outside_employment_period`.

## Path parameters

- `company` string, uuid, required

## Headers

- `Idempotency-Key` string
- `Factuarea-Version` string, date

## Request body

- RequestTimeCorrectionRequest
  - `time_entry_id` string, uuid, required: Clock entry ID (UUID v7) of the workday record to correct.
  - `kind` 'add_missing_entry' | 'adjust_time' | 'remove_entry', required: Type of correction: `add_missing_entry`, `adjust_time` or `remove_entry`.
  - `reason` string, required: Required reason for the correction request.
  - `proposed` object: Proposed values for the correction (consistency validated in the domain).

## Response `201`

Time correction requested. The `Location` header contains the canonical URL of the new correction request.

- object
  - `data` TimeCorrection, required: A time entry correction request for the Control Horario (time tracking) module (RD-ley 8/2019). A correction is an append-only entry that references the original time entry without mutating it (analogous to a corrective invoice); its status is derived from the ledger — there is no status column. The workflow is request → approve/reject, always resolved by a manager and never self-approved.
    - `id` string, uuid, required: Opaque identifier of the correction request, a UUID v7 (e.g. `01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a9b`).
    - `object` 'time_correction', required: Always `time_correction`.
    - `status` 'pending' | 'approved' | 'rejected', required: Derived workflow state: `pending` (awaiting resolution), `approved` or `rejected`.
    - `kind` 'add_missing_entry' | 'adjust_time' | 'remove_entry', required: Type of correction: `add_missing_entry`, `adjust_time` or `remove_entry`.
    - `time_entry_id` string, uuid, required: UUID v7 of the original time entry the correction refers to.
    - `employee_id` string, uuid, required: UUID v7 of the employee the corrected entry belongs to.
    - `requested_by_id` string, uuid, required: UUID v7 of the user who requested the correction.
    - `resolved_by_id` string, uuid, nullable, required: UUID v7 of the user who approved or rejected the request; `null` while it is still pending.
    - `reason` string, nullable, required: Reason supplied with the request (or the rejection); `null` if none.
    - `proposed` object, required: Map of the proposed values of the correction (shape depends on `kind`).
    - `resolved_at` string, date-time, nullable, required: When the request was resolved (ISO 8601); `null` while it is still pending.
    - `requested_at` string, date-time, required: When the correction was requested (ISO 8601).

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company. `profile_not_found`: the company in the path does not exist, is not in the API key scope or belongs to the other environment (live or test).
- `409`: The request conflicts with data that already exists or with a request running at the same time. `resource_conflict`: another request was reserving identifiers for the same kind of record at that moment and this one could not complete its reservation. Nothing was written; send the request again after a few seconds.
- `422`: Validation failed, or the clock entry breaks a time tracking rule. Domain rejections share the code `business_rule_violation` and are told apart by `error.subcode`: `clocking_outside_employment_period` (the resulting entry falls before the employee’s `hire_date` or after their `termination_date`; `error.param` is `occurred_at` and the message names the date that is breached — nothing is written) or a workday transition that is not allowed, such as `already_clocked_in`. The `error.param` field identifies which input is invalid, if any.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
