Doctor profile updates
PATCH /api/v1/doctors/profile persists professional edits for the doctor identified by Authorization: Bearer <access_token>. It requires a current session, active Identity account and matching Doctor profile. Email verification, license approval, organization affiliation and permission grants are not required.
{
"license_number": "BMDC-123",
"speciality_id": "10000000-0000-4000-8000-000000000001",
"specialization_ids": []
}Send at least one of these fields. Omission preserves the stored value. Null, unknown fields and unknown query parameters are rejected. License numbers are trimmed, must be nonblank and support up to 255 Unicode characters. The license must be unique across doctors.
Catalog IDs must be canonical UUIDs. specialization_ids replaces the ordered selection, supports up to 30 unique entries and accepts [] to clear it. Sending speciality_id also requires specialization_ids; each selected child must belong to that speciality. Sending only specialization_ids uses the current stored speciality. Qualifications, qualification summary, chambers and Identity name/email are preserved. Use the professional details PUT to replace qualifications alongside speciality and specializations.
Success returns 200 with { "message": "Doctor profile updated successfully.", "status_code": 200, "data": { ... } }. data is the professional profile, including its doctor/user IDs, current Identity name/email, license, catalog entries, optional qualification/chambers and timestamps. Read the account and nested professional profile with GET /api/v1/doctors/profile.
Every patch commits atomically and locks the profile against concurrent partial edits and professional selection replacements. A license or hierarchy conflict rolls back the entire update. Historical credential reviews retain their submitted license and decision. Admin's effective verification_status is not_submitted when the latest submission concerns a different license; a new submission and review are needed for the changed license.
Missing/invalid credentials return 401, an inactive account or missing Doctor profile 403, duplicate licenses or missing/incompatible catalog selections 409, invalid input 422, malformed JSON 400, and unavailable dependencies 503. Errors use application/problem+json; all responses use Cache-Control: no-store. The former /api/v1/doctors/me profile route has been removed.