Introduction
Welcome to the RedSed LMS API Reference. You can use our API to access RedSeed API endpoints, which can get information on your users, training, courses and more.
You can view code examples in the dark area to the right.
Authentication
Note the authorization header below.
curl "https://api.redseed.me/api/v0/<endpoint>" \
--header 'Authorization: Bearer <YOUR_API_KEY>"
Make sure to replace
<YOUR_API_KEY>
with your API key.
RedSeed uses API keys to allow access to our API. You can request a new RedSeed API key by contacting RedSeed Support.
RedSeed expects for the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer <YOUR_API_KEY>
Users
An active user is required to login and use RedSeed and to access the RedSeed API.
User Attributes
Attribute | Type | Description |
---|---|---|
id |
integer | A unique and autoincrementing identifier for the user which is generated by RedSeed automatically. |
code |
string | A unique employee code, eg. the employee's payroll identifier. |
firstName |
string | First name(s) |
lastName |
string | Last name(s) |
email |
string | Email address |
type |
string | 'HR', 'Manager', 'Trainee', 'System' - User type. Used to set user abilities & permissions. |
status |
string | 'Active', 'Archived' - User status. Archived users cannot access RedSeed, but can still be reported on. |
username |
string | A unique username for the user. This is used to login to RedSeed. |
locale |
string | User locale in ISO/IEC 15897 format. See supported user locales below. |
marker |
boolean | Should this user be able to assess other users' coached activities? |
dateLastLogin |
datetime | The last time the user successfully logged in |
dateArchivedAt |
datetime | The datetime the user was last archived |
dateDeletedAt |
datetime | The datetime the user was deleted |
dateActivityAt |
datetime | The last recorded activity of the user |
dateCreatedAt |
datetime | The datetime the user record was created at |
dateUpdatedAt |
datetime | The datetime the user record was last updated |
location |
Location resource | The users location resource |
userRole |
User role resource | The user role. If the user is NOT assigned a user role this attribute will not be present. |
userIdentities |
array of User Identity resources | All User identity records assigned to the user. If the user has no user identities this attribute will not be present. |
Supported User Locales
Locale | Linguonym |
---|---|
en_AU |
English (Aus) |
en_NZ |
English (NZ) |
en_US |
English (US) |
es_ES |
Español |
fr_FR |
Français |
id_ID |
Bahasa Indonesia |
ja_JP |
日本語 |
pt_BR |
Português |
th_TH |
ภาษาไทย |
Getting users
curl --location --request GET 'https://api.redseed.me/api/v0/users' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": [
// User resource array
],
"links": {
"first": "https://api.redseed.me/api/v0/users?page=1",
"last": "https://api.redseed.me/api/v0/users?page=9",
"prev": null,
"next": "https://api.redseed.me/api/v0/users?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 9,
"links": [
// Pagination links
],
"path": "https://api.redseed.me/api/v0/users",
"per_page": 100,
"to": 100,
"total": 835
}
}
This endpoint is used to fetch a list of users. It returns a JSON object that includes an array of user resources.
Results are returned in pages of 100 users. You can specify the page number to return using the page
query parameter. If no page is specified, the first page will be returned.
Users that have been deleted will not be returned in the results.
HTTP Requests
GET https://api.redseed.me/api/v0/users
GET https://api.redseed.me/api/v0/users/?page=<page_number>
GET https://api.redseed.me/api/v0/users/?location_id=<location_id>
GET https://api.redseed.me/api/v0/users/?location_id=<location_id>&status[]=Active
GET https://api.redseed.me/api/v0/users/?status[]=Active&status[]=Archived
URL Parameters
Parameter | Description |
---|---|
page |
The page of results to retrieve. If no page is specified, the first page will be returned. |
location_id |
Retrieve users from this location and its children |
status[] |
Retrieve users with this status. Supports multiple values. |
Getting a user's details
This endpoint is used to fetch details about a specific user. It returns a JSON object that includes the user's location and user role resources.
curl --location --request GET 'https://api.redseed.me/api/v0/users/188291' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": {
"id": 188291,
"firstName": "API Test",
"lastName": "User",
"email": "apitestuser@redseed.com",
"username": "apitest1",
"code": null,
"type": "HR",
"status": "Active",
"marker": 1,
"locale": "en_NZ",
"dateLastLogin": null,
"dateCreatedAt": "2023-05-30T03:39:33.000000Z",
"dateUpdatedAt": "2023-05-30T03:48:47.000000Z",
"dateArchivedAt": null,
"dateActivityAt": null,
"location": {
"id": 11728,
"status": "ACTIVE",
"description": "Demo",
"code": null,
"dateCreatedAt": null,
"dateUpdatedAt": "2023-05-09T12:00:54.000000Z"
},
"userRole": {
"id": 1588,
"description": "Technical Engineer"
},
"userIdentities": []
}
}
HTTP Request
GET https://api.redseed.me/api/v0/users/<user_id>
URL Parameters
Parameter | Description |
---|---|
<user_id> |
The ID of the user |
Creating a new user
curl --location --request POST 'https://api.redseed.me/api/v0/users' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {MY_API_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "First Name",
"lastName": "Last Name",
"type": "Trainee",
"email": "test@email.com",
"code": "employee_code_1234",
"username": "username123",
"marker": true,
"locale": "en_AU",
"location": {
"id": 11234
}
}'
The above command returns JSON structured like this:
{
"id": 189814,
"firstName": "Test",
"lastName": "API User",
"email": "test@email.com",
"username": "username123",
"code": "employee_code_1234",
"type": "Trainee",
"status": "Active",
"marker": 1,
"locale": "en_NZ",
"dateLastLogin": null,
"dateCreatedAt": "2023-06-21T22:31:30.000000Z",
"dateUpdatedAt": "2023-06-21T22:31:30.000000Z",
"dateArchivedAt": null,
"dateActivityAt": null,
"location": {
"id": 11728,
"status": "ACTIVE",
"description": "Demo",
"code": null,
"dateCreatedAt": null,
"dateUpdatedAt": "2023-06-09T12:00:55.000000Z"
},
"userRole": null,
"userIdentities": []
}
HTTP Request
POST https://api.redseed.me/api/v0/users
Parameters
Attribute | Type | Required / Optional |
---|---|---|
firstName |
String | Required |
lastName |
String | Required |
email |
String | Required |
type |
String | Required |
status |
String | Required |
username |
String | Required |
locale |
String | Required |
marker |
Boolean | Required |
locationId |
Integer | Required |
code |
String | Optional |
role.id |
Integer | Optional |
See User Attributes for more information.
Updating a user
curl --location --request PUT 'https://api.redseed.me/api/v0/users/188291' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {MY_API_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "API Test",
"lastName": "User",
"type": "HR",
"status": "Active",
"marker": 1,
"locale": "en_NZ",
"location":{ "id": 11728},
"email": "newEmailAddress@mail.com",
"username": "apitest1"
}'
The above command returns JSON structured like this:
{
"id": 188291,
"firstName": "API Test",
"lastName": "User",
"email": "newEmailAddress@mail.com",
"username": "apitest1",
"code": null,
"type": "HR",
"status": "Active",
"marker": 1,
"locale": "en_NZ",
"dateLastLogin": "2023-06-07 16:09:40",
"dateCreatedAt": "2023-05-30T03:39:33.000000Z",
"dateUpdatedAt": "2023-06-23T01:01:06.000000Z",
"dateArchivedAt": null,
"dateActivityAt": "2023-06-07T04:11:24.000000Z"
}
HTTP Request
PUT https://api.redseed.me/api/v0/users/<user_id>
URL Parameters
Parameter | Description |
---|---|
<user_id> |
The ID of the user |
Parameters
Attribute | Type | Required / Optional |
---|---|---|
firstName |
String | Required |
lastName |
String | Required |
email |
String | Required |
type |
String | Required |
status |
String | Required |
username |
String | Required |
locale |
String | Required |
marker |
Boolean | Required |
locationId |
Integer | Required |
code |
String | Optional |
role.id |
Integer | Optional |
See User Attributes for more information.
Deleting a user
Users that have been deleted will not be returned in any other API responses. There is currently no way to restore a deleted user via the API. Please contact support if you need to restore a deleted user.
curl --location --request DELETE 'https://api.redseed.me/api/v0/users/188291' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {MY_API_TOKEN}' \
--header 'Content-Type: application/json'
The above command returns JSON structured like this:
{
"id": 188291,
"firstName": "API Test",
"lastName": "User",
"email": "newEmailAddress@mail.com",
"username": "apitest1",
"code": null,
"type": "HR",
"status": "Active",
"marker": 1,
"locale": "en_NZ",
"dateLastLogin": "2023-06-07 16:09:40",
"dateCreatedAt": "2023-05-30T03:39:33.000000Z",
"dateUpdatedAt": "2023-06-23T01:01:06.000000Z",
"dateArchivedAt": null,
"dateDeletedAt": "2025-01-22T08:15:00.000000Z",
"dateActivityAt": "2023-06-07T04:11:24.000000Z"
}
HTTP Request
DELETE https://api.redseed.me/api/v0/users/<user_id>
URL Parameters
Parameter | Description |
---|---|
<user_id> |
The ID of the user |
Locations
Location Attributes
Attribute | Type | Description |
---|---|---|
id |
integer | A unique and autoincrementing identifier for the user which is generated by RedSeed automatically. |
status |
'ACTIVE', 'ARCHIVED' | Location status |
description |
string | Location description |
code |
string | Location code |
coach |
User | Location coach |
dateCreatedAt |
datetime | The datetime the location resource was created at |
dateUpdatedAt |
datetime | The datetime the location resource was last updated |
Get location
Update location
Moving locations
RedSeed does not currently provide API access to move locations and their children. Please contact RedSeed support if you need to alter your location hierarchy.
Courses
Course Attributes
Attribute | Type | Description |
---|---|---|
id |
integer | A unique and autoincrementing identifier for the Course which is generated by RedSeed automatically. |
name |
text | The course name |
status |
'Active', 'Locked', 'Inactive', 'System' | The Course status. see User type. Used to set user abilities & permissions |
activeVersion |
Course version resource | The active version of the course. Courses may have multiple versions but only one may be active. |
description |
string | Course description |
completion_time |
integer | The median course completion time in seconds |
dateCreatedAt |
datetime | The datetime the course resource was created at |
dateUpdatedAt |
datetime | The datetime the course resource was last updated at |
dateReleasedAt |
datetime | The datetime the course resource was released at |
versions |
array of course versions | All Course version resources associated with this course, including the active course version. |
categories |
array of course categories | All Course categories that have been assigned to the course. |
Course type
Course type controls if a user can be enrolled in a course and if an existing enrollment is visible.
Parameter | Description |
---|---|
Active | Users can be enrolled in the course. Users with existing enrollments can complete the course. |
Locked | Users cannot be enrolled in the course. Users with existing enrollments can complete the course. |
Inactive | Users cannot be enrolled in the course. Existing Enrollments are not shown. |
Getting courses
curl --location --request GET 'https://api.redseed.me/api/v0/courses' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": [
{
"id": 42694364,
"name": "Red Course",
"status": "Active",
"description": "A course about red",
"completion_time": 600,
"dateCreatedAt": "2024-01-31T19:49:30.000000Z",
"dateUpdatedAt": "2024-01-31T19:49:30.000000Z",
"dateReleasedAt": "2024-01-31T19:49:30.000000Z",
"versions": [
{
"id": 14,
"version_id": 2,
"launch_url": "index.html",
"schema_version": "xapi",
"dateCreatedAt": "2024-01-31T19:49:30.000000Z",
"dateUpdatedAt": "2024-01-31T19:49:30.000000Z"
}
]
},
{
"id": 355230263,
"name": "Blue Course",
"status": "Active",
"description": "A course about blue",
"completion_time": 0,
"dateCreatedAt": "2024-01-31T19:49:30.000000Z",
"dateUpdatedAt": "2024-01-31T19:49:30.000000Z",
"dateReleasedAt": "2024-01-31T19:49:30.000000Z",
"versions": [
{
"id": 15,
"version_id": 3,
"launch_url": "index.html",
"schema_version": "1.2",
"dateCreatedAt": "2024-01-31T19:49:30.000000Z",
"dateUpdatedAt": "2024-01-31T19:49:30.000000Z"
}
]
}
],
"links": {
...
},
"meta": {
...
}
}
This endpoint retrieves all course records. It returns a JSON object that includes an array of course resources.
Results are returned in pages of 100 records. You can specify the page number to return using the page query parameter. If no page is specified, the first page will be returned.
HTTP Request Examples
Fetch all courses :
GET https://api.redseed.me/api/v0/courses
Fetch page 2 of all courses :
GET https://api.redseed.me/api/v0/courses?page=2
Fetch all courses with a course.type of Active :
GET https://api.redseed.me/api/v0/courses?status[]=Active
Fetch course 2205 :
GET https://api.redseed.me/api/v0/courses/?course_id[]=2205
Fetch courses 3306 & 3307 :
GET https://api.redseed.me/api/v0/courses/?course_id[]=3306&course_id[]=3307
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | The page of results to retrieve. If no page is specified, the first page will be returned. |
course_id[] | - | retrieve this course resource. Supports multiple values. |
status[] | All | retrive courses with this course type only. Supports multiple values. |
Getting course details
You can also fetch a single course resource like this :
curl --location --request GET 'https://api.redseed.me/api/v0/course/297065' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": {
"id": 205141907,
"name": "Orange Course",
"status": "Active",
"description": "A course about oranges",
"completion_time": 1230,
"dateCreatedAt": "2017-09-15T01:24:53.000000Z",
"dateUpdatedAt": "2017-09-15T01:24:53.000000Z",
"dateReleasedAt": "2017-09-15T01:24:53.000000Z"
}
}
This endpoint is used to fetch details about a specific course record. It returns a JSON object.
HTTP Request
GET https://api.redseed.me/api/v0/course/<course.id>
URL Parameters
Parameter | Description |
---|---|
<course.id> |
The ID of the course resource to retrieve. |
Training
Training resources join Users to Courses. A training resource is created when a user is enrolled in a course. A training resource is deleted when a user is unenrolled from a course.
Training attributes
Attribute | Type | Description |
---|---|---|
id |
integer | A unique and autoincrementing identifier for the training resource. Generated automatically. |
status |
text | 'Training', 'Coaching', 'NotStarted', 'Completed' - Training status. |
percentComplete |
integer | How far through the training the user is. This is a percentage value. |
seconds |
integer | How many seconds the trainee has spent on the training. |
dateCreatedAt |
datetime | When the trainee was enrolled in the course. |
dateStartedAt |
datetime | When the trainee started the training. |
dateUpdatedAt |
datetime | When the training record was last updated. |
dateCompletedAt |
datetime | When the trainee completed the training. |
dateDueAt |
datetime | When the training is due to be completed. |
dateExpiresAt |
datetime | When the training expires. This is set when the training is created and is based on the course's expiry period. |
dateDeletedAt |
datetime | When the training record was deleted. This is set when the training is deleted. |
dateInactiveAt |
datetime | When the training will be - or was - marked as inactive. This is set when the training is marked as inactive. |
user |
UserResource | The trainee enrolled in this training. |
coach |
UserResource | The coach assigned to this training. |
course |
CourseResource | The course this training is for. |
courseVersion |
CourseVersionResource | The course version this training is for. |
media |
MediaResource | Any media associated with this training. |
tags |
Array of TagResources | Any tags associated with this training. |
Getting training resources
curl --location --request GET 'https://api.redseed.me/api/v0/training' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": [
// Training resource array
],
"links": {
"first": "https://api.redseed.me/api/v0/training?page=1",
"last": "https://api.redseed.me/api/v0/training?page=9",
"prev": null,
"next": "https://api.redseed.me/api/v0/training?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 9,
"links": [
// Pagination links
],
"path": "https://api.redseed.me/api/v0/training",
"per_page": 100,
"to": 100,
"total": 835
}
}
This endpoint is used to fetch all training records. It returns a JSON object that includes an array of training resources.
Results are returned in pages of 1000 records. You can specify the page number to return using the page
query parameter. If no page is specified, the first page will be returned.
HTTP Requests
GET https://api.redseed.me/api/v0/training
GET https://api.redseed.me/api/v0/training/?course_id[]=<course_id>
GET https://api.redseed.me/api/v0/training/?course_id[]=<course_id>&course_id[]=<course_id>
GET https://api.redseed.me/api/v0/training/?user_id[]=<user_id>
GET https://api.redseed.me/api/v0/training/?coach_id[]=<coach_id>&course_id[]=<course_id>
GET https://api.redseed.me/api/v0/training/?location_id=<location_id>&course_id[]=<course_id>
URL Parameters
Parameter | Description |
---|---|
page |
The page of results to retrieve. If no page is specified, the first page will be returned. |
location_id |
retrieve training for users at this location and its children. |
user_id[] |
retrieve training for this user. Supports multiple values. |
coach_id[] |
retrieve training records assigned to this coach. Supports multiple values. |
course_id[] |
retrieve training records for this course. Supports multiple values. |
Getting training details
curl --location --request GET 'https://api.redseed.me/api/v0/training/297065' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": {
"id": 297065,
"status": "NotStarted",
"percentComplete": 0,
"seconds": 0,
"dateCreatedAt": "2017-09-15T01:24:53.000000Z",
"dateStartedAt": null,
"dateUpdatedAt": "2021-07-12T03:21:32.000000Z",
"dateCompletedAt": null,
"dateExpiresAt": null,
"dateDeletedAt": null,
"dateInactiveAt": null,
"user": {
// User Resource
},
"coach": {
// User Resource
},
"course": {
// Course Resource
},
"courseVersion": {
// Course Version Resource
},
"media": {
// Media Resource
},
//Array of Tag Resources
"tags": [
{
"id": 13,
"name": "red"
},
{
"id": 14,
"name": "blue"
},
{
"id": 16,
"name": "green"
}
]
}
}
This endpoint is used to fetch details about a specific training record. It returns a JSON object.
HTTP Request
GET https://api.redseed.me/api/v0/training/<training_id>
URL Parameters
Parameter | Description |
---|---|
<training_id> |
The ID of the training record to retrieve. |
Enrolling a user in a course
curl --location --request POST 'https://api.redseed.me/api/v0/training' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {MY_API_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"user": {
"id": 189814
},
"coach": {
"id": 70152
},
"course": {
"id": 2943
}
}'
The above command returns JSON structured like this:
{
"id": 2083944,
"status": "NotStarted",
"percentComplete": 0,
"seconds": 0,
"dateCreatedAt": "2023-06-26T02:41:27.000000Z",
"dateStartedAt": null,
"dateUpdatedAt": "2023-06-26T02:41:27.000000Z",
"dateCompletedAt": null,
"dateExpiresAt": null,
"dateDeletedAt": null,
"dateInactiveAt": null,
"course": {
"id": 2943,
"name": "1. Opening the Sale",
"status": "Active",
"certificate": 0,
"active_version": 1951,
"description": null,
"completion_time": 1015,
"dateCreatedAt": "2021-04-27 16:48:22",
"dateUpdatedAt": "2023-05-30 16:16:28",
"dateReleasedAt": "2021-04-27 16:48:22"
}
}
This endpoint is used to enroll a user in a course. It returns a JSON object.
HTTP Request
POST https://api.redseed.me/api/v0/training
Parameters
Attribute | Type | Required / Optional |
---|---|---|
user.id |
integer | Required |
coach.id |
integer | Required |
course.id |
integer | Required |
See Training Attributes for more information.
Unenrolling a user from a course
curl --location --request DELETE 'https://api.redseed.me/api/v0/training/2083944' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
Users can be unenrolled from a course by deleting the training record. This endpoint returns a 204 HTTP code.
HTTP Request
DELETE https://api.redseed.me/api/v0/training/<training_id>
URL Parameters
Parameter | Description |
---|---|
<training_id> |
The id of the training record to remove. |
Getting self-enrollable courses
curl --location --request POST 'https://api.redseed.me/api/v0/self_enroll' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {MY_API_TOKEN}' \
--header 'Content-Type: application/json' \
The above command returns JSON structured like this:
{
"data": [
{
"id": 231852427,
"name": "Red Course",
"status": "Active",
"certificate": 1,
"activeVersion": {
"id": 10724,
"version_id": 3,
"launch_url": "index.html",
"schema_version": "xapi",
"dateCreatedAt": "2024-01-31T03:16:59.000000Z",
"dateUpdatedAt": "2024-01-31T03:16:59.000000Z"
},
"description": "A course about Red",
"completion_time": 0,
"dateCreatedAt": "2024-01-31T03:16:59.000000Z",
"dateUpdatedAt":"2024-01-31T03:16:59.000000Z",
"dateReleasedAt": null,
"categories": [
{
"id": 8908,
"name": "leadership"
},
{
"id": 8909,
"name": "product knowledge"
}
]
},
{
"id": 786489599,
"name": "Blue Course",
"status": "Active",
"certificate": 1,
"activeVersion": {
"id": 10725,
"version_id": 3,
"launch_url": "index.html",
"schema_version": "xapi",
"dateCreatedAt": "2024-01-31T03:16:59.000000Z",
"dateUpdatedAt": "2024-01-31T03:16:59.000000Z"
},
"description": "A course about Blue",
"completion_time": 0,
"dateCreatedAt": "2024-01-31T03:16:59.000000Z",
"dateUpdatedAt": "2024-01-31T03:16:59.000000Z",
"dateReleasedAt": "2024-01-31T03:16:59.000000Z",
"categories": [
{
"id": 8904,
"name": "coaching"
},
{
"id": 8905,
"name": "leadership"
}
]
}
]
}
This endpoint is used to fetch all courses that the user can self enroll themselves in. It returns a JSON object.
HTTP Request
GET https://api.redseed.me/api/v0/self_enroll
Self Enrolling in a course
curl --location --request POST 'https://api.redseed.me/api/v0/self_enroll/{course.id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {MY_API_TOKEN}' \
--header 'Content-Type: application/json' \
If the The above command is successful it will return a single training JSON resource :
{
"id": 167,
"status": "NotStarted",
"percentComplete": null,
"seconds": 0,
"launch_url": "https:\/\/www.redseed.me\/training\/8392\/723938303\/1143945081\/167",
"dateCreatedAt": "2024-01-31T03:30:49.000000Z",
"dateStartedAt": "2024-01-31T03:30:49.000000Z",
"dateUpdatedAt": "2024-01-31T03:30:49.000000Z",
"dateCompletedAt": null,
"dateExpiresAt": null,
"dateDeletedAt": null,
"dateInactiveAt": "2024-02-14T03:30:49.000000Z",
"user": {
"id": 1143945081,
"firstName": "Xzavier",
"lastName": "Little",
"email": "angeline162@example.com",
"username": "160379",
"code": "72461363",
"type": "Trainee",
"status": "Active",
"marker": 0,
"locale": "en_NZ",
"dateLastLogin": null,
"dateCreatedAt": "2024-01-31T03:30:49.000000Z",
"dateUpdatedAt": "2024-01-31T03:30:49.000000Z",
"dateArchivedAt": null,
"dateActivityAt": "2024-01-31T03:30:49.000000Z"
},
"course": {
"id": 723938303,
"name": "Green Course",
"status": "Active",
"certificate": 1,
"activeVersion": {
"id": null,
"version_id": 1,
"launch_url": null,
"schema_version": "RedSeed",
"dateCreatedAt": null,
"dateUpdatedAt": null
},
"description": "A course about green",
"completion_time": 0,
"dateCreatedAt": "2024-01-31T03:30:49.000000Z",
"dateUpdatedAt": "2024-01-31T03:30:49.000000Z",
"dateReleasedAt": "2024-01-31T03:30:49.000000Z"
}
}
This endpoint is used to self enroll a user in a course. It returns a JSON Training resource object.
HTTP Request
POST https://api.redseed.me/api/v0/self_enroll/{course.id}
Pathways
Pathways consist of a group of courses. In general, a pathway will enroll trainees in a course after they have completed the previous course in the pathway. Pathways can be used to create a structured learning program for trainees.
Pathway Attributes
Attribute | Type | Description |
---|---|---|
id |
string | A uuid that uniquely identifies the pathway |
name |
text | The name of the pathway |
description |
text | A description of the pathway |
status |
text | The status of the pathway. Can be 'Active' or 'Locked' |
dateCreatedAt |
datetime | The date the pathway was created. |
dateUpdatedAt |
datetime | The date the pathway was last updated. |
dateDeletedAt |
datetime | The date the pathway was deleted. |
enrollment_rules |
Enrollment Rule | Enrollment rule resources associated with this pathway. |
Enrollment Rules
Attribute | Type | Description |
---|---|---|
id |
string | A uuid that uniquely identifies the enrollment rule |
position |
integer | the enrollment rule position / order |
type |
text | INITIAL or COMPLETE. Initial rules don't require a completed course. COMPLETE rules require a course to be completed. |
completeCourse |
Course | The course that needs to be completed for this enrollment rule to be satisified. |
enrollCourse |
Course | The course that this rule will enroll a user in when it is satisfied |
delay |
integer | Used to wait a number of days after the incoming Course has been completed |
created_at |
datetime | The date the enrollment rule was created. |
updated_at |
datetime | the date the enrollment rule was last updated. |
Getting pathways
curl --location --request GET 'https://api.redseed.me/api/v0/pathways' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": [
// Pathway resource array
],
"links": {
"first": "https://api.redseed.me/api/v0/pathways?page=1",
"last": "https://api.redseed.me/api/v0/pathways?page=9",
"prev": null,
"next": "https://api.redseed.me/api/v0/pathways?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 9,
"links": [
// Pagination links
],
"path": "https://api.redseed.me/api/v0/pathways",
"per_page": 100,
"to": 100,
"total": 835
}
}
HTTP Request
GET https://api.redseed.me/api/v0/pathways/?page=<page_number>
URL Parameters
Parameter | Description |
---|---|
<page_number> |
The page of results to retrieve. If no page is specified, the first page will be returned. |
Getting pathway details
curl --location --request GET 'https://api.redseed.me/api/v0/pathways/d6ad3424-ef9c-466c-b783-80a688645ce5' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"data": {
"id": "d6ad3424-ef9c-466c-b783-80a688645ce5",
"name": "Pathway Name",
"description": "This pathway contains courses about the colour red and blue.",
"status": "Active",
"dateCreatedAt": "2023-06-20T21:22:05.000000Z",
"dateUpdatedAt": "2023-06-20T21:22:05.000000Z",
"dateDeletedAt": null,
"enrollment_rules" : [
{
"id" : 176,
"position" : 1,
"type" : "INITIAL",
"completeCourse" : null,
"enrollCourse" : {
"id" : 676577838,
"name" : "Lake Savanah",
"status" : "Active",
"description" : null,
"completion_time" : 0,
"dateCreatedAt" : null,
"dateUpdatedAt" : null,
"dateReleasedAt" : null,
"image_url" : "https://www.redseed.me/images/courses/course_default.png"
},
"delay" : 0,
"created_at" : "2023-02-13T23:30:00.000000Z",
"updated_at" : "2023-02-13T23:30:00.000000Z",
},
{
"id" : 177,
"position" : 2,
"type" : "COMPLETE",
"completeCourse" : {
"id" : 676577838,
"name" : "Lake Savanah",
"status" : "Active",
"description" : null,
"completion_time" : 0,
"dateCreatedAt" : null,
"dateUpdatedAt" : null,
"dateReleasedAt" : "-000001-11-29T12:20:56.000000Z",
"image_url" : "https://www.redseed.me/images/courses/course_default.png",
}
}
]
}
}
HTTP Request
GET https://api.redseed.me/api/v0/pathways/<pathway_id>
URL Parameters
Parameter | Description |
---|---|
<pathway_id> |
The UUID of the pathway record to retrieve. |
Enrolling a user in a pathway
curl --location --request POST 'https://api.redseed.me/api/v0/user_pathways' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"user": {
"id": 189814
},
"pathway": {
"uuid":"4f858f3e-8337-4220-bd61-cc72f3cc4cf1"
}
}'
The above command returns a JSON response structured like this:
{
"id": 132447,
"status": "Active",
"trainingCompleted": 0,
"trainingTotal": 3,
"dateCreatedAt": "2023-06-29T02:00:49.000000Z",
"dateUpdatedAt": "2023-06-29T02:00:50.000000Z",
"dateDeletedAt": null,
"pathway": {
"id": "4f858f3e-8337-4220-bd61-cc72f3cc4cf1",
"name": "Coms demo pathway",
"description": "Demo pathway that allows users to try out some of the communication modules for RedSeed.",
"status": "Active",
"dateCreatedAt": "2023-06-26T00:12:16.000000Z",
"dateUpdatedAt": "2023-06-26T00:12:16.000000Z",
"dateDeletedAt": null
},
"user": {
"id": 189814,
"firstName": "Test",
"lastName": "API User",
"email": "test.api1234@mail.com",
"username": "test.api1234@mail.com",
"code": "employee_code_1234",
"type": "Trainee",
"status": "Active",
"marker": 1,
"locale": "en_NZ",
"dateLastLogin": null,
"dateCreatedAt": "2023-06-21T22:31:30.000000Z",
"dateUpdatedAt": "2023-06-21T22:31:30.000000Z",
"dateArchivedAt": null,
"dateActivityAt": null,
"location": {
"id": 11728,
"status": "ACTIVE",
"description": "Demo",
"code": null,
"dateCreatedAt": null,
"dateUpdatedAt": "2023-06-28T12:00:50.000000Z"
}
}
}
HTTP Request
POST https://api.redseed.me/api/v0/user_pathways
Parameters
Attribute | Type | Required / Optional |
---|---|---|
user.id |
integer | Required |
pathway.uuid |
string | Required |
Unenrolling a user from a pathway
curl --location --request DELETE 'https://api.redseed.me/api/v0/user_pathways/132447' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
Users can be unenrolled from a pathway by deleting the user pathway record. This endpoint returns a 204 HTTP code.
HTTP Request
DELETE https://api.redseed.me/api/v0/user_pathways/<user_pathway_id>
URL Parameters
Parameter | Description |
---|---|
<user_pathway_id> |
The id of the user pathway record to remove. |
Engagement
Engagement is the percentage of active training at a Location.
Engagement Attributes
Attribute | Type | Description |
---|---|---|
location |
Location resource | The location resource |
NotStarted |
integer | The number of enrollments that are Not Started |
Training |
integer | The number of enrollments that are have a status of Training |
Inactive |
integer | The number of enrollments that have a status of Inactive |
Completed |
integer | The number of enrollments that have been completed |
Total |
integer | The total number of enrollments |
Engagement |
ratio | The ratio of enrollments that are training OR Completed |
Getting Engagement
curl --location --request GET 'https://api.redseed.me/api/v0/engagement_summary/<location_id>' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
The above command returns a JSON response structured like this:
{
"location": {
"id": 508798981,
"status": "ACTIVE",
"description": "Red Retail",
"code": "RED88",
"dateCreatedAt": "2023-02-13T23:30:00.000000Z",
"dateUpdatedAt": "2023-02-13T23:30:00.000000Z"
},
"NotStarted": 16,
"Training": 31,
"Inactive": 89,
"Completed": 74,
"Total": 210,
"Engagement": 0.5
}
This endpoint is used to fetch a summary of the engagement at a specific location. If no location is specified, the organisations's top location will be used. The response will contain the number of enrollments that are Not Started, Training, Inactive, and Completed, as well as the total number of enrollments, and the engagement ratio. The engagement ratio is calculated as the number of enrollments that are Training or Completed, divided by the total number of enrollments. The response includes the enrolments at child locations.
HTTP Requests
GET https://api.redseed.me/api/v0/engagement_summary
GET https://api.redseed.me/api/v0/engagement_summary/<location_id>
URL Parameters
Parameter | Description |
---|---|
location_id |
The location to retrieve engagement for. if no location is specified, the client's top location will be used. |
Webhooks
RedSeed LMS allows you to configure webhooks to be notified when certain events occur in the system. This allows you to integrate RedSeed with other systems and automate processes.
Setting up webhooks
To set up a webhook, you will need to provide:
- a URL to send the webhook to,
- a list of events to be notified about, and
- any headers we should include in the request.
You can do this by sending a request to support [at] redseed.com.
User created
The "UserCreated" webhook payload contains the newly-created user resource.
{
"event": "UserCreated",
"payload": {
"id": 190452,
"firstName": "Webhook",
"lastName": "TestUser",
"email": "test@mail.com",
"username": "webhook1",
"code": null,
"type": "Trainee",
"status": "Active",
"marker": 0,
"locale": "en_NZ",
"dateLastLogin": null,
"dateCreatedAt": "2023-07-04T23:40:21.000000Z",
"dateUpdatedAt": "2023-07-04T23:40:21.000000Z",
"dateArchivedAt": null,
"dateActivityAt": null,
"location": {
// Location resource
},
"userRole": {
// UserRole resource
},
"userIdentities": [
// UserIdentity resources
]
}
}
This event is triggered when a user is created.
User archived
The "UserArchived" webhook payload contains the newly-created user resource.
{
"event": "UserArchived",
"payload": {
"id": 190452,
"firstName": "Webhook",
"lastName": "TestUser",
"email": "test@mail.com",
"username": "webhook1",
"code": null,
"type": "Trainee",
"status": "Archived",
"marker": 0,
"locale": "en_NZ",
"dateLastLogin": null,
"dateCreatedAt": "2023-07-04T23:40:21.000000Z",
"dateUpdatedAt": "2023-07-04T23:40:21.000000Z",
"dateArchivedAt": "2023-07-05T23:40:21.000000Z",
"dateActivityAt": null,
"location": {
// Location resource
},
"userRole": {
// UserRole resource
},
"userIdentities": [
// UserIdentity resources
]
}
}
This event is triggered when a user is created.
Training completed
The "TrainingCompleted" webhook payload contains a training resource, including the user, coach, and course resources.
{
"event": "TrainingCompleted",
"payload": {
"id": 1754313,
"status": "Completed",
"percentComplete": 100,
"seconds": 0,
"dateCreatedAt": "2022-10-11T02:24:26.000000Z",
"dateStartedAt": null,
"dateUpdatedAt": "2023-06-30T03:11:39.000000Z",
"dateCompletedAt": "2023-06-30T03:11:39.000000Z",
"dateExpiresAt": null,
"dateDeletedAt": null,
"dateInactiveAt": null,
"user": {
// User resource
},
"coach": {
// User resource
},
"course": {
// Course resource
},
}
}
This event is triggered when a user completes a course.
Training expired
The "TrainingExpired" webhook payload contains a training resource, including the user, coach, and course resources.
{
"event": "TrainingExpired",
"payload": {
"id": 1754313,
"status": "Completed",
"percentComplete": 100,
"seconds": 312,
"dateCreatedAt": "2022-10-11T02:24:26.000000Z",
"dateStartedAt": null,
"dateUpdatedAt": "2023-06-30T03:11:39.000000Z",
"dateCompletedAt": "2023-06-30T03:11:39.000000Z",
"dateExpiresAt": "2023-09-30T03:11:39.000000Z",
"dateDeletedAt": null,
"dateInactiveAt": null,
"user": {
// User resource
},
"coach": {
// User resource
},
"course": {
// Course resource
},
}
}
This event is triggered when a user's training expires. Training is checked for expiry every hour, on the hour.
Pathway completed
The "UserPathwayCompleted" webhook payload contains a UserPathway resource, including the user, coach, and course resources.
{
"event": "UserPathwayCompleted",
"payload": {
"id": 80548,
"status": "Completed",
"trainingCompleted": 3,
"trainingTotal": 3,
"dateCreatedAt": "2022-03-31T18:58:43.000000Z",
"dateUpdatedAt": "2023-07-05T00:42:49.000000Z",
"dateDeletedAt": null,
"client": {
// RedSeed Client resource
},
"pathway": {
"id": "03d12776-7083-4958-ab03-0714cf2c2194",
"name": "Test pathway",
"description": "Pathway to test completion webhook",
"status": "Active",
"dateCreatedAt": "2020-03-30T19:17:20.000000Z",
"dateUpdatedAt": "2021-11-23T18:06:35.000000Z",
"dateDeletedAt": null,
"courses": [
// Course resources
]
},
"user": {
// User resource
"location": {
// Location resource
},
}
}
}
}
This event is triggered when a user completes a course.
Errors
The RedSeed API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The resource requested is hidden for administrators only. |
404 | Not Found -- The specified resource could not be found. |
405 | Method Not Allowed -- You tried to access an endpoint with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't json. |
422 | Unprocessable Entity - You submitted a create or an update request that fails validation. Check the attributes you sent and the error messages and try again. |
429 | Too Many Requests -- You're making too many request! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |