> ## 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.

# Get Workforce Employee

> Retrieve a single own workforce employee with their demographic data

[← Own Workforce API](/api-reference/own-workforce/overview)

Retrieve one employee by id. This returns the person's demographics; their contracts, trainings and absences live on their own endpoints.

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication

  **Example:** `sk_live_1234567890abcdef`
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID

  **Example:** `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`
</ParamField>

### Path Parameters

<ParamField path="own_workforce_id" type="string" required>
  Employee UUID

  **Example:** `550e8400-e29b-41d4-a716-446655440000`
</ParamField>

### Query Parameters

<ParamField query="consolidate_group" type="boolean" default="false">
  Group view. By default the employee must belong to the header organization. With `true` the lookup spans the header organization's accepted business family, and the response additionally carries the owning organization's name and logo.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Employee UUID
</ResponseField>

<ResponseField name="external_employee_id" type="string">
  The identifier from your HR system
</ResponseField>

<ResponseField name="birth_date" type="string">
  `YYYY-MM-DD`
</ResponseField>

<ResponseField name="gender" type="string">
  One of `M`, `F`, `O` (other) or `NS` (not specified)
</ResponseField>

<ResponseField name="disabled_employee" type="string">
  Disability grade: `no_disability`, `with_disability`, `disability_33` or `disability_65`
</ResponseField>

<ResponseField name="nationality" type="string | null">
  Employee nationality, null when it was not provided
</ResponseField>

<ResponseField name="organization_id" type="string">
  Owning organization
</ResponseField>

<ResponseField name="organization_name" type="string">
  Owning organization name. **Present only** when `consolidate_group=true`.
</ResponseField>

<ResponseField name="organization_logo_url" type="string">
  Owning organization logo. **Present only** when `consolidate_group=true`.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp
</ResponseField>

<ResponseField name="updated_at" type="string | null">
  ISO 8601 timestamp
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X GET "https://api.dcycle.io/v1/own_workforces/550e8400-e29b-41d4-a716-446655440000" \
    -H "x-api-key: ${DCYCLE_API_KEY}" \
    -H "x-organization-id: ${DCYCLE_ORG_ID}"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os

  import requests

  headers = {
      "x-api-key": os.getenv("DCYCLE_API_KEY"),
      "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
  }

  employee_id = "550e8400-e29b-41d4-a716-446655440000"
  response = requests.get(
      f"https://api.dcycle.io/v1/own_workforces/{employee_id}",
      headers=headers,
  )

  employee = response.json()
  # Print the identifier only. The rest of this response is personal data — see the warning below.
  print(employee["external_employee_id"], "found")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const headers = {
    'x-api-key': process.env.DCYCLE_API_KEY,
    'x-organization-id': process.env.DCYCLE_ORG_ID
  };

  const employeeId = '550e8400-e29b-41d4-a716-446655440000';

  axios.get(`https://api.dcycle.io/v1/own_workforces/${employeeId}`, { headers })
    .then(response => {
      // Log the identifier only. The rest of this response is personal data.
      console.log(response.data.external_employee_id, 'found');
    })
    .catch(error => console.error(error));
  ```
</CodeGroup>

<Warning>
  This response carries birth date, gender and disability grade. Do not log it verbatim — the samples above deliberately print only the identifier.
</Warning>

### Successful Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "external_employee_id": "EMP-2024-001",
  "birth_date": "1990-01-01",
  "gender": "F",
  "disabled_employee": "no_disability",
  "nationality": "Spain",
  "organization_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa",
  "created_at": "2026-02-15T09:30:00",
  "updated_at": "2026-02-15T09:30:00"
}
```

## Common Errors

### 401 Unauthorized

**Cause:** the key is invalid, or it does not belong to the organization in `x-organization-id` — the two are looked up as a pair. A request carrying no credentials at all answers `AUTH_REQUIRED` instead.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "Invalid API key for organization",
  "code": "INVALID_API_KEY"
}
```

### 403 Forbidden

**Cause:** the key's owner is not an enabled member of the organization in `x-organization-id`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "Logged User is not Member of Organization",
  "code": "LOGGED_USER_NOT_MEMBER"
}
```

### 404 Not Found

**Cause:** no employee with that id inside your perimeter. An employee that exists but belongs to another organization returns exactly this response, not a 403 — the endpoint deliberately refuses to confirm that an id exists elsewhere.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "code": "NOT_FOUND",
  "detail": "OwnWorkforceModel with id='550e8400-e29b-41d4-a716-446655440000' not found"
}
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List employees" icon="users" href="/api-reference/own-workforce/list">
    Find the id to look up
  </Card>

  <Card title="Contracts of an employee" icon="file-signature" href="/api-reference/own-workforce/list-contracts">
    Their employment history
  </Card>

  <Card title="Trainings of an employee" icon="graduation-cap" href="/api-reference/own-workforce/list-trainings-by-employee">
    Their training records
  </Card>

  <Card title="Delete employee" icon="trash" href="/api-reference/own-workforce/delete">
    Remove the record
  </Card>
</CardGroup>
