---
title: "Quickstart | Docs | HR by R&D Copilot"
description: "Hire a person, check the result, find them and read their checklist, with four requests."
canonical: "https://hr.rdcopilot.com/docs/get-started/quickstart/"
language: en
updated: 2026-11-22
---

# Quickstart

Hire a person, check the result, find them and read their checklist, with four requests.

You need the client credentials and the base address of your test company. The samples read them from the environment: `$RDC_BASE_URL` and `$RDC_TOKEN`. See [Authentication](https://hr.rdcopilot.com/docs/get-started/authentication/) for the token.

## Hire a person

Choose a new `operationId`, and give the person the number your own system has for them as `externalId`. You will find the person by that number in a moment. The manager is a person of your account, read from `listEmployees`; here it is the purchasing lead.

curl

```bash
curl -X POST "$RDC_BASE_URL/hr/v1/employees" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Teodora Nistor",
  "job": "Buyer",
  "departmentId": "purchasing",
  "managerId": "68830a58-d574-4401-9f7d-90be0b6c1dbf",
  "workplaceId": "office",
  "contractType": "indefinite",
  "grossSalary": "6500.00",
  "startDate": "2026-12-02",
  "externalId": "hr-0231",
  "operationId": "3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "Teodora Nistor",
    "job": "Buyer",
    "departmentId": "purchasing",
    "managerId": "68830a58-d574-4401-9f7d-90be0b6c1dbf",
    "workplaceId": "office",
    "contractType": "indefinite",
    "grossSalary": "6500.00",
    "startDate": "2026-12-02",
    "externalId": "hr-0231",
    "operationId": "3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/hr/v1/employees',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'name': 'Teodora Nistor',
        'job': 'Buyer',
        'departmentId': 'purchasing',
        'managerId': '68830a58-d574-4401-9f7d-90be0b6c1dbf',
        'workplaceId': 'office',
        'contractType': 'indefinite',
        'grossSalary': '6500.00',
        'startDate': '2026-12-02',
        'externalId': 'hr-0231',
        'operationId': '3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "name": "Teodora Nistor",
  "job": "Buyer",
  "departmentId": "purchasing",
  "managerId": "68830a58-d574-4401-9f7d-90be0b6c1dbf",
  "workplaceId": "office",
  "contractType": "indefinite",
  "grossSalary": "6500.00",
  "startDate": "2026-12-02",
  "externalId": "hr-0231",
  "operationId": "3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/hr/v1/employees");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "name": "Teodora Nistor",
  "job": "Buyer",
  "departmentId": "purchasing",
  "managerId": "68830a58-d574-4401-9f7d-90be0b6c1dbf",
  "workplaceId": "office",
  "contractType": "indefinite",
  "grossSalary": "6500.00",
  "startDate": "2026-12-02",
  "externalId": "hr-0231",
  "operationId": "3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12",
  "status": "accepted",
  "aggregateRevision": 1
}
```

## Read the result

Look the operation up with the `operationId` you sent. When `status` is `completed`, the person exists.

curl

```bash
curl "$RDC_BASE_URL/hr/v1/operations/3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/operations/3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/hr/v1/operations/3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/operations/3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/hr/v1/operations/3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "operationId": "3c9d2f6a-5b1e-4d7a-8f20-6a1b9c0e4d12",
  "status": "completed",
  "aggregateRevision": 1
}
```

| Status | Meaning |
| --- | --- |
| accepted | The request was recorded and is being applied. |
| completed | The change was applied. |
| rejected | The request was refused. Nothing was changed. |

## Find the person

The answer to a change does not carry the identifier of the new record. Ask for the person by your own number. The `id` in the answer is what every other request names, and `status` is `onboarding` until the first day of work. [Your own ids](https://hr.rdcopilot.com/docs/concepts/people-and-employments/#your-own-ids) explains why.

curl

```bash
curl "$RDC_BASE_URL/hr/v1/employees?externalId=hr-0231" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees?externalId=hr-0231`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/hr/v1/employees?externalId=hr-0231',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees?externalId=hr-0231');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/hr/v1/employees?externalId=hr-0231");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "items": [
    {
      "id": "c9e3affa-61ed-4023-a015-4c988db539e5",
      "number": "A-0053",
      "name": "Teodora Nistor",
      "job": "Buyer",
      "departmentId": "purchasing",
      "managerId": "68830a58-d574-4401-9f7d-90be0b6c1dbf",
      "workplaceId": "office",
      "contractType": "indefinite",
      "contractEnd": null,
      "startDate": "2026-12-02",
      "lastDay": null,
      "status": "onboarding",
      "externalId": "hr-0231",
      "revision": 1
    }
  ],
  "nextCursor": null
}
```

## Read the checklist

Every hire has a checklist. `registerDue` is the day before the first day of work: the hire is registered by then. A step with names in `blockedBy` waits for them. Note `revision`: the next change to the person sends it as `expectedRevision`.

curl

```bash
curl "$RDC_BASE_URL/hr/v1/employees/c9e3affa-61ed-4023-a015-4c988db539e5/onboarding" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees/c9e3affa-61ed-4023-a015-4c988db539e5/onboarding`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/hr/v1/employees/c9e3affa-61ed-4023-a015-4c988db539e5/onboarding',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees/c9e3affa-61ed-4023-a015-4c988db539e5/onboarding');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/hr/v1/employees/c9e3affa-61ed-4023-a015-4c988db539e5/onboarding");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "employeeId": "c9e3affa-61ed-4023-a015-4c988db539e5",
  "registerDue": "2026-12-01",
  "steps": [
    {
      "id": "contract",
      "ownerId": "a31a1dd1-9214-434e-a00a-db907727f048",
      "done": false,
      "doneAt": null,
      "blockedBy": []
    },
    {
      "id": "register",
      "ownerId": "a31a1dd1-9214-434e-a00a-db907727f048",
      "done": false,
      "doneAt": null,
      "blockedBy": [
        "contract"
      ]
    },
    {
      "id": "payroll",
      "ownerId": "bb78eec5-e3db-4951-8af5-097c81a5874f",
      "done": false,
      "doneAt": null,
      "blockedBy": [
        "register"
      ]
    },
    {
      "id": "courses",
      "ownerId": "a31a1dd1-9214-434e-a00a-db907727f048",
      "done": false,
      "doneAt": null,
      "blockedBy": [
        "contract"
      ]
    },
    {
      "id": "access",
      "ownerId": "15a61181-9564-4cb8-9aef-b3ef3b7ef421",
      "done": false,
      "doneAt": null,
      "blockedBy": [
        "contract"
      ]
    }
  ],
  "revision": 1
}
```

Repeat a request with the same `operationId` after a timeout. The person is hired once.

## Next

-   Do the steps: [Onboard a hire](https://hr.rdcopilot.com/docs/guides/onboard-a-hire/).
-   Receive a message when leave is approved: [Subscriptions](https://hr.rdcopilot.com/docs/events/subscriptions/).
