> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Own Workforce Import Templates

> The three import templates that write employee, training and absence data, with their columns and validation rules

[← Imports](/api-reference/imports/overview)

Own workforce data has no per-record create endpoint. The Imports API is the write path, and it exposes three templates:

| `template_id`                          | What a row creates                                                 |
| -------------------------------------- | ------------------------------------------------------------------ |
| `own_workforce`                        | An employee, their contract, and optionally a remuneration period  |
| `own_workforce_trainings`              | A training record for an existing employee                         |
| `own_workforce_accidents_absenteeisms` | An accident, an absence, or an accident plus the absence it caused |

<Note>
  **There is no endpoint that lists the available `template_id` values.** [Get Template](/api-reference/imports/get-template) fetches one by id, but there is no catalogue to enumerate them. These three ids are only discoverable from this page, so treat them as the reference.
</Note>

Use them through the normal flow: [create a session](/api-reference/imports/create-session) with the `template_id` and your file, [map the columns](/api-reference/imports/confirm-mapping), [validate](/api-reference/imports/validate), correct rows if needed, then [submit](/api-reference/imports/submit). Submission is asynchronous — [poll the status](/api-reference/imports/get-status).

## Order matters

`own_workforce_trainings` and `own_workforce_accidents_absenteeisms` attach rows to an employee by `external_employee_id`, and the accepted values are the employees that **already exist** in the organization. Import `own_workforce` first; the other two will reject rows for people the system does not know yet.

## A note on "required"

In the [Get Template](/api-reference/imports/get-template) response, `required: true` appears only for columns with a hard `required` rule. Columns that are *conditionally* required — through `required_with` or `required_without` — come back as `required: false`, with the condition inside `validations`. Reading only the boolean will tell you a column is optional when in practice it is mandatory as soon as you fill in its siblings. The tables below mark those as **conditional**.

***

## `own_workforce` — employees, contracts and pay

Each row creates or updates one employee and their contract, plus a remuneration period when the pay columns are filled in.

| Column                          | Type     | Required    | Notes                                                                                               |
| ------------------------------- | -------- | ----------- | --------------------------------------------------------------------------------------------------- |
| `external_employee_id`          | string   | yes         | Your HR identifier. Unique per organization, so the same value may exist in a sibling organization. |
| `organization_id`               | category | yes         | Which organization of your tree the row belongs to                                                  |
| `disabled`                      | category | yes         | `no_disability`, `with_disability`, `disability_33`, `disability_65`                                |
| `gender`                        | category | yes         | `M`, `F`, `O`, `NS`. Common aliases in several languages are accepted.                              |
| `birth_date`                    | date     | yes         | Not in the future, year 1900 or later                                                               |
| `location`                      | category | yes         | Country of work                                                                                     |
| `nationality`                   | category | no          | Left blank, the employee's nationality stays empty                                                  |
| `contract_type`                 | category | yes         | From the contract-type catalogue                                                                    |
| `contract_start_date`           | date     | yes         | Year 1900 or later                                                                                  |
| `contract_end_date`             | date     | no          | Must not precede `contract_start_date`. Blank means open-ended.                                     |
| `contract_end_date_reason`      | category | no          | From the end-reason catalogue                                                                       |
| `working_hours_ratio`           | float    | yes         | Greater than 0, up to 1. This is what drives FTE.                                                   |
| `labor_agreement`               | category | yes         | Boolean, with multilingual aliases                                                                  |
| `employment_category`           | string   | yes         | Free text — the job category                                                                        |
| `contract_annual_working_hours` | float    | no          | Greater than 0, up to 2928 (8 h × 366 d)                                                            |
| `remuneration_start_date`       | date     | conditional | Required once any other remuneration column is filled. Must not precede `contract_start_date`.      |
| `remuneration_end_date`         | date     | no          | Must not precede `remuneration_start_date`                                                          |
| `remuneration_amount`           | float    | conditional | Required with the other remuneration columns. Zero or greater.                                      |
| `remuneration_currency`         | category | conditional | Required with the other remuneration columns                                                        |

The four remuneration columns move together: fill one and the other three become mandatory. Leave all four blank to import an employee and contract with no pay data.

***

## `own_workforce_trainings` — training records

| Column                 | Type     | Required | Notes                                                                                                                                                   |
| ---------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `description`          | string   | yes      | What the training was                                                                                                                                   |
| `external_employee_id` | category | yes      | Must match an employee already in the organization                                                                                                      |
| `organization_id`      | category | no       | Multi-organization files only. Blank, or absent entirely, falls back to the organization of the upload — so single-organization imports are unaffected. |
| `type`                 | string   | yes      | Free text                                                                                                                                               |
| `start_date`           | date     | yes      | Year 1970 or later                                                                                                                                      |
| `end_date`             | date     | yes      | Must not precede `start_date`                                                                                                                           |
| `hours`                | float    | yes      | Greater than 0                                                                                                                                          |

***

## `own_workforce_accidents_absenteeisms` — absences and accidents

One row can carry an accident, an absence, or both. The shape is driven by which columns you fill.

| Column                         | Type     | Required    | Notes                                                                                                                                    |
| ------------------------------ | -------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `external_employee_id`         | category | yes         | Must match an employee already in the organization                                                                                       |
| `organization_id`              | category | no          | As above — blank falls back to the upload's organization                                                                                 |
| `absenteeism_accident_type`    | string   | yes         | Free text label                                                                                                                          |
| `absenteeism_accident_context` | category | conditional | `in_labore` or `in_itinere`. Required when `accident_date` is set.                                                                       |
| `accident_date`                | date     | conditional | Required when a context is given. Cannot be in the future.                                                                               |
| `absenteeism_start_date`       | date     | conditional | Required when the other absence columns are filled, **and** required when there is no `accident_date`. Must not precede `accident_date`. |
| `absenteeism_end_date`         | date     | no          | Must not precede `absenteeism_start_date`                                                                                                |
| `absenteeism_total_hours`      | float    | no          | Greater than 0                                                                                                                           |

In practice: a row with only accident columns records an accident; a row with only absence columns records an absence; a row with both records an accident and the sick leave it caused, linked together.

***

## Validation rules

Five rules apply per row and two across the whole file. Two of the seven are warnings, which annotate a row without blocking the import.

### Per row

| Rule                                        | Severity    | What it checks                                                    |
| ------------------------------------------- | ----------- | ----------------------------------------------------------------- |
| `own_workforce_employee_belongs_to_org`     | error       | The employee exists in the organization the row resolves to       |
| `own_workforce_accident_not_duplicate`      | error       | No accident is already recorded for that employee on that date    |
| `own_workforce_absenteeism_not_overlapping` | error       | The absence does not overlap one already stored for that employee |
| `own_workforce_accident_within_contract`    | **warning** | The accident date falls inside one of the employee's contracts    |
| `own_workforce_absenteeism_within_contract` | **warning** | The absence falls inside one of the employee's contracts          |

### Across the file

| Rule                                        | Severity | What it checks                                                  |
| ------------------------------------------- | -------- | --------------------------------------------------------------- |
| `own_workforce_duplicate_accident_in_file`  | error    | No two rows give the same employee an accident on the same date |
| `own_workforce_absenteeism_overlap_in_file` | error    | No two rows give the same employee overlapping absences         |

Both file-level rules flag **every** row in the offending group, not just the second one, so a duplicate shows up twice in the error list.

<Note>
  The employee is resolved against the row's **effective organization** — the `organization_id` cell when filled, otherwise the organization of the upload. This matters in a group: the same `external_employee_id` can legitimately exist in several organizations of the tree, and the rule checks the one the row points at.
</Note>

## Category values

Columns typed `category` accept a fixed set of values, which you can fetch at runtime with [Get Options Source](/api-reference/imports/get-options-source). `location`, `nationality` and `organization_id` resolve against the shared country and organization sources; the workforce-specific ones are:

| Source key                            | Values                                                               |
| ------------------------------------- | -------------------------------------------------------------------- |
| `own_workforce_genders`               | `M`, `F`, `O`, `NS`, plus multilingual aliases                       |
| `own_workforce_disability_grades`     | `no_disability`, `with_disability`, `disability_33`, `disability_65` |
| `own_workforce_accident_contexts`     | `in_labore`, `in_itinere`                                            |
| `own_workforce_boolean`               | true/false, with multilingual aliases                                |
| `own_workforce_contract_types`        | The contract-type catalogue                                          |
| `own_workforce_contract_end_reasons`  | The end-reason catalogue                                             |
| `own_workforce_external_employee_ids` | The employees that already exist in your organization                |

Only the last one is organization-specific: it is resolved live against your employees, so fetch it per organization rather than caching it. The contract-type and end-reason catalogues are shared across organizations.

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Create an import session" icon="file-import" href="/api-reference/imports/create-session">
    Start here, with one of the three `template_id` values
  </Card>

  <Card title="Get template" icon="table-columns" href="/api-reference/imports/get-template">
    Fetch a template's columns at runtime
  </Card>

  <Card title="Validate" icon="circle-check" href="/api-reference/imports/validate">
    Apply the rules above before submitting
  </Card>

  <Card title="Own Workforce API" icon="users" href="/api-reference/own-workforce/overview">
    Read back what you imported
  </Card>
</CardGroup>
