API – Profil zamestnanca¶
Cesty sú za https://api.innovanet.com. Hlavička Authorization: Bearer inv_mcp_…. Funkcia innovanet() je v kapitole Rozhranie API.
Vlastný profil číta GET /api/profile. Cudzí profil (GET /api/profile/{id}) a schvaľovanie zmien vidí ten, kto ich vidí aj v portáli.
POST /api/profile/change-requests¶
Návrh zmeny vlastného poľa. Schváli ho personalista v portáli.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
field_key |
string | áno | kľúč poľa, najviac 100 |
proposed_value |
string | áno | nová hodnota |
reason |
string | nie | dôvod, najviac 255 |
Požiadavka
{
"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',
]);
Odpoveď 201 – request_id a task_id sú v koreni, nie v data.
{
"success": true,
"request_id": 7,
"task_id": 44,
"message": "Change request submitted for approval"
}
Chýbajúce pole vráti 422 a objekt errors bez success. Zoznam vlastných návrhov: GET /api/profile/change-requests.
Ostatné cesty¶
Každá cesta nižšie je súčasťou tohto modulu. Názvy polí sú tie, ktoré API číta. Súbor na stiahnutie nie je JSON.
PUT /api/profile/change-requests/{id}/approve¶
Vlastný návrh zmeny neschváliš sám (403), ak existuje iný schvaľovateľ s oprávnením profile úroveň 1.
Telo
| Pole | Typ | Povinné |
|---|---|---|
comment |
string | nie |
{
"comment": "text"
}
$res = innovanet('PUT', '/api/profile/change-requests/1/approve', [
'comment' => 'text',
]);
API tieto polia číta. Povinnosť platí, keď je v tabuľke áno.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/change-requests/{id}/reject¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
comment |
string | áno |
{
"comment": "text"
}
$res = innovanet('PUT', '/api/profile/change-requests/1/reject', [
'comment' => 'text',
]);
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/audit-export¶
Parametre
| Pole | Typ | Povinné |
|---|---|---|
master_user_id |
integer | áno |
from |
date | nie |
to |
date | nie |
format |
string | nie |
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/qualifications/expiring¶
Parametre
| Pole | Typ | Povinné |
|---|---|---|
days |
string | nie |
API tieto polia číta. Povinnosť platí, keď je v tabuľke áno.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/qualifications¶
Zoznam documents obsahuje len dokumenty kategórií, ktoré smie zobrazený používateľ vidieť.
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/qualifications¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
type |
file | nie |
name |
string | áno |
issuer |
string | nie |
reference_number |
string | nie |
level |
string | nie |
issued_date |
date | nie |
valid_until |
date | nie |
document_id |
integer | nie |
note |
string | nie |
{
"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',
]);
Súbor sa posiela ako multipart, nie v JSON.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/qualifications/{qid}¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
type |
file | nie |
name |
string | áno |
issuer |
string | nie |
reference_number |
string | nie |
level |
string | nie |
issued_date |
date | nie |
valid_until |
date | nie |
document_id |
integer | nie |
note |
string | nie |
{
"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',
]);
Súbor sa posiela ako multipart, nie v JSON.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
DELETE /api/profile/{id}/qualifications/{qid}¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/attendance-settings¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/attendance-settings¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
enabled |
boolean | áno |
employment_type_id |
integer | nie |
legislation |
string | nie |
{
"enabled": true,
"employment_type_id": 1,
"legislation": "text"
}
$res = innovanet('PUT', '/api/profile/1/attendance-settings', [
'enabled' => true,
'employment_type_id' => 1,
'legislation' => 'text',
]);
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/attendance-fonds¶
Parametre
| Pole | Typ | Povinné |
|---|---|---|
year |
string | nie |
API tieto polia číta. Povinnosť platí, keď je v tabuľke áno.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/attendance-fonds¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
reason_id |
integer | áno |
days |
number | áno |
{
"reason_id": 1,
"days": 1
}
$res = innovanet('POST', '/api/profile/1/attendance-fonds', [
'reason_id' => 1,
'days' => 1,
]);
Odpoveď 201 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/bulk¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
fields |
array | áno |
reason |
string | nie |
{
"fields": [],
"reason": "text"
}
$res = innovanet('PUT', '/api/profile/1/bulk', [
'fields' => [],
'reason' => 'text',
]);
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/field-history/{fieldKey}¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/changelog¶
Záznamy sa filtrujú podľa poľa (changed_field) rovnako ako profil: neviditeľné polia sa nevrátia.
Parametre
| Pole | Typ | Povinné |
|---|---|---|
field |
string | nie |
from |
string | nie |
to |
string | nie |
API tieto polia číta. Povinnosť platí, keď je v tabuľke áno.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/history¶
Pri udalosti salary_change sú details (sumy) len pre HR, samotného zamestnanca a jeho priameho nadriadeného; inak null.
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/history¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
event_type |
string | áno |
event_date |
date | áno |
description |
array | áno |
description.sk |
string | áno |
details |
array | nie |
{
"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' => [],
]);
Odpoveď 201 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/assets¶
Zoznam majetku, ktorého držiteľom je daná osoba. Vidí ho len ona sama, HR a nadriadený, inak 403. Bez tela.
Odpoveď 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 alebo inactive, return_date je vždy null.
GET /api/profile/{id}/documents¶
Parametre
| Pole | Typ | Povinné |
|---|---|---|
category_id |
string | nie |
API tieto polia číta. Povinnosť platí, keď je v tabuľke áno.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/documents¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
file |
file | áno |
category_id |
integer | áno |
name |
string | áno |
valid_from |
date | nie |
valid_to |
date | nie |
{
"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',
]);
Súbor sa posiela ako multipart, nie v JSON.
Odpoveď 201 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/documents/{docId}/download¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
DELETE /api/profile/{id}/documents/{docId}¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/consents-summary¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
GET /api/profile/{id}/consents¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/consents¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
consent_type |
string | áno |
{
"consent_type": "text"
}
$res = innovanet('POST', '/api/profile/1/consents', [
'consent_type' => 'text',
]);
Odpoveď 201 – Obálka { "success": true, "data": ... }.
DELETE /api/profile/{id}/consents/{consentType}¶
Bez tela.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
PUT /api/profile/{id}/preferred-name¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
preferred_name |
string | nie |
{
"preferred_name": "text"
}
$res = innovanet('PUT', '/api/profile/1/preferred-name', [
'preferred_name' => 'text',
]);
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/photo¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
photo |
file | áno |
Súbor sa posiela ako multipart, nie v JSON.
Odpoveď 200 – Obálka { "success": true, "data": ... }.
POST /api/profile/{id}/terminate¶
Telo
| Pole | Typ | Povinné |
|---|---|---|
termination_date |
date | áno |
termination_reason |
string | áno |
rehire_eligible |
boolean | áno |
{
"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,
]);
Odpoveď 200 – Obálka { "success": true, "data": ... }.
Máte záujem vyskúšať túto funkciu? Aktivujte si innovanet v skúšobnej dobe →