Profili
Ažuriraj profil
Ažuriraj postojeći profil pacijenta
PATCH
/
api
/
v1
/
profiles
/
{id}
curl --request PATCH \
--url https://anivahealth.com/api/v1/profiles/a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+4917612345678",
"language": "en"
}'
{
"id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"handle": null,
"first_name": "Maria",
"last_name": "Schmidt",
"email": "maria.schmidt@example.com",
"phone": "+4917612345678",
"sex": 2,
"date_of_birth": "1985-03-22",
"height": 168,
"weight": 65,
"language": "en",
"transactional_emails_enabled": true,
"created_at": "2026-04-01T09:14:32Z",
"updated_at": "2026-04-01T14:22:11Z"
}
{
"error": "phone: Phone must be in E.164 format (e.g., +14155552671)"
}
{
"error": "Profile not found"
}
Ažuriraj jedno ili više polja na postojećem profilu pacijenta. Trebaš uključiti samo polja koja želiš promijeniti — svi parametri u tijelu zahtjeva su neobavezni.
Zahtijeva opseg
create_user.
Zahtjev
Parametri putanje
Parametri tijela
Nova vrijednost biološkog spola prema ISO/IEC 5218 (
1 = muški, 2 = ženski). 0 (nepoznato) vraća 400.Novi datum rođenja u formatu
YYYY-MM-DD. Mora biti u prošlosti i ne prije 1900. godine. Izračunata
dob mora biti između 16 i 100 godina.Novi željeni jezik:
en, bg, ca, cs, da, de, el, es, et, fi, fr, ga, hr, hu, is, it, lb, lt, lv, mt, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, tr ili uk.Treba li ovaj profil primati transakcijske (programatske) e-mailove — potvrde
termina, obavijesti o gotovim rezultatima itd. Odvojeno od privole za marketing. Izostavi da zadržiš
trenutnu vrijednost.
Odgovor
U slučaju uspjeha, API vraća200 OK s cijelim ažuriranim profilom.
Biološki spol prema normi ISO/IEC 5218 (
0 = nepoznato, 1 = muški, 2 = ženski). Može biti null.Odgovori s pogreškama
| Status | Opis |
|---|---|
400 | Pogreška validacije — jedno ili više polja nije prošlo validaciju. |
403 | Zabranjeno — tvoj API ključ nema pristup ovoj operaciji ili je profil izvan tvog konteksta pristupa. |
404 | Profil nije pronađen. |
500 | Interna pogreška poslužitelja. |
curl --request PATCH \
--url https://anivahealth.com/api/v1/profiles/a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+4917612345678",
"language": "en"
}'
{
"id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"handle": null,
"first_name": "Maria",
"last_name": "Schmidt",
"email": "maria.schmidt@example.com",
"phone": "+4917612345678",
"sex": 2,
"date_of_birth": "1985-03-22",
"height": 168,
"weight": 65,
"language": "en",
"transactional_emails_enabled": true,
"created_at": "2026-04-01T09:14:32Z",
"updated_at": "2026-04-01T14:22:11Z"
}
{
"error": "phone: Phone must be in E.164 format (e.g., +14155552671)"
}
{
"error": "Profile not found"
}
⌘I
curl --request PATCH \
--url https://anivahealth.com/api/v1/profiles/a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phone": "+4917612345678",
"language": "en"
}'
{
"id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"handle": null,
"first_name": "Maria",
"last_name": "Schmidt",
"email": "maria.schmidt@example.com",
"phone": "+4917612345678",
"sex": 2,
"date_of_birth": "1985-03-22",
"height": 168,
"weight": 65,
"language": "en",
"transactional_emails_enabled": true,
"created_at": "2026-04-01T09:14:32Z",
"updated_at": "2026-04-01T14:22:11Z"
}
{
"error": "phone: Phone must be in E.164 format (e.g., +14155552671)"
}
{
"error": "Profile not found"
}