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

# Create a new enrollment

`POST /enrollment-statuses`

## Request

- Base URL: `https://api.sandbox.zusapi.com/zap-data-subscriptions`
- URL: `https://api.sandbox.zusapi.com/zap-data-subscriptions/enrollment-statuses`
- Auth: none declared

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 and the `practitioner` and `organization` relationships are not allowed.
        - `npi` string: The NPI of the user / organization who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed.
        - `firstName` string: The first name of the user who has a treatment relationship with the patient. Use this field if you are using an individual NPI. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed.
        - `lastName` string: The last name of the user who has a treatment relationship with the patient. Use this field if you are using an individual NPI. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed.
        - `name` string: The full name of the user / organization who has a treatment relationship with the patient. If you are using an organizational NPI, you may instead reference an existing Organization resource in the `organization` relationship of the `relationships` object. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed. Note: If you use individual NPI, please use 'firstName' and 'lastName'.
        - `role` string: The role of the user / organization 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, and specifying a resource ID in the `practitioner` or `organization` relationship 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 and the `practitioner` and `organization` relationships are not allowed. Note: This field is deprecated. Please use `practitioner` or `organization` relationship.
        - `npi` string: The NPI of the user / organization who has a treatment relationship with the patient. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed.
        - `firstName` string: The first name of the user who has a treatment relationship with the patient. Use this field if you are using an individual NPI. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed.
        - `lastName` string: The last name of the user who has a treatment relationship with the patient. Use this field if you are using an individual NPI. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed.
        - `name` string: The full name of the user / organization who has a treatment relationship with the patient. If you are using an organizational NPI, you may instead reference an existing Organization resource in the `organization` relationship of the `relationships` object. If present, the 'resourceId' field is not allowed, and specifying a resource ID in the `practitioner` or `organization` relationship is not allowed. Note: If you use individual NPI, please use 'firstName' and 'lastName'.
        - `role` string: The role of the user / organization 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, and specifying a resource ID in the `practitioner` or `organization` relationship 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 resource to satisfy the name and NPI requirement. Specify either this relationship or the `provider` object in `attributes`, but not both. Cannot be combined with the `organization` relationship.
        - `data` object
          - `type` string: The data type of this object. This should always be "fhir/Practitioner".
          - `id` string: The Practitioner ID
      - `organization` object: Reference an existing Organization resource to satisfy the name and NPI requirement. Specify either this relationship or the `provider` object in `attributes`, but not both. Cannot be combined with the `practitioner` relationship.
        - `data` object
          - `type` string: The data type of this object. This should always be "fhir/Organization".
          - `id` string: The Organization 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 / organization 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 / organization 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 / organization 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 / organization 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 / organization 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 / organization 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.dev/zushealth/apis/zap-data-subscriptions.md) - [All operations](https://skmtc.dev/zushealth/apis/zap-data-subscriptions/llms.txt) - [OpenAPI document](https://skmtc.dev/zushealth/apis/zap-data-subscriptions/revisions/53c881ee99ff?raw)
