---
title: "Terminate several practitioner relationships, and/or states to credential, in one request"
method: PUT
path: "/practitioners/terminate-partial"
tags: ["Practitioner"]
---

# Terminate several practitioner relationships, and/or states to credential, in one request

`PUT /practitioners/terminate-partial`

Multi-scope sibling of `PUT /practitioners/terminate`, built for the monitoring termination drawer (CP-36182). That endpoint accepts exactly ONE scope per call; this one takes the whole selection and fans out over the same per-scope service internally, so guard checks, per-type validation, date validation and cascades behave identically.

**Scope types accepted:** `GROUP`, `NETWORK`, `GROUP_LOCATIONS`, `LOCATION_NETWORK`. `FULL_EXIT` and `INFERRED_LOCATION` are rejected with 400 — full termination is already a single call, so use `PUT /practitioners/terminate` for it.

**Identity:** the practitioner is identified by `certifyPractitionerId`; `tenantPractitionerId` is resolved server-side from it plus the `tenant-id` header, scoped to that tenant.

**Additionally** removes the supplied `statesToCredential` from the practitioner's contributing crosswalk (writing an empty array, never null, when none remain), marks the acted-on flag seen with the termination note, and re-syncs the monitoring workflow so flags for removed states are re-evaluated.

**Returns 200 even on partial failure** — inspect `status` and `scopeResults`. A 2xx does NOT mean everything applied. Only whole-request problems (validation, auth, kill switch) come back as 4xx/5xx.

Gated by `practitioner.termination.partial-composite.enabled` (default false); returns 404 as if the endpoint did not exist while disabled.

## Headers

- `tenant-id` string

## Request body

- PartialTerminationRequest — Multi-scope practitioner termination: several relationship scopes plus states-to-credential removal, applied in one request.
  - `certifyPractitionerId` string, required — Certify practitioner id
  - `terminationDate` string, required — Termination date (YYYY-MM-DD)
  - `terminationReason` string — Termination reason; also written as the note on the acted-on flag
  - `terminationInformedDate` string — Date the practitioner was informed (YYYY-MM-DD)
  - `scopes` TerminationScope[] — Relationship scopes to terminate; may be empty if statesToCredential is supplied
    - `terminationType` string, required — GROUP | NETWORK | GROUP_LOCATIONS | LOCATION_NETWORK
    - `tenantGroupId` string — Tenant group id — required for every supported scope type
    - `networkId` string — Network id — required for NETWORK
    - `tenantGroupLocationId` string — Tenant group location id — required for GROUP_LOCATIONS
    - `tenantGroupLocationPractitionerNetworkId` string — Tenant group location practitioner network id — LOCATION_NETWORK
    - `acknowledgedLocationNetworkTermination` boolean — Opt into the GROUP_LOCATIONS -> TGLPN cascade
    - `label` string — Display label, echoed back in the per-scope result
  - `statesToCredential` string[] — State codes to REMOVE from statesToCredential; may be empty
  - `flagId` string — Monitoring flag to mark seen with the termination note

## Response `200`

Applied. `status` is SUCCESS, PARTIAL_SUCCESS or FAILED; `scopeResults` carries per-scope detail.

- PartialTerminationResponse — Outcome of a multi-scope partial termination, with per-scope detail
  - `status` string — SUCCESS | PARTIAL_SUCCESS | FAILED
  - `terminationDate` string — The termination date applied
  - `scopeResults` ScopeResult[] — One result per requested scope, in request order
    - `terminationType` string — The scope's termination type
    - `label` string — Display label echoed from the request
    - `ok` boolean — Whether this scope applied
    - `message` string — Success message from the underlying termination
    - `errorCode` string — Error classification when ok is false
    - `detail` string — Failure detail when ok is false
  - `statesResult` StatesToCredentialResult — States-to-credential removal outcome
    - `attempted` boolean — Whether a states change was requested
    - `ok` boolean — Whether every slice was updated
    - `removed` string[] — States actually removed
    - `remaining` string[] — States left afterwards; empty, never null
    - `slicesUpdated` integer — Contributing crosswalk slices written
  - `flagResult` FlagResult — Acted-on flag outcome
    - `attempted` boolean — Whether a flag update was requested
    - `ok` boolean — Whether the flag was updated
    - `flagId` string — The flag id
    - `status` string — The resulting status
  - `monitoringWorkflowResult` WorkflowResult — Monitoring workflow update outcome
    - `attempted` boolean — Whether a workflow update was triggered
    - `ok` boolean — Whether the write and flag recalculation both succeeded
    - `workflowId` string — The workflow updated, or null when the practitioner has none
    - `sectionsReevaluated` string[] — Flag sections recalculated

## Other responses

- `400` — Validation failure: no scopes and no states, a malformed scope, an unsupported terminationType, or the practitioner could not be resolved in this tenant
- `401` — Missing or invalid JWT
- `403` — Missing UPDATE_PRACTITIONER permission
- `404` — The endpoint is disabled by its kill switch

---

[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)
