---
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: Lesson Trackings REST API
layout: subsection
---

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

The <i>Lesson Trackings</i> REST API supports the creation, updating, and retrieval of lesson tracking details for an enrollment. This API will support all relevant lesson types, including:

-   External Content: This API is for partners who aren’t content partners. Content partner integrations should be done via the Cloud Connect for Learner integration.
-   In Person Classroom (Instructor Led)
-   Virtual Classroom (Instructor Led) without Zoom and Microsoft Teams integration.
-   Training Activity: The API doesn’t yet support uploading of attachments.


<b>Note:</b> This API doesn’t support the updating of course-level tracking, as internal processing in Workday determines the course-level tracking based on the lessons within that course.

## <a id="section_2"></a>Operation Types

The following operations are completed within the context of a learner enrollment.

<b>Get Request</b>

Required:

-   Enrollment ID (to retrieve all tracking information for a specified enrollment)


Optional:

-   Lesson Trackings ID (required to identify tracking for one specific lesson on a specified enrollment)


The API will return these information:

-   For an Instructor Led Lesson:

    -   Lesson Context WID
    -   Completion Status
    -   Completion Date
    -   Duration
    -   Score
    -   Grade
    -   Attendance

-   For a Training Activity:

    -   Lesson Context WID
    -   Completion Status
    -   Completion Date
    -   Score
    -   Grade
    -   Attendance
    -   Assessor
    -   Comment

-   For an External Content Lesson:

    -   Lesson Context WID
    -   Completion Status
    -   Completion Date



<b>POST Request</b>

Required:

-   Lesson Context WID
-   Completion Status


Optional:

-   For an Instructor Led Lesson:

    -   Completion Date
    -   Duration
    -   Score
    -   Grade
    -   Attendance

-   For a Training Activity:

    -   Completion Date
    -   Score
    -   Grade
    -   Attendance
    -   Assessor
    -   Comment

-   For an External Content Lesson:

    -   Completion Date



<b>PATCH Request</b>

Required:

-   Lesson Context WID


Optional:

-   For an Instructor Led Lesson:

    -   Completion Date
    -   Duration
    -   Score
    -   Grade
    -   Attendance

-   For a Training Activity:

    -   Completion Date
    -   Score
    -   Grade
    -   Attendance
    -   Assessor
    -   Comment

-   For an External Content Lesson:

    -   Completion Date



For reference documentation about the <i>Lesson Trackings</i>REST API, see `learning/enrollments/lessonTrackings` 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_3"></a>URL Base Path

<b>Tenant Base Path</b>

```
https://{tenantHostname}/api/learning/{version}/{tenantName}/enrollments/{ID}/lessonTrackings
 
```

Example:

```
https://yourTenantHostName.com/api/learning/v1/gms/enrollments/{ID}/lessonTrackings
```

<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_4"></a>Workday Tasks

<table><thead><tr><th>Workday Task</th><th>Endpoint</th></tr></thead><tbody><tr><td><b>Manage Grading and Attendance</b> OR <b>Manage Enrollment Completion</b></td><td><p>GET /enrollments/{enrollmentID}/lessonTrackings/{lessonTrackingID}</p> <p>POST /enrollments/{enrollmentID}/lessonTrackings/</p> <p>PATCH /enrollments/{ID}lessonTrackings</p></td></tr></tbody></table><br/>

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

The<i>Lesson Trackings</i>REST API is secured to the <i>Manage: Learning Records</i> domain in the Learning Core functional area.

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

The <i>Lesson Trackings</i> REST API can be used to provide grading and attendance details to a course lesson following an update to this information within a third-party system. This API is also required to support the new UI change to Enable External Completion when adding external content lesson details to a course, to ensure accurate completion tracking can be received from the third-party provider.

To retrieve enrollment level information, you must use the <i>Records</i> REST API, which will return summary level information for all learning records.

To update enrollment-level information, you must use the <i>Enrollments</i> REST API, which will allow you to update grading information at the enrollment level.

<b>Note:</b> Integrating partners will still be required to PATCH enrollment details to add grading and attendance information for the enrollment, even when there is only 1 lesson on a course enrollment.

## <a id="section_7"></a>Getting Details for a Single Lesson Tracking

The `GET /enrollments/{enrollmentID}/lessonTrackings/{lessonTrackingID}`endpoint facilitates the retrieval of details for a single lesson tracking within an enrollment.

Sample response:

```
{
  "total": 1,
  "data": [
    {
      "id": "Workday ID",
      "grade": {
        "descriptor": "Pass",
        "id": "Grade=PASS"
      },
      "completionDate": "2019-05-30T21:35:01.323Z"
      "attendanceStatus": {
        "descriptor": "Attended",
        "id": "Attendance_Status_ID=Attended"
      },
      "lessonIdentifier": {
        "id": "Workday ID"
      },
      "completionStatus": {
        "descriptor": "Completed",
        "id": "Goal_Completion_Status_ID=GOAL_COMPLETION_STATUS-3"
      },
      "score": "100"
    },
 
```

## <a id="section_8"></a>Creating a Lesson Tracking Within an Enrollment

The `POST /enrollments/{enrollmentID}/lessonTrackings/` endpoint facilitates the creation of a lesson tracking within an enrollment.

<b>Example</b>

For this example, the lesson being created is a training activity lesson, containing only fields that are relevant to that lesson type.

```
POST /enrollments/{enrollmentID}/lessonTrackings/
```

Request body:

```
{
  "lessonIdentifier": 
  {
    "id": "Workday ID"
  },
  "grade":
  {
    "id": "Grade=PASS"
  },
  "score": 100,
  "completionStatus": 
  {
    "id": "Goal_Completion_Status_ID=GOAL_COMPLETION_STATUS-4"
  },
  "attendanceStatus":
  {
    "id": "Attendance_Status_ID=Attended"
  },
  "assessors": [
   {
    "id": "Learning_Assessor_ID=INTERNAL_LEARNING_ASSESSOR-1-2"
   }
  ],
  "comment": "Testing",
  "completionDate": "2019 05 30 14 35 01 323 -0700"
}
 
```

## <a id="section_9"></a>Updating an Existing Lesson Tracking Within an Enrollment

The `PATCH /enrollments/{enrollmentID}/lessonTrackings/` endpoint facilitates the updating of an existing lesson tracking within an enrollment.

<b>Example</b>

For this example, the lesson being updated is a training activity lesson, containing only fields that are relevant to that lesson type.

```
PATCH /enrollments/{enrollmentID}/lessonTrackings/
```

Request body:

```
{
  "lessonIdentifier": 
  {
    "id": "Workday ID"
  },
  "grade":
  {
    "id": "Grade=PASS"
  },
  "score": 90,
  "completionStatus": 
  {
    "id": "Goal_Completion_Status_ID=GOAL_COMPLETION_STATUS-4"
  },
  "attendanceStatus":
  {
    "id": "Attendance_Status_ID=Attended"
  },
  "assessors": [
   {
    "id": "Learning_Assessor_ID=INTERNAL_LEARNING_ASSESSOR-1-2"
   }
  ],
  "comment": "Testing",
  "completionDate": "2019 05 30 14 35 01 323 -0700"
}
 
```

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

<table><thead><tr><th><p>Operation</p></th><th><p>Validation</p></th><th><p>Documentation Recommendations</p></th></tr></thead><tbody><tr><td><p>POST</p></td><td><p>Can’t add another tracking for a lesson for this enrollment.</p></td><td><p>You can't add tracking for the lesson as a tracking already exists.</p></td></tr><tr><td><p>POST</p></td><td><p>Can't add tracking for virtual classroom lessons that use an integration.</p></td><td><p>You can't add tracking for virtual classroom lessons that use a Workday-delivered integration. The integration manages the tracking for this lesson.</p></td></tr><tr><td><p>POST</p></td><td><p>Can't add tracking for lessons that aren’t of type ILT/OJT or external link content.</p></td><td><p>You can only add tracking for Instructor-Led Training Activity or External Content lesson types.</p></td></tr><tr><td><p>POST</p></td><td><p>Can't add attendance for lessons of type external link content.</p></td><td><p>You can't add attendance for the External Content lesson type.</p></td></tr><tr><td><p>POST</p></td><td><p>Can't add score or grade to a lesson that does not track grades.</p></td><td><p>To add a score or grade, enable grade tracking for the lesson.</p></td></tr><tr><td><p>POST</p></td><td><p>Can't add attendance to a lesson that does not track attendance.</p></td><td><p>To add attendance, enable attendance tracking for the lesson.</p></td></tr><tr><td><p>POST</p></td><td><p>Lesson is not on this enrollment.</p></td><td><p>Specify a lesson that's on this enrollment.</p></td></tr><tr><td><p>POST</p></td><td><p>Completion Date can't be in the future.</p></td><td><p>Specify a Completion Date that is today or in the past.</p></td></tr><tr><td><p>POST</p></td><td><p>Time Unit must be entered if Attendance Duration is not 0 for ILT Lessons.</p></td><td><p>For Instructor-Led Training Activity lessons, specify a time unit when you provide an attendance duration.</p></td></tr><tr><td><p>POST</p></td><td><p>Attendance Duration must be greater than 0 if Time Unit is entered.</p></td><td><p>Specify an attendance duration greater than 0 when you specify a time unit.</p></td></tr><tr><td><p>POST</p></td><td><p>An assessor is required if you enter Date Completed for tracking the training activity on the lesson.</p></td><td><p>Specify an assessor when you provide a completed date for the Instructor-Led Training Activity lesson.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Can't update completed training activity lesson completion date.</p></td><td><p>You can't delete the completion date for a completed training activity lesson.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Can't update tracking for virtual classroom lessons that use an integration.</p></td><td><p>You can't update tracking for virtual classroom lessons that use a Workday-delivered integration. The integration manages the tracking for this lesson.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Can't update tracking for lessons that are not of type ILT/OJT or external link content.</p></td><td><p>You can only update tracking for Instructor-Led Training Activity or External Content lesson types.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Can't update attendance for lessons of type external link content.</p></td><td><p>You can't update attendance for the External Content lesson type.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Can't update score or grade to a lesson that does not track grades.</p></td><td><p>You can't update the score or grade because this lesson doesn't track grades.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Can't update attendance to a lesson that does not track attendance.</p></td><td><p>You can't update attendance because this lesson doesn't track attendance.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Tracking isn’t for this lesson.</p></td><td><p>You can't update the tracking as it isn't a valid tracking for this lesson.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Lesson isn’t on this enrollment.</p></td><td><p>Specify a lesson that's on this enrollment.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Completion Date can't be in the future.</p></td><td><p>Specify a Completion Date that is today or in the past.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Time Unit must be entered if Attendance Duration is not 0 for ILT Lessons.</p></td><td><p>For Instructor-Led Training lessons, specify a time unit when you provide an attendance duration.</p></td></tr><tr><td><p>PATCH</p></td><td><p>Attendance Duration must be greater than 0 if Time Unit is entered.</p></td><td><p>Specify an attendance duration greater than 0 when you specify a time unit.</p></td></tr><tr><td><p>PATCH</p></td><td><p>An assessor is required if you enter Date Completed for tracking the training activity on the lesson.</p></td><td><p>Specify an assessor when you provide a completed date for the Training Activity lesson.</p></td></tr></tbody></table><br/>

## <a id="section_11"></a>Limitations

-   The <i>Lesson Trackings</i> REST API supports up to 1000 trackings per request.
-   If a score of 0 is sent via the<i>Lesson Trackings</i> REST API, it will be treated as no score within Workday Learning.
-   Integrating partners using the<i>Lesson Trackings</i> REST API will still be required to use PATCH enrollment to add grading and attendance information for the enrollment, even when there is only 1 lesson on a course enrollment.


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

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

### Related Information

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

