---
title: "Upsert roles at the core and group-location level"
method: PUT
path: "/practitioners/{id}/roles"
tags: ["Practitioner"]
---

# Upsert roles at the core and group-location level

`PUT /practitioners/{id}/roles`

Updates the practitioner's roles at the core practitioner level and, optionally, at the group-practitioner-location level. Each role entry in the request is upserted — added if not present, updated if already present; roles are not deleted by omission, so to remove a role use `PATCH /practitioners/{id}/roles/remove` instead. Use this when adding or modifying practitioner roles; for renaming a role key as a data correction, use `PATCH /practitioners/{id}/roles/correct`. `{id}` is the `certifyPractitionerId`. Each entry requires `role` (validated against a runtime role allowlist) and at least one of `effectiveDate`/`terminationDate`; `groupPractitionerLocationId` is optional and controls whether the entry is also applied at the location level — if omitted, only the core practitioner record is updated.

## Path parameters

- `id` string, required

## Headers

- `tenant-id` string

## Request body

- PractitionerRoleUpdateRequest[]
  - `role` 'PCP' | 'Specialist' | 'Hospitalist' | 'Hospital-based Provider', required — Role type
  - `effectiveDate` string — Role effective date (ISO 8601 format)
  - `terminationDate` string — Role termination date (ISO 8601 format)
  - `groupPractitionerLocationId` string — Optional group practitioner location ID. If omitted, only core practitioner will be updated

## Response `200`

Practitioner roles updated successfully. Both `practitionerRoles` and `locationRoles` are populated when location IDs are present in the request; `locationRoles` is empty otherwise.

- PractitionerRolesUpdateResponse — Practitioner roles update response
  - `practitionerRoles` object — Updated practitioner roles map from core_practitioners
  - `locationRoles` object — Updated practitioner roles map from group_practitioner_locations, keyed by groupPractitionerLocationId

## Other responses

- `400` — Bad request - Invalid input
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `404` — Practitioner not found
- `500` — Internal server error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
