users

Update user by id

Updates a user payload by user id using English field names.

patch/api/users/by-id/{user_id}

Path parameters

user_idstring uuid required

Request body

first_namestring nullable

User first name

last_namestring nullable

User last name

phonestring nullable

User phone number

home_addressstring nullable

User home address

citystring nullable

User city

provincestring nullable

User province

postal_codestring nullable

User postal code

place_of_birthstring nullable

User place of birth

tax_codestring nullable

User tax code (codice fiscale)

genderstring nullable

User gender

registration_reasonstring nullable

Reason for registration

commercial_communications_consentboolean nullable

Consent to receive commercial and promotional communications

how_did_you_hear_about_usstring nullable

How did you hear about us

emailstring nullable

User email

date_of_birthstring date nullable

User date of birth (YYYY-MM-DD)

notesstring nullable

User notes

Response

Successful Response

idstring required

User ID

emailstring required

User email

first_namestring nullable

User first name

last_namestring nullable

User last name

place_of_birthstring nullable

User place of birth

phonestring nullable

User phone number

tax_codestring nullable

User tax code (codice fiscale)

date_of_birthstring nullable

User date of birth (YYYY-MM-DD)

country_of_residencestring nullable

User country of residence

citystring nullable

User city

provincestring nullable

User province

postal_codestring nullable

User postal code

home_addressstring nullable

User home address

genderstring nullable

User gender

how_did_you_hear_about_usstring nullable

How did you hear about us

registration_reasonstring nullable

Reason for registration (enum key, e.g. WANT_TO_START_JOURNEY)

commercial_communications_consentboolean

Consent to receive commercial and promotional communications

social_providerstring nullable

Social provider used for login or null if email/password

has_profile_photoboolean

Whether user has a profile photo uploaded. Use /api/storage/profile-photo/{user_id} to retrieve it.

rolesstring[]

User roles

third_party_consentboolean

Whether the patient accepted the third-party contacts treatment consent. Gates adding/editing third-party contacts.

tax_deduction_consentboolean nullable

Whether the patient accepted the tax data transmission needed for the deduction. Null when never answered: the app asks before the first payment.

first_loginboolean nullable

Whether this is the user's first login

notesstring nullable

Internal notes

deletion_requested_atstring nullable

Deletion request timestamp ISO

created_atstring nullable

Creation timestamp ISO

updated_atstring nullable

Last update timestamp ISO

patient_idstring nullable

Related patient id

operator_idstring nullable

Related operator id

social_registrationboolean nullable

Whether user registered via social provider

Example response

{
  "city": "Rome",
  "commercial_communications_consent": true,
  "country_of_residence": "Italy",
  "date_of_birth": "1990-01-01",
  "email": "user@example.com",
  "first_name": "John",
  "gender": "male",
  "has_profile_photo": false,
  "home_address": "Via Example 123",
  "how_did_you_hear_about_us": "Social media",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "last_name": "Doe",
  "phone": "+39 123 456 7890",
  "postal_code": "00100",
  "province": "RM",
  "registration_reason": "WANT_TO_START_JOURNEY",
  "roles": [
    "patient"
  ],
  "tax_code": "RSSMRA90A01H501X"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.