---
title: "Create a new enrollment"
method: POST
path: "/enrollment-statuses"
tags: ["EnrollmentStatuses"]
---

# Create a new enrollment

`POST /enrollment-statuses`

Enroll a patient in a package.

## Request body

- object
  - `data` EnrollmentStatusCreate — 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. If previously enrolled then un-unrolled, there will be a PatientEnrollmentStatus object with a status value of "inactive"
    - `type` string
    - `attributes` object
      - `priority` boolean — When the priority field is set to true, the initial data refresh will run right away. When it is set to false, it will be queued to run as part of our batch process, which manages load on the data networks. Developers should set the priority field to true for end-user requests, and to false when running large cohorts.
      - `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. Note: This filed is deprecated. Please use `practitioner` or `organization` relationship.
        - `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.
      - `patient` object — To create and enroll a new patient in one API call.
        - `resourceType` string
        - `identifier` object[]
          - `system` string — Unique namespace for the identifier value
          - `value` string — Unique identifier value
        - `name` object[]
          - `family` string — Patient last name
          - `given` object[]
            - `given_1` string — Patient first name
            - `given_2` string — Patient middle name
        - `gender` string — Patient gender
        - `birthDate` string — Patient date of birth
        - `address` object[]
          - `line` object[]
            - `line_1` string — Address Line 1
            - `line_2` string — Address Line 2
          - `city` string — Address city
          - `state` string — Address state
          - `postalCode` string — U.S. ZIP code
        - `telecom` object[]
          - `system` string — Purpose of this contact point
          - `use` string — Form for contact point
          - `value` string — The actual contact point details
    - `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
      - `practitioner` object — Reference an existing Practitioner
        - `data` object
          - `type` string — The data type of this object. This should always be "fhir/Practitioner".
          - `id` string — The patient ID
      - `organization` object — Reference an existing Organization
        - `data` object
          - `type` string — The data type of this object. This should always be "fhir/Organization".
          - `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

## Response `201`

Successfully created the package enrollment status. The patient is now enrolled in the package.

- 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 usually indicates that there is incorrect or missing data in the EnrollmentStatus object in the request's body.
- `409` — Conflict. This indicates that there is already enrollment status for the given patient in the requested package.
- `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)
