Partner RestrictedAll endpoints for this API are restricted to providers that have signed a Paylocity technology partnership agreement. Please reach out to [email protected] if you would like to discuss partnership opportunities.
Introduction
The LMS API supports integration with Paylocityās Learning Management System by enabling content providers to add training content, retrieve content metadata, and access employee assignment and completion data. It supports multiple company IDs for distributing learning materials across organizations and accommodates a range of content formats, including SCORM, video, file, URL-based content, quizzes, audio, and text.
Key Features
- Add training items to a customerās LMS library.
- Retrieve content metadata, usage data, and completion status.
- Support multiple company IDs to distribute content across organizations.
User Cases
Automated Content Integration:
- A third-party platform synchronizes its training catalog with the LMS by adding new modules or media files to a clientās library.
- A content provider publishes updated training by adding a new version of existing content.
- An organization with multiple subsidiaries distributes the same learning materials across multiple company IDs, with each company onboarded separately.
- A reporting system retrieves content metadata and completion data for analysis.
Training Content
The Learning Management APIs support integration and delivery of learning materials in the following formats: SCORM, Video, File, URL, VideoUpload, Quiz, VideoHub, Audio, and Text.
Getting Started with LMS APIs
Step 1: (POST) Create Training Content
The Create Training Content [Single] endpoint enable partners to add external media content to a clientās LMS library. It will accept a POST request to create new content in the customer's LMS library. It is the first step in the two-step process for adding content to the customer's LMS Partner Content Library or On-demand Library.
The request includes required content metadata, such as title, description, content URL, and file details. Each content item is assigned a unique external content ID and may include an optional thumbnail URL. The resource schema defines the required and optional properties for content creation.
Option 1: Use the the payload to add content directly to the customer library
Option 2: Include the training object to add content directly to on-demand trainings
fileDetails.lengthĀ needs to be the exact length when uploading the file, or the preview will not work.
URL: /apiHub/learningManagementSystem/v1/companies/{companyId}/content
Request:
{
"title": "test",
"description": "my test",
"url": "<https://test.com">,
"contentType": 3,
"fileDetails": {
"name": "myFile.zip",
"length": 1024,
"contentType": "zip"
}
},
"training"{
"name": "my training content"
}
Response:
{
"message": "Request is accepted and being processed",
"externalContentId": "e6f2091a-b8ce-480b-a0bc-6027071c7b9e",
"fileUploadDetails": {
"file": {
"guid": "d7f0d607-00fa-4af8-83bd-0452f1077c95",
"name": "myFile.pdf",
"length": 0
},
"strategies": {
"signed": {
"httpMethod": "PUT",
"url": "<https://example.paylocity.com/companies/42570/lmsFlatFileMediaContent/d7f0d607-00fa-4af8-83bd-0452f1077c95/myFile.zip?signature=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.ey">
}
}
}
}
Step 2: (PUT) Upload Training Content
The final step to adding content into the customer's LMS content library is to PUT the physical file to the customer content library. This can be accomplished by using the strategies - signed URL generated in the response in the previous step. The content type also needs to be the same as the content type in the header.
Example file upload script:
// Retrieve the signed upload URL from the creation response.
var fileUploadUrl = createResponse.FileUploadDetails.Strategies.Signed.Url;
// Create a PUT request to the signed URL using the file content.
// The Content-Type header is set using the value from the payload's FileDetails.
using (var httpClient = new HttpClient())
{
var fileUploadRequest = new HttpRequestMessage(HttpMethod.Put, fileUploadUrl)
{
Content = new ByteArrayContent(fileContent)
};
fileUploadRequest.Content.Headers.ContentType = new MediaTypeHeaderValue(payload.FileDetails.ContentType);
// Execute the file upload.
var fileUploadResponse = await httpClient.SendAsync(fileUploadRequest);
// The file upload response is expected to return an HTTP 200 (OK) status.
}
Step 3: (GET) Training Content [Batch]
The GET Training Content [Batch] endpoint allows partners to retrieve details about a client's media content library by company id. By sending a GET request, users can access content metadata such as the content ID, title, description, URL, file ID, duration, and optional thumbnail URL. This API provides a way for partners to manage and review individual content items within their LMS integration.
URL: /learningManagementSystem/v1/companies/{companyId}/contents
Response:
{
"models": [
{
"contentId": "string",
"title": "string",
"description": "string",
"url": "string",
"fileId": "string",
"duration": 0,
}
]
}
Step 4: Read (GET) Training Content [Single]
The GET Training Content [Single] endpoint allows partners to retrieve details about specific content in a client media content library by content ID. By sending a GET request, users can access content metadata such as the content ID, title, description, URL, file ID, duration, and optional thumbnail URL. This API provides a way for partners to manage and review individual content items within their LMS integration.
URL: /learningManagementSystem/v1/companies/{companyId}/contents/{contentId}
Response:
"model": {
"contentId": "b2d0db11-f6ed-4cfd-afa0-88a294a686a4",
"title": "Mocked Title",
"description": "Mocked Description",
"url": "https://example.com/mocked",
"fileId": "mockedFileId123",
"duration": 120
},
"usage": {
"companyId": "42570",
"companyName": "test",
"statistics": [
{
"trainingName": "TrainingName",
"dueDates": [
"2025-02-12T00:00:00-06:00",
"2025-02-13T00:00:00-06:00"
],
"totalAssigned": 10,
"totalCompleted": 9
}
]
}
}