Profile
Zaktualizuj profil
Zaktualizuj istniejący profil pacjenta
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"
}
Zaktualizuj jedno lub więcej pól istniejącego profilu pacjenta. Wystarczy uwzględnić pola, które chcesz zmienić — wszystkie parametry treści żądania są opcjonalne.
Wymaga zakresu
create_user.
Żądanie
Parametry ścieżki
Parametry treści
Nowa wartość płci biologicznej zgodnie z ISO/IEC 5218 (
1 = mężczyzna, 2 = kobieta). Wartość 0 (nieznana) zwraca 400.Nowa data urodzenia w formacie
YYYY-MM-DD. Musi być w przeszłości i nie wcześniej niż w 1900 roku. Wynikający z niej
wiek musi mieścić się w przedziale od 16 do 100 lat.Nowy preferowany język:
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 lub uk.Określa, czy ten profil ma otrzymywać e-maile transakcyjne (automatyczne) — potwierdzenia
wizyt, powiadomienia o gotowych wynikach itp. Niezależne od zgody marketingowej. Pomiń, aby zachować
bieżącą wartość.
Odpowiedź
W przypadku powodzenia API zwraca200 OK wraz z pełnym zaktualizowanym profilem.
Płeć biologiczna wg ISO/IEC 5218 (
0 = nieznana, 1 = męska, 2 = żeńska). Może mieć wartość null.Czy ten profil otrzymuje e-maile transakcyjne (automatyczne).
null, jeśli nigdy nie ustawiono.Odpowiedzi z błędami
| Status | Opis |
|---|---|
400 | Błąd walidacji — co najmniej jedno pole nie przeszło walidacji. |
403 | Brak dostępu — twój klucz API nie ma uprawnień do tej operacji lub profil znajduje się poza twoim kontekstem dostępu. |
404 | Nie znaleziono profilu. |
500 | Wewnętrzny błąd serwera. |
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"
}