API – Profil zaměstnance¶
Cesty jsou za https://api.innovanet.com. Hlavička Authorization: Bearer inv_mcp_…. Funkce innovanet() je v kapitole Rozhraní API.
Vlastní profil čte GET /api/profile. Cizí profil (GET /api/profile/{id}) a schvalování změn vidí ten, kdo je vidí i v portálu.
POST /api/profile/change-requests¶
Návrh změny vlastního pole. Schválí ho personalista v portálu.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
field_key |
string | ano | klíč pole, nejvýše 100 |
proposed_value |
string | ano | nová hodnota |
reason |
string | ne | důvod, nejvýše 255 |
Požadavek
{
"field_key": "phone",
"proposed_value": "+421900000000",
"reason": "nové firemní číslo"
}
PHP
$res = innovanet('POST', '/api/profile/change-requests', [
'field_key' => 'phone',
'proposed_value' => '+421900000000',
'reason' => 'nové firemní číslo',
]);
Odpověď 201 – request_id a task_id jsou v kořeni, ne v data.
{
"success": true,
"request_id": 7,
"task_id": 44,
"message": "Change request submitted for approval"
}
Chybějící pole vrátí 422 a objekt errors bez success. Seznam vlastních návrhů: GET /api/profile/change-requests.
Ostatní cesty¶
Každá cesta níže patří do tohoto modulu. Názvy polí jsou ty, které API čte. Soubor ke stažení není JSON.
PUT /api/profile/change-requests/{id}/approve¶
Vlastní návrh změny neschválíš sám (403), pokud existuje jiný schvalovatel s oprávněním profile úroveň 1.
Tělo
| Pole | Typ | Povinné |
|---|---|---|
comment |
string | ne |
{
"comment": "text"
}
$res = innovanet('PUT', '/api/profile/change-requests/1/approve', [
'comment' => 'text',
]);
API tato pole čte. Povinnost platí, když je v tabulce ano.
Odpověď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/change-requests/{id}/reject¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
comment |
string | ano |
{
"comment": "text"
}
$res = innovanet('PUT', '/api/profile/change-requests/1/reject', [
'comment' => 'text',
]);
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/audit-export¶
Parametry
| Pole | Typ | Povinné |
|---|---|---|
master_user_id |
integer | ano |
from |
date | ne |
to |
date | ne |
format |
string | ne |
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/qualifications/expiring¶
Parametry
| Pole | Typ | Povinné |
|---|---|---|
days |
string | ne |
API tato pole čte. Povinnost platí, když je v tabulce ano.
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/qualifications¶
Seznam documents obsahuje jen dokumenty kategorií, které smí zobrazený uživatel vidět.
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/qualifications¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
type |
file | ne |
name |
string | ano |
issuer |
string | ne |
reference_number |
string | ne |
level |
string | ne |
issued_date |
date | ne |
valid_until |
date | ne |
document_id |
integer | ne |
note |
string | ne |
{
"name": "text",
"issuer": "text",
"reference_number": "text",
"level": "text",
"issued_date": "2026-11-05",
"valid_until": "2026-11-05",
"document_id": 1,
"note": "text"
}
$res = innovanet('POST', '/api/profile/1/qualifications', [
'name' => 'text',
'issuer' => 'text',
'reference_number' => 'text',
'level' => 'text',
'issued_date' => 'text',
'valid_until' => 'text',
'document_id' => 1,
'note' => 'text',
]);
Soubor se posílá jako multipart, ne v JSON.
Odpověď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/qualifications/{qid}¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
type |
file | ne |
name |
string | ano |
issuer |
string | ne |
reference_number |
string | ne |
level |
string | ne |
issued_date |
date | ne |
valid_until |
date | ne |
document_id |
integer | ne |
note |
string | ne |
{
"name": "text",
"issuer": "text",
"reference_number": "text",
"level": "text",
"issued_date": "2026-11-05",
"valid_until": "2026-11-05",
"document_id": 1,
"note": "text"
}
$res = innovanet('PUT', '/api/profile/1/qualifications/1', [
'name' => 'text',
'issuer' => 'text',
'reference_number' => 'text',
'level' => 'text',
'issued_date' => 'text',
'valid_until' => 'text',
'document_id' => 1,
'note' => 'text',
]);
Soubor se posílá jako multipart, ne v JSON.
Odpověď 200 – Obálka { "success": true, "data": ... }.
DELETE /api/profile/{id}/qualifications/{qid}¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/attendance-settings¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/attendance-settings¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
enabled |
boolean | ano |
employment_type_id |
integer | ne |
legislation |
string | ne |
{
"enabled": true,
"employment_type_id": 1,
"legislation": "text"
}
$res = innovanet('PUT', '/api/profile/1/attendance-settings', [
'enabled' => true,
'employment_type_id' => 1,
'legislation' => 'text',
]);
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/attendance-fonds¶
Parametry
| Pole | Typ | Povinné |
|---|---|---|
year |
string | ne |
API tato pole čte. Povinnost platí, když je v tabulce ano.
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/attendance-fonds¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
reason_id |
integer | ano |
days |
number | ano |
{
"reason_id": 1,
"days": 1
}
$res = innovanet('POST', '/api/profile/1/attendance-fonds', [
'reason_id' => 1,
'days' => 1,
]);
Odpověď 201 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/bulk¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
fields |
array | ano |
reason |
string | ne |
{
"fields": [],
"reason": "text"
}
$res = innovanet('PUT', '/api/profile/1/bulk', [
'fields' => [],
'reason' => 'text',
]);
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/field-history/{fieldKey}¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/changelog¶
Záznamy se filtrují podle pole (changed_field) stejně jako profil: neviditelná pole se nevrátí.
Parametry
| Pole | Typ | Povinné |
|---|---|---|
field |
string | ne |
from |
string | ne |
to |
string | ne |
API tato pole čte. Povinnost platí, když je v tabulce ano.
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/history¶
U události salary_change jsou details (částky) jen pro HR, samotného zaměstnance a jeho přímého nadřízeného; jinak null.
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/history¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
event_type |
string | ano |
event_date |
date | ano |
description |
array | ano |
description.sk |
string | ano |
details |
array | ne |
{
"event_type": "text",
"event_date": "2026-11-05",
"description": [],
"description.sk": "text",
"details": []
}
$res = innovanet('POST', '/api/profile/1/history', [
'event_type' => 'text',
'event_date' => 'text',
'description' => [],
'description.sk' => 'text',
'details' => [],
]);
Odpověď 201 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/assets¶
Seznam majetku, jehož držitelem je daná osoba. Vidí ho jen ona sama, HR a nadřízený, jinak 403. Bez těla.
Odpověď 200 – Pozor, bez obálky success/data:
{
"assets": [
{
"id": 41,
"name": "Notebook Dell Latitude",
"inventory_number": "INV-0041",
"category": "Notebooky",
"serial_number": "SN123456",
"status": "active",
"assigned_date": "2026-03-01",
"return_date": null
}
]
}
status je active nebo inactive, return_date je vždy null.
GET /api/profile/{id}/documents¶
Parametry
| Pole | Typ | Povinné |
|---|---|---|
category_id |
string | ne |
API tato pole čte. Povinnost platí, když je v tabulce ano.
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/documents¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
file |
file | ano |
category_id |
integer | ano |
name |
string | ano |
valid_from |
date | ne |
valid_to |
date | ne |
{
"category_id": 1,
"name": "text",
"valid_from": "2026-11-05",
"valid_to": "2026-11-05"
}
$res = innovanet('POST', '/api/profile/1/documents', [
'category_id' => 1,
'name' => 'text',
'valid_from' => 'text',
'valid_to' => 'text',
]);
Soubor se posílá jako multipart, ne v JSON.
Odpověď 201 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/documents/{docId}/download¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
DELETE /api/profile/{id}/documents/{docId}¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/consents-summary¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/consents¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/consents¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
consent_type |
string | ano |
{
"consent_type": "text"
}
$res = innovanet('POST', '/api/profile/1/consents', [
'consent_type' => 'text',
]);
Odpověď 201 – Obálka { "success": true, "data": ... }.
DELETE /api/profile/{id}/consents/{consentType}¶
Bez těla.
Odpověď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/preferred-name¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
preferred_name |
string | ne |
{
"preferred_name": "text"
}
$res = innovanet('PUT', '/api/profile/1/preferred-name', [
'preferred_name' => 'text',
]);
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/photo¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
photo |
file | ano |
Soubor se posílá jako multipart, ne v JSON.
Odpověď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/terminate¶
Tělo
| Pole | Typ | Povinné |
|---|---|---|
termination_date |
date | ano |
termination_reason |
string | ano |
rehire_eligible |
boolean | ano |
{
"termination_date": "2026-11-05",
"termination_reason": "text",
"rehire_eligible": true
}
$res = innovanet('POST', '/api/profile/1/terminate', [
'termination_date' => 'text',
'termination_reason' => 'text',
'rehire_eligible' => true,
]);
Odpověď 200 – Obálka { "success": true, "data": ... }.
Máte zájem vyzkoušet tuto funkci? Aktivujte si innovanet v zkušební době →