---
title: "Update an existing enrollment"
method: PATCH
path: "/enrollment-statuses/{patientId}:{packageId}"
tags: ["EnrollmentStatuses"]
---

# Update an existing enrollment

`PATCH /enrollment-statuses/{patientId}:{packageId}`

This endpoint can be used to update a specific package enrollment using the enrollment status id. Enrollment status id is a combination of the patient ID and the package ID in the following format "patientId:packageId"

## Path parameters

- `patientId` string, required
- `packageId` string, required

## Request body

- object
  - `data` EnrollmentStatusUpdate — The enrollment status update describes the how the EnrollmentStatus can be updated using PATCH endpoint.
    - `type` string
    - `attributes` object
      - `provider` object
        - `resourceId` string, uuid — The Provider resource ID corresponding to a user who has a treatment relationship with the patient. If present, the rest of the provider fields are not allowed.
        - `npi` string — The NPI of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `firstName` string — The first name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `lastName` string — The last name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `name` string — The full name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed. Note: If you use individual NPI, please use 'firstName' and 'lastName'.
        - `role` string — The role of the user who has a treatment relationship with the patient - it can be string or SNOMED CT code as a string. If present, the 'resourceId' field is not allowed.
      - `practitioner` object — This field is deprecated. Please use 'provider'.
        - `resourceId` string, uuid — The Practitioner resource ID corresponding to a user who has a treatment relationship with the patient. If present, the rest of the practitioner fields are not allowed.
        - `npi` string — The NPI of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `firstName` string — The first name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `lastName` string — The last name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `name` string — The full name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed. Note: If you use individual NPI, please use 'firstName' and 'lastName'.
        - `role` string — The role of the user who has a treatment relationship with the patient - it can be string or SNOMED CT code as a string. If present, the 'resourceId' field is not allowed.
    - `relationships` object
      - `package` PackageRelationshipCreate — The package to which this status refers when creating an Enrollment status.
        - `data` object
          - `type` string — The data type of this object. This should always be "zap-data-subscriptions/package"
          - `id` string — The package ID

## Response `200`

Successfully update the package enrollment status.

- object
  - `data` EnrollmentStatusRead — The enrollment status describes the link between a patient and a package. If a patient has never been enrolled in a given package, then there will not be a PatientEnrollmentStatus object.
    - `type` string
    - `id` string
    - `attributes` object
      - `provider` object
        - `resourceId` string, uuid — The Provider resource ID corresponding to a user who has a treatment relationship with the patient.
        - `npi` string — The NPI of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `firstName` string — The first name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `lastName` string — The last name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `name` string — The full name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed. Note: If you use individual NPI, please use 'firstName' and 'lastName'.
        - `role` string — The role of the user who has a treatment relationship with the patient - it can be string or SNOMED CT code as a string. If present, the 'resourceId' field is not allowed.
      - `practitioner` object — This field is deprecated.
        - `resourceId` string, uuid — The Practitioner resource ID corresponding to a user who has a treatment relationship with the patient.
        - `npi` string — The NPI of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `firstName` string — The first name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `lastName` string — The last name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed.
        - `name` string — The full name of the user who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed. Note: If you use individual NPI, please use 'firstName' and 'lastName'.
        - `role` string — The role of the user who has a treatment relationship with the patient - it can be string or SNOMED CT code as a string. If present, the 'resourceId' field is not allowed.
      - `createdAt` string — The timestamp (in ISO 8601 format) at which enrollment status was created. This field is managed by Zus, and updates will be ignored.
    - `relationships` object
      - `patient` object — Reference an existing Zus patient.
        - `data` object
          - `type` string — The data type of this object. This should always be "fhir/Patient"
          - `id` string — The patient ID
      - `package` PackageRelationshipCreate — The package to which this status refers when creating an Enrollment status.
        - `data` object
          - `type` string — The data type of this object. This should always be "zap-data-subscriptions/package"
          - `id` string — The package ID
      - `createdBy` object — The Zus user responsible for creating this enrollment status. This field is managed by Zus, and requests to manually update the field will result in an error being returned.
        - `data` object
          - `type` string
          - `id` string
          - `meta` object
            - `userEmail` string

## Other responses

- `400` — Bad request. This would usually indicate that the there is missing or invalid data in the request.
- `500` — Error condition

---

[API](https://skmtc.net/zushealth/apis/auth-service-api.md) · [All operations](https://skmtc.net/zushealth/apis/auth-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zushealth/auth-service-api/versions/ee03e3c0910d/schema)
