People
People who work for a company: their records (job, contract, work percentage, manager, first and last day), the private details they give, the bank account their pay goes to (confirmed by a second person), the files kept of them and the checklists of their first and last days; the departments across the companies. Private details only for whoever keeps the people's records and the person.
POST /v1/departments
Add a department
Add a department, possibly within another and with its head, an employee of any company
(409 department_name_taken). For an administrator or a role that opens People (403
employee_records_closed). Needs an Idempotency-Key.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | create_department_v1_departments_post |
Request body
application/json (required): DepartmentInput
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Its name, unique in the organization. (min length 1; max length 100) |
parent |
string or null | Name or id of the department it is within; omitted: a department of its own. (max length 100) | |
head |
string (uuid) or null | Employee id (GET /v1/employees) of who heads it, of any company; omitted: nobody yet. |
Example request
curl -X POST "$ERP_URL/v1/departments" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Consulting"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | DepartmentOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"parent": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"head_left": true,
"people": 1
}
PATCH /v1/departments/{department_id}
Change a department
Rename it, move it within another (never within itself or one within it: 422
department_parent_invalid), or give it a new head.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | update_department_v1_departments__department_id__patch |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | department_id |
string (uuid) | yes | Id of the department (GET /v1/departments). |
Request body
application/json (required): DepartmentUpdate
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | Its name. (min length 1; max length 100) | |
parent |
string or null | Name or id of the department it is within; null: a department of its own. (max length 100) | |
head |
string (uuid) or null | Employee id of who heads it, of any company; null: nobody. |
Example request
curl -X PATCH "$ERP_URL/v1/departments/{department_id}" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | DepartmentOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"parent": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"head_left": true,
"people": 1
}
DELETE /v1/departments/{department_id}
Remove a department
Remove it: its people and the departments within it then belong to the department it was in, or to none.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | remove_department_v1_departments__department_id__delete |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | department_id |
string (uuid) | yes | Id of the department (GET /v1/departments). |
Example request
curl -X DELETE "$ERP_URL/v1/departments/{department_id}" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | No content | |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
GET /v1/employees
List employees
Who works for the companies, by last name: number, job, manager, first and last day. Private details, the bank account and the files only for whoever keeps the people's records (and each person's own).
| Required scope | read (admin implies every scope) |
| Operation id | list_employees_v1_employees_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | entity |
string or null | Only this company's (code or id). | |
| query | status |
"active" | "leaving" | "left" | "starting" or null |
Only starting, active, leaving or left. |
|
| query | q |
string or null | Text in the name, number or job title. |
Example request
curl "$ERP_URL/v1/employees" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of EmployeeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"number": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"job_title": "string",
"work_email": "string",
"start_date": "2026-09-21",
"end_date": "2026-09-21",
"status": "active",
"contract": "apprentice",
"work_percent": "string",
"manager": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"name": "string"
},
"department": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"department_head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"heads": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
],
"user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sign_in_status": "string",
"sign_in_ends": "2026-09-21T09:30:00Z",
"private": {
"birth_date": null,
"private_email": null,
"phone": null,
"street": null,
"postal_code": null,
"town": null,
"country": null,
"subdivision": null,
"nationality": null,
"id_number": null,
"emergency_name": null,
"emergency_phone": null
},
"bank": {
"holder": "string",
"account": "string"
},
"bank_change": {
"holder": "string",
"account": "string",
"given_by": "string",
"given_at": "2026-09-21T09:30:00Z",
"approval_id": null,
"iban": null,
"routing_number": null,
"account_number": null,
"also_paid_to": []
},
"missing": [
"string"
],
"files": 1
}
]
POST /v1/employees
Add an employee
Add a person who works for a company: their name, job and first day; their number is the
next one (E-00001). What they give of themselves can follow, by them or by you; missing
says what is still needed before they are paid. A bank account given here waits for a
second person's confirmation. For an administrator or a role that opens People (403
employee_records_closed). Needs an Idempotency-Key.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | create_employee_v1_employees_post |
Request body
application/json (required): EmployeeInput
| Field | Type | Required | Description |
|---|---|---|---|
birth_date |
string (date) or null | Date of birth. | |
private_email |
string or null | Private e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
phone |
string or null | Private phone number. (max length 40) | |
street |
string or null | Home street and number. (max length 200) | |
postal_code |
string or null | Home postal code. (max length 20) | |
town |
string or null | Home town. (max length 100) | |
country |
string or null | Home country: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
subdivision |
string or null | The state, canton or province, as the address country writes it (TX, ZH). (max length 10) |
|
nationality |
string or null | Nationality: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
id_number |
string or null | The social insurance number the company's country asks for: the AHV number in Switzerland (756.1234.5678.97), the Social Security number in the US (123-45-6789); checked. (max length 40) |
|
emergency_name |
string or null | Who to call in an emergency. (max length 200) | |
emergency_phone |
string or null | Their phone number. (max length 40) | |
entity |
string | yes | Code (or id) of the company they work for. (min length 1) |
first_name |
string | yes | First name. (min length 1; max length 100) |
last_name |
string | yes | Last name. (min length 1; max length 100) |
job_title |
string | yes | What they do: Consultant. (min length 1; max length 200) |
start_date |
string (date) | yes | Their first day of work. |
end_date |
string (date) or null | Their last day, for a fixed term; omitted: open-ended. | |
work_email |
string or null | Their work e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
contract |
"apprentice" | "fixed_term" | "hourly" | "intern" | "permanent" |
permanent (default), fixed_term, hourly, apprentice or intern. (default "permanent") |
|
work_percent |
decimal string | How much of a full-time week they work, in per cent: 100, 80. (max 100; greater than 0; default "100") |
|
manager |
string or null | Number (E-00001) or id of the employee they report to, in the same company. |
|
department |
string or null | Name or id of the department they work in (GET /v1/departments), of any company; null: none. (max length 100) |
|
user |
string (uuid) or null | Id of the person's sign-in (GET /v1/people): they then see and fill in their own record. |
|
iban |
string or null | The IBAN pay goes to; confirmed by a second person before it is used. (max length 42) | |
routing_number |
string or null | A US account's ABA routing number, a UK account's sort code. (max length 20) | |
account_number |
string or null | A US or UK account's account number. (max length 30) | |
account_type |
"checking" | "savings" or null |
A US account: checking (default) or savings. |
Example request
curl -X POST "$ERP_URL/v1/employees" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"entity": "CH01",
"first_name": "Lena",
"job_title": "Consultant",
"last_name": "Meier",
"start_date": "2026-12-01"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | EmployeeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"number": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"job_title": "string",
"work_email": "string",
"start_date": "2026-09-21",
"end_date": "2026-09-21",
"status": "active",
"contract": "apprentice",
"work_percent": "string",
"manager": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"name": "string"
},
"department": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"department_head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"heads": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
],
"user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sign_in_status": "string",
"sign_in_ends": "2026-09-21T09:30:00Z",
"private": {
"birth_date": "2026-09-21",
"private_email": "string",
"phone": "string",
"street": "string",
"postal_code": "string",
"town": "string",
"country": "string",
"subdivision": "string",
"nationality": "string",
"id_number": "string",
"emergency_name": "string",
"emergency_phone": "string"
},
"bank": {
"holder": "string",
"account": "string"
},
"bank_change": {
"holder": "string",
"account": "string",
"given_by": "string",
"given_at": "2026-09-21T09:30:00Z",
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"iban": "string",
"routing_number": "string",
"account_number": "string",
"also_paid_to": [
"string"
]
},
"missing": [
"string"
],
"files": 1
}
GET /v1/employees/steps/waiting
Steps waiting on me
The open steps of starters and leavers that are yours to do, soonest first: whoever keeps the people's records gets theirs, a manager those of their people, everyone their own.
| Required scope | read (admin implies every scope) |
| Operation id | steps_waiting_v1_employees_steps_waiting_get |
Example request
curl "$ERP_URL/v1/employees/steps/waiting" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of EmployeeStepWaitingOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"key": "string",
"journey": "leave",
"who": "keeper",
"due_on": "2026-09-21",
"overdue": true,
"done": true,
"by_system": true,
"done_by": "string",
"done_at": "2026-09-21T09:30:00Z",
"may_tick": true,
"employee": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"name": "string"
},
"entity": "string"
}
]
GET /v1/employees/{employee_id}
Get an employee
The employee, with their private details for whoever may see them.
| Required scope | read (admin implies every scope) |
| Operation id | get_employee_v1_employees__employee_id__get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
Example request
curl "$ERP_URL/v1/employees/{employee_id}" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | EmployeeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"number": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"job_title": "string",
"work_email": "string",
"start_date": "2026-09-21",
"end_date": "2026-09-21",
"status": "active",
"contract": "apprentice",
"work_percent": "string",
"manager": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"name": "string"
},
"department": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"department_head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"heads": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
],
"user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sign_in_status": "string",
"sign_in_ends": "2026-09-21T09:30:00Z",
"private": {
"birth_date": "2026-09-21",
"private_email": "string",
"phone": "string",
"street": "string",
"postal_code": "string",
"town": "string",
"country": "string",
"subdivision": "string",
"nationality": "string",
"id_number": "string",
"emergency_name": "string",
"emergency_phone": "string"
},
"bank": {
"holder": "string",
"account": "string"
},
"bank_change": {
"holder": "string",
"account": "string",
"given_by": "string",
"given_at": "2026-09-21T09:30:00Z",
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"iban": "string",
"routing_number": "string",
"account_number": "string",
"also_paid_to": [
"string"
]
},
"missing": [
"string"
],
"files": 1
}
PATCH /v1/employees/{employee_id}
Change an employee
Their name, job, contract, work percentage, manager, sign-in, private details, or their last day (a leaver keeps their record). For an administrator or a role that opens People. When an administrator gives the last day of someone with a sign-in, their access ends at midnight after it, in the company's time (and taking the day back takes that end back).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | update_employee_v1_employees__employee_id__patch |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
Request body
application/json (required): EmployeeUpdate
| Field | Type | Required | Description |
|---|---|---|---|
birth_date |
string (date) or null | Date of birth. | |
private_email |
string or null | Private e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
phone |
string or null | Private phone number. (max length 40) | |
street |
string or null | Home street and number. (max length 200) | |
postal_code |
string or null | Home postal code. (max length 20) | |
town |
string or null | Home town. (max length 100) | |
country |
string or null | Home country: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
subdivision |
string or null | The state, canton or province, as the address country writes it (TX, ZH). (max length 10) |
|
nationality |
string or null | Nationality: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
id_number |
string or null | The social insurance number the company's country asks for: the AHV number in Switzerland (756.1234.5678.97), the Social Security number in the US (123-45-6789); checked. (max length 40) |
|
emergency_name |
string or null | Who to call in an emergency. (max length 200) | |
emergency_phone |
string or null | Their phone number. (max length 40) | |
first_name |
string or null | First name. (min length 1; max length 100) | |
last_name |
string or null | Last name. (min length 1; max length 100) | |
job_title |
string or null | What they do. (min length 1; max length 200) | |
start_date |
string (date) or null | Their first day of work. | |
end_date |
string (date) or null | Their last day: a leaving date, or the end of a fixed term. | |
work_email |
string or null | Their work e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
contract |
"apprentice" | "fixed_term" | "hourly" | "intern" | "permanent" or null |
The kind of contract. | |
work_percent |
decimal string or null | How much of a full-time week they work, in per cent: 100, 80. (max 100; greater than 0) |
|
manager |
string or null | Number (E-00001) or id of the employee they report to, in the same company. |
|
department |
string or null | Name or id of the department they work in (GET /v1/departments), of any company; null: none. (max length 100) |
|
user |
string (uuid) or null | Id of the person's sign-in (GET /v1/people): they then see and fill in their own record. |
Example request
curl -X PATCH "$ERP_URL/v1/employees/{employee_id}" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"job_title": "Senior consultant",
"work_percent": "80"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | EmployeeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"number": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"job_title": "string",
"work_email": "string",
"start_date": "2026-09-21",
"end_date": "2026-09-21",
"status": "active",
"contract": "apprentice",
"work_percent": "string",
"manager": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"name": "string"
},
"department": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"department_head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"heads": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
],
"user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sign_in_status": "string",
"sign_in_ends": "2026-09-21T09:30:00Z",
"private": {
"birth_date": "2026-09-21",
"private_email": "string",
"phone": "string",
"street": "string",
"postal_code": "string",
"town": "string",
"country": "string",
"subdivision": "string",
"nationality": "string",
"id_number": "string",
"emergency_name": "string",
"emergency_phone": "string"
},
"bank": {
"holder": "string",
"account": "string"
},
"bank_change": {
"holder": "string",
"account": "string",
"given_by": "string",
"given_at": "2026-09-21T09:30:00Z",
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"iban": "string",
"routing_number": "string",
"account_number": "string",
"also_paid_to": [
"string"
]
},
"missing": [
"string"
],
"files": 1
}
PUT /v1/employees/{employee_id}/bank
Give an employee's bank account
A new account for their pay, waiting for a second person (not you, not them) in Approvals; until then the account before stays.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | give_bank_v1_employees__employee_id__bank_put |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
Request body
application/json (required): EmployeeBankInput
| Field | Type | Required | Description |
|---|---|---|---|
holder |
string | yes | Whose account it is, as the bank has it. (min length 1; max length 200) |
iban |
string or null | The IBAN, spaces allowed. (max length 42) | |
routing_number |
string or null | A US account's ABA routing number, a UK account's sort code. (max length 20) | |
account_number |
string or null | A US or UK account's account number. (max length 30) | |
account_type |
"checking" | "savings" or null |
A US account: checking (default) or savings. |
Example request
curl -X PUT "$ERP_URL/v1/employees/{employee_id}/bank" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"holder": "Lena Meier",
"iban": "CH93 0076 2011 6238 5295 7"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | EmployeeOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"number": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"job_title": "string",
"work_email": "string",
"start_date": "2026-09-21",
"end_date": "2026-09-21",
"status": "active",
"contract": "apprentice",
"work_percent": "string",
"manager": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "string",
"name": "string"
},
"department": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"department_head": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entity": "string",
"company": "string",
"number": "string",
"name": "string"
},
"heads": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
],
"user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sign_in_status": "string",
"sign_in_ends": "2026-09-21T09:30:00Z",
"private": {
"birth_date": "2026-09-21",
"private_email": "string",
"phone": "string",
"street": "string",
"postal_code": "string",
"town": "string",
"country": "string",
"subdivision": "string",
"nationality": "string",
"id_number": "string",
"emergency_name": "string",
"emergency_phone": "string"
},
"bank": {
"holder": "string",
"account": "string"
},
"bank_change": {
"holder": "string",
"account": "string",
"given_by": "string",
"given_at": "2026-09-21T09:30:00Z",
"approval_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"iban": "string",
"routing_number": "string",
"account_number": "string",
"also_paid_to": [
"string"
]
},
"missing": [
"string"
],
"files": 1
}
GET /v1/employees/{employee_id}/files
List an employee's files
The files kept of them, newest first: for them and whoever keeps the records.
| Required scope | read (admin implies every scope) |
| Operation id | list_files_v1_employees__employee_id__files_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
Example request
curl "$ERP_URL/v1/employees/{employee_id}/files" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of EmployeeFileOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"employee_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "certificate",
"title": "string",
"filename": "string",
"content_type": "string",
"size": 1,
"expires_on": "2026-09-21",
"created_by": "string",
"created_at": "2026-09-21T09:30:00Z"
}
]
POST /v1/employees/{employee_id}/files
Add a file to an employee
Keep a file of the employee (by them, or whoever keeps the records).
| Required scope | read (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | add_file_v1_employees__employee_id__files_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
Request body
multipart/form-data (required): Body_add_file_v1_employees__employee_id__files_post
| Field | Type | Required | Description |
|---|---|---|---|
file |
string | yes | A PDF or a photo (JPEG, PNG, WebP); at most 20 MB. |
kind |
"certificate" | "contract" | "identity" | "other" | "permit" |
yes | contract, identity, permit, certificate or other. |
title |
string or null | What it is; default its file name. | |
expires_on |
string (date) or null | When it expires (a permit). |
Example request
curl -X POST "$ERP_URL/v1/employees/{employee_id}/files" \
-H "Authorization: Bearer $ERP_KEY" \
-F "file=@statement.xml" \
-F "kind=certificate"
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | EmployeeFileOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"employee_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "certificate",
"title": "string",
"filename": "string",
"content_type": "string",
"size": 1,
"expires_on": "2026-09-21",
"created_by": "string",
"created_at": "2026-09-21T09:30:00Z"
}
GET /v1/employees/{employee_id}/files/{file_id}
Download an employee's file
The file byte for byte (SHA-256 in X-Content-SHA256).
| Required scope | read (admin implies every scope) |
| Operation id | download_file_v1_employees__employee_id__files__file_id__get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
| path | file_id |
string (uuid) | yes | Id of the file (GET .../files). |
| query | download |
boolean | true: as an attachment; default inline. (default false) |
Example request
curl "$ERP_URL/v1/employees/{employee_id}/files/{file_id}" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The file as it was sent. | application/pdf, application/xml, text/xml, image/png, image/jpeg, image/webp |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
DELETE /v1/employees/{employee_id}/files/{file_id}
Remove an employee's file
No longer keep the file (whoever keeps the records).
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | remove_file_v1_employees__employee_id__files__file_id__delete |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
| path | file_id |
string (uuid) | yes | Id of the file (GET .../files). |
Example request
curl -X DELETE "$ERP_URL/v1/employees/{employee_id}/files/{file_id}" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | No content | |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
GET /v1/employees/{employee_id}/steps
List an employee's first and last days
The checklist of their first days (until a month after its last step was due) and, once
their last day is known, of their last days: each step with its day, whose it is and
whether it is done. For whoever keeps the records, the person and their manager (403
employee_records_closed).
| Required scope | read (admin implies every scope) |
| Operation id | list_steps_v1_employees__employee_id__steps_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
Example request
curl "$ERP_URL/v1/employees/{employee_id}/steps" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of EmployeeStepOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"key": "string",
"journey": "leave",
"who": "keeper",
"due_on": "2026-09-21",
"overdue": true,
"done": true,
"by_system": true,
"done_by": "string",
"done_at": "2026-09-21T09:30:00Z",
"may_tick": true
}
]
PUT /v1/employees/{employee_id}/steps/{step}
Tick a step done
Mark the step done; ticking it again changes nothing. The person ticks their own steps,
the manager theirs, whoever keeps the records any (403 step_not_yours); the system's
steps tick themselves from the record (409 step_by_system).
| Required scope | read (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | tick_step_v1_employees__employee_id__steps__step__put |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
| path | step |
string | yes | The step's key (GET /v1/employees/{employee_id}/steps), e.g. welcome_talk. (max length 60) |
Example request
curl -X PUT "$ERP_URL/v1/employees/{employee_id}/steps/{step}" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of EmployeeStepOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"key": "string",
"journey": "leave",
"who": "keeper",
"due_on": "2026-09-21",
"overdue": true,
"done": true,
"by_system": true,
"done_by": "string",
"done_at": "2026-09-21T09:30:00Z",
"may_tick": true
}
]
DELETE /v1/employees/{employee_id}/steps/{step}
Take a step's tick back
Mark the step open again, as whoever may tick it.
| Required scope | read (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | untick_step_v1_employees__employee_id__steps__step__delete |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | employee_id |
string (uuid) | yes | Id of the employee (GET /v1/employees). |
| path | step |
string | yes | The step's key (GET /v1/employees/{employee_id}/steps), e.g. welcome_talk. (max length 60) |
Example request
curl -X DELETE "$ERP_URL/v1/employees/{employee_id}/steps/{step}" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of EmployeeStepOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"key": "string",
"journey": "leave",
"who": "keeper",
"due_on": "2026-09-21",
"overdue": true,
"done": true,
"by_system": true,
"done_by": "string",
"done_at": "2026-09-21T09:30:00Z",
"may_tick": true
}
]
Schemas
Body_add_file_v1_employees__employee_id__files_post
| Field | Type | Required | Description |
|---|---|---|---|
file |
string | yes | A PDF or a photo (JPEG, PNG, WebP); at most 20 MB. |
kind |
"certificate" | "contract" | "identity" | "other" | "permit" |
yes | contract, identity, permit, certificate or other. |
title |
string or null | What it is; default its file name. | |
expires_on |
string (date) or null | When it expires (a permit). |
DepartmentInput
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Its name, unique in the organization. (min length 1; max length 100) |
parent |
string or null | Name or id of the department it is within; omitted: a department of its own. (max length 100) | |
head |
string (uuid) or null | Employee id (GET /v1/employees) of who heads it, of any company; omitted: nobody yet. |
DepartmentUpdate
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | Its name. (min length 1; max length 100) | |
parent |
string or null | Name or id of the department it is within; null: a department of its own. (max length 100) | |
head |
string (uuid) or null | Employee id of who heads it, of any company; null: nobody. |
EmployeeFileOut
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | The file's id. |
employee_id |
string (uuid) | yes | The employee it is kept for. |
kind |
"certificate" | "contract" | "identity" | "other" | "permit" |
yes | contract, identity, permit, certificate or other. |
title |
string | yes | What the file is. |
filename |
string | yes | The name of the file as it was added. |
content_type |
string | yes | Its media type: application/pdf, image/jpeg, image/png or image/webp. |
size |
integer | yes | Its size in bytes. |
expires_on |
string (date) or null | yes | The day a permit or an ID expires; null when it does not. |
created_by |
string | yes | Who added it. |
created_at |
string (date-time) | yes | When it was added. |
EmployeeInput
| Field | Type | Required | Description |
|---|---|---|---|
birth_date |
string (date) or null | Date of birth. | |
private_email |
string or null | Private e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
phone |
string or null | Private phone number. (max length 40) | |
street |
string or null | Home street and number. (max length 200) | |
postal_code |
string or null | Home postal code. (max length 20) | |
town |
string or null | Home town. (max length 100) | |
country |
string or null | Home country: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
subdivision |
string or null | The state, canton or province, as the address country writes it (TX, ZH). (max length 10) |
|
nationality |
string or null | Nationality: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
id_number |
string or null | The social insurance number the company's country asks for: the AHV number in Switzerland (756.1234.5678.97), the Social Security number in the US (123-45-6789); checked. (max length 40) |
|
emergency_name |
string or null | Who to call in an emergency. (max length 200) | |
emergency_phone |
string or null | Their phone number. (max length 40) | |
entity |
string | yes | Code (or id) of the company they work for. (min length 1) |
first_name |
string | yes | First name. (min length 1; max length 100) |
last_name |
string | yes | Last name. (min length 1; max length 100) |
job_title |
string | yes | What they do: Consultant. (min length 1; max length 200) |
start_date |
string (date) | yes | Their first day of work. |
end_date |
string (date) or null | Their last day, for a fixed term; omitted: open-ended. | |
work_email |
string or null | Their work e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
contract |
"apprentice" | "fixed_term" | "hourly" | "intern" | "permanent" |
permanent (default), fixed_term, hourly, apprentice or intern. (default "permanent") |
|
work_percent |
decimal string | How much of a full-time week they work, in per cent: 100, 80. (max 100; greater than 0; default "100") |
|
manager |
string or null | Number (E-00001) or id of the employee they report to, in the same company. |
|
department |
string or null | Name or id of the department they work in (GET /v1/departments), of any company; null: none. (max length 100) |
|
user |
string (uuid) or null | Id of the person's sign-in (GET /v1/people): they then see and fill in their own record. |
|
iban |
string or null | The IBAN pay goes to; confirmed by a second person before it is used. (max length 42) | |
routing_number |
string or null | A US account's ABA routing number, a UK account's sort code. (max length 20) | |
account_number |
string or null | A US or UK account's account number. (max length 30) | |
account_type |
"checking" | "savings" or null |
A US account: checking (default) or savings. |
EmployeeRef
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | The employee's id. |
number |
string | yes | Their employee number, E-00001. |
name |
string | yes | Their first and last name. |
EmployeeStepOut
| Field | Type | Required | Description |
|---|---|---|---|
key |
string | yes | The step: contract_signed, sign_in, workplace_ready, details, bank, social_insurance_ch, tax_form_us, work_eligibility_us, welcome_talk, first_month_talk, exit_talk, last_pay, reference_letter, return_items, access_end. |
journey |
"leave" | "start" |
yes | start (a starter's first days) or leave (a leaver's last). |
who |
"keeper" | "manager" | "person" |
yes | Whose step it is: keeper (whoever keeps the people's records), person (the employee) or manager. |
due_on |
string (date) | yes | The day it is due, from the first or the last day. |
overdue |
boolean | yes | Whether its day passed (the company's day) and it is open. |
done |
boolean | yes | Whether it is done. |
by_system |
boolean | yes | Whether the system ticks it itself, from the record (a sign-in linked, the details or the bank account given, the sign-in ending after the last day). |
done_by |
string or null | yes | Who ticked it; null for the system's steps. |
done_at |
string (date-time) or null | yes | When it was ticked. |
may_tick |
boolean | yes | Whether you may tick it (or take the tick back). |
EmployeeStepWaitingOut
| Field | Type | Required | Description |
|---|---|---|---|
key |
string | yes | The step: contract_signed, sign_in, workplace_ready, details, bank, social_insurance_ch, tax_form_us, work_eligibility_us, welcome_talk, first_month_talk, exit_talk, last_pay, reference_letter, return_items, access_end. |
journey |
"leave" | "start" |
yes | start (a starter's first days) or leave (a leaver's last). |
who |
"keeper" | "manager" | "person" |
yes | Whose step it is: keeper (whoever keeps the people's records), person (the employee) or manager. |
due_on |
string (date) | yes | The day it is due, from the first or the last day. |
overdue |
boolean | yes | Whether its day passed (the company's day) and it is open. |
done |
boolean | yes | Whether it is done. |
by_system |
boolean | yes | Whether the system ticks it itself, from the record (a sign-in linked, the details or the bank account given, the sign-in ending after the last day). |
done_by |
string or null | yes | Who ticked it; null for the system's steps. |
done_at |
string (date-time) or null | yes | When it was ticked. |
may_tick |
boolean | yes | Whether you may tick it (or take the tick back). |
employee |
EmployeeRef |
yes | The employee the step is for. |
entity |
string | yes | The code of their company. |
EmployeeUpdate
| Field | Type | Required | Description |
|---|---|---|---|
birth_date |
string (date) or null | Date of birth. | |
private_email |
string or null | Private e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
phone |
string or null | Private phone number. (max length 40) | |
street |
string or null | Home street and number. (max length 200) | |
postal_code |
string or null | Home postal code. (max length 20) | |
town |
string or null | Home town. (max length 100) | |
country |
string or null | Home country: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
subdivision |
string or null | The state, canton or province, as the address country writes it (TX, ZH). (max length 10) |
|
nationality |
string or null | Nationality: ISO 3166-1 alpha-2 code, e.g. CH. (pattern ^[A-Za-z]{2}$) |
|
id_number |
string or null | The social insurance number the company's country asks for: the AHV number in Switzerland (756.1234.5678.97), the Social Security number in the US (123-45-6789); checked. (max length 40) |
|
emergency_name |
string or null | Who to call in an emergency. (max length 200) | |
emergency_phone |
string or null | Their phone number. (max length 40) | |
first_name |
string or null | First name. (min length 1; max length 100) | |
last_name |
string or null | Last name. (min length 1; max length 100) | |
job_title |
string or null | What they do. (min length 1; max length 200) | |
start_date |
string (date) or null | Their first day of work. | |
end_date |
string (date) or null | Their last day: a leaving date, or the end of a fixed term. | |
work_email |
string or null | Their work e-mail address. (max length 320; pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$) |
|
contract |
"apprentice" | "fixed_term" | "hourly" | "intern" | "permanent" or null |
The kind of contract. | |
work_percent |
decimal string or null | How much of a full-time week they work, in per cent: 100, 80. (max 100; greater than 0) |
|
manager |
string or null | Number (E-00001) or id of the employee they report to, in the same company. |
|
department |
string or null | Name or id of the department they work in (GET /v1/departments), of any company; null: none. (max length 100) |
|
user |
string (uuid) or null | Id of the person's sign-in (GET /v1/people): they then see and fill in their own record. |