---
category: [Administration & Integrations, Administration & Integrations/Workday API, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend, Talent & Engagement, Talent & Engagement/Training, Talent Management, Talent Management/Learning, Talent & Engagement/Training/Digital Courses, Talent & Engagement/Training/Required Courses & Lessons, Talent & Engagement/Training/Blended Courses, Talent & Engagement/Training/Lessons, Human Capital Management, Talent & Engagement/Training/LMS Course Catalog]
nav: wcp_docs
parent_url: /wcp_docs/
title: Manage Enrollments REST API
layout: subsection
---

## <a id="section_1"></a>Overview

The <i>Manage Enrollments</i> REST API will enable a third-party integration to create a learning enrollment event in Workday Learning if an enrollment doesn’t already exist in Workday Learning.

The API call needs this information:

-   Learning content (registrable)
-   Learner reference ID


The API will return these information:

-   Enrollment event ID
-   Enrollment ID: Returned only after the Workday Business Process, triggered by the enrollment event, has successfully completed.


For reference documentation about the <i>Manage Enrollments</i> REST API, see `learning/manageEnrollments` in the [REST API Explorer on the Developer Site](https://developer.workday.com/rest-api-explorer) or [Workday REST Services Directory](https://community.workday.com/sites/default/files/file-hosting/restapi/index.html) .

## <a id="section_2"></a>URL Base Path

<b>Tenant Base Path</b>

```
https://{tenantHostname}/api/learning/{version}/{tenantName}/manageEnrollments
```

Example to create single enrollment

```
https://yourTenantHostName.com/api/learning/v1/<TENANT_NAME>/manageEnrollments
```

Example to create multiple enrollments

```
https://yourTenantHostName.com/api/learning/v1/<TENANT_NAME>/manageEnrollments?bulk=true
```

<b>Workday Extend API Gateway Base Path</b>

For Workday Extend apps, use the regional API Gateway base URL for your company. See [Reference: Workday Extend API Gateways and Authorization Base URLs](https://developer.workday.com/documentation/dlh1653340161856) on the Developer Site. Note that the API Gateway base URL doesn’t include the tenant name.

## <a id="section_3"></a>Workday Tasks

<table><thead><tr><th>Workday Task</th><th>Endpoint</th></tr></thead><tbody><tr><td><b>Manage Grading and Attendance</b></td><td><code>POST /manageEnrollments</code></td></tr></tbody></table><br/>

## <a id="section_4"></a>Business Process

<table><thead><tr><th>Business Process</th><th>Endpoint</th></tr></thead><tbody><tr><td><i>Manage Enrollment initiated by Enroll in Content (REST Service)</i></td><td><code>POST /manageEnrollments</code></td></tr></tbody></table><br/>

## <a id="section_5"></a>Security Considerations

-   The enrollment data created using the <i>Learning</i> v1 REST service is secured to the <i>Public Reporting Items</i> domain in the Tenant Non-Configurable functional area.
-   The <i>Manage Enrollments</i> REST API is secured to the new initiating action <i>Enroll in Content (REST Service)</i> on the Enroll in Content business process.


## <a id="section_6"></a>Integration Touchpoints

You can use the <i>Manage Enrollments</i> REST API to create a learning enrollment event after a response from the <i>Records</i> REST API call confirms that an enrollment record with the status of <i>Not Started</i> or <i>In-Progress</i> exists for a learner for a piece of learning content.

## <a id="section_7"></a>Importing Learning Enrollments

The `POST /manageEnrollments` endpoint facilitates the import of learning enrollments.

To import multiple learning enrollments, specify the `bulk=true` query parameter. The `bulk=true` query parameter requires the `data[]` array containing the multiple instances in the request body. If you don’t specify `the bulk=true` query parameter, you must specify the request body with a single instance JSON object.

In the request body, an enrollment instance must contain at least these 2 required fields:

-   learner - the id of the role that they want to enroll in the content.
-   content - the id of the content that they want to enroll the learner in.


## <a id="section_8"></a>Examples

This sample request creates a single enrollment.

```
POST /manageEnrollments
 
```

Request body:

```
{
  "learner": {
       "id": "dbc36200180101000dd3415f9a940000"
  },
  "content": {
       "id": "0d0e27a091d5011bbd2186ae68ec0000"
  }
}
 
```

This sample request creates two enrollments, as specified by the `bulk=true` query parameter and the `data[]` array in the request body.

```
POST /manageEnrollments?bulk=true
```

Request body:

```
{
    "data": [
        {
           "learner": {
                  "id": "dbc36200180101000dd3415f9a940000"
            },
            "content": {
                   "id": "0d0e27a091d5011bbd2186ae68ec0000"
            }
        },
       {
          "learner": {
                "id": "b4e6be32084810b5f6146c468ff901b0"
           },
           "content": {
                "id": "ca43a6df08ae012bba2a1150d01d9200"
           }
      }      
    ]
}
 
```

## <a id="section_9"></a>Checking Validations

<table><thead><tr><th>Error</th><th>Error Code</th><th>Solution</th></tr></thead><tbody><tr><td><p>If the learner doesn’t have access to all of the content in a learning program they can’t enroll in the program.</p></td><td><p>This learner isn't eligible for the program because they don't have access to all of the content. - A2932</p></td><td><p>Ensure the learner has access to all the content.</p></td></tr><tr><td><p>If the content has prerequisites and the learner has not completed them they can’t enroll in the content.</p></td><td><p>The learner does not meet the prerequisites for this content. - A480</p></td><td><p>Ensure the learner completed the prerequisites for the content.</p></td></tr><tr><td><p>If the content doesn’t have at least 1 mandatory lesson the learner can’t enroll in that content.</p></td><td><p>You can't enroll learners in courses without any mandatory lessons. - A2933</p></td><td><p>Ensure content has at least 1 mandatory lesson to enroll learners.</p></td></tr><tr><td><p>A learner can’t enroll in content if:</p> <ul><li>The content is inactive or closed.
</li><li>They have enrolled before and not completed the last enrollment.
</li><li>They have enrolled once before and the content doesn’t have self-directed learning.
</li></ul></td><td><p>The learner isn't eligible to enroll or re-enroll in the content. - A2934</p></td><td><p>Ensure content is active and open, the learner has not enrolled before or has completed the last enrollment, and the content has self-directed learning to be allowed re-enroll.</p></td></tr><tr><td><p>If the learner doesn’t have access to the security group on the content they can’t enroll in the content.</p></td><td><p>To enroll this learner, ensure that the learner is eligible to view this content. - A2935</p></td><td><p>Ensure the learner has access to the content.</p></td></tr><tr><td><p>Custom validations have been met.</p></td><td><p>The learner isn't eligible to enroll in this content. - A2968</p></td><td><p>Depends on what the custom validation is.</p></td></tr><tr><td><p>The learner can only be added to the waitlist once.</p></td><td><p>The learner is already on the waitlist. To enroll this learner, remove them from the waitlist. - A3003</p></td><td><p>Ensure the learner is removed from the waitlist to be added again.</p></td></tr><tr><td><p>If sending a bulk request, an enrollment can only be present in the request once, duplicates are not allowed.</p></td><td><p>Remove duplicate enrollment entries. You can't enroll the same user in the same course more than once in a single request. - A2931</p></td><td><p>Remove duplicate enrollments in the bulk request.</p></td></tr><tr><td><p>If content is inactive the learner can’t be enrolled</p></td><td><p>Learners can't enroll in inactive content. - A474</p></td><td><p>Ensure content is activated before enrolling learners.</p></td></tr><tr><td><p>If the content is at full capacity the learner can’t be enrolled.</p></td><td><p>No Available Capacity - A2839</p></td><td><p>Ensure content has capacity to enroll learners.</p></td></tr></tbody></table><br/>

## <a id="section_10"></a>Performance Considerations

You can import up to 1000 enrollments in bulk with a single request.

## <a id="section_11"></a>Common Errors

<table><thead><tr><th>Error</th><th>Error Code</th><th>Cause and Solution</th></tr></thead><tbody><tr><td>Missing Required Field Malformed Syntax Invalid Data Value Duplicate Resource.</td><td>400 Bad Request</td><td>Check the syntax of the request body, identify required fields, see if any enrollment ID and learner ID already exists.</td></tr><tr><td>Authentication Failed.</td><td>401 Unauthorized</td><td>Ensure your request headers contain a valid and unexpired API key or bearer token.</td></tr></tbody></table><br/>

### Related Information

[Learning REST Web Service](https://doc.workday.com/release-notes/en-us/lrn/9234679.html)

