Course API (Get , Create and Update)
Course API
Get Courses: Provides the details (all list/by id/by filter) of course via Litmos Commerce API.
Note: All requests must be Authenticated.
Authentication and Authorization
Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.
Header | Description |
CompanyLoginId | Company Login Id (provisioned by ViewCentral account management) |
ProductId | Product Id. 1=Learning Management, 2=Event Management |
Username | User account username |
Password | User account password |
Request URI :
1. Get details of all courses in Litmos commerce application (subscription package and bundle are excluded) –
GET https://api.viewcentral.com/api/courses/
Response Codes:
HTTP Status | Description |
200 | Operation successful. course object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. course object not found |
Response Example:
{ "Success": true, "Error": null, "Data": [ { "AccessLimit": " Int [max length 4]", "Active": " Int [max length 4]", "BusinessUnit": { "ID": " Int [max length 4]" }, "Description": "String [max length 255]", "Directory": "String [max length 255]", "AccessDuration": " Int [max length 4]", "DurationType": " Varchar [max length 50]", "Duration": " Numeric [max length 9]", "ID": "Int [max length 4]", "Name": "String [max length 255]", "CourseDisplayName": "Optional String [max length 255]", "Url": " String [max length 255]", "ImageUrl": " String [max length 255]", "ImageUrl2": " String [max length 255]", "NumberOfCredits": "Numeric [max length 13]", "ProductId": " Varchar [max length 50]", "RosterDescription": " String [max length 255]", "StartPage": " String [max length 255]", "FullDescription": "String [max length 255]", "TrainingHours": "Numeric [max length 9]", "CustomDetail1": "String [max length 2048]", "CustomDetail2": "String [max length 2048]", "CustomDetail3": "String [max length 2048]", "CustomDetail4": "String [max length 2048]", "CustomDetail5": "String [max length 2048]", "CustomDetail6": "String [max length 1024]", "DeliveryMethod": "string [max length 1024]", "SortOrder": " int[max length 4]", "VendorID": "Optional int[max length 4]", "Units": "Numeric [max length 5]", "Modified": { "CreatedBy": "string [max length 50]", "CreatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]", "UpdatedBy": "string [max length 50]", "UpdatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]" }, "Links": [ { "Rel": "Self", "Href": "/courses/{id}", "Method": "GET" }, { "Rel": "AttendeeGroup", "Href": "/courses/{id}/attendee-groups", "Method": "GET" }, { "Rel": "Prerequisites", "Href": "/courses/{id}/prerequisites", "Method": "GET" }, { "Rel": "Categories", "Href": "/courses/{id}/categories", "Method": "GET" }, { "Rel": "Translations", "Href": "courses/{id}/translations", "Method": "GET" } ] } ] }
2. Get details of course using filter in Litmos commerce application (subscription package and bundle are excluded) –
GET https://api.viewcentral.com/api/courses?name=
Request Filters : Name = Course name.
Sl.No | Key | Value |
1 | name | String [max length 255] |
Response Codes:
HTTP Status | Description |
200 | Operation successful. course object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. course object not found |
Response Example:
Click here to see single ‘Course’ response example
3. Get details of course using course id in Litmos commerce application (subscription package and bundle are excluded) –
GET https://api.viewcentral.com/api/courses/{ID}
Response Codes :
HTTP Status | Description |
200 | Operation successful. course object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. course object not found |
Create Course ( ClassRoom only) :
Create course via Litmos Commerce API. (Provide course object in request body).
Note: All requests must be Authenticated.
Authentication and Authorization
Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.
Header | Description |
CompanyLoginId | Company Login Id (provisioned by ViewCentral account management) |
ProductId | Product Id. 1=Learning Management, 2=Event Management |
Username | User account username |
Password | User account password |
Request: Provide created course object in request body
URI: POST https://api.viewcentral.com/api/Courses
Request Example :
{ "Active": "Bool", "BusinessUnit": { "ID": "Optional int [max length 4]" }, "Description": "Optional string [max length 255]", "DurationType": "Optional string [max length 50]", "Duration": "Optional string [max length 9]", "Name": "Required string [max length 255]", "CourseDisplayName": "Optional String [max length 255]", "Url": "Optional string [max length 255]", "ImageUrl": "Optional string [max length 255]", "ImageUrl2": "Optional string [max length 255]", "NumberOfCredits": "Optional numeric[max length 13]", "ProductId": "Optional string[max length 50]", "RosterDescription": "Optional string[max length 255]", "FullDescription": "Optional string[max length 255]", "TrainingHours": "Optional numeric[max length 9]", "CustomDetail1": "Optional string [max length 2048]", "CustomDetail2": "Optional string [max length 2048]", "CustomDetail3": "Optional string [max length 2048]", "CustomDetail4": "Optional string [max length 2048]", "CustomDetail5": "Optional string [max length 2048]", "CustomDetail6": "Optional string [max length 1024]", "Units": "Optional numeric[max length 9]", "DeliveryMethod": "Required string [max length 1024]", "SortOrder": "Optional int[max length 4]", "VendorID": "Optional int[max length 4]" }
Response Codes:
HTTP Status | Description |
201 | Operation successful. course object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. course object not found |
Update Course ( ClassRoom only) :
Update course via Litmos Commerce API. (Provide course object in request body).
Note: All requests must be Authenticated.
Authentication and Authorization
Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.
Header | Description |
CompanyLoginId | Company Login Id (provisioned by ViewCentral account management) |
ProductId | Product Id. 1=Learning Management, 2=Event Management |
Username | User account username |
Password | User account password |
NOTE: this operation supports complete object update and partial object update as well .If the API request data does not supply ALL properties/fields with their intended values, the fields not supplied will be assigned the default value: NULL. If record previously had data in this field, the value will now be set to previous value. For example, course record is added with the ‘FullDescription’ set to “Course FD”. With the API (PUT action) to update, if the course.‘FullDescription’ property is not supplied in the API request, the ‘FullDescription’ value will not be changed means it has value of “Course FD”.
Request : Provide updated course object in request body.
URI: PUT https://api.viewcentral.com/api/courses/{ID}
Request example:
{ "Active": "Bool", "BusinessUnit": { "ID": "Optional int [max length 4]" }, "Description": "Optional string [max length 255]", "DurationType": "Optional string [max length 50]", "Duration": "Optional string [max length 9]", "Name": "Required string [max length 255]", "CourseDisplayName": "Optional String [max length 255]", "Url": "Optional string [max length 255]", "ImageUrl": "Optional string [max length 255]", "ImageUrl2": "Optional string [max length 255]", "NumberOfCredits": "Optional numeric[max length 13]", "ProductId": "Optional string[max length 50]", "RosterDescription": "Optional string[max length 255]", "FullDescription": "Optional string[max length 255]", "TrainingHours": "Optional numeric[max length 9]", "CustomDetail1": "Optional string [max length 2048]", "CustomDetail2": "Optional string [max length 2048]", "CustomDetail3": "Optional string [max length 2048]", "CustomDetail4": "Optional string [max length 2048]", "CustomDetail5": "Optional string [max length 2048]", "CustomDetail6": "Optional string [max length 1024]", "Units": "Optional numeric[max length 9]", "DeliveryMethod": "Required string [max length 1024]", "SortOrder": "Optional int[max length 4]", "VendorID": "Optional int[max length 4]" }
Response Codes:
HTTP Status | Description |
200 | Operation successful. course object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. course object not found |