Updates all fields of an existing professional user. This is a full update operation that requires all fields to be provided.
Authentication
Requires a valid JWT token in the Authorization header.
Permissions
- Superusers: Can update any professional profile
- Regular users: Can only update their own profile
- Returns
403 Forbidden if a non-superuser tries to update another user’s profile
Path Parameters
The unique identifier of the professional user to updateExample: 1
Request Body
Full name of the professionalExample: "Maria Oliveira"
Password for the professional account (will be hashed)Example: "maria123"
Contact phone numberExample: "456789123"
CRM/COREN registration number (must be unique)Example: "CRM-PR 67890"
Medical specialty or area of expertiseAllowed values:
"Clinica Geral"
"Dermatologia"
"Ginecologia"
"Ortopedia"
"Pediatria"
"Psiquiatria"
"Psicologia"
"Nutrição"
"Fisioterapia"
"Odontologia"
Working hours scheduleAllowed values:
"Manhã (08:00 - 12:00)"
"Tarde (13:00 - 18:00)"
"Noite (18:00 - 22:00)"
"Integral (08:00 - 22:00)"
"Plantão (12h)"
"Plantão (24h)"
Professional biography or descriptionExample: "Médica com 10 anos de experiência"
User type (must be "PROFISSIONAL" for professional users)Example: "PROFISSIONAL"
Whether the professional account is activeExample: true
Whether the professional has superuser/admin privilegesExample: false
Response
Unique identifier for the professional
Full name of the professional
CRM/COREN registration number
User type ("PROFISSIONAL")
curl -X PUT https://api.vidaplus.com/profissionais/1 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"nome": "Maria Oliveira Santos",
"email": "[email protected]",
"senha": "newpassword123",
"telefone": "456789999",
"crmCoren": "CRM-PR 67890",
"especialidade": "Dermatologia",
"horario_atendimento": "Tarde (13:00 - 18:00)",
"biografia": "Médica com 15 anos de experiência em dermatologia",
"tipo": "PROFISSIONAL",
"is_active": true,
"is_superuser": false
}'
{
"id": 1,
"nome": "Maria Oliveira Santos",
"email": "[email protected]",
"telefone": "456789999",
"crmCoren": "CRM-PR 67890",
"especialidade": "Dermatologia",
"horario_atendimento": "Tarde (13:00 - 18:00)",
"biografia": "Médica com 15 anos de experiência em dermatologia",
"tipo": "PROFISSIONAL",
"is_active": true,
"is_superuser": false
}
Error Codes
| Status Code | Description |
|---|
| 200 | Professional updated successfully |
| 401 | Authentication required |
| 403 | User does not have permission to update this profile |
| 404 | Professional user not found |
| 409 | Email or CRM/COREN already exists for another user |