Profili
Aġġorna l-profil
Aġġorna profil eżistenti ta’ pazjent
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ġġorna qasam wieħed jew aktar fuq profil ta’ pazjent eżistenti. Għandek bżonn tinkludi biss l-oqsma li trid tibdel — il-parametri kollha tal-body huma fakultattivi.
Jeħtieġ is-scope
create_user.
Talba
Parametri tal-path
Parametri tal-body
Valur ġdid tas-sess bijoloġiku skont ISO/IEC 5218 (
1 = raġel, 2 = mara). 0 (mhux magħruf) jirritorna 400.Data tat-twelid ġdida fil-format
YYYY-MM-DD. Trid tkun fil-passat u mhux qabel l-1900. L-età
implikata trid tkun bejn 16 u 100.Lingwa preferuta ġdida:
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 jew uk.Jekk dan il-profil għandux jirċievi emails tranżazzjonali (programmatiċi) — konfermi ta’
appuntamenti, avviżi li r-riżultati huma lesti, eċċ. Distint mill-kunsens għall-marketing. Ħallih barra biex iżżomm
il-valur attwali.
Risposta
F’każ ta’ suċċess, l-API tirritorna200 OK bil-profil aġġornat sħiħ.
Sess bijoloġiku skont ISO/IEC 5218 (
0 = mhux magħruf, 1 = raġel, 2 = mara). Jista’ jkun null.Jekk dan il-profil jirċevix emails tranżazzjonali (programmatiċi).
null meta qatt ma ġie stabbilit.Risposti ta’ żball
| Status | Deskrizzjoni |
|---|---|
400 | Żball ta’ validazzjoni — qasam wieħed jew aktar ma għaddewx mill-validazzjoni. |
403 | Projbit — iċ-ċavetta API tiegħek m’għandhiex aċċess għal din l-operazzjoni jew il-profil huwa barra mill-kuntest ta’ aċċess tiegħek. |
404 | Il-profil ma nstabx. |
500 | Żball intern tas-server. |
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"
}