stabisoDocs

API reference

My employment

Your own employee records: your details, your bank account for pay, what is still needed of you, and the steps of a starter's or leaver's checklist that are yours.

Operation Summary Scope Idempotency-Key
GET /v1/employees/mine My record read
PATCH /v1/employees/mine/{employee_id} Give my details read
PUT /v1/employees/mine/{employee_id}/bank Give my bank account read
GET /v1/employees/rights My rights on people read

GET /v1/employees/mine

My record

The signed-in person's own records, one for each company they work for, with their private details and what is still needed of them.

Required scope read (admin implies every scope)
Operation id my_employment_v1_employees_mine_get

Example request

curl "$ERP_URL/v1/employees/mine" \
  -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
  }
]

PATCH /v1/employees/mine/{employee_id}

Give my details

Your own address, birth date, social insurance number and emergency contact (403 employee_not_yours for someone else's record). An omitted field stays as it is.

Required scope read (admin implies every scope)
Idempotency-Key not used
Operation id give_my_details_v1_employees_mine__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): EmployeeDetailsInput

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)

Example request

curl -X PATCH "$ERP_URL/v1/employees/mine/{employee_id}" \
  -H "Authorization: Bearer $ERP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "birth_date": "1990-04-12",
  "country": "CH",
  "emergency_name": "Jonas Meier",
  "emergency_phone": "+41 79 123 45 67",
  "id_number": "756.1234.5678.97",
  "postal_code": "8002",
  "street": "Seestrasse 12",
  "town": "Zürich"
}'

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/mine/{employee_id}/bank

Give my bank account

The account your pay goes to. It waits for a second person's confirmation in Approvals (409 employee_bank_waiting while one waits); until then the account before stays.

Required scope read (admin implies every scope)
Idempotency-Key not used
Operation id give_my_bank_v1_employees_mine__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/mine/{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/rights

My rights on people

Whether you keep the people's records: add and change employees and see their private details (an administrator, or a role that opens People).

Required scope read (admin implies every scope)
Operation id my_rights_v1_employees_rights_get

Example request

curl "$ERP_URL/v1/employees/rights" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK PeopleRights
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)

{
  "keeps_records": true
}

Schemas

EmployeeDetailsInput

What a person gives of themselves; each field omitted stays as it is, null clears it.

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)

PeopleRights

Field Type Required Description
keeps_records boolean yes Whether the signed-in person keeps the people's records (an administrator, or a role that opens People): adds and changes employees and sees their private details.
Stabiso, the Enterprise System of Record · generated from the code and its guides · release 3262ae655e81