Introduction
List of all API endpoints
Welcome to our API documentation!
Authenticating requests
This API is not authenticated.
Users
You can perform user management tasks like creating, deleting and updating users.
Retrieve Custom User Fields that needs to be shown on the Registration page
Retrieves the details of pre saved Custom User Fields.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/customRegistrationFields" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/customRegistrationFields"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"fields": {
"user_meta_key_1": {
"id": 1,
"type": "text",
"label": "Gender",
"defaultValue": null,
"isRequired": false,
"optionLabel": [],
"isFieldOnRegistrationPage": false,
"isFieldOnCertificate": true,
"includeInReportExports": [
"export-users",
"export-orders"
]
},
"user_meta_key_2": {
"id": 2,
"type": "textarea",
"label": "What is your home address",
"defaultValue": null,
"isRequired": true,
"optionLabel": [],
"isFieldOnRegistrationPage": true,
"isFieldOnCertificate": false,
"includeInReportExports": []
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the status of a webinar registration for the given user and course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/update-webinar-status?ids=%5B101%2C+102%2C+103%5D&status=%22approved%22&webinarId=55&portalId=12" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/update-webinar-status"
);
const params = {
"ids": "[101, 102, 103]",
"status": ""approved"",
"webinarId": "55",
"portalId": "12",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Status Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the notes for a webinar registration for the given user and course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/update-webinar-notes?ids=%5B101%2C+102%2C+103%5D&webinarId=55&portalId=12¬es=%22This+is+a+test+note%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/update-webinar-notes"
);
const params = {
"ids": "[101, 102, 103]",
"webinarId": "55",
"portalId": "12",
"notes": ""This is a test note"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Notes Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the quizzes for a given user and portal.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/reports/student-quizzes?user_id=1&searchPortalIds=%5B1%2C2%5D&page_number=1&page_size=10&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22John+Doe%22%2C%22status%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/reports/student-quizzes"
);
const params = {
"user_id": "1",
"searchPortalIds": "[1,2]",
"page_number": "1",
"page_size": "10",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"John Doe","status":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalNotStarted": int,
"totalInProgress": int,
"totalCompleted": int,
"recordsTotal": int,
"recordsFiltered": int,
"records": Array,
"userDetails": Object
}
Example response (200):
{
"totalNotStarted": 2,
"totalInProgress": 1,
"totalCompleted": 1,
"recordsTotal": 4,
"recordsFiltered": 4,
"records": Array,
"userDetails": Object
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves a list of portals for a given user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/portals?userId=1&type=checkout" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/portals"
);
const params = {
"userId": "1",
"type": "checkout",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"portals": [
{
"id": 1,
"name": "Portal 1",
"referralCode": "portal1",
"userType": "portal_admin",
"totalSeat": 100,
"subscriptionId": 1,
"parentPortalId": 1,
"slug": "portal-1"
},
{
"id": 2,
"name": "Portal 2",
"referralCode": "portal2",
"userType": "portal_admin",
"totalSeat": 50,
"subscriptionId": 2,
"parentPortalId": 2,
"slug": "portal-2"
}
],
"siteLogo": "http://example.com/logo.jpg",
"baseUrl": "http://example.com"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Types
Retrieves all the user types in the system like admin, owner, staff, general.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/userType/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/userType/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "admin",
"display_name": "Admin"
},
{
"db_value": "owner",
"display_name": "Owner"
},
{
"db_value": "staff",
"display_name": "Staff"
},
{
"db_value": "general",
"display_name": "General"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the users in a tabular list format with pagination mode. You can apply filter using search_param via nameOrEmail, membershipId, userCategoryId.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22John+Doe%22%2C%22membershipId%22%3A1%2C+%22userCategoryId%22%3A1%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"nameOrEmail":"John Doe","membershipId":1, "userCategoryId":1}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 4,
"first_name": "John",
"last_name": "Doe",
"is_disabled": false,
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"display_type": "General",
"created_at": "Aug 06, 2020 07:20 AM",
"last_login": "2 days ago",
"source": "default",
"portals": "Portal 1, Portal 2",
"user_category": "Category 1, Category 2"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Users By Type
Retrieves a list of users filtered by user type and optionally by portal ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/getUsersByType?userType=learner&portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/getUsersByType"
);
const params = {
"userType": "learner",
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 1,
"name": "John Doe ([email protected])"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enables enroll content for a user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/enableEnrollContent?userId=1&selectedCourseView=%27grid%27&selectedLearningPathView=%27list%27&selectedCourseViewMode=%27enroll%27&selectedLearningPathViewMode=%27enroll%27&type=%27course%27" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/enableEnrollContent"
);
const params = {
"userId": "1",
"selectedCourseView": "'grid'",
"selectedLearningPathView": "'list'",
"selectedCourseViewMode": "'enroll'",
"selectedLearningPathViewMode": "'enroll'",
"type": "'course'",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Setting Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Users
Retrieves a list of users filtered by search term and optionally by portal ID and user type.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/lookup?search_term=John&portalId=1&userType=learner&remote_user_search=qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/lookup"
);
const params = {
"search_term": "John",
"portalId": "1",
"userType": "learner",
"remote_user_search": "qui",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 1,
"full_name": "John Doe",
"email": "[email protected]",
"user_type": "learner"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new user.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/create?firstName=John&lastName=Doe&email=john.doe%40example.com&password=h%5C%2A%7BP%2FtCM8u&userCategory=%5B1%2C2%2C3%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/create"
);
const params = {
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"password": "h\*{P/tCM8u",
"userCategory": "[1,2,3]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "User created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk upload users from csv file
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/bulkUpload" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userList\": [
\"amet\"
],
\"selectedCourses\": [
\"officia\"
],
\"selectedLearningPaths\": [
\"dolorum\"
],
\"membershipId\": 2,
\"portalId\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/user/bulkUpload"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userList": [
"amet"
],
"selectedCourses": [
"officia"
],
"selectedLearningPaths": [
"dolorum"
],
"membershipId": 2,
"portalId": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "User(s) uploaded successfully",
"is_success": "true"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the saved cards for a user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/saved-cards?userId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/saved-cards"
);
const params = {
"userId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 101,
"last4": "4242",
"payment_gateway_name": "Stripe",
"card_type": "Visa"
},
{
"id": 102,
"last4": "1881",
"payment_gateway_name": "PayPal",
"card_type": "Mastercard"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes a saved card for a user.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/delete-card?paymentTokenId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/delete-card"
);
const params = {
"paymentTokenId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Card has been deleted."
}
Example response (400):
{
"status": "error",
"message": "Card not deleted. Please try again later." OR "Card cannot be deleted as it is linked to an active subscription."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns a sample file in JSON format which can be downloaded by the user and used as a template for bulk uploading users.
The sample file contains dummy data for the standard fields and the custom user fields that have been set up in the system. The dummy data is in a format that can be easily copied and pasted into the user's own CSV file. The first record in the sample file contains data for all the fields, while the subsequent records contain blank data. This is to make it easy for the user to see what data is required for each field.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/getBulkUploadSampleFile" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/getBulkUploadSampleFile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"headers": [
"email",
"first_name",
"last_name",
"password",
"custom_field_1",
"custom_field_2",
"custom_field_3"
],
"records": [
{
"email": "[email protected]",
"first_name": "Fake FName1",
"last_name": "Fake LName1",
"password": "Qwerty@123",
"custom_field_1": "Fake Custom Field 1 Value",
"custom_field_2": "Fake Custom Field 2 Value",
"custom_field_3": "Fake Custom Field 3 Value"
},
{
"email": "[email protected]",
"first_name": "Fake FName2",
"last_name": "Fake LName2",
"password": "",
"custom_field_1": "",
"custom_field_2": "",
"custom_field_3": ""
},
{
"email": "[email protected]",
"first_name": "Fake FName3",
"last_name": "Fake LName3",
"password": "",
"custom_field_1": "",
"custom_field_2": "",
"custom_field_3": ""
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get blocked and allowed emails and domains for a given portal.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/getBlockedEmailsAndDomains?portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/getBlockedEmailsAndDomains"
);
const params = {
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"blocked": [
"[email protected]",
"[email protected]"
],
"allowed": [
"[email protected]",
"[email protected]"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User By ID
This endpoint returns the user details based on the ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"lastLoggedIn": "2 hours ago",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\" viewBox=\"0 0 100 100\"><circle cx=\"50\" cy=\"50\" r=\"50\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"50\" y=\"50\" font-size=\"40\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"disabled": false,
"userType": "staff",
"currentLoggedUserType": "owner",
"membership": {
"id": 1,
"name": "Silver",
"expiryDate": null
},
"customUserMetas": {
"full_name": {
"type": "text",
"label": "Full Name",
"submitted_value": "John Doe",
"placeholder_value": ""
},
"user_type": {
"type": "dropdown",
"label": "User Type",
"submitted_value": 1,
"placeholder_value": "",
"option_label": [
"Staff",
"Owner"
],
"option_value": [
1,
2
]
}
},
"internal_note": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates an existing user.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/{id}?id=1&firstName=John&lastName=Doe&email=john.doe%40example.com&disabled=0&internal_note=This+is+a+note.&customUserMetas=%7B%22meta_key1%22%3A%7B%22type%22%3A%22text%22%2C%22submitted_value%22%3A%22value1%22%7D%2C%22meta_key2%22%3A%7B%22type%22%3A%22checkbox%22%2C%22submitted_value%22%3A%5B1%2C2%2C3%5D%7D%7D&userCategory=%5B1%2C2%2C3%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/{id}"
);
const params = {
"id": "1",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"disabled": "0",
"internal_note": "This is a note.",
"customUserMetas": "{"meta_key1":{"type":"text","submitted_value":"value1"},"meta_key2":{"type":"checkbox","submitted_value":[1,2,3]}}",
"userCategory": "[1,2,3]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "User updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Membership
Updates the membership of a specified user. The membership will be revoked if the expired_at date is in the past. If the expired_at is not provided, the expired_at of the membership will be used.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/1/update-membership" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"1\",
\"expired_at\": \"\'2021-10-03 23:59:59\'\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user/1/update-membership"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1",
"expired_at": "'2021-10-03 23:59:59'"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
array A response with a message. Example: {message: User updated successfully}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates the password of a user.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/updatePassword/{id}?password=%22MyP%40ssw0rd%22&userId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/updatePassword/{id}"
);
const params = {
"password": ""MyP@ssw0rd"",
"userId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Password updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Courses
Retrieves all courses enrolled by a specified user. The response includes course status, completion percentage, last access date, and access status.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/enrolled-courses?user_id=1&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22status%22%3A%5B%22Not+Started%22%2C%22In+Progress%22%5D%2C%22nameOrEmail%22%3A%22John+Doe%22%7D&portalId=1&viewType=%22self%22&manage_course=true" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/enrolled-courses"
);
const params = {
"user_id": "1",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"status":["Not Started","In Progress"],"nameOrEmail":"John Doe"}",
"portalId": "1",
"viewType": ""self"",
"manage_course": "true",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 50,
"recordsFiltered": 50,
"records": [
{
"id": 1,
"courseId": 1,
"featuredImageUrl": "https://example.com/course1.jpg",
"courseSlug": "course1",
"courseName": "Course 1",
"lastAccessed": "2 days ago",
"status": "Not Started",
"display_status": "Not Started",
"accessStatus": "Allowed",
"percentComplete": 0,
"courseStatus": "publish",
"registered_on": "Aug 09, 2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"isExpired": false,
"canRecertify": false,
"estimatedCompletionTime": "2 hours",
"certificate_count": 0,
"enableCourseRating": true,
"rating": 4.5
}
],
"name": "John Doe",
"email": "[email protected]",
"userType": "learner",
"avatar": "https://example.com/avatar.jpg",
"isLearner": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get courses enrolled by a user in a particular portal
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/getPortalCourses" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 7,
\"page_size\": 17,
\"page_number\": 18,
\"order_by\": [],
\"search_param\": []
}"
const url = new URL(
"https://demo.aomlms.com/api/users/getPortalCourses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 7,
"page_size": 17,
"page_number": 18,
"order_by": [],
"search_param": []
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"courses": [
{
"courseId": 1,
"registrationId": 1,
"type": "course",
"contentName": "Course 1",
"rating": 4.5,
"enableCourseRating": true,
"featureImage": "https://example.com/image.jpg",
"launchUrl": "/portal/course/course-1/launch",
"canRecertify": true,
"isEnrolled": true,
"lastAccessed": "3 days ago",
"display_status": "In Progress",
"percentComplete": 20,
"isExpired": false,
"registered_on": "2021-01-01 00:00:00",
"estimatedCompletionTime": "3 hours",
"status": "In Progress"
}
],
"totalRecords": 10,
"recordsFiltered": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a user or multiple users
Deletes a specified user or multiple users in a single API call. Supports deleting users with or without enrollments. Does not delete users who have created courses or modules. Does not delete users who have portal access. Also deletes announcements, cart abandonment records, and user reviews associated with the user.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/delete?delete_ids=%22%5B1%2C2%2C3%5D%22&user_id=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/delete"
);
const params = {
"delete_ids": ""[1,2,3]"",
"user_id": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "string",
"deletedStudents": [
{
"id": 2,
"name": "John Doe"
},
{
"id": 3,
"name": "Jane Doe"
}
],
"notDeletedStudents": [
{
"id": 1,
"name": "Adam Smith"
}
],
"usedInCourses": {
"John Doe": [
{
"id": 1,
"name": "Course 1"
},
{
"id": 2,
"name": "Course 2"
}
]
},
"usedAsCourseAuthors": {
"John Doe": [
{
"id": 1,
"name": "Course 1"
},
{
"id": 2,
"name": "Course 2"
}
]
},
"usedAsModuleAuthors": {
"John Doe": [
{
"id": 1,
"name": "Module 1"
},
{
"id": 2,
"name": "Module 2"
}
]
},
"usedInPortals": {
"John Doe": [
{
"id": 1,
"name": "Portal 1"
},
{
"id": 2,
"name": "Portal 2"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates user details in bulk based on the provided parameters. This function supports enabling/disabling users, enrolling users in courses and learning paths, and attaching users to memberships.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_ids\": [
1,
2,
3
],
\"course_ids\": [
10,
20
],
\"disabled\": true,
\"learning_path_ids\": [
5,
6
],
\"enrollMembershipId\": 2,
\"portalId\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/user/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_ids": [
1,
2,
3
],
"course_ids": [
10,
20
],
"disabled": true,
"learning_path_ids": [
5,
6
],
"enrollMembershipId": 2,
"portalId": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Users updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Insert Address
Adds a new address for a specified user with the provided details. If the address is marked as default, it updates other addresses of the same type to not be default.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/{id}/addAddress" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fullName\": \"John Doe\",
\"orgName\": \"Acme Corp\",
\"orgVatId\": \"VAT12345\",
\"addressLine1\": \"Boring Street\",
\"addressLine2\": \"Awesome Colony\",
\"zipcode\": \"123456\",
\"city\": \"Mumbai\",
\"state\": \"NY\",
\"country\": \"US\",
\"isDefault\": true,
\"userId\": 4,
\"type\": \"billing\",
\"billing_address_id\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/user/{id}/addAddress"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fullName": "John Doe",
"orgName": "Acme Corp",
"orgVatId": "VAT12345",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "NY",
"country": "US",
"isDefault": true,
"userId": 4,
"type": "billing",
"billing_address_id": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Address added successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve all billing addresses of a user
Retrieves all the billing addresses which are added by the specified user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/userAddress/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/userAddress/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"isDefault": false,
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get shipping address By ID.
Retrieves a list of all shipping addresses associated with a specific user ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/userShippingAddress/12" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/userShippingAddress/12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"isDefault": true,
"fullName": "John Doe",
"orgName": "Acme Inc.",
"orgVatId": "VAT123456",
"addressLine1": "123 Main St",
"addressLine2": "Suite 456",
"zipcode": "12345",
"city": "New York",
"state": "NY",
"country": "USA"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Dashboard Statistics
Returns user's dashboard statistics which includes Total Courses, Completed Courses, In Progress Courses, Not Started Courses, and Time Spent.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/dashboard/statistics?user_id=4&portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/dashboard/statistics"
);
const params = {
"user_id": "4",
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalCourses": 10,
"completedCourses": 2,
"inProgressCourses": 3,
"notStartedCourses": 5,
"timeSpent": 12
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Activities
Returns all activities performed by a specified user in a paginated format. Supports filtering, sorting, and context-based queries.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-activities?user_id=4&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22desc%22%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22course-1%22%2C%22status%22%3A%22In+Progress%22%7D&context=%22admin%22&portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-activities"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"desc"}",
"search_param": "{"courseCategoryIds":[],"courseName":"course-1","status":"In Progress"}",
"context": ""admin"",
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 15,
"verb": "ENROLLED",
"created_at": "Aug 09, 2020 10:27 AM",
"message": "John Doe is enrolled to course 1",
"course": "course 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Orders
Returns all orders of a specified user in a paginated format. Supports filtering, sorting, and context-based queries.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-orders?user_id=4&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22desc%22%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22course-1%22%2C%22status%22%3A%22In+Progress%22%7D&context=%22admin%22&portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-orders"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"desc"}",
"search_param": "{"courseCategoryIds":[],"courseName":"course-1","status":"In Progress"}",
"context": ""admin"",
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 15,
"verb": "ENROLLED",
"created_at": "Aug 09, 2020 10:27 AM",
"message": "John Doe is enrolled to course 1",
"course": "course 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get user certificates.
Retrieves a paginated list of certificates for a specific user, with optional filtering, sorting, and portal-based context.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-certificates/42?page_size=10&page_number=1&order_by=%5B%7B%22field%22%3A%22issued_at%22%2C%22direction%22%3A%22desc%22%7D%5D&search_param=%5B%7B%22field%22%3A%22title%22%2C%22value%22%3A%22AWS%22%7D%5D&return_type=%22summary%22&portalId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-certificates/42"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "[{"field":"issued_at","direction":"desc"}]",
"search_param": "[{"field":"title","value":"AWS"}]",
"return_type": ""summary"",
"portalId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "AWS Certified Solutions Architect",
"issued_at": "2023-08-01",
"valid_till": "2026-08-01",
"issuer": "Amazon",
"status": "active"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes a certificate issued to a user.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/{id}/delete-certificate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/user/{id}/delete-certificate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate Deleted Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Certificate Issue and Expiry Dates
This API request is used to update the issue date and expiry date of a user's certificate.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/update-certificate-dates" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"rowId\": 1,
\"newIssueDate\": \"2020-08-15 10:00:00\",
\"newExpiryDate\": \"2020-08-15 10:00:00\"
}"
const url = new URL(
"https://demo.aomlms.com/api/update-certificate-dates"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"rowId": 1,
"newIssueDate": "2020-08-15 10:00:00",
"newExpiryDate": "2020-08-15 10:00:00"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Date Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the default address of a user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/default-address/1?type=billing_address+or+shipping_address" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/default-address/1"
);
const params = {
"type": "billing_address or shipping_address",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"isDefault": false,
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the address of a user by address ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/getaddress/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/getaddress/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"isDefault": false,
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a user's address.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/updateAddress/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fullName\": \"John Doe\",
\"orgName\": \"ABC Company\",
\"orgVatId\": \"1234567890\",
\"addressLine1\": \"Boring Street\",
\"addressLine2\": \"Awesome Colony\",
\"zipcode\": \"123456\",
\"city\": \"Mumbai\",
\"state\": \"MH\",
\"country\": \"IN\",
\"isDefault\": \"true\",
\"userId\": \"1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user/updateAddress/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fullName": "John Doe",
"orgName": "ABC Company",
"orgVatId": "1234567890",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN",
"isDefault": "true",
"userId": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Address updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the detailed report for all courses of a user. Returned data contains information like total number of modules and number of courses in different status(In Progress, Not Started and Completed).
Example - [1,0]. You can use these data for graphs representation as well.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/reports/user-detailed?user_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%5D%7D&portalId=%7B%22portalId%22%3A1%7D&searchPortalIds=%7B%22searchPortalIds%22%3A%5B1%2C2%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/reports/user-detailed"
);
const params = {
"user_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"","status":[]}",
"portalId": "{"portalId":1}",
"searchPortalIds": "{"searchPortalIds":[1,2]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 3,
"totalNotStarted": 1,
"totalInProgress": 1,
"totalCompleted": 1,
"recordsFiltered": 3,
"records": [
{
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"status": "In Progress",
"percent_complete": 45,
"access_status": "Allowed",
"registered_on": "10-Aug-2020",
"started_on": "10-Aug-2020",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "1 hour ago",
"percent_achieved": null,
"total_time_spent": "0h 20m",
"certifcate_issued": "No"
},
{
"first_name": "Client",
"last_name": "Admin",
"email": "[email protected]",
"status": "Not Started",
"percent_complete": 0,
"access_status": "Allowed",
"registered_on": "09-Aug-2020",
"started_on": "",
"completed_on": "",
"expire_on": "12-Aug-2023",
"last_accessed_on": "Never",
"percent_achieved": null,
"total_time_spent": "0h 0m",
"certifcate_issued": "Yes"
},
{
"first_name": "Demo",
"last_name": "Student",
"email": "[email protected]",
"status": "Completed",
"percent_complete": 50,
"access_status": "Allowed",
"registered_on": "03-Aug-2020",
"started_on": "03-Aug-2020",
"completed_on": "03-Aug-2020",
"expire_on": "Never",
"last_accessed_on": "6 days ago",
"percent_achieved": 0,
"total_time_spent": "0h 0m",
"certifcate_issued": "Yes"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves a paginated report of users with custom user data.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/report?page_size=10&page_number=1®istered_between=%5B%222023-01-01%22%2C+%222023-12-31%22%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/report"
);
const params = {
"page_size": "10",
"page_number": "1",
"registered_between": "["2023-01-01", "2023-12-31"]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"user_type": "General",
"created_at": "2023-01-01 12:00:00",
"last_login": "2 days ago",
}
],
"headers": [
"custom_field_1",
"custom_field_2"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Subscriptions
Returns all subscriptions of a specified user in a paginated format. Supports filtering and sorting.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-subscriptions?user_id=4&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22desc%22%7D&search_param=%7B%22status%22%3A%22Active%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-subscriptions"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"desc"}",
"search_param": "{"status":"Active"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 5,
"recordsFiltered": 5,
"records": [
{
"id": 1,
"subscription_name": "Premium Plan",
"status": "Active",
"start_date": "2023-01-01",
"end_date": "2023-12-31"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all User Sources
Retrieves all the sources for a portal with pagination mode. You can apply filter using search_param via name or identifier.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-source?portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-source"
);
const params = {
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 1,
"name": "Default",
"identifier": "default",
"description": "Default source of users.",
"logoUrl": "https://example.com/default.png"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new portal for a given user.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/portal-create?portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userId\": 12,
\"portals\": [
{
\"name\": \"My New Portal\",
\"referralCode\": \"REF123\",
\"totalSeat\": 50,
\"userType\": \"admin\",
\"portalType\": \"education\",
\"status\": \"active\",
\"subscriptionId\": 101,
\"expiryDate\": \"2025-12-31\",
\"expiryMessage\": \"Subscription ends soon\",
\"parentPortalId\": 1
}
],
\"clonePortalAdmins\": true,
\"cloneBrandingNotifications\": false
}"
const url = new URL(
"https://demo.aomlms.com/api/user/portal-create"
);
const params = {
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userId": 12,
"portals": [
{
"name": "My New Portal",
"referralCode": "REF123",
"totalSeat": 50,
"userType": "admin",
"portalType": "education",
"status": "active",
"subscriptionId": 101,
"expiryDate": "2025-12-31",
"expiryMessage": "Subscription ends soon",
"parentPortalId": 1
}
],
"clonePortalAdmins": true,
"cloneBrandingNotifications": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Portals created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all learning paths for a given user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/enrolled-learningpaths?user_id=1&portalId=-1&viewType=self&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22started_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22status%22%3A%5B%22Not+Started%22%2C%22In+Progress%22%5D%2C%22nameOrEmail%22%3A%22John+Doe%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/enrolled-learningpaths"
);
const params = {
"user_id": "1",
"portalId": "-1",
"viewType": "self",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"started_on","direction":"desc"}",
"search_param": "{"status":["Not Started","In Progress"],"nameOrEmail":"John Doe"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 12,
"recordsFiltered": 12,
"records": [
{
"id": 1,
"featuredImageUrl": "http://example.com/featured-image.jpg",
"launchSlug": "http://example.com/launch-learning-path",
"learningPathName": "Learning Path 1",
"status": "Not Started",
"display_status": "Not Started",
"percentComplete": 0,
"registered_on": "22-02-2022",
"started_on": "",
"completed_on": "",
"certificateCount": 0,
"totalLPCourses": 5,
"completedLpCourses": 0,
"rating": 4.5,
"totalEstimatedTime": "2 hours"
}
],
"name": "John Doe",
"email": "[email protected]",
"userType": "Learner",
"avatar": "http://example.com/avatar.jpg"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves learning paths associated with the portal, filtered by the search parameters.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/portalLearningPaths?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22name%22%3A+%22Learning+Path+1%22%2C+%22status%22%3A+%5B%22registered%22%2C+%22started%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/portalLearningPaths"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "desc"}",
"search_param": "{"name": "Learning Path 1", "status": ["registered", "started"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"learningPaths": [
{
"id": 1,
"learningPathId": 1,
"type": "public",
"learningPathName": "Learning Path 1",
"featureImage": "http://example.com/learning-path-image.jpg",
"display_status": "Registered",
"percentComplete": 0,
"isEnrolled": true,
"certificateCount": 0,
"launchSlug": "http://example.com/portal/learning-path/1/launch",
"totalLPCourses": 5,
"completedLpCourses": 2,
"rating": 4.5,
"totalEstimatedTime": "2 hours"
},
{
"id": 2,
"learningPathId": 2,
"type": "private",
"learningPathName": "Learning Path 2",
"featureImage": "http://example.com/learning-path-image.jpg",
"display_status": "Not Enrolled",
"percentComplete": 0,
"isEnrolled": false,
"certificateCount": 0,
"launchSlug": "http://example.com/portal/learning-path/2/launch",
"totalLPCourses": 5,
"completedLpCourses": 0,
"rating": null,
"totalEstimatedTime": "2 hours"
}
],
"totalRecords": 10,
"recordsFiltered": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Membership Content
Fetches and returns a paginated list of content available to a user through their membership. The content includes courses and modules, which can be filtered and sorted based on the input parameters.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/membership/user-contents?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22desc%22%7D&search_param=%7B%22type%22%3A%22video%22%2C+%22nameOrDescription%22%3A%22Introduction%22%7D&portalId=1&viewType=%22self%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/membership/user-contents"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"desc"}",
"search_param": "{"type":"video", "nameOrDescription":"Introduction"}",
"portalId": "1",
"viewType": ""self"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"activeMembership": true,
"recordsTotal": 100,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Course 1",
"slug": "course-1",
"type": "Course",
"description": "Course description",
"enrollButton": null,
"duration": "2 hours",
"launchUrl": "http://example.com/launch",
"user_id": [
4
],
"created_at": "2023-01-01"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Custom User Field Type Lookup
Provides a list of available custom user field types. Each type is represented by a database value and a display value.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/fieldtype/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/fieldtype/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "text",
"display_value": "Text Field"
},
{
"db_value": "textarea",
"display_value": "Text Area"
},
{
"db_value": "date",
"display_value": "Date"
},
{
"db_value": "radio",
"display_value": "Single Select"
},
{
"db_value": "checkbox",
"display_value": "Multiple Select"
},
{
"db_value": "dropdown",
"display_value": "Drop Down"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Custom User Fields that needs to be shown on the Registration page
Retrieves the details of pre saved Custom User Fields.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/customUserFields" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/customUserFields"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"fields": [
{
"id": 1,
"type": "text",
"label": "How you left",
"defaultValue": null,
"isRequired": false,
"optionLabel": [],
"isFieldOnRegistrationPage": false,
"isFieldOnCertificate": true,
"includeInReportExports": [
"export-users",
"export-orders"
]
},
{
"id": 2,
"type": "textarea",
"label": "What is your home address",
"defaultValue": null,
"isRequired": true,
"optionLabel": [],
"isFieldOnRegistrationPage": true,
"isFieldOnCertificate": false,
"includeInReportExports": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update custom user fields.
Updates the details of the fields in "Custom User Fields" table. If the field is not present in the table, it will be added. If the field is not present in the request, it will be deleted from the table.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/users/customUserFields" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fields\": [
\"possimus\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/users/customUserFields"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fields": [
"possimus"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Fields updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lookup for custom user fields report exports
Retrieves a list of reports that custom user fields can be included in.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/customUserFieldsReports/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/customUserFieldsReports/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{"db_value": "export-users", "display_value": "Export Users"},
{"db_value": "course-insight", "display_value": "Course Insight"},
{"db_value": "export-orders", "display_value": "Export Orders"},
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Checks if a custom user field can be deleted.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/can-delete-field?fieldToDelete=%7B%22userMetaKey%22%3A%22dob%22%2C%22label%22%3A%22Date+Of+Birth%22%2C%22type%22%3A%22date%22%2C%22isRequired%22%3Afalse%2C%22optionsLabel%22%3A%5B%5D%7D.+example%3A+%7B%22userMetaKey%22%3A%22custom_field_1%22%2C%22label%22%3A%22Custom+Field+1%22%2C%22type%22%3A%22text%22%2C%22isRequired%22%3Afalse%2C%22optionsLabel%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/can-delete-field"
);
const params = {
"fieldToDelete": "{"userMetaKey":"dob","label":"Date Of Birth","type":"date","isRequired":false,"optionsLabel":[]}. example: {"userMetaKey":"custom_field_1","label":"Custom Field 1","type":"text","isRequired":false,"optionsLabel":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"canDeleteField": true,
"message": "This field can not be deleted as some user data is associated with it. Please contact administrator.",
"certificateTemplates": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the badges and the count of each badge a user has earned
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/badges/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/badges/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Gold",
"badgeIconUrl": "/images/badges/Badge_1.png",
"points": 1,
"organizationId": 1,
"count": 3
},
{
"id": 2,
"title": "Silver",
"badgeIconUrl": "/images/badges/Badge_2.png",
"points": 2,
"organizationId": 1,
"count": 1
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the leaderboard information for a user
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/leaderboard/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/leaderboard/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
"rankedUsers": [
{
"id": 1,
"rank": 1,
"firstName": "John",
"lastName": "Doe",
"points": 100,
"badgeCount": 10
},
{
"id": 2,
"rank": 2,
"firstName": "Jane",
"lastName": "Doe",
"points": 80,
"badgeCount": 5
}
],
"userTier": "Gold",
"userRank": 1
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns 2FA details for a user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-meta/2fa?user_id=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-meta/2fa"
);
const params = {
"user_id": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"is2FactorAuthActive": true,
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAE1pY3Jvc29mdCBPZmZpY2UgTWF0aXZpY2FsIEJ1aWx0aW5nIChNaW5pbnNpemUpd2l0aCBHZW5lcmF0b3Igd2l0aCBQb3NpdGljIFRleHQgLSBDb3B5cmlnaHQgTmFtZSBmcm9tIHVuaXF1ZSBpZGVudGl0eQAAABh0RVh0VGh1bWI6OkRTVEVYUWhUQyBjb250ZW50LW1vc3QgdGh1bWIh4NApweCt4M6rAAAAAElFTkSuQmCC",
"string_code": "string code"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Prepares QR code for Two factor authentication.
Returns QR code, URI code and String code for users to authenticate themselves using their authenticator app.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/prepareTwoFactorAuth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/user/prepareTwoFactorAuth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"as_qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAE1pY3Jvc29mdCBPZmZpY2UgTWF0aXZpY2FsIEJ1aWx0aW5nIChNaW5pbnNpemUpd2l0aCBHZW5lcmF0b3Igd2l0aCBQb3NpdGljIFRleHQgLSBDb3B5cmlnaHQgTmFtZSBmcm9tIHVuaXF1ZSBpZGVudGl0eQAAABh0RVh0VGh1bWI6OkRTVEVYUWhUQyBjb250ZW50LW1vc3QgdGh1bWIh4NApweCt4M6rAAAAAElFTkSuQmCC",
"as_uri": "otpauth://totp/AOM?secret=base32secret&issuer=AOM",
"as_string": "base32secret"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Confirms relation between AOM site and authenticator app for 2fa.
User need to provided secret code from authenticator app. It enables Two factor authentication feature in the system for users.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/confirmTwoFactorAuth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4,
\"secretCode\": \"123456\",
\"qrCode\": \"data:image\\/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAE1pY3Jvc29mdCBPZmZpY2UgTWF0aXZpY2FsIEJ1aWx0aW5nIChNaW5pbnNpemUpd2l0aCBHZW5lcmF0b3Igd2l0aCBQb3NpdGljIFRleHQgLSBDb3B5cmlnaHQgTmFtZSBmcm9tIHVuaXF1ZSBpZGVudGl0eQAAABh0RVh0VGh1bWI6OkRTVEVYUWhUQyBjb250ZW50LW1vc3QgdGh1bWIh4NApweCt4M6rAAAAAElFTkSuQmCC\",
\"stringCode\": \"base32secret\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user/confirmTwoFactorAuth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4,
"secretCode": "123456",
"qrCode": "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAE1pY3Jvc29mdCBPZmZpY2UgTWF0aXZpY2FsIEJ1aWx0aW5nIChNaW5pbnNpemUpd2l0aCBHZW5lcmF0b3Igd2l0aCBQb3NpdGljIFRleHQgLSBDb3B5cmlnaHQgTmFtZSBmcm9tIHVuaXF1ZSBpZGVudGl0eQAAABh0RVh0VGh1bWI6OkRTVEVYUWhUQyBjb250ZW50LW1vc3QgdGh1bWIh4NApweCt4M6rAAAAAElFTkSuQmCC",
"stringCode": "base32secret"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Two Factor Authentication activated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Disable Two Factor Authentication for a user.
Disables Two factor authentication feature in the system for users.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/disableTwoFactorAuth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/user/disableTwoFactorAuth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2factor authentication disabled successfully",
"qrcode": null,
"stringcode": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sends a reminder email to a user about their abandoned cart.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/sendCartReminderEmail?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/sendCartReminderEmail"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Email send successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Resend New Account Email
Resends a new account email to the user. If the user is not found, it will be ignored.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/email/resendNewAccountEmail?portalId=1&user_id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/email/resendNewAccountEmail"
);
const params = {
"portalId": "1",
"user_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "New Password is created and New Account Email Sent."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Loads user consents based on pagination parameters.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-consents/tabularlist?page_size=10&page_number=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-consents/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"userConsents": [
{
"id": 101,
"consentDate": "2025-04-01T14:32:00Z",
"consentId": "CONSENT-XYZ123",
"country": "US",
"ipAddress": "192.168.1.15",
"status": "accepted",
"userId": 2001,
"userName": "johndoe",
"createdAt": "2025-04-01T14:32:00Z"
},
{
"id": 102,
"consentDate": "2025-04-02T09:15:43Z",
"consentId": "CONSENT-ABC456",
"country": "DE",
"ipAddress": "203.0.113.45",
"status": "rejected",
"userId": 2002,
"userName": "janedoe",
"createdAt": "2025-04-02T09:15:43Z"
}
],
"total": 50,
"recordsFiltered": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Accredible
It allows users to receive digital credentials
Validate Accredible API Key
Validates the API Key provided with the request
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/accredible/validate-key/{key}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"key\": \"sunt\"
}"
const url = new URL(
"https://demo.aomlms.com/api/accredible/validate-key/{key}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"key": "sunt"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Success",
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Accredible Groups Lookup
Retrieves all the accredible groups. Helps while showing group names in dropdown elements.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/accredible/group/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/accredible/group/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"isEnabled": true,
"data": [
{
"id": 353767,
"name": "group_aom_course"
},
{
"id": 353282,
"name": "intro-ce"
},
{
"id": 352594,
"name": "aom"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Announcements
The Announcements module allows you to manage announcement-related operations within the system.
Create an Announcement
Updates an existing announcement with new content, expiry, and sending rules. Also updates the recipient list depending on the sending rules.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/announcement" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 45,
\"expiry\": \"2025-12-31 23:59:59\",
\"heading\": \"System Maintenance\",
\"content\": \"The system will be down for maintenance tonight.\",
\"sending_rules\": \"specific_users\",
\"course_ids\": [
101,
102
],
\"portal_ids\": [
201,
202
],
\"user_ids\": [
1,
2,
3
],
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/announcement"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 45,
"expiry": "2025-12-31 23:59:59",
"heading": "System Maintenance",
"content": "The system will be down for maintenance tonight.",
"sending_rules": "specific_users",
"course_ids": [
101,
102
],
"portal_ids": [
201,
202
],
"user_ids": [
1,
2,
3
],
"portalId": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"id": 45,
"message": "Announcement Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Announcement Tabular List
Returns all the announcements in a tabular list format in paginated mode. You can apply filter using search_param via heading(announcement heading).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/announcement/tabularlist?portalId=5&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22heading%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/tabularlist"
);
const params = {
"portalId": "5",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"heading":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"heading": "Test Announcement",
"author": "John Doe",
"created_at": "2020-08-26 09:08",
"content": "This is a test announcement",
"rules": "all"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an announcement.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/announcement/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 12,
\"expiry\": \"2020-08-05\",
\"heading\": \"New Announcement\",
\"content\": \"The system will be down for maintenance tonight.\",
\"sending_rules\": \"specific_users\",
\"course_ids\": [
101,
102
],
\"portal_ids\": [
201,
202
],
\"user_ids\": [
1,
2,
3
],
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 12,
"expiry": "2020-08-05",
"heading": "New Announcement",
"content": "The system will be down for maintenance tonight.",
"sending_rules": "specific_users",
"course_ids": [
101,
102
],
"portal_ids": [
201,
202
],
"user_ids": [
1,
2,
3
],
"portalId": 5
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"id": 45,
"message": "Announcement Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Announcement
Retrieves the details of the specified announcement. Helps in fetching announcement using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/announcement/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"heading": "New Announcement",
"content": "This is for test purpose",
"sending_rules": "all",
"expiry": "2020-08-05"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Announcement
To delete an announcement, you need to use this request. Returns number of announcement deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/announcement/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "3 announcement(s) deleted "
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learner Announcement List
Returns all the announcement in list format in paginated mode. You can apply filter using search_param via heading of the announcements. These annoucement list will appear in learner panel(dashboard) not admin panel.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/student/announcements?portalId=1&page_size=5&page_number=1&order_by[colName]=created_at&order_by[direction]=desc&search_param[heading]=&viewType=self" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/student/announcements"
);
const params = {
"portalId": "1",
"page_size": "5",
"page_number": "1",
"order_by[colName]": "created_at",
"order_by[direction]": "desc",
"search_param[heading]": "",
"viewType": "self",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"avatar": "http://localhost:8000/storage/users/1/avatar.jpg",
"recordsTotal": 100,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"heading": "Announcement 1",
"author": "John Doe",
"content": "<p>This is an example of announcement content</p>",
"created_at": "21st Jan, 2020 12:00 PM"
},
{
"id": 2,
"heading": "Announcement 2",
"author": "John Doe",
"content": "<p>This is an example of announcement content</p>",
"created_at": "21st Jan, 2020 12:00 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assignments
An Assignment Module is a lesson module used as course content. Helps to perform CRUD operation to and for Assignments modules.
Assignment Modules Tabular List
Returns all the assignment modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/assignment?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "Assignment-1",
"slug": "assignment-1",
"type": "assignment",
"submissionType": "file",
"display_type": "File",
"totalPoints": 20,
"icon": "<i class=\"el-icon-document\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM",
"showMappedCourses": false,
"course_count": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Assignment Module
Handles the creation of an assignment module as part of course content. Validates the request and saves a new module with the given parameters.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/assignment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Essay on LMS\",
\"content\": \"An introduction to LMS.\",
\"totalPoints\": 30,
\"submission_type\": \"file\",
\"allowed_filetypes\": \"[\\\"pdf\\\", \\\"docx\\\"]\",
\"isLocked\": true,
\"estimatedCompletion\": \"90\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Essay on LMS",
"content": "An introduction to LMS.",
"totalPoints": 30,
"submission_type": "file",
"allowed_filetypes": "[\"pdf\", \"docx\"]",
"isLocked": true,
"estimatedCompletion": "90",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 5,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Assignment Module
Updates the details of a specified assignment module. (See parameters) Assignment modules can be used in the course as course content.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/assignment/6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"totalPoints\": 20,
\"submission_type\": \"file\",
\"allowed_filetypes\": [
\"pdf\",
\"docx\"
],
\"isLocked\": true,
\"estimatedCompletion\": \"90\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment/6"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"content": "<p>This is the updated short content here<\/p>",
"totalPoints": 20,
"submission_type": "file",
"allowed_filetypes": [
"pdf",
"docx"
],
"isLocked": true,
"estimatedCompletion": "90",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Assignment Module
Retrieves the details of the specified assignment module using its ID. This includes the module's ID, name, slug, content, total points, submission type, allowed file types, estimated completion, and associated courses. If the module's details exist, it fetches additional information such as total points, submission type, lock status, and allowed file types.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/assignment/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"qui\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "qui"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{"id": 1, "name": "Assignment-1", "slug": "assignment-1", "content": "Content description", "totalPoints": 100, "submission_type": "file", "allowed_filetypes": ["image", "pdf"], "estimatedCompletion": 5, "estimationCompletedUnit": hour,
"courses": [{"course_id": 1, "course_name": "Course Name"}]}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Assignment Module Info
Retrieves detailed information of an assignment module including course details, module details, and previous submissions. This function also checks if the module can be launched based on the current registration and updates the module's status if accessed.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/assignment/details?portalId=1®istrationId=1&moduleId=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/details"
);
const params = {
"portalId": "1",
"registrationId": "1",
"moduleId": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Assignment 1",
"slug": "assignment-1",
"content": "<p>Example content</p>",
"courseName": "Course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"min_time_spent": 120,
"totalPoints": 100,
"submissionType": "file",
"maxUploadSize": 50,
"allowedFileTypes": ".pdf,.docx",
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "8 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 3
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"icon": "<i class=\"el-icon-discover\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 9,
"name": "My-video-lesson",
"slug": "my-video-lesson",
"type": "video",
"icon": "<i class=\"el-icon-video-play\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 4,
"status": "In Progress",
"started_on": "2020-08-10T20:04:14.000000Z",
"completed_on": null,
"last_accessed_on": "6 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 0,
"no_of_times_accessed": 1
},
{
"module_id": 10,
"name": "Essay on LMS",
"slug": "essay-on-lms",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 5,
"status": "Completed",
"started_on": "2020-08-11T02:47:32.000000Z",
"completed_on": "2020-08-11T02:47:32.000000Z",
"last_accessed_on": "46 seconds ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 100,
"no_of_times_accessed": 1
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "previous-assignment",
"nextSlug": "next-assignment",
"status": "In Progress",
"display_status": "In Progress",
"statusRowId": 5,
"timeSpent": 30,
"prevSubmission": [],
"timeToBeSpent": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Assignment Submission Details
Retrieves the submission details of the assigment the student have given. Helps in grading a student. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/assignment/submissions?statusRowId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/submissions"
);
const params = {
"statusRowId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseId": 1,
"courseName": "course 1",
"assignmentName": "assign",
"status": "In Progress",
"content": "Desc",
"totalPoints": 50,
"userFullName": "Aom Staff",
"userEmail": "[email protected]",
"submissions": [
{
"id": 1,
"file_path": [
"aom-uploads-test.s3.us-west-2.amazonaws.com/assignments/aom-sample-bulkupload_1597042007.csv"
],
"student_message": null,
"instructor_message": null,
"points_awarded": null,
"evaluated_by": "",
"submitted_on": "Aug 10, 2020 11:33 AM",
"evaluated_on": ""
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Submit Assignment
Submits the assignment after attempting all the aspects of the assignment.Updates the status of assignment to submitted if student is finished the assignment and submits. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/assignment/submit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 1,
\"statusRowId\": \"7\",
\"submissions\": \"[1,2,3]\",
\"studentMessage\": \"\\\"This is my assignment submission\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/submit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 1,
"statusRowId": "7",
"submissions": "[1,2,3]",
"studentMessage": "\"This is my assignment submission\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Assignment submitted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Assignment File
Handles the upload of an assignment file by students. You can use File form to upload a file to the system.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/assignment/upload" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"file\": \"aliquam\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/upload"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"file": "aliquam"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"s3_url": "https://s3.aws.com/wTsycTYRCLKIUVXXIYFYVXBXIXUGIXB"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Evaluate Assignment
Evaluates the assignment from Instructor side.Updates the status of assignment to completed if Instructor thinks student's submission is upto the marks. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/assignment/evaluate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 1,
\"statusRowId\": \"7\",
\"evaluation\": \"{instructorMessage : \'You comments look good\', pointsAwarded: \'50\', isAccepted : true }\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/evaluate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 1,
"statusRowId": "7",
"evaluation": "{instructorMessage : 'You comments look good', pointsAwarded: '50', isAccepted : true }"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Assignment evaluated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Audit Logs
It allows you to track the user activity in the LMS.
Get Audit Activities
Fetches and paginates a list of audit log activities for the selected portal and date range. Supports filtering by user, activity type, date range, and model (performedOn). Also allows sorting.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/audit-activities?portalId=5&page_size=10&page_number=1&order_by[colName]=created_at&order_by[direction]=desc&search_param=%7B%22user_id%22%3A3%2C%22activityName%22%3A%22created%22%2C%22dates%22%3A%5B%222024-12-01%22%2C%222024-12-31%22%5D%2C%22performedOn%22%3A%22Course%22%7D&context=admin&selectedMonth=03-2024" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/audit-activities"
);
const params = {
"portalId": "5",
"page_size": "10",
"page_number": "1",
"order_by[colName]": "created_at",
"order_by[direction]": "desc",
"search_param": "{"user_id":3,"activityName":"created","dates":["2024-12-01","2024-12-31"],"performedOn":"Course"}",
"context": "admin",
"selectedMonth": "03-2024",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 135,
"recordsFiltered": 23,
"records": [
{
"performed_by": "Jane Doe",
"effect_on": "Course",
"subject": "Course: Laravel Basics",
"action": "CREATED",
"created_at": "13 Apr 2025 02:45 PM",
"details": {
"attributes": {
"name": "Laravel Basics",
"status": "active"
}
}
}
],
"performedOnList": [
"Course",
"Module",
"User"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Audit Activity Lookup
Retrieves all the activities performed by the user. This is a lookup request that helps in showing options in dropdowns elements.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/audit-activities/verb/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/audit-activities/verb/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "login",
"display_value": "LOGIN"
},
{
"db_value": "created",
"display_value": "CREATED"
},
{
"db_value": "updated",
"display_value": "UPDATED"
},
{
"db_value": "deleted",
"display_value": "DELETED"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Badge
Endpoints for handling and managing Gamification badges
Get a tabular list of badges, with pagination and search
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/badges/tabularlist?page_size=50&page_number=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badges/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"title": "Badge 1",
"badgeIconUrl": "https://example.com/badge1.png",
"points": 10
},
{
"id": 2,
"title": "Badge 2",
"badgeIconUrl": "https://example.com/badge2.png",
"points": 20
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new badge
Example request:
curl --request POST \
"https://demo.aomlms.com/api/badge/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Gold\",
\"points\": \"1\",
\"badgeIconUrl\": \"\\/images\\/badges\\/Badge_1.png\",
\"defaultIconUrl\": \"\\/images\\/default-badge.png\",
\"organizationId\": \"97852067\"
}"
const url = new URL(
"https://demo.aomlms.com/api/badge/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Gold",
"points": "1",
"badgeIconUrl": "\/images\/badges\/Badge_1.png",
"defaultIconUrl": "\/images\/default-badge.png",
"organizationId": "97852067"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 3,
"message": "Badge created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Return default badges available in the system.
These badges are not stored in the database and are available for use as soon as the application is installed.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/badges/defaultBadgeLookUp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badges/defaultBadgeLookUp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"value": "Badge 1",
"url": "/images/badges/Badge_1.png"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a badge by its ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/badge/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badge/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"title": "Gold",
"points": 1,
"organizationId": "97852067",
"badgeIconUrl": "/images/badges/Badge_1.png"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing badge by its ID.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/badge/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Gold\",
\"points\": \"1\",
\"badgeIconUrl\": \"\\/images\\/badges\\/Badge_1.png\",
\"defaultIconUrl\": \"\\/images\\/default-badge.png\",
\"organizationId\": \"97852067\"
}"
const url = new URL(
"https://demo.aomlms.com/api/badge/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Gold",
"points": "1",
"badgeIconUrl": "\/images\/badges\/Badge_1.png",
"defaultIconUrl": "\/images\/default-badge.png",
"organizationId": "97852067"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Badge updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete specified badges.
Deletes badges that are not assigned to any users and not used in gamification events. Logs an activity for each deleted badge.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/badge/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/badge/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 badge(s) deleted. 0 badge(s) not deleted as they are assigned to users. 0 badge(s) not deleted as they are used in gamification events."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Categories
Categories represents Course category, Product category, Question category. Helps performimg operations in all these models.
Product Category Lookup
Retrieves all the product categories. This request helps in showing all product categories in form elements like dropdown, etc. Returns ID and name of the product category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/product/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/product/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Product Category 1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Category Lookup
Retrieves all categories of the courses. If courseIds is provided, it will filter the categories for those courses. If categoryIds is provided, it will filter the categories with those IDs. Returns name and id of the category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/course/lookup?array=%5B1%2C2%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/course/lookup"
);
const params = {
"array": "[1,2]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Category 1"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Module Category Lookup
Retrieves all categories of the modules. Returns name and id of the category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/module/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/module/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Category 1"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Question Category Lookup
Retrieves all the categories of the questions user has ever created. This request helps in showing all question categories in form elements like dropdown, etc. Returns ID and name of the question category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/question/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/question/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 4,
"name": "Question-cat"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Category Lookup
Retrieves all the categories of the users user has ever created. This request helps in showing all user categories in form elements like dropdown, etc. Returns ID and name of the user category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/user/lookup?search_term=numquam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/user/lookup"
);
const params = {
"search_term": "numquam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "User Category 1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Category Lookup
Retrieves all the categories of the learning paths user has ever created. This request helps in showing all learning path categories in form elements like dropdown, etc. Returns ID and name of the learning path category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/learning-path/lookup?search_term=sed" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/learning-path/lookup"
);
const params = {
"search_term": "sed",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Learning Path Category 1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Category Tabular List
Returns all the course categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coursecategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coursecategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"name": "superman_postman",
"author": "Client Admin",
"count": 0,
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 2,
"name": "category-new",
"author": "Aom Staff",
"count": 0,
"created_at": "Aug 10, 2020 12:37 PM"
},
{
"id": 1,
"name": "Category-1",
"author": "Aom Staff",
"count": 1,
"created_at": "Aug 09, 2020 06:20 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Module Category Tabular List
Returns all the module categories in a tabular list format in paginated mode. You can apply a filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modulecategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modulecategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 2,
"records": [
{
"id": 1,
"name": "module-category-1",
"author": "Aom Staff",
"count": 3,
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 2,
"name": "module-category-2",
"author": "Client Admin",
"count": 1,
"created_at": "Aug 09, 2020 06:20 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Category Tabular List
Returns all the product categories in a tabular list format in paginated mode. You can apply a filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/productcategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/productcategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 2,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"name": "product memberships",
"author": "Aom Staff",
"count": 1,
"created_at": "May 10, 2022 03:39 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Question Category Tabular List
Returns all the question categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/questioncategory/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/questioncategory/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 3,
"recordsFiltered": 3,
"records": [
{
"id": 1,
"name": "Question Category-1",
"author": "Aom Staff",
"count": 4,
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 2,
"name": "Question Category-2",
"author": "Client Admin",
"count": 2,
"created_at": "Aug 09, 2020 06:20 PM"
},
{
"id": 3,
"name": "Question Category-3",
"author": "Aom Staff",
"count": 1,
"created_at": "Aug 10, 2020 06:34 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Category
Creates a new category using parameters mentioned. (See parameters) Creates the course/question/product category details using category name and category type.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/category/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"category_name\": \"category-new\",
\"categoryType\": \"course\"
}"
const url = new URL(
"https://demo.aomlms.com/api/category/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"category_name": "category-new",
"categoryType": "course"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Category Created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Category
Updates a category using parameters mentioned. (See parameters) Updates the course/question/product category details using category name and category type.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/category/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"category_name\": \"category-new\",
\"categoryType\": \"course\"
}"
const url = new URL(
"https://demo.aomlms.com/api/category/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"category_name": "category-new",
"categoryType": "course"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Category Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Category
Retrieves a category by its ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/category/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/category/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 3,
"name": "superman_postman",
"type": "course",
"created_by": 2,
"updated_by": null,
"deleted_by": null,
"created_at": "2020-08-10 12:43:12",
"updated_at": "2020-08-10 12:56:37",
"deleted_at": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete categories of given type
Example request:
curl --request POST \
"https://demo.aomlms.com/api/category/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"question\",
\"delete_ids\": \"[1,2,3]\",
\"categoryName\": \"Question Category-1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/category/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "question",
"delete_ids": "[1,2,3]",
"categoryName": "Question Category-1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "3 category(s) deleted. 2 category(s) not deleted as it is used in dynamic quiz(s). Please remove the category from the quiz and try again.",
"deletedCategories": [
4
],
"notDeletedCategories": [
1,
2
],
"usedInPlaces": [
{
"Question Category-1": [
{
"id": 1,
"name": "Quiz Name 1"
},
{
"id": 2,
"name": "Quiz Name 2"
}
]
},
{
"Question Category-2": [
{
"id": 3,
"name": "Quiz Name 3"
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the count of questions in a category
Get the count of questions in a category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/question-count" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/question-count"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"questionCount": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Category Tabular List
Returns all the learning path categories in a tabular list format in paginated mode. You can apply a filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-pathcategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-pathcategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "learning path category 1",
"author": "Aom Staff",
"count": 1,
"created_at": "May 16, 2022 07:00 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Certificate Templates
A Certificate template is used to provide to learners. learners can achieve this award by completing the course. Helps in performing CRUD operations for and to certificates
Certificate Template Lookup
Returns all the certificate templates in a list format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_templates/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_templates/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "cert 1"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Certificate Template Tabular List
Returns all the certificate templates in a tabular list format in paginated mode. You can apply filter using search_param via templateName(certificate template name) and courseId(course Id).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_templates/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22templateName%22%3A%22abc%22%2C%22courseId%22%3A%221%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_templates/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"templateName":"abc","courseId":"1"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "cert 1",
"slug": "cert-1",
"status": "publish",
"categories": "",
"author": "Aom Staff",
"created_at": "03 Aug 2020 09:08 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit Certificate Templates
Updates the instructor/author for the selected certificate templates.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate_templates/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"template_ids\": \"explicabo\",
\"author_id\": \"commodi\"
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_templates/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"template_ids": "explicabo",
"author_id": "commodi"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate Templates updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Field Keys Lookup
Retrieves all the fields that can be available on the certificate template. Helps while showing fields in form elements like dropdown while creating certificate template. Returns a list of all fields that can be used on the certificate template. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/keysLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/keysLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "student_first_name",
"display_value": "Student First Name"
},
{
"db_value": "student_last_name",
"display_value": "Student Last Name"
},
{
"db_value": "student_full_name",
"display_value": "Student Full Name"
},
{
"db_value": "course_name",
"display_value": "Course Name"
},
{
"db_value": "issue_date",
"display_value": "Date of Issue"
},
{
"db_value": "expiry_date",
"display_value": "Date of Expiry"
},
{
"db_value": "instructor_name",
"display_value": "Instructor Name"
},
{
"db_value": "certificate_code",
"display_value": "Certificate Code"
},
{
"db_value": "course_credit",
"display_value": "Course Credit"
},
{
"db_value": "learning_path_name",
"display_value": "Learning Path Name"
},
{
"db_value": "learning_path_credit",
"display_value": "Learning Path Credit"
},
{
"db_value": "custom_text",
"display_value": "Custom Text"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Font Families Lookup
Retrieves all the font families that can be used on the certificate template. Helps while showing font families in form elements like dropdown while creating certificate template. Returns a list of all font families that can be used on the certificate template. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/fontFamilyLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/fontFamilyLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "Lato",
"display_value": "Arial",
"is_selected": "true"
},
{
"db_value": "Courier",
"display_value": "Courier"
},
{
"db_value": "Source Sans Pro",
"display_value": "Helvetica"
},
{
"db_value": "Montserrat",
"display_value": "Montserrat"
},
{
"db_value": "Roboto Condensed",
"display_value": "Roboto"
},
{
"db_value": "Space Mono",
"display_value": "Space Mono"
},
{
"db_value": "Roboto Slab",
"display_value": "Roboto Slab"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Certificate Template
Creates a new certificate template and stores it in the database. The template can be used to assign to students upon course completion.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate_template" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Completion-Certificate\",
\"organization_id\": 12,
\"bg_url\": \"http:\\/\\/aom.com\\/images\\/default-certificate.png\",
\"height\": 680,
\"width\": 1075,
\"fields\": [
\"est\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Completion-Certificate",
"organization_id": 12,
"bg_url": "http:\/\/aom.com\/images\/default-certificate.png",
"height": 680,
"width": 1075,
"fields": [
"est"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 2,
"message": "Certificate Template created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves a single certificate template.
Returns a single certificate template based on the id provided. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/facilis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/facilis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Completion-Certificate",
"organization_id": 1,
"bg_url": "http://aom.com/images/default-certificate.png",
"height": 680,
"width": 1075,
"fields": [
{
"key": "course_name",
"value": "Course Name",
"font_size": 20,
"font_family": "Arial",
"font_color": "#222",
"top": 432,
"left": 469,
"align_center": false,
"width": 200,
"height": 40
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Preview Certificate Template
Allows users to preview a certificate template by downloading it with demo data. Simulates 100% completion and marks the text module as completed.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/preview/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/preview/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
PDF file as a download
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Certificate Template
Updates the details of a specified certificate template.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/certificate_template/4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Completion-Certificate\",
\"organization_id\": 19,
\"bg_url\": \"http:\\/\\/aom.com\\/images\\/default-certificate.png\",
\"height\": 680,
\"width\": 1075,
\"fields\": [
\"praesentium\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Completion-Certificate",
"organization_id": 19,
"bg_url": "http:\/\/aom.com\/images\/default-certificate.png",
"height": 680,
"width": 1075,
"fields": [
"praesentium"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate Template updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes a certificate template or multiple templates.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate_template/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": \"[1,2,3]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": "[1,2,3]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 template(s) deleted. 2 template(s) not deleted as it is used in course. Please remove the template(s) from the course and try again.",
"deletedTemplates": [1],
"notDeletedTemplates": [2,3],
"coursesWithTemplates": { "2": [{"id": 2, "name": "Course 2"}, {"id": 3, "name": "Course 3"}]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone Certificate Template
Clones the selected certificate template to create a new one with same settings. The new template name is set as "
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"templateId\": \"porro\"
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"templateId": "porro"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate Template Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Courses
You can perform operations like create, edit, delete on courses and its contents.
Load Course Rating Details
Retrieves the course ratings with details. The response includes course name, course ID, rating, reviews, user ID, user display name, user avatar, and submission date.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/ratings/details?page_size=10&page_number=1&courseIds=%5B1%2C2%2C3%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/ratings/details"
);
const params = {
"page_size": "10",
"page_number": "1",
"courseIds": "[1,2,3]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"ratings": [
{
"id": 1,
"courseName": "Course 1",
"courseId": 1,
"rating": 4.5,
"userId": 1,
"reviews": "This is a sample review",
"userDisplayName": "John Doe",
"avatar": "<svg...>",
"submissionDate": "Feb 2020"
}
],
"total": 20,
"recordsFiltered": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve course curriculum details
Retrieves the course curriculum details given a set of course IDs. The response includes course name, modules, and sections.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/curriculum?courseIds=placeat" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/curriculum"
);
const params = {
"courseIds": "placeat",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"name": "Course 1",
"modules": [
{
"module_id": 1,
"name": "Test Module 1",
"type": "text",
"display_type": "Text",
"icon": "el-icon-tickets"
},
{
"section_name": "Section 1",
"modules": [
{
"module_id": 2,
"name": "Test Module 2",
"type": "video",
"display_type": "Video",
"icon": "el-icon-video-camera"
}
]
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the courses in a tabular list format with pagination mode. You can apply filter using search_param via courseName, courseCategoryIds and status.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22courseCategoryIds%22%3A+%5B1%2C2%5D%2C+%22courseName%22%3A+%22%22%2C+%22status%22%3A+%22DRAFT%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"courseCategoryIds": [1,2], "courseName": "", "status": "DRAFT"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "Test Course",
"slug": "test-course",
"status": "DRAFT",
"display_status": "Draft",
"categories": "Category 1, Category 2",
"author": "John Doe",
"created_at": "Aug 26, 2020 12:00 AM",
"certificate_template_id": 1,
"accredible_group_id": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dropdown List
Retrieves all the courses in a dropdown format in paginated mode. You can apply filter using portal_id via query param.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/dropdownlist?portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/dropdownlist"
);
const params = {
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Course 1"
},
{
"id": 2,
"name": "Course 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Learners
Retrieves all enrolled students for a course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/enrolled-students?course_id=1&portalId=5&page_size=10&page_number=1&order_by=registered_on&search_param=%7B%22status%22%3A%5B%22Not+Started%22%2C%22In+Progress%22%5D%2C%22nameOrEmail%22%3A%22John+Doe%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/enrolled-students"
);
const params = {
"course_id": "1",
"portalId": "5",
"page_size": "10",
"page_number": "1",
"order_by": "registered_on",
"search_param": "{"status":["Not Started","In Progress"],"nameOrEmail":"John Doe"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": "http://localhost:8000/storage/courses/1/featured_image.jpg",
"recordsTotal": 12,
"totalNotStarted": 3,
"totalInProgress": 4,
"totalCompleted": 5,
"recordsFiltered": 12,
"records": [
{
"id": 1,
"user_id": 2,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "http://localhost:8000/storage/users/2/avatar.jpg",
"status": "Not Started",
"display_status": "Not Started",
"percentComplete": 0,
"access_status": "Allowed",
"registered_on": "Aug 09, 2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "Never",
"certificate_count": 0,
"user_type": "Learner",
"raw_user_type": "learner"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the list of webinars for a given course
This API retrieves the list of webinars for a given course ID. The response includes the webinar name, start date, end date, duration, location, instructor, and other relevant information.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/webinars?search_param=%7B%22dates%22%3A+%5B%222020-07-01%22%2C+%222020-07-31%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/webinars"
);
const params = {
"search_param": "{"dates": ["2020-07-01", "2020-07-31"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Webinar 1",
"startDate": "2020-07-01",
"endDate": "2020-07-01",
"duration": "1 hour",
"location": "New York",
"instructor": "John Doe"
},
{
"id": 2,
"name": "Webinar 2",
"startDate": "2020-07-01",
"endDate": "2020-07-01",
"duration": "1 hour",
"location": "New York",
"instructor": "Jane Doe"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the list of learning resources for a given course
This API retrieves the list of learning resources for a given course ID. The response includes the learning resource name, type, file name, file type, status, s3_url, mux_url, mux_id, bunny_video_id, bunny_video_url, mime_type, created at.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/learning-resources?search_param=%7B%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/learning-resources"
);
const params = {
"search_param": "{}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Learning Resource 1",
"type": "video",
"file_name": "LR1.mp4",
"file_type": "mp4",
"status": "active",
"s3_url": "https://example.com/LR1.mp4",
"mux_url": "https://example.com/LR1.mux",
"mux_id": "mux-id-1",
"bunny_video_id": "bunny-video-id-1",
"bunny_video_url": "https://example.com/LR1.bunny",
"mime_type": "video/mp4",
"created_at": "2020-07-01 10:00:00"
},
{
"id": 2,
"name": "Learning Resource 2",
"type": "document",
"file_name": "LR2.pdf",
"file_type": "pdf",
"status": "active",
"s3_url": "https://example.com/LR2.pdf",
"mux_url": "https://example.com/LR2.mux",
"mux_id": "mux-id-2",
"bunny_video_id": "bunny-video-id-2",
"bunny_video_url": "https://example.com/LR2.bunny",
"mime_type": "application/pdf",
"created_at": "2020-07-01 10:00:00"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the submissions for all the courses a user is enrolled in, for a given portal
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/submissions?page_size=10&page_number=1&order_by[column]=name&order_by[direction]=asc&search_param[name]=John+Doe&search_param[type]=assignment&search_param[status]=Submitted&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/submissions"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by[column]": "name",
"order_by[direction]": "asc",
"search_param[name]": "John Doe",
"search_param[type]": "assignment",
"search_param[status]": "Submitted",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course name",
"featuredImage": "http://localhost:8000/storage/courses/1/featured_image.jpg",
"totalPending": 5,
"recordsTotal": 12,
"recordsFiltered": 12,
"records": [
{
"status_row_id": 1,
"module_id": 1,
"module_name": "Assignment 1",
"module_type": "assignment",
"module_status": "Submitted",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "https://example.com/avatar.jpg",
"submission_id": 1,
"submitted_on": "2020-01-01"
},
{
"status_row_id": 2,
"module_id": 2,
"module_name": "Discussion 1",
"module_type": "discussion",
"module_status": "Submitted",
"first_name": "Jane",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "https://example.com/avatar.jpg",
"submission_id": 2,
"submitted_on": "2020-01-01"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the submissions for all the courses a user is enrolled in, for a given portal
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/all-submissions?page_size=10&page_number=1&order_by[column]=name&order_by[direction]=asc&search_param[name]=Course+Name&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/all-submissions"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by[column]": "name",
"order_by[direction]": "asc",
"search_param[name]": "Course Name",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"totalPending": 5,
"records": [
{
"course_name": "Course 1",
"status_row_id": 1,
"module_id": 1,
"module_name": "Assignment 1",
"module_type": "assignment",
"module_status": "Submitted",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "https://example.com/avatar.jpg",
"submission_id": 1,
"submitted_on": "2020-01-01"
},
{
"course_name": "Course 2",
"status_row_id": 2,
"module_id": 2,
"module_name": "Discussion 1",
"module_type": "discussion",
"module_status": "Submitted",
"first_name": "Jane",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "https://example.com/avatar.jpg",
"submission_id": 2,
"submitted_on": "2020-01-01"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
API to fetch LMS Overview Report
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/reports/overview" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"searchPortalIds\": [
\"est\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/reports/overview"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"searchPortalIds": [
"est"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"labels": [],
"totalNotStarted": [],
"totalInProgress": [],
"totalCompleted": [],
"percentageCompleted": [],
"sumNotStarted": 0,
"sumInProgress": 0,
"sumCompleted": 0,
"sumPercentageCompleted": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
API to get Course Detail Report
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/reports/course-detailed" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_ids\": [
\"qui\"
],
\"page_size\": 12,
\"page_number\": 12,
\"order_by\": [],
\"search_param\": [],
\"userCategoryId\": 18,
\"registered_between\": [
\"mollitia\"
],
\"searchPortalIds\": [
\"sapiente\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/reports/course-detailed"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_ids": [
"qui"
],
"page_size": 12,
"page_number": 12,
"order_by": [],
"search_param": [],
"userCategoryId": 18,
"registered_between": [
"mollitia"
],
"searchPortalIds": [
"sapiente"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 0,
"totalNotStarted": 0,
"totalInProgress": 0,
"totalCompleted": 0,
"recordsFiltered": 0,
"records": [
{
"user_id": 0,
"course_id": 0,
"first_name": "",
"last_name": "",
"email": "",
"course_name": "",
"portal_name": "",
"status": "",
"display_status": "",
"percent_complete": 0,
"access_status": "",
"registered_on": "",
"started_on": "",
"completed_on": "",
"expire_on": "",
"last_accessed_on": "",
"percent_achieved": 0,
"total_time_spent": "",
"certifcate_issued": "",
"certifcate_count": "",
"certifcate_issued_date": "",
"certificate_expire": ""
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the list of custom user metas that needs to be printed on the Course Insight Export report
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/reports/course-detailed-custom-headers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/reports/course-detailed-custom-headers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
"user_meta_key_1" => "Label 1",
"user_meta_key_2" => "Label 2"
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Course Details
Fetches detailed information for a specific course, including metadata, modules, categories, learning paths, and associated resources.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Course Name",
"slug": "course-name",
"featuredImageUrl": "https://example.com/image.jpg",
"instructions": "Course instructions",
"credits": 3,
"estimatedCompletion": 10,
"estimationCompletedUnit": "hours",
"minPassingPercentage": 70,
"gradingRule": "average",
"durationRule": "fixed",
"durationSpecificDate": "2025-06-01",
"durationDays": 30,
"selectedBadgeId": 1,
"isBadgeSelected": "badge",
"points": 100,
"status": "published",
"certificateTemplates": [
1,
2
],
"associatedProduct": [],
"shopifyProducts": [
101,
102
],
"completionRedirectionUrl": "https://example.com/completion",
"certificateExpiresAfter": 365,
"certificateExpiresAfterGracePeriod": 30,
"accredibleGroupId": [
5,
6
],
"enableCourseRating": true,
"completionCriteria": "all_modules",
"hasAssociatedProduct": false,
"modules": [
{
"module_id": 1,
"display_order": 1,
"name": "Module Name",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"drip_rules": "immediately",
"drip_fixed_date": null,
"drip_interval": null,
"drip_interval_unit": "day",
"drip_calculation_reference": "registration_date",
"selectedModuleBadgeId": 1,
"modulePoints": 10,
"isModuleBadgeSelected": "badge",
"minSpentHour": 0,
"minSpentMinutes": 0
}
],
"categories": [
1,
2
],
"gradeModules": [
1,
2
],
"selectedModules": [
1,
-999
],
"learningPaths": [
{
"learning_path_id": 1,
"learning_path_name": "Learning Path Name"
}
],
"learningResources": [],
"webinarList": [],
"selectedWebinars": [
-999
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Course
Creates or updates a course with associated modules, categories, certificates, webinars, and settings. This endpoint handles both draft and publish modes. It validates different fields based on the mode. In draft mode, only the course name is required. In publish mode, full validation is enforced including modules, certificates, completion criteria, badges, and grading settings.
It also links categories (creating new ones if needed), associates selected certificate templates, handles Shopify product mappings, and processes webinar integrations.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"\\\"Professional Development and Training\\\"\",
\"status\": \"\\\"published\\\"\",
\"featuredImageUrl\": \"\\\"https:\\/\\/example.com\\/image.jpg\\\"\",
\"instructions\": \"\\\"Complete all modules.\\\"\",
\"credits\": 3,
\"estimatedCompletion\": 10,
\"estimationCompletedUnit\": \"\\\"hours\\\"\",
\"minPassingPercentage\": \"70\",
\"gradingRule\": [
{
\"type\": \"average\",
\"weight\": 50
}
],
\"durationRule\": \"\\\"fixed\\\"\",
\"durationSpecificDate\": \"\\\"2025-06-01\\\"\",
\"durationDays\": 30,
\"points\": 100,
\"certificateTemplates\": 2,
\"certificateExpiresAfter\": 365,
\"certificateExpiresAfterGracePeriod\": 30,
\"completionRedirectionUrl\": \"\\\"https:\\/\\/example.com\\/congrats\\\"\",
\"enableCourseRating\": true,
\"completionCriteria\": \"\\\"all_modules\\\"\",
\"selectedModules\": [
1,
3,
5
],
\"selectedWebinars\": [
10,
11
],
\"shopifyProducts\": [
101,
102
],
\"learningResources\": [
201,
202
],
\"accredibleGroupId\": 55,
\"isBadgeSelected\": \"\\\"badge\\\"\",
\"selectedBadgeId\": 7,
\"modules\": [
\"consequatur\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "\"Professional Development and Training\"",
"status": "\"published\"",
"featuredImageUrl": "\"https:\/\/example.com\/image.jpg\"",
"instructions": "\"Complete all modules.\"",
"credits": 3,
"estimatedCompletion": 10,
"estimationCompletedUnit": "\"hours\"",
"minPassingPercentage": "70",
"gradingRule": [
{
"type": "average",
"weight": 50
}
],
"durationRule": "\"fixed\"",
"durationSpecificDate": "\"2025-06-01\"",
"durationDays": 30,
"points": 100,
"certificateTemplates": 2,
"certificateExpiresAfter": 365,
"certificateExpiresAfterGracePeriod": 30,
"completionRedirectionUrl": "\"https:\/\/example.com\/congrats\"",
"enableCourseRating": true,
"completionCriteria": "\"all_modules\"",
"selectedModules": [
1,
3,
5
],
"selectedWebinars": [
10,
11
],
"shopifyProducts": [
101,
102
],
"learningResources": [
201,
202
],
"accredibleGroupId": 55,
"isBadgeSelected": "\"badge\"",
"selectedBadgeId": 7,
"modules": [
"consequatur"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Course Details
Use this endpoint to update a course's settings, including curriculum, certification, grading, duration, and other metadata.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"\\\"Professional Development and Training\\\"\",
\"status\": \"\\\"published\\\"\",
\"featuredImageUrl\": \"\\\"https:\\/\\/example.com\\/image.jpg\\\"\",
\"instructions\": \"\\\"Complete all modules.\\\"\",
\"credits\": 3,
\"estimatedCompletion\": 10,
\"estimationCompletedUnit\": \"\\\"hours\\\"\",
\"minPassingPercentage\": \"70\",
\"gradingRule\": [
{
\"type\": \"average\",
\"weight\": 50
}
],
\"durationRule\": \"\\\"fixed\\\"\",
\"durationSpecificDate\": \"\\\"2025-06-01\\\"\",
\"durationDays\": 30,
\"points\": 100,
\"certificateTemplates\": 2,
\"certificateExpiresAfter\": 365,
\"certificateExpiresAfterGracePeriod\": 30,
\"completionRedirectionUrl\": \"\\\"https:\\/\\/example.com\\/congrats\\\"\",
\"enableCourseRating\": true,
\"completionCriteria\": \"\\\"all_modules\\\"\",
\"selectedModules\": [
1,
3,
5
],
\"selectedWebinars\": [
10,
11
],
\"shopifyProducts\": [
101,
102
],
\"learningResources\": [
201,
202
],
\"accredibleGroupId\": 55,
\"isBadgeSelected\": \"\\\"badge\\\"\",
\"selectedBadgeId\": 7,
\"modules\": \"registration_date\"
}"
const url = new URL(
"https://demo.aomlms.com/api/course/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "\"Professional Development and Training\"",
"status": "\"published\"",
"featuredImageUrl": "\"https:\/\/example.com\/image.jpg\"",
"instructions": "\"Complete all modules.\"",
"credits": 3,
"estimatedCompletion": 10,
"estimationCompletedUnit": "\"hours\"",
"minPassingPercentage": "70",
"gradingRule": [
{
"type": "average",
"weight": 50
}
],
"durationRule": "\"fixed\"",
"durationSpecificDate": "\"2025-06-01\"",
"durationDays": 30,
"points": 100,
"certificateTemplates": 2,
"certificateExpiresAfter": 365,
"certificateExpiresAfterGracePeriod": 30,
"completionRedirectionUrl": "\"https:\/\/example.com\/congrats\"",
"enableCourseRating": true,
"completionCriteria": "\"all_modules\"",
"selectedModules": [
1,
3,
5
],
"selectedWebinars": [
10,
11
],
"shopifyProducts": [
101,
102
],
"learningResources": [
201,
202
],
"accredibleGroupId": 55,
"isBadgeSelected": "\"badge\"",
"selectedBadgeId": 7,
"modules": "registration_date"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Course updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Lookup
Retrieves the courses matching the search term provided in the request. If the portalId is provided, it will fetch courses which are attached to the portal. If the type is report, it will fetch all the courses attached to the membership and the courses attached to the learning path attached to the portal as well.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/lookup?search_term=course+1&portalId=5&type=report" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/lookup"
);
const params = {
"search_term": "course 1",
"portalId": "5",
"type": "report",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "course 1"
},
{
"value": 2,
"label": "course 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes courses
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "3 course(s) deleted, 2 course(s) not deleted as it has enrollments. Please remove the students from the course and try again.",
"deletedCourses": [
1,
2
],
"notDeletedCourses": [
3,
4
],
"enrolledCourses": [
{
"id": 3,
"name": "Course 3"
},
{
"id": 4,
"name": "Course 4"
}
],
"notDeletedProductCourses": [
1,
3
],
"productCourses": {
"Course 1": [
{
"id": 1,
"title": "Product 1"
}
],
"Course 3": [
{
"id": 2,
"title": "Product 2"
}
]
},
"notDeletedAutoEnrolledCourses": [
2
],
"autoEnrolledCourses": [
{
"courseId": 2,
"courseName": "Course 2"
}
],
"notDeletedLearningPathCourses": [
4
],
"learningPathCourses": {
"Course 4": [
{
"id": 1,
"title": "Learning Path 1"
}
]
},
"notDeletedPortalCourses": [
1
],
"portalCourses": {
"Course 1": [
{
"id": 1,
"name": "Portal 1"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details of specified courses in bulk. The parameters to be updated are provided in the request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_ids\": [
1,
2
],
\"author_id\": 1,
\"categories_id\": [
3,
4
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_ids": [
1,
2
],
"author_id": 1,
"categories_id": [
3,
4
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Courses updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Drip Option Lookup
Retrieves all the options for the drip feature that the platform offers like Immediately, On a Fixed Date, At Fixed Intervals. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/drip/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/drip/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"options": [
{
"db_value": "immediately",
"display_value": "Immediately"
},
{
"db_value": "fixed_date",
"display_value": "On a Fixed Date"
},
{
"db_value": "specific_interval",
"display_value": "At Fixed Intervals"
}
],
"intervals": [
{
"db_value": "day",
"display_value": "Day(s)"
},
{
"db_value": "week",
"display_value": "Week(s)"
},
{
"db_value": "month",
"display_value": "Month(s)"
}
],
"calculation_ref": [
{
"db_value": "registration_date",
"display_value": "Enrollment Date"
},
{
"db_value": "started_date",
"display_value": "Course Start Date"
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Status Lookup
Retrieves all the statuses for a course the platform offers like Not Started, In Progress, Completed. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "Not Started",
"display_value": "Not Started"
},
{
"db_value": "In Progress",
"display_value": "In Progress"
},
{
"db_value": "Completed",
"display_value": "Completed"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Grading Rules Lookup
Retrieves all the grading rules available for course creation. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/grading-rules/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/grading-rules/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "no_grading",
"display_value": "No Grading"
},
{
"db_value": "avg_all_modules",
"display_value": "Average of all Quiz/Assignment/Discussions/Scorm"
},
{
"db_value": "avg_specific_modules",
"display_value": "Average of specific Quiz/Assignment/Discussions/Scorm"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Duration Rules Lookup
Retrieves all the duration rules for the courses. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/duration-rules/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/duration-rules/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "unlimited",
"display_value": "Unlimited"
},
{
"db_value": "on_specific_date",
"display_value": "Till Specific Date"
},
{
"db_value": "x_days_after_start",
"display_value": "Till X day(s) after a student starts the course"
},
{
"db_value": "x_days_after_enrollment",
"display_value": "Till X day(s) after a student registers in the course"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Course Activities
Retrieves paginated activities for a specified course based on various parameters.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course-activities?course_id=1&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22asc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22John+Doe%22%7D&context=%22overview%22&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course-activities"
);
const params = {
"course_id": "1",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"asc"}",
"search_param": "{"nameOrEmail":"John Doe"}",
"context": ""overview"",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 40,
"recordsFiltered": 10,
"records": [
{
"id": 10,
"verb": "ACCESSED",
"created_at": "Aug 03, 2020 10:07 AM",
"message": "Demo Student has accessed course 1",
"student": "Demo Student"
},
{
"id": 9,
"verb": "ACHIEVED CERTIFICATE",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has achieved certificate for course 1",
"student": "Demo Student"
},
{
"id": 8,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 7,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 6,
"verb": "ACHIEVED CERTIFICATE",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has achieved certificate for course 1",
"student": "Demo Student"
},
{
"id": 5,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 4,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 3,
"verb": "STARTED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has started test",
"student": "Demo Student"
},
{
"id": 2,
"verb": "STARTED",
"created_at": "Aug 03, 2020 10:01 AM",
"message": "Demo Student has started course 1",
"student": "Demo Student"
},
{
"id": 1,
"verb": "ENROLLED",
"created_at": "Aug 03, 2020 10:00 AM",
"message": "Demo Student is enrolled to course 1",
"student": "Demo Student"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the course details for given course ID and user ID
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course-progress/edit/1?userId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course-progress/edit/1"
);
const params = {
"userId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "course 1",
"course_id": 1,
"userId": 3,
"userName": "John Doe",
"email": "[email protected]",
"featuredImageUrl": null,
"status": "Not Started",
"completionPercentage": 0,
"enrollmentDate": "2020-08-03T10:00:00.000000Z",
"expiryDate": "2020-08-04T10:00:00.000000Z",
"completionDate": null,
"startDate": null,
"lastAccessed": null,
"modules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"status_row_id": -1,
"status": "Not Started",
"started_on": null,
"completed_on": null,
"last_accessed_on": null,
"total_time_spent": null,
"completion_percentage": 0,
"no_of_times_accessed": 0,
"totalMarks": null,
"obtainedMarks": null
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"status_row_id": -1,
"status": "Not Started",
"started_on": null,
"completed_on": null,
"last_accessed_on": null,
"total_time_spent": null,
"completion_percentage": 0,
"no_of_times_accessed": 0,
"totalMarks": 50,
"obtainedMarks": null
}
],
"hasSection": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Course Progress
Updates the course progress for given course.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course-progress/update/6?userId=3&enrollmentDate=2020-01-01+00%3A00%3A00&expiryDate=2020-01-01+00%3A00%3A00&startDate=2020-01-01+00%3A00%3A00&completionDate=2020-01-01+00%3A00%3A00&lastAccessed=2020-01-01+00%3A00%3A00&status=Completed&modules=%5B%7B%22module_id%22%3A+16%2C+%22status%22%3A+%22Not+Started%22%7D%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course-progress/update/6"
);
const params = {
"userId": "3",
"enrollmentDate": "2020-01-01 00:00:00",
"expiryDate": "2020-01-01 00:00:00",
"startDate": "2020-01-01 00:00:00",
"completionDate": "2020-01-01 00:00:00",
"lastAccessed": "2020-01-01 00:00:00",
"status": "Completed",
"modules": "[{"module_id": 16, "status": "Not Started"}]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Course updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the name of the course for given course ID
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/name/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/name/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
string Course name
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enroll learners
To enroll users in a course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/enroll/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"studentIds\": [
2,
3
],
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/course/enroll/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"studentIds": [
2,
3
],
"portalId": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) enrolled successfully",
"enrolledUsersCount": 2,
"notEnrolledUsers": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Learners
To remove users from a course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/remove/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/remove/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) removed successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Progress
To reset the progress of students for course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/reset/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/reset/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) progress is reset successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revoke Access
To revoke the access of course from students, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/revoke/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
8,
7
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/revoke/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
8,
7
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 learner(s) access has been revoked successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Grant Access
To grant the access of course to students, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/grant/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/grant/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 learner(s) access has been granted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Expiry
To update the expiry date for the learners of a course, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/setExpiry/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
\"fugiat\"
],
\"expiryDate\": \"porro\"
}"
const url = new URL(
"https://demo.aomlms.com/api/course/setExpiry/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
"fugiat"
],
"expiryDate": "porro"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Expiration date is successfully updated for 2 student(s)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign Certificate
To assign certificate to the user for the course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/assignCertificate/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
\"qui\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/assignCertificate/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
"qui"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate is successfully assigned to 2 student(s)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Activity Lookup
Retrieves all the activities performed in a course. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/activities/verb/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/activities/verb/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "ENROLLED",
"display_value": "ENROLLED"
},
{
"db_value": "STARTED",
"display_value": "STARTED"
},
{
"db_value": "ACCESSED",
"display_value": "ACCESSED"
},
{
"db_value": "COMPLETED",
"display_value": "COMPLETED"
},
{
"db_value": "SUBMITTED",
"display_value": "SUBMITTED"
},
{
"db_value": "EVALUATED",
"display_value": "EVALUATED"
},
{
"db_value": "REJECTED",
"display_value": "REJECTED"
},
{
"db_value": "RETAKE",
"display_value": "RETAKEN"
},
{
"db_value": "ACHIEVED CERTIFICATE",
"display_value": "ACHIEVED CERTIFICATE"
},
{
"db_value": "RESET",
"display_value": "RESET"
},
{
"db_value": "REMOVED",
"display_value": "REMOVED"
},
{
"db_value": "REVOKED",
"display_value": "REVOKED"
},
{
"db_value": "GRANTED",
"display_value": "GRANTED"
},
{
"db_value": "UPDATED EXPIRY DATE",
"display_value": "UPDATED EXPIRY DATE"
},
{
"db_value": "FAILED",
"display_value": "FAILED"
},
{
"db_value": "MANUALLY UPDATED",
"display_value": "MANUALLY UPDATED"
},
{
"db_value": "REGISTERED",
"display_value": "REGISTERED"
},
{
"db_value": "ATTENDED",
"display_value": "ATTENDED"
},
{
"db_value": "NO SHOW",
"display_value": "NO SHOW"
},
{
"db_value": "CANCELLED",
"display_value": "CANCELLED"
},
{
"db_value": "ACHIEVED BADGE",
"display_value": "ACHIEVED BADGE"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gradebook Data
Retrieves all the progress achieved by a learner on the course. Details will be returned in paginated mode. You can use the userId parameter to get details for different Learners.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/progress/course/1?userId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/progress/course/1"
);
const params = {
"userId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "course 1",
"modules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "6 days ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1,
"totalMarks": null,
"obtainedMarks": null
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0,
"totalMarks": 50,
"obtainedMarks": null
}
],
"id": 1,
"userId": 3,
"permalink": "http://localhost:8000/course/course-1",
"featuredImageUrl": null,
"instructions": null,
"accessStatus": "Allowed",
"status": "Completed",
"completionPercentage": 50,
"timeSpent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"enrollmentDate": "03 Aug 2020",
"isExpired": false,
"daysToExpire": "Unlimited days",
"lastAccessed": "6 days ago",
"isCertificateAvailable": true,
"totalMarks": 50,
"obtainedMarks": 0,
"percentage": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled User Lookup
Retrieves a list of users enrolled in a specified course, optionally filtered by portal ID and search term. The search term can match first name, last name, email, or full name.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/enrolled/course/{id}?search_term=%22John+Doe%22&id=1&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/enrolled/course/{id}"
);
const params = {
"search_term": ""John Doe"",
"id": "1",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"full_name": "John Doe",
"email": "[email protected]"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone a course.
This function clones a course and its associated categories and modules. It allows for a deep copy, which clones all course content, including modules and their details. The cloned course will have a new name suffixed with "_copy" and the requesting user will be recorded as the creator and updater.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_id\": 1,
\"isDeepCopy\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/course/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_id": 1,
"isDeepCopy": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Course Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the list of courses which are auto-enrolled for free to users after registration.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/courses/auto-enroll-courses/update" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"courses\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/courses/auto-enroll-courses/update"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"courses": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Course Updated Successfully",
"type": "success",
"title": "Success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the list of courses which are auto-enrolled for free to users after registration.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/auto-enroll-courses" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/auto-enroll-courses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "Course 1"
},
{
"value": 2,
"label": "Course 2"
},
{
"value": 3,
"label": "Course 3"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the list of students enrolled in a given webinar
This API retrieves the list of students enrolled in a given webinar ID and portal ID. The response includes the student name, email, avatar, status, registered on, last accessed on, attendance recording type, notes.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/webinar/enrolled-students?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/enrolled-students"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "{}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"user_id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "https://example.com/john.jpg",
"status": "active",
"registered_on": "2020-07-01 10:00:00",
"last_accessed_on": "2020-07-01 11:00:00",
"attendance_recording_type": "video",
"notes": "Some notes"
},
{
"id": 2,
"user_id": 2,
"first_name": "Jane",
"last_name": "Smith",
"email": "[email protected]",
"avatar": "https://example.com/jane.jpg",
"status": "inactive",
"registered_on": "2020-07-01 10:00:00",
"last_accessed_on": "2020-07-01 11:00:00",
"attendance_recording_type": "audio",
"notes": "Some notes"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Course Rating
Saves the course rating given by user and fires an event to send notification to the course creator.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/courses/rating" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": \"1\",
\"course_id\": \"1\",
\"reviews\": \"\\\"This course is awesome\\\"\",
\"rating\": 5,
\"display_name\": \"\\\"John Doe\\\"\",
\"portal_id\": \"1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/courses/rating"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": "1",
"course_id": "1",
"reviews": "\"This course is awesome\"",
"rating": 5,
"display_name": "\"John Doe\"",
"portal_id": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
"message" => "Course Rating submitted successfully."
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the course ratings in a tabular list format in paginated mode.
You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/ratings/listing?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/ratings/listing"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"total": 1,
"recordsFiltered": 1,
"ratings": [
{
"id": 1,
"courseName": "Course Name",
"courseId": 1,
"rating": 5,
"userId": 1,
"reviews": "My first comment",
"userdisplayName": "John Doe",
"submissionDate": "Aug 11, 2020 05:56 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Course Rating
Deletes the specified course rating and updates the average rating of the course.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/ratings/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/course/ratings/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Course Rating deleted successfully!"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Launch
This API is used to launch a course and get the modules associated with the course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/launch?info=info%3Dtrue&portalId=1&moduleIds[]=1&moduleIds[]=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/launch"
);
const params = {
"info": "info=true",
"portalId": "1",
"moduleIds[0]": "1",
"moduleIds[1]": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Course Name",
"id": 2,
"permalink": "http://example.com/course/launch",
"featuredImageUrl": "http://example.com/featured-image.jpg",
"instructions": "Course Instructions",
"rating": 4.5,
"enableCourseRating": true,
"accessStatus": "Allowed",
"status": "Not Started",
"display_status": "Not Started",
"completionPercentage": 0,
"timeSpent": "00:00:00",
"enrollmentDate": "22-02-2022",
"isExpired": false,
"lastAccessed": "Never",
"estimatedCompletionTime": "2 hours",
"expireOn": "22-02-2022",
"modules": [],
"daysToExpire": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve course information (name, modules, webinars, etc.)
This API retrieves course information for a given course ID, portal ID, and user ID. The response includes the course name, modules, webinars, learning resources, and other relevant information.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/portalCourseInfo?courseId=1&portalId=1&userId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/portalCourseInfo"
);
const params = {
"courseId": "1",
"portalId": "1",
"userId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Course 1",
"modules": [
{
"module_id": 1,
"name": "Test Module 1",
"slug": "test-module-1",
"type": "text",
"icon": "el-icon-tickets",
"display_type": "Text",
"last_accessed_on": "Never",
"status": "Not Enrolled",
"display_status": "Not Enrolled",
"completion_percentage": 0,
"estimatedCompletion_time": "1 hour"
}
],
"webinarList": [
{
"id": 1,
"name": "Test Webinar 1",
"start_date": "2020-08-03T10:02:33.000000Z",
"end_date": "2020-08-03T10:02:33.000000Z",
"description": "Test webinar description",
"duration": "1 hour",
"is_registered": false
}
],
"learningResources": [
{
"id": 1,
"name": "Test Resource 1",
"url": "http://example.com/test-resource-1.pdf",
"description": "Test resource description"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Discount Coupons
A Coupon is used by the learners to reduce ther price by some discount, provided by the Instructor. It helps for adding/updating/editing discount coupons applied on products.
Coupons Tabular List
Returns all the coupons in a tabular list format with pagination. Allows filtering using the search_param via code (coupon code).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupons/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22desc%22%7D&search_param=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupons/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"desc"}",
"search_param": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"code": "code75",
"type": "percent_amount",
"value": 1500,
"total_limit": 12,
"expired_at": "Aug 26, 2020"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Coupon Lookup
Retrieves all coupons whose code matches the search term provided. This is useful for displaying coupons in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupons/lookup?search_term=%22SUMMER%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupons/lookup"
);
const params = {
"search_term": ""SUMMER"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"code": "code75"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the type of the coupons.
Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupons/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupons/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "fixed_amount",
"display_value": "Fixed Cart Discount"
},
{
"db_value": "percent_amount",
"display_value": "Percentage Discount"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Coupon
Creates a coupon based on the request data. Coupons can be used by the students to get some discount while purchasing the course.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/coupon/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"code\": \"code75\",
\"value\": \"1500\",
\"type\": \"percent_amount\",
\"expiry\": \"2020-08-26\",
\"allowed_emails\": \"null\",
\"usage_limit\": 2000,
\"notes\": \"Discount upto 75%\",
\"allowed_products\": [
1,
2,
3
],
\"allowed_product_categories\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"code": "code75",
"value": "1500",
"type": "percent_amount",
"expiry": "2020-08-26",
"allowed_emails": "null",
"usage_limit": 2000,
"notes": "Discount upto 75%",
"allowed_products": [
1,
2,
3
],
"allowed_product_categories": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Coupon created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Coupon
Retrieves a coupon based on its ID. Useful for displaying a coupon's details.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupon/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"code": "code75",
"type": "percent_amount",
"value": 1500,
"usage_limit": 12,
"expiry": "2020-08-26",
"allowed_emails": null,
"note_privacy": null,
"notes": "Discount upto 75%",
"allowed_products": [],
"excluded_products": [],
"allowed_product_categories": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Coupon
Updates a coupon based on the id provided as parameter.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/coupon/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"1\",
\"code\": \"code75\",
\"value\": \"1500\",
\"type\": \"percent_amount\",
\"expiry\": \"2020-08-26\",
\"allowed_emails\": \"null\",
\"usage_limit\": 2000,
\"notes\": \"Discount upto 75%\",
\"allowed_products\": [
1,
2,
3
],
\"allowed_product_categories\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1",
"code": "code75",
"value": "1500",
"type": "percent_amount",
"expiry": "2020-08-26",
"allowed_emails": "null",
"usage_limit": 2000,
"notes": "Discount upto 75%",
"allowed_products": [
1,
2,
3
],
"allowed_product_categories": [
1,
2,
3
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Coupon updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Coupon
Deletes a coupon based on the id provided as parameter.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/coupon/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": \"[1,2,3]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": "[1,2,3]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 coupon(s) deleted. 1 coupon(s) not deleted as they are associated with orders"
}
Example response (500):
{
"message": "Something went wrong"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List of all coupons.
Returns a list of all coupons. Response contains coupon id and coupon code.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/coupon/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/coupon/list"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"0": {
"id": 1,
"code": "code1"
},
"1": {
"id": 2,
"code": "code2"
}
}
Example response (500):
{
"message": "Something went wrong"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Discussions
A Discussion module is used as course content and a platform where learners can have discussions. Helps to perform CRUD operation to and for discussion modules.
Discussion Modules Tabular List
Returns all discussion modules in a tabular list format with pagination. Filters can be applied using search parameters for associated courses and module names.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/discussion?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22associatedCourse%22%3A+%22%22%2C+%22moduleName%22%3A+%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"associatedCourse": "", "moduleName": ""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 5,
"records": [
{
"id": 1,
"name": "Discussion 1",
"slug": "discussion-1",
"type": "discussion",
"totalPoints": 100,
"icon": "<i class=\"el-icon-chat\"></i>",
"author": "John Doe",
"showMappedCourses": false,
"created_at": "Aug 03, 2020 09:56 AM",
"course_count": 2
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Discussion Module
To create a discussion module, you need to use this request. (See parameters) Created discussion modules can be used in the course as course content/lesson.
Returns : id of the discussion created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/discussion" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"First-discussion\",
\"content\": \"A brief description\",
\"should_be_evaluated\": true,
\"totalPoints\": 20,
\"minComments\": 5,
\"estimatedCompletion\": \"90\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "First-discussion",
"content": "A brief description",
"should_be_evaluated": true,
"totalPoints": 20,
"minComments": 5,
"estimatedCompletion": "90",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 8,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Discussion Module
Updates the details of a specified discussion module. Validates the request and updates the module with the given parameters if it exists.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/discussion/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"First Discussion\",
\"content\": \"An updated brief description\",
\"should_be_evaluated\": true,
\"totalPoints\": 20,
\"minComments\": 5,
\"estimatedCompletion\": \"90\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "First Discussion",
"content": "An updated brief description",
"should_be_evaluated": true,
"totalPoints": 20,
"minComments": 5,
"estimatedCompletion": "90",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Discussion Module
Returns a discussion module based on its ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/discussion/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Discussion 1",
"slug": "discussion-1",
"content": "A brief description",
"totalPoints": 100,
"should_be_evaluated": true,
"minComments": 2,
"estimatedCompletion": 2,
"estimationCompletedUnit": "hours",
"courses": [
{
"course_id": 1,
"course_name": "Course 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Discussion Module Details
To get the details of a discussion module, you need to use this request. (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First Discussion",
"slug": "first-discussion",
"content": "A brief description",
"courseName": "First Course",
"courseSlug": "http://localhost:8000/courses/1/launch",
"url": "http://localhost:8000/courses/1/modules/2/launch",
"totalPoints": 20,
"shouldBeEvaluated": true,
"min_time_spent": 90,
"otherModules": [],
"launchCheck": {...},
"prevSlug": "first-video",
"nextSlug": "second-video",
"currentUserId": 1,
"currentStudentAvatar": "http://localhost:8000/storage/avatars/1.png",
"currentUserName": "John Doe",
"status": "In Progress",
"statusRowId": 1,
"timeSpent": 0,
"course_newly_completed": false,
"timeToBeSpent": 1,
"instructorResponse": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Comments
Returns all the discussion comments in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/loadComments?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D&moduleId=2®istrationId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/loadComments"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
"moduleId": "2",
"registrationId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"recordsTotal":1,"recordsFiltered":1,"records":[{"id":1,"comment":"My first comment","userAvatar":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" \/><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS<\/text><\/svg>","userFullName":"Aom Staff","date":"Aug 11, 2020 05:56 AM", "replies":[]}]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Post Comment for Discussion Module
Post a comment for the discussion module. The comment is for the given module under the given course registration. If the comment meets the submission conditions, then the module status is updated to 'Submitted' and an entry is made in discussion evaluation table and an email is sent to the instructor.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/discussion/postComment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": \"7\",
\"currentUserId\": \"1\",
\"comment\": \"This is my first comment.\",
\"parentId\": \"1\",
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/postComment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": "7",
"currentUserId": "1",
"comment": "This is my first comment.",
"parentId": "1",
"portalId": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "Submitted",
"message": "Comment Posted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Discussion Submission Details
Retrieves the submission details of the discussion the student have given. Helps in grading a student. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/submissions?statusRowId=delectus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/submissions"
);
const params = {
"statusRowId": "delectus",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseId": 1,
"courseName": "course 1",
"discussionName": "assign",
"status": "In Progress",
"content": "Desc",
"totalPoints": 50,
"shouldBeEvaluated": true,
"userAvatar": "avatar.jpg",
"userFullName": "Aom Staff",
"userEmail": "[email protected]",
"comments": [
{
"id": 1,
"comment": "This is my first comment.",
"date": "Aug 10, 2020 11:33 AM"
}
],
"replies": [
{
"id": 1,
"comment": "This is my first reply.",
"date": "Aug 10, 2020 11:33 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Evaluate Discussion
Evaluates the discussion from Instructor side.Updates the status of discussion to completed if Instructor thinks student's submission is upto the marks. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/discussion/evaluate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 1,
\"statusRowId\": \"7\",
\"evaluation\": \"{instructorMessage : \'You comments look good\', pointsAwarded: \'50\' }\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/evaluate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 1,
"statusRowId": "7",
"evaluation": "{instructorMessage : 'You comments look good', pointsAwarded: '50' }"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Discussion evaluated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Discussion Comments
Retrieves all the discussion comments in a nested tree format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/comments?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D&moduleId=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/comments"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"associatedCourse":"","moduleName":""}",
"moduleId": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"comment": "My first comment",
"courseName": "course 1",
"userAvatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"userFullName": "Aom Staff",
"date": "Aug 11, 2020 05:56 AM",
"replies": [
{
"id": 1,
"comment": "My first reply",
"userAvatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"userFullName": "Aom Staff",
"date": "Aug 11, 2020 05:56 AM",
"replies": [
{
"id": 1,
"comment": "My second reply",
"userAvatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"userFullName": "Aom Staff",
"date": "Aug 11, 2020 05:56 AM",
"replies": []
}
]
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Discussion Comments
Deletes the given comments and its children too.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/discussion/deleteComments" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": \"[1,2,3]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/deleteComments"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": "[1,2,3]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Comment(s) deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce
Endpoints for managing ecommerce settings. Getting and setting items status and values for the platform and the products.
Retrieves the global ecommerce product settings.
Fetches the settings of global products, including the color of product price and call to action names for free, simple and subscription products.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/global" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/global"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"product_price_color": {
"content": {
"backgroundColor": "#fff"
}
},
"free_product_cta": "Enroll Now",
"simple_product_cta": "Add to Cart",
"subscription_product_cta": "Subscribe"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Ecommerce Cart Abandonment Settings
Fetches the settings related to cart abandonment tracking, including whether tracking is enabled and the UTM parameters used for tracking.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/cartAbandonment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/cartAbandonment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"enable_cart_abandoned_tracking": true,
"enable_tracking_staff": false,
"utm_parameters": "utm_source=google&utm_medium=cpc"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Country Lookup
Retrieves all the countries in list format. Helps while showing countries in form elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/countries/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/countries/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"AF": "Afghanistan",
"AX": "Aland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
"AG": "Antigua and Barbuda",
"AR": "Argentina",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaijan",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesh",
"BB": "Barbados",
"BY": "Belarus",
"BE": "Belgium",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivia",
"BA": "Bosnia and Herzegovina",
"BW": "Botswana",
"BV": "Bouvet Island",
"BR": "Brazil",
"VG": "Virgin Islands, British",
"BN": "Brunei",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"KH": "Cambodia",
"CM": "Cameroon",
"CA": "Canada",
"CV": "Cape Verde",
"KY": "Cayman Islands",
"CF": "Central African Republic",
"TD": "Chad",
"CL": "Chile",
"CN": "China",
"CX": "Christmas Island",
"CC": "Cocos (Keeling) Islands",
"CO": "Colombia",
"KM": "Comoros",
"CG": "Congo",
"CD": "Congo, The Democratic Republic of the",
"CK": "Cook Islands",
"CR": "Costa Rica",
"CI": "Cote d'Ivoire",
"HR": "Croatia",
"CU": "Cuba",
"CW": "Curacao",
"CY": "Cyprus",
"CZ": "Czech Republic",
"DK": "Denmark",
"DJ": "Djibouti",
"DM": "Dominica",
"DO": "Dominican Republic",
"EC": "Ecuador",
"EG": "Egypt",
"SV": "El Salvador",
"GQ": "Equatorial Guinea",
"ER": "Eritrea",
"EE": "Estonia",
"ET": "Ethiopia",
"FK": "Falkland Islands (Malvinas)",
"FO": "Faroe Islands",
"FJ": "Fiji",
"FI": "Finland",
"FR": "France",
"GF": "French Guiana",
"PF": "French Polynesia",
"TF": "French Southern Territories",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgia",
"DE": "Germany",
"GH": "Ghana",
"GI": "Gibraltar",
"GR": "Greece",
"GL": "Greenland",
"GD": "Grenada",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HM": "Heard Island and McDonald Islands",
"VA": "Holy See (Vatican City)",
"HN": "Honduras",
"HK": "Hong Kong",
"HU": "Hungary",
"IS": "Iceland",
"IN": "India",
"ID": "Indonesia",
"IR": "Iran, Islamic Republic of",
"IQ": "Iraq",
"IE": "Ireland",
"IM": "Isle of Man",
"IL": "Israel",
"IT": "Italy",
"JM": "Jamaica",
"JP": "Japan",
"JE": "Jersey",
"JO": "Jordan",
"KZ": "Kazakhstan",
"KE": "Kenya",
"KI": "Kiribati",
"KP": "Korea, Democratic People's Republic of",
"KR": "Korea, Republic of",
"KW": "Kuwait",
"KG": "Kyrgyzstan",
"LA": "Lao People's Democratic Republic",
"LV": "Latvia",
"LB": "Lebanon",
"LS": "Lesotho",
"LR": "Liberia",
"LY": "Libyan Arab Jamahiriya",
"LT": "Lithuania",
"LU": "Luxembourg",
"MO": "Macao",
"MK": "Macedonia, The Former Yugoslav Republic of",
"MG": "Madagascar",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Maldives",
"ML": "Mali",
"MT": "Malta",
"MH": "Marshall Islands",
"MQ": "Martinique",
"MR": "Mauritania",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Mexico",
"FM": "Micronesia, Federated States of",
"MD": "Moldova, Republic of",
"MC": "Monaco",
"MN": "Mongolia",
"ME": "Montenegro",
"MS": "Montserrat",
"MA": "Morocco",
"MZ": "Mozambique",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NL": "Netherlands",
"NC": "New Caledonia",
"NZ": "New Zealand",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"NF": "Norfolk Island",
"MP": "Northern Mariana Islands",
"NO": "Norway",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestinian Territory, Occupied",
"PA": "Panama",
"PG": "Papua New Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PH": "Philippines",
"PN": "Pitcairn",
"PL": "Poland",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"RE": "Reunion",
"RO": "Romania",
"RU": "Russian Federation",
"RW": "Rwanda",
"BL": "Saint Barthelemy",
"SH": "Saint Helena, Ascension and Tristan da Cunha",
"KN": "Saint Kitts and Nevis",
"LC": "Saint Lucia",
"MF": "Saint Martin (French part)",
"PM": "Saint Pierre and Miquelon",
"VC": "Saint Vincent and the Grenadines",
"WS": "Samoa",
"SM": "San Marino",
"ST": "Sao Tome and Principe",
"SA": "Saudi Arabia",
"SN": "Senegal",
"RS": "Serbia",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapore",
"SX": "Sint Maarten (Dutch part)",
"SK": "Slovakia",
"SI": "Slovenia",
"SB": "Solomon Islands",
"SO": "Somalia",
"ZA": "South Africa",
"GS": "South Georgia and the South Sandwich Islands",
"SS": "South Sudan",
"ES": "Spain",
"LK": "Sri Lanka",
"SD": "Sudan",
"SR": "Suriname",
"SJ": "Svalbard and Jan Mayen",
"SZ": "Swaziland",
"SE": "Sweden",
"CH": "Switzerland",
"SY": "Syrian Arab Republic",
"TW": "Taiwan, Province of China",
"TJ": "Tajikistan",
"TZ": "Tanzania, United Republic of",
"TH": "Thailand",
"TL": "Timor-Leste",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad and Tobago",
"TN": "Tunisia",
"TR": "Turkey",
"TM": "Turkmenistan",
"TC": "Turks and Caicos Islands",
"TV": "Tuvalu",
"UG": "Uganda",
"UA": "Ukraine",
"AE": "United Arab Emirates",
"GB": "United Kingdom",
"US": "United States",
"UM": "United States Minor Outlying Islands",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VE": "Venezuela, Bolivarian Republic of",
"VN": "Viet Nam",
"VI": "Virgin Islands, U.S.",
"WF": "Wallis and Futuna",
"EH": "Western Sahara",
"YE": "Yemen",
"ZM": "Zambia",
"ZW": "Zimbabwe"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
States Lookup
Retrieves all the states for a given country code in list format. Helps while showing states in form elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/states/lookup?countryCode=IN" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/states/lookup"
);
const params = {
"countryCode": "IN",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"KA":"Karnataka","KL":"Kerala","TN":"Tamil Nadu",...}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the currencies.
Fetches the list of all the currencies supported by the platform.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/currency/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/currency/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"USD":"United States (US) dollar","EUR":"Euro","INR":"Indian rupee",...}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the general ecommerce settings. Helps in fetching items of the ecommerce settings, like country, city, address, location, etc(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"addressLine1": "1234 Lorem Ipsum Drive",
"addressLine2": "omnis",
"city": "New Jersey",
"state": "vel",
"country": "country",
"zipcode": "08053",
"selling_location": "all_countries",
"some_countries_excluded": [],
"some_countries": [],
"enableTaxes": true,
"enableCoupons": true,
"currency": "USD",
"productionMode": true,
"enableSaleTax": true,
"enableShipping": true,
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set General Ecommerce Settings
To save the general ecommerce settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"addressLine1\": \"1234 Lorem Ipsum Drive\",
\"addressLine2\": \"omnis\",
\"city\": \"New Jersey\",
\"state\": \"vel\",
\"country\": \"country\",
\"zipcode\": \"08053\",
\"enableCoupons\": true,
\"currency\": \"USD\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"addressLine1": "1234 Lorem Ipsum Drive",
"addressLine2": "omnis",
"city": "New Jersey",
"state": "vel",
"country": "country",
"zipcode": "08053",
"enableCoupons": true,
"currency": "USD"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the invoice settings. Helps in fetching items of the invoice settings, like invoice business name, business name, tax settings, business info, etc(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"invoiceBusinessName": "defaultBusinessName",
"businessName": "Business Name",
"taxSettings": "inclusive",
"businessInfo": {
"addressLine1": "1234 Lorem Ipsum Drive",
"addressLine2": "omnis",
"city": "New Jersey",
"state": "vel",
"country": "country",
"zipcode": "08053",
},
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Invoice Settings
Updates the settings for Invoice. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"invoiceBusinessName\": \"customBusinessName\",
\"businessName\": \"Business Name\",
\"taxSettings\": \"inclusive\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"invoiceBusinessName": "customBusinessName",
"businessName": "Business Name",
"taxSettings": "inclusive"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Order Invoice Settings Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Global Ecommerce Product Settings
Updates the settings of global products, including the color of product price and call to action names for free, simple and subscription products.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/global" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"freeProductCta\": \"Enroll Now\",
\"simpleProductCta\": \"Add to Cart\",
\"subscriptionProductCta\": \"Subscribe\",
\"productPriceColor\": {
\"content\": {
\"backgroundColor\": \"#fff\"
}
}
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/global"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"freeProductCta": "Enroll Now",
"simpleProductCta": "Add to Cart",
"subscriptionProductCta": "Subscribe",
"productPriceColor": {
"content": {
"backgroundColor": "#fff"
}
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Ecommerce Cart Abandonment Setting
Updates the ecommerce settings related to cart abandonment tracking. Allows enabling/disabling of cart abandonment tracking and tracking by staff. Also updates UTM parameters used for tracking.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/cartAbandonment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enableTracking\": true,
\"enableTrackingStaff\": false,
\"utmParameters\": \"utm_source=google&utm_medium=cpc\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/cartAbandonment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enableTracking": true,
"enableTrackingStaff": false,
"utmParameters": "utm_source=google&utm_medium=cpc"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Cart Settings Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Cart Abandonment Details
Fetches the cart abandonment details, including the cart total, status, abandoned at date, completed at date and products in the cart.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/cartAbandonmentDetails" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"search_param\": {
\"abandonedAt\": [
\"provident\"
],
\"status\": [
\"veritatis\"
],
\"nameOrEmail\": \"[email protected]\"
}
}"
const url = new URL(
"https://demo.aomlms.com/api/cartAbandonmentDetails"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"search_param": {
"abandonedAt": [
"provident"
],
"status": [
"veritatis"
],
"nameOrEmail": "[email protected]"
}
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"recoverableOrders": 0,
"recoveredOrders": 0,
"recoverableRevenue": "0.00",
"recoveredRevenue": "0.00",
"currency": "USD",
"enableTracking": true,
"records": [
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"cartTotal": "100.00",
"cartTotalNumber": 100,
"status": "Abandoned",
"abandonedAt": "2022-01-01 12:00:00",
"completedAt": null,
"orderId": null,
"products": [
"Product 1",
"Product 2"
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the base currency of the shop.
Fetches the base currency set in the Ecommerce settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/get-shop-base-currency" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/get-shop-base-currency"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"currency": "USD"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns a list of all tax classes and their associated tax rates.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/taxClasses/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxClasses/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Standard",
"description": "Default tax class for general products",
"showDetails": true,
"taxRates": [
{
"taxClassId": 1,
"rate_id": 101,
"name": "US Standard Rate",
"country": "US",
"state": [
"CA",
"NY"
],
"zipCode": [
"90001",
"10001"
],
"rate": 7.25
},
{
"taxClassId": 1,
"rate_id": 102,
"name": "US Reduced Rate",
"country": "US",
"state": [
"TX"
],
"zipCode": [
"73301"
],
"rate": 6.5
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a sales tax configuration.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/salesTax" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"pricesIncludeTax\": true,
\"taxCalculationBasedOn\": \"\\\"shipping\\\"\",
\"shippingTaxClass\": 1,
\"taxDisplaySuffix\": \"\\\"Incl. Tax\\\"\",
\"displayTaxTotals\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/salesTax"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"pricesIncludeTax": true,
"taxCalculationBasedOn": "\"shipping\"",
"shippingTaxClass": 1,
"taxDisplaySuffix": "\"Incl. Tax\"",
"displayTaxTotals": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Sales tax created successfully",
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the sales tax settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/getSalesTax" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/getSalesTax"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"pricesIncludeTax": true,
"taxCalculationBasedOn": "shipping",
"shippingTaxClass": 1,
"taxDisplaySuffix": "Incl. Tax",
"displayTaxTotals": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a tax class.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/taxClass/update/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"\\\"Sales Tax\\\"\",
\"description\": \"\\\"This is a sales tax\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxClass/update/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "\"Sales Tax\"",
"description": "\"This is a sales tax\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Tax Class updated successfully",
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes a tax class and its associated tax rates.
If a tax class is associated with a product, it will not be deleted.
If a tax class is associated with an order, it will not be deleted.
If a tax class is associated with an order item, it will not be deleted.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/taxClasses/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxClasses/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"deletedTaxClasses": [
1,
3
],
"notDeletedTaxClasses": [
{
"order_id": 5001,
"tax_rate_id": 102,
"tax_rate_name": "US Reduced Rate"
},
{
"order_id": 5002,
"tax_rate_id": 201,
"tax_rate_name": "EU Reduced Rate"
}
],
"notDeletedTaxClassesProduct": [
{
"product_id": 3001,
"product_name": "Wireless Mouse",
"tax_class_id": 2
},
{
"product_id": 3002,
"product_name": "E-book Subscription",
"tax_class_id": 2
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a tax rate.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/taxRate/update/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"tax_class_id\": 1,
\"name\": \"\\\"Sales Tax\\\"\",
\"country\": \"\\\"United States\\\"\",
\"state\": \"\\\"California\\\"\",
\"zipCode\": [
\"10001\",
\"10002\",
\"10003\"
],
\"rate\": 0.2,
\"appliedRateOn\": \"\\\"all_states\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxRate/update/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"tax_class_id": 1,
"name": "\"Sales Tax\"",
"country": "\"United States\"",
"state": "\"California\"",
"zipCode": [
"10001",
"10002",
"10003"
],
"rate": 0.2,
"appliedRateOn": "\"all_states\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Tax rates updated successfully!",
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the sales tax settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/enablesalesTax" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/enablesalesTax"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"enableSalesTaxes": true,
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates the sales tax setting.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/enablesalesTax" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enableSalesTaxes\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/enablesalesTax"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enableSalesTaxes": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated",
"type": "success",
"title": "Success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new tax class and associated tax rates.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/taxClasses/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"\\\"Sales Tax\\\"\",
\"description\": \"\\\"Sales tax\\\"\",
\"taxRates\": [
{
\"name\": \"Sales Tax\",
\"country\": \"United States\",
\"state\": \"California\",
\"zipCode\": [
\"10001\",
\"10002\",
\"10003\"
],
\"rate\": 0.2,
\"appliedRateON\": \"specific_states\"
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxClasses/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "\"Sales Tax\"",
"description": "\"Sales tax\"",
"taxRates": [
{
"name": "Sales Tax",
"country": "United States",
"state": "California",
"zipCode": [
"10001",
"10002",
"10003"
],
"rate": 0.2,
"appliedRateON": "specific_states"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"success": true,
"message": "Tax Class and Rates created successfully.",
"tax_class_id": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a tax rate.
If a tax rate is associated with any order, it will not be deleted and the API will return a list of orders which use the tax rate.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/taxRate/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxRate/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "failed",
"message": "Tax rate could not be deleted as it is associated with existing orders.",
"notDeletedTaxRates": [
{
"order_id": 4501,
"tax_rate_id": 1,
"tax_rate_name": "US Standard Rate"
},
{
"order_id": 4502,
"tax_rate_id": 1,
"tax_rate_name": "US Standard Rate"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Loads a tax class by its ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/getTaxClass/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/getTaxClass/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"name": "Standard",
"description": "Default tax class for general products",
"taxRates": [
{
"id": 101,
"name": "US Standard Rate",
"country": "US",
"state": [
"CA",
"NY"
],
"zipCode": [
"90001",
"10001"
],
"rate": 7.25,
"appliedRateON": "2025-01-01T00:00:00Z"
},
{
"id": 102,
"name": "US Reduced Rate",
"country": "US",
"state": [
"TX"
],
"zipCode": [
"73301"
],
"rate": 6.5,
"appliedRateON": "2025-03-15T00:00:00Z"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a tax rate.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/taxRate/add" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"tax_class_id\": 1,
\"name\": \"\\\"Sales Tax\\\"\",
\"country\": \"\\\"United States\\\"\",
\"state\": [
\"California\"
],
\"zipCode\": [
\"10001\",
\"10002\",
\"10003\"
],
\"rate\": 0.2,
\"appliedRateOn\": \"\\\"all_states\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/taxRate/add"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"tax_class_id": 1,
"name": "\"Sales Tax\"",
"country": "\"United States\"",
"state": [
"California"
],
"zipCode": [
"10001",
"10002",
"10003"
],
"rate": 0.2,
"appliedRateOn": "\"all_states\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Tax rate added successfully!",
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Toggle Shipping Settings
Updates the shipping settings to enable or disable shipping based on the provided request parameter.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/toggleShippingSettings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enableShipping\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/toggleShippingSettings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enableShipping": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated",
"type": "success",
"title": "Success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Shipping Setting
Updates the settings for shipping. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"shippingDestination\": \"billing_address\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"shippingDestination": "billing_address"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Sales Tax Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the shipping settings.
Helps in fetching items of the shipping settings, like shipping destination and whether shipping is enabled or disabled.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/shipping" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"shippingDestination": "123 Main Street, Springfield, IL 62704, USA",
"enableShipping": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all shipping zones.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/shipping-zones" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zones"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Shipping Zone 1",
"country": "India",
"state": [
"Delhi",
"Punjab"
],
"zip_code": [
"110000",
"110001"
],
"shippingMethods": "Flat Rate, Free Shipping",
"shippingMethod": {
"Flat Rate": {
"cost": 0,
"minAmountRequired": 0,
"taxStatus": "Taxable"
},
"Free Shipping": {
"cost": 0,
"minAmountRequired": 0,
"taxStatus": "Taxable"
}
}
}
],
"currency": "INR"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Shipping Zone Methods
Fetches details of a specific shipping zone, including its name, country, state, zip code, applied zone criteria, and associated shipping methods.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/shipping-zones-methods/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zones-methods/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "California",
"country": "US",
"state": [
"CA"
],
"zip_code": [
"94000",
"95000"
],
"appliedZoneOn": "specific_states",
"shippingMethods": [
{
"id": 1,
"name": "Flat Rate Shipping",
"isEnabled": true,
"shippingMethod": "flat_rate",
"taxStatus": "taxable",
"cost": "10.00",
"minAmountRequired": true,
"minimumOrderAmount": 50
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new shipping zone.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"USA\",
\"country\": \"US\",
\"appliedZoneOn\": \"specific_states\",
\"zip_code\": \"5600556, 5658666, 8474841\",
\"state\": [
\"AL\",
\"AK\",
\"AZ\",
\"AR\",
\"CA\"
],
\"shippingMethod\": [
{
\"name\": \"Flat Rate\",
\"isEnabled\": true,
\"shippingMethod\": \"flat_rate\",
\"taxStatus\": \"taxable\",
\"cost\": 10.99,
\"minAmountRequired\": 100,
\"minimumOrderAmount\": 150
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "USA",
"country": "US",
"appliedZoneOn": "specific_states",
"zip_code": "5600556, 5658666, 8474841",
"state": [
"AL",
"AK",
"AZ",
"AR",
"CA"
],
"shippingMethod": [
{
"name": "Flat Rate",
"isEnabled": true,
"shippingMethod": "flat_rate",
"taxStatus": "taxable",
"cost": 10.99,
"minAmountRequired": 100,
"minimumOrderAmount": 150
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"success": true,
"message": "Shipping Zone Created Successfully",
"shippingZoneId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates a shipping zone.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zone/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"name\": \"US East Zone\",
\"country\": \"US\",
\"appliedZoneOn\": \"zip_code\",
\"zip_code\": \"12345,67890\",
\"state\": [
\"NY\",
\"NJ\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zone/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"name": "US East Zone",
"country": "US",
"appliedZoneOn": "zip_code",
"zip_code": "12345,67890",
"state": [
"NY",
"NJ"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Shipping Zone Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a shipping zone.
If the shipping zone is associated with one or more shipping methods, the method is not deleted and the response contains a list of orders that prevents the deletion.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zone/delete/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-zone/delete/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": true,
"message": "Shipping Zone deleted successfully",
"notDeletedShippingZone": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a shipping method.
If the shipping method is associated with one or more orders, the method is not deleted and the response contains a list of orders that prevents the deletion.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/delete/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/delete/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"success": true,
"message": "Shipping method deleted successfully",
"notDeletedShippingMethod": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new shipping method.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Flat Rate\",
\"shippingZoneId\": 1,
\"taxStatus\": \"taxable\",
\"cost\": 10.99,
\"isEnabled\": true,
\"shippingMethod\": \"Flat Rate\",
\"minAmountRequired\": 100,
\"minimumOrderAmount\": 100
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Flat Rate",
"shippingZoneId": 1,
"taxStatus": "taxable",
"cost": 10.99,
"isEnabled": true,
"shippingMethod": "Flat Rate",
"minAmountRequired": 100,
"minimumOrderAmount": 100
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Shipping method added successfully!"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates a shipping method.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/update/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Flat Rate\",
\"shippingZoneId\": 1,
\"taxStatus\": \"taxable\",
\"cost\": 10.99,
\"isEnabled\": true,
\"shippingMethod\": \"Flat Rate\",
\"minAmountRequired\": 100,
\"minimumOrderAmount\": 100
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/update/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Flat Rate",
"shippingZoneId": 1,
"taxStatus": "taxable",
"cost": 10.99,
"isEnabled": true,
"shippingMethod": "Flat Rate",
"minAmountRequired": 100,
"minimumOrderAmount": 100
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Shipping method updated successfully!"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the status of a shipping method.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/update-status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"isEnabled\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/shipping-method/update-status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"isEnabled": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Shipping method status updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce Orders
An ECommerce Order is made by the learners when they purchase a product hence course. It helps in managing orders and performing CRUD operation on orders.
Tabular List
Retrieves all the orders in a tabular list format with pagination mode. You can apply filter using search_param via status(order status), user(user email or id), dateRange(date range).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/orders/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22status%22%3A%5B%22pending%22%5D%2C%22user%22%3A%5B%221%22%5D%2C%22dateRange%22%3A%5B%222020-01-01%22%2C%222020-01-31%22%5D%7D&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/orders/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"status":["pending"],"user":["1"],"dateRange":["2020-01-01","2020-01-31"]}",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"status": "pending",
"display_status": "Pending",
"total": "100.00",
"isTestOrder": false,
"customer": "John Doe",
"email": "[email protected]",
"created_at": "Jan 01, 2020 12:00 AM",
"isPortalOrder": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download the PDF invoice for a specific order.
This endpoint allows authorized users to download a PDF invoice for a given order.
- General users can download only their own orders.
- Admins, owners, and staff can download any order.
The invoice includes billing/shipping information, tax breakdowns, product details, and more.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/download?orderId=1023" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/download"
);
const params = {
"orderId": "1023",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Invoice downloaded successfully.",
"file": "/downloads/order.pdf"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export Orders
Exports the order details based on the provided filters to an Excel file. The filters can include various criteria such as date range, user, product, etc. The generated file is downloaded as 'orders-test.xlsx'.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/export?filters=%7B%22dateRange%22%3A%5B%222020-07-31%22%2C%222020-08-30%22%5D%2C%22users%22%3A%5B3%5D%2C%22products%22%3A%5B1%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/export"
);
const params = {
"filters": "{"dateRange":["2020-07-31","2020-08-30"],"users":[3],"products":[1]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
A downloadable Excel file containing the filtered order details.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Yearly Sales
Retrieves the details of yearly based order sales made from students and returns in tabular form. You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/reports/yearsales?year=2020" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/reports/yearsales"
);
const params = {
"year": "2020",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"totalIncome": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"totalOrders": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"sumIncome": 0,
"sumTotalOrder": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the details of order sales for this month made from students and returns in tabular form.
You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/reports/monthlysales?selectedMonth=1-2020" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/reports/monthlysales"
);
const params = {
"selectedMonth": "1-2020",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Jan-01",
"Jan-02",
"Jan-03",
"Jan-04",
"Jan-05",
"Jan-06",
"Jan-07",
"Jan-08",
"Jan-09",
"Jan-10",
"Jan-11",
"Jan-12"
],
"totalIncome": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"totalOrders": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"sumIncome": 0,
"sumTotalOrder": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Product Breakdown Sales
Retrieves the details of product break-down based order sales for a given date range made from students and returns in tabular form. You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/reports/productbreakdown?selectedDateRange=2020-01-01-2020-01-31" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/reports/productbreakdown"
);
const params = {
"selectedDateRange": "2020-01-01-2020-01-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Product-1",
"Product-2"
],
"totalIncome": [
0,
0
],
"totalOrders": [
0,
0
],
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"sumIncome": 0,
"sumTotalOrder": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Order Status Lookup
Retrieves all the possible statuses for an order, such as pending payment, completed, cancelled, refunded, failed, awaiting shipping, and shipped. This is useful for showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "PENDING_PAYMENT",
"display_value": "Payment Pending"
},
{
"db_value": "COMPLETED",
"display_value": "Completed"
},
{
"db_value": "CANCELLED",
"display_value": "Cancelled"
},
{
"db_value": "REFUNDED",
"display_value": "Refunded"
},
{
"db_value": "FAILED",
"display_value": "Failed"
},
{
"db_value": "AWAITING_SHIPPING",
"display_value": "Awaiting Shipping"
},
{
"db_value": "SHIPPED",
"display_value": "Shipped"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Order
Deletes one or more orders based on the ids provided in the request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": \"[1,2,3]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": "[1,2,3]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 order(s) deleted."
}
Example response (500):
{
"message": "Something went wrong"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Order
Creates a new order. (See parameters) Orders can be used as purchasing products by students.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"orderDate\": \"2020-08-25 0:00:00\",
\"status\": \"COMPLETED\",
\"customerId\": 3,
\"billingAddressId\": 3500,
\"shippingAddressId\": 3500,
\"orderItems\": [
\"qui\"
],
\"orderNotes\": [
\"eum\"
],
\"taxAmount\": \"null\",
\"otherFee\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"orderDate": "2020-08-25 0:00:00",
"status": "COMPLETED",
"customerId": 3,
"billingAddressId": 3500,
"shippingAddressId": 3500,
"orderItems": [
"qui"
],
"orderNotes": [
"eum"
],
"taxAmount": "null",
"otherFee": "null"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Order created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the details of a specified order.
Helps in fetching order using its ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"orderDate": "2022-11-16 14:19:45",
"status": "PENDING_PAYMENT",
"display_status": "Pending Payment",
"customerId": 1,
"billingAddressId": 1,
"shippingAddressId": 1,
"taxAmount": 0,
"otherFee": 0,
"isTestOrder": false,
"total": "10.00",
"sub_total": "10.00",
"currency": "USD",
"shopAddress": "123 Main St, Anytown, CA 12345, USA",
"billingAddress": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"company_name": "Company Name",
"street_address": "123 Main St",
"apartment_suite_number": "Apt 101",
"city": "Anytown",
"state": "CA",
"zip": "12345",
"country": "US"
},
"shippingAddress": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"company_name": "Company Name",
"street_address": "123 Main St",
"apartment_suite_number": "Apt 101",
"city": "Anytown",
"state": "CA",
"zip": "12345",
"country": "US"
},
"coupon_used": null,
"paymentGatewayId": 1,
"paymentGatewayEnabled": true,
"companyName": null,
"isShippingRequired": false,
"thankYouUrl": "/thank-you",
"shippingMethodId": 1,
"shippingTax": 0,
"shippingTaxRateId": null,
"orderNotes": [],
"orderItems": [
{
"product_id": 1,
"product_title": "Product Title",
"price": "10.00",
"quantity": 1,
"total": "10.00",
"initialProductPrice": "10.00",
"taxRateId": null,
"tax": 0,
"isShippingRequired": false,
"saleTax": 0
}
],
"taxSettings": {
"enable_tax": true,
"tax_base": "base_price",
"tax_rate": 0
},
"taxRates": [
{
"taxRateId": 1,
"taxRateName": "Tax Rate Name",
"totalTax": "0.00"
}
],
"totalTax": "0.00"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an order's details.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/order/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"dicta\",
\"orderDate\": \"maxime\",
\"status\": \"rerum\",
\"customerId\": \"nemo\",
\"billingAddressId\": 1,
\"shippingAddressId\": 2,
\"orderItems\": [
\"asperiores\"
],
\"taxAmount\": \"et\",
\"otherFee\": \"mollitia\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "dicta",
"orderDate": "maxime",
"status": "rerum",
"customerId": "nemo",
"billingAddressId": 1,
"shippingAddressId": 2,
"orderItems": [
"asperiores"
],
"taxAmount": "et",
"otherFee": "mollitia"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Order updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Order Status
To update the status of an existing order
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/order/3/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"status\": \"sequi\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/3/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"status": "sequi"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Order updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Order Note
To create a order note, you need to use this request. Returns all order notes left after this note gets created. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order-note/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"data\": \"New notes\",
\"type\": \"PRIVATE\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order-note/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"data": "New notes",
"type": "PRIVATE"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"data": "note-1",
"type": "PRIVATE",
"created_on": "Aug 11, 2020 05:36 PM"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Order Note
Deletes an order note specified by its ID. After deletion, returns all remaining order notes for the associated order.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/order-note/delete/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order-note/delete/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"data": "note-1",
"type": "PRIVATE",
"created_on": "Aug 11, 2020 05:36 PM"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refund Options Lookup
Provides the available refund options for an order, such as full refund or partial refund. This is useful for displaying choices in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/refund/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "FULL_REFUND",
"display_value": "Refund 100%"
},
{
"db_value": "PARTIAL_REFUND",
"display_value": "Refund Partially"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Order Note Type Lookup
Provides the available note types for an order, such as private or public. This is useful for displaying choices in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/note/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/note/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "PRIVATE",
"display_value": "Don’t show to Customer"
},
{
"db_value": "PUBLIC",
"display_value": "Show to customer"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refund Types Lookup
Provides the available refund types for an order, such as stripe, braintree, authorize.net and manual. This is useful for displaying choices in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/refund/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "STRIPE_PAYMENT_GATEWAY",
"display_value": "Stripe Payment Gateway"
},
{
"db_value": "BRAINTREE_PAYMENT_GATEWAY",
"display_value": "Braintree Payment Gateway"
},
{
"db_value": "AUTHORIZENET_PAYMENT_GATEWAY",
"display_value": "AuthorizeNet Payment Gateway"
},
{
"db_value": "MANUALLY",
"display_value": "Manually"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refund an order
This function will allow you to process a refund of an order. The refund amount, refund reason, and refund type must be provided. The refund type can be either FULL_REFUND or PARTIAL_REFUND. The refund amount is required if the refund type is PARTIAL_REFUND, and the refund amount must be greater than 0.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order/refund" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 123,
\"refundedVia\": \"MANUALLY\",
\"refundType\": \"FULL_REFUND\",
\"refundAmount\": \"50.00\",
\"refundReason\": \"\\\"Product not as described\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 123,
"refundedVia": "MANUALLY",
"refundType": "FULL_REFUND",
"refundAmount": "50.00",
"refundReason": "\"Product not as described\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"success": true,
"message": "Order Refunded Successfully."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all the refund orders for the given order id
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/refund/harum" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund/harum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"refundedVia": "MANUALLY",
"displayRefundedVia": "Manually",
"refundAmount": 100,
"refundReason": "Product not delivered",
"refundStatus": "COMPLETED",
"refundType": "FULL_REFUND",
"refundDatePaid": "2020-01-01"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce Payments
Endpoints for managing ecommerce Payment Gateways. Payment gateways will be used when your users are purchasing products.
Get All Payment Gateways
Returns all Payment Gateways.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/payment-gateway" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/payment-gateway"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 1,
"name": "Stripe",
"logo_url": "https://www.paypalobjects.com/webstatic/en_US/i/logo/pp-logo-100x50.png",
"is_enabled": true,
"support_recurring_payments": true
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Status of Payment Gateway
Updates the status of the specified payment gateway.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/paymentmethod/updateStatus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"status\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/paymentmethod/updateStatus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"status": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Stripe Settings
Updates the settings for Stripe payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/stripe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Credit or Debit Card\",
\"publishableKey\": \"expedita\",
\"secretKey\": \"maiores\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/stripe"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Credit or Debit Card",
"publishableKey": "expedita",
"secretKey": "maiores"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Stripe Settings
Retrieves all the settings for Stripe payment gateway. Helps in maintaining the data and enable status of the Stripe settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/stripe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/stripe"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Credit or Debit Card",
"publishableKey": "",
"secretKey": "",
"production_mode": "no"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update AuthorizeNet Settings
Updates the settings for AuthorizeNet payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Retrieve AuthorizeNet Settings
Retrieves all the settings for AuthorizeNet payment gateway. Helps in mainting the data and enable status of the AuthorizeNet settings.
Update Braintree Settings
Updates the settings for Braintree payment gateway based on the provided request parameters. The settings include enabling the gateway, setting the payment title, and updating merchant credentials for either live or test mode depending on the production mode status.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/braintree" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Credit or Debit Card\",
\"merchantId\": \"your_merchant_id\",
\"publicKey\": \"your_public_key\",
\"privateKey\": \"your_private_key\",
\"authorizationKey\": \"your_authorization_key\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/braintree"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Credit or Debit Card",
"merchantId": "your_merchant_id",
"publicKey": "your_public_key",
"privateKey": "your_private_key",
"authorizationKey": "your_authorization_key"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the settings for Braintree payment gateway. Helps in mainting the data and enable status of the Braintree settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/braintree" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/braintree"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Credit or Debit Card",
"merchantId": "",
"publicKey": "",
"privateKey": "",
"authorizationKey": "",
"production_mode": "yes"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Paypal Settings
Retrieves all the settings for Paypal payment gateway. Helps in mainting the data and enable status of the Paypal settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/paypal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/paypal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Paypal",
"clientId": "",
"notificationUrl": "https://staging.aomlms.com/api/webhook/paypal",
"production_mode": "yes"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Paypal Settings
Updates the settings for Paypal payment gateway based on the provided request parameters. The settings include enabling the gateway, setting the payment title, and updating client credentials for either live or test mode depending on the production mode status.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/paypal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Credit or Debit Card\",
\"clientId\": \"your_client_id\",
\"secretKey\": \"your_secret_key\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/paypal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Credit or Debit Card",
"clientId": "your_client_id",
"secretKey": "your_secret_key"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Invoice Settings
Updates the settings for Invoice payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Invoice\",
\"paymentInstructions\": \"Instructions for payment\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Invoice",
"paymentInstructions": "Instructions for payment"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Invoice Settings
Retrieves all the settings for the Invoice payment gateway. This includes the enable status, payment title, and payment instructions. Useful for maintaining and displaying the current configuration of the Invoice gateway.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Invoice",
"paymentInstructions": "Instructions for payment"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Cashnet Settings
Updates the settings for Cashnet payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/cashnet" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Credit or Debit Card\",
\"merchantId\": \"explicabo\",
\"apiKey\": \"quo\",
\"apiEnvUrl\": \"https:\\/\\/api.sandbox.cashnet.com\\/api\\/v1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/cashnet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Credit or Debit Card",
"merchantId": "explicabo",
"apiKey": "quo",
"apiEnvUrl": "https:\/\/api.sandbox.cashnet.com\/api\/v1"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Cashnet Settings
Retrieves all the settings for Cashnet payment gateway. This includes the enable status, payment title, merchant id, api key, api environment url and production mode status. Useful for maintaining and displaying the current configuration of the Cashnet gateway.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/cashnet" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/cashnet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Credit or Debit Card",
"merchantId": "your_merchant_code",
"apiKey": "your_api_key",
"apiEnvUrl": "https://api.sandbox.cashnet.com/api/v1",
"production_mode": "yes"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce Products
A Product will be reached to your learners. Course has to be attached to products so that learners can purchase your courses. Helps in performing CRUD operations for and to products.
Retrieve Product Catalog
Retrieves the details for the product catalogs in paginated form to show this to students as course catalog so that they can purchase the product hence course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/catalog?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22title%22%3A%22%22%2C+%22ids%22%3A%22%22%2C+%22selectedPrice%22%3A%5B%22Paid%22%2C+%22Free%22%5D%2C+%22selectedProductCategories%22%3A%5B%5D%2C+%22selectedCourseType%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/catalog"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"title":"", "ids":"", "selectedPrice":["Paid", "Free"], "selectedProductCategories":[], "selectedCourseType":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"title": "Product-1",
"slug": "product-1",
"featuredImage": "https://example.com/product-1.jpg",
"displayPrice": 3000,
"status": "IN-STOCK",
"label": "SIMPLE",
"display_label": "Simple",
"canBePurchased": true,
"seo_description": "This is the description of product 1.",
"price": 3000,
"type": "SIMPLE",
"price_frequency": "MONTHLY",
"webinarsCount": 1,
"modulesCount": 2,
"averageRating": 4.5
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the product details.
Fetches the product details, including the title, slug, description, featured image url, regular price, sale price, status, expiry date, dynamic pricing, SEO title, SEO description, display price, can be purchased, label, display label, subscription price, price frequency, free trial value, free trial frequency, subscription expire after, membership id, content access type, catalog rank, global product setting color, sale tax, tax class id, average rating, min purchase quantity, webinars count, modules count, dynamic prices, categories, related products, courses, course categories, instructor led course, learning paths, learning path categories, category courses and category learning paths.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/{id}?id=provident" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/{id}"
);
const params = {
"id": "provident",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"title": "Product-1",
"slug": "product-1",
"description": "This is the description of product 1.",
"featuredImageUrl": "https://example.com/product-1.jpg",
"regular_price": 3500,
"type": "SIMPLE",
"sale_price": 3000,
"saleStartDate": "2021-01-01 12:00:00",
"saleEndDate": "2021-01-15 12:00:00",
"status": "IN-STOCK",
"expiry_date": "2021-01-31 12:00:00",
"dynamic_pricing": true,
"seo_title": "Product-1",
"seo_description": "This is the description of product 1.",
"displayPrice": 3000,
"canBePurchased": true,
"label": "SIMPLE",
"display_label": "Simple",
"subscription_price": 3000,
"price_frequency": "MONTHLY",
"free_trial_value": 1,
"free_trial_frequency": "MONTHLY",
"subscription_expire_after": "2021-01-31 12:00:00",
"membership_id": 1,
"contentAccessType": "PHYSICAL",
"catalog_rank": 1,
"globalProductSettingColor": {
"product_price_color": {
"backgroundColor": "#fff"
}
},
"saleTax": 0,
"taxClassId": 1,
"averageRating": 4.5,
"minPurchaseQuantity": 1,
"webinarsCount": 1,
"modulesCount": 2,
"dynamicPrices": [
{
"minQty": 1,
"maxQty": 10,
"perPrice": 3000
}
],
"categories": [
1,
2
],
"relatedProducts": [
1,
2
],
"courses": [
{
"value": 1,
"label": "Course-1"
},
{
"value": 2,
"label": "Course-2"
}
],
"courseCategories": [
1,
2
],
"instructorLedCourse": [
{
"value": 1,
"label": "Instructor Led Course-1"
}
],
"learningPaths": [
{
"value": 1,
"label": "Learning Path-1",
"learningPathCourses": [
{
"id": 1,
"name": "Course-1"
},
{
"id": 2,
"name": "Course-2"
}
]
}
],
"categoryCourses": [
{
"value": 3,
"label": "Course-3"
}
],
"categoryLearningPaths": [
{
"value": 2,
"label": "Learning Path-2",
"learningPathCourses": [
{
"id": 3,
"name": "Course-3"
},
{
"id": 4,
"name": "Course-4"
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get webinars for a product
Returns all webinars associated with the courses related to the product with the given ID. Optionally accepts a search parameter which can be used to filter the results by date range and location.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/webinars?product_id=reprehenderit&search_param=cum" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/webinars"
);
const params = {
"product_id": "reprehenderit",
"search_param": "cum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"Course Name 1": [
{
"id": 1,
"startDate": "2020-01-01",
"endDate": "2020-01-01",
"startTime": "09:00:00",
"endTime": "17:00:00",
"location_id": 1,
"location": "Location 1"
},
{
"id": 2,
"startDate": "2020-01-15",
"endDate": "2020-01-15",
"startTime": "09:00:00",
"endTime": "17:00:00",
"location_id": 2,
"location": "Location 2"
}
],
"Course Name 2": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Search Products
Retrieves the products with the search_term in the product name or in the name of the courses or learning paths associated with the product. Returns the products in a select list format. Helps while showing products names in form elements like dropdown. You can apply filters using search_term parameter. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/get-search-product?search_term=totam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/get-search-product"
);
const params = {
"search_term": "totam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Product-1",
"value": "/product/product-1"
},
{
"id": 2,
"name": "Product-2",
"value": "/product/product-2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve All Products
Retrieves all the products that exists in the system. Helps in fetching all the products.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products?excludeId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products"
);
const params = {
"excludeId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[{"id":1,"title":"Product 1","slug":"product-1","description":"Course 1 product","featured_image_url":null,"regular_price":3500,"sale_price":3001,"sale_price_from":null,"sale_price_to":null,"status":"IN-STOCK","type":"SIMPLE","price_frequency":null,"site-wide-membership":null,"expired_at":"2020-10-29 00:00:00","price_includes_tax":false,"tax_rate_based_on":"CUSTOMER-BILLING-ADDR","seo_title":null,"seo_description":null,"created_by":1,"updated_by":null,"deleted_by":null,"created_at":"2020-08-11 14:12:27","updated_at":"2020-08-11 14:12:27","deleted_at":null},...]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Type Lookup
Retrieves the types of the product that the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "SIMPLE",
"display_value": "Simple"
},
{
"db_value": "SUBSCRIPTION",
"display_value": "Subscription"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Slug
Updates the slug of the product identified by 'id' with the new slug provided. The new slug is checked for uniqueness and if it already exists, a new slug is generated by appending a counter to the slug. The updated slug is then saved to the product. Returns the updated slug.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/products/update-slug/3?slug=%22about-us%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/update-slug/3"
);
const params = {
"slug": ""about-us"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
"about-us-1"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Status Lookup
Retrieves the statuses for a product the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "COMING-SOON",
"display_value": "Coming Soon"
},
{
"db_value": "IN-STOCK",
"display_value": "In Stock"
},
{
"db_value": "OUT-OF-STOCK",
"display_value": "Out of Stock"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the products in a tabular list format in paginated mode. You can apply filter using search_param via title, productStatus(in-stock, out-of-stock, etc) and productCategoryIds.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22title%22%3A+%22%22%2C+%22productStatus%22%3A+%5B%22IN-STOCK%22%5D%2C+%22productCategoryIds%22%3A+%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"title": "", "productStatus": ["IN-STOCK"], "productCategoryIds": []}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"title": "Product 1",
"regular_price": 3500,
"type": "SIMPLE",
"status": "IN-STOCK",
"created_at": "2021-01-01 12:00:00",
"catalog_rank": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Lookup
Retrieves all the products in a select list format. Helps while showing products names in form elements like dropdown. You can apply filters using search_term parameter. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/lookup?search_term=molestiae" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/lookup"
);
const params = {
"search_term": "molestiae",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Product-1",
"isShippingRequired": true
},
{
"id": 2,
"title": "Product-2",
"isShippingRequired": false
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new product.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Product-1\",
\"description\": \"Course 1 product\",
\"featuredImageUrl\": \"https:\\/\\/www.aom-images.com\\/product.jpeg\",
\"regular_price\": \"3500\",
\"type\": \"SIMPLE\",
\"sale_price\": \"3001\",
\"saleStartDate\": \"2020-12-01 0:00:00\",
\"saleEndDate\": \"2020-12-31 0:00:00\",
\"status\": \"IN-STOCK\",
\"expiry\": \"2020-10-29 0:00:00\",
\"categories\": [],
\"courses\": [
\"aspernatur\"
],
\"courseCategories\": [],
\"learningPaths\": [
\"omnis\"
],
\"learningPathCategories\": [],
\"membership_id\": 1,
\"seo_title\": \"awesome-product\",
\"seo_description\": \"includes many good courses\",
\"subscription_price\": \"3500\",
\"price_frequency\": \"WEEKLY\",
\"free_trial_value\": \"5\",
\"free_trial_frequency\": \"aut\",
\"subscription_expire_after\": \"5\",
\"dynamic_pricing\": true,
\"taxClassId\": 1,
\"minPurchaseQuantity\": \"2\",
\"catalog_rank\": \"1\",
\"saleTax\": \"taxable\",
\"shippingClass\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/product/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Product-1",
"description": "Course 1 product",
"featuredImageUrl": "https:\/\/www.aom-images.com\/product.jpeg",
"regular_price": "3500",
"type": "SIMPLE",
"sale_price": "3001",
"saleStartDate": "2020-12-01 0:00:00",
"saleEndDate": "2020-12-31 0:00:00",
"status": "IN-STOCK",
"expiry": "2020-10-29 0:00:00",
"categories": [],
"courses": [
"aspernatur"
],
"courseCategories": [],
"learningPaths": [
"omnis"
],
"learningPathCategories": [],
"membership_id": 1,
"seo_title": "awesome-product",
"seo_description": "includes many good courses",
"subscription_price": "3500",
"price_frequency": "WEEKLY",
"free_trial_value": "5",
"free_trial_frequency": "aut",
"subscription_expire_after": "5",
"dynamic_pricing": true,
"taxClassId": 1,
"minPurchaseQuantity": "2",
"catalog_rank": "1",
"saleTax": "taxable",
"shippingClass": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"id": 1,
"message": "Product created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing product.
requires authentication
This endpoint allows updating a product's details, including its pricing, categories, related products, courses, and other properties. It supports dynamic pricing and validation for product data such as description, sale prices, SEO, and tax settings.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/product/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"title\": \"\\\"New Course Title\\\"\",
\"description\": \"\\\"A detailed description of the course.\\\"\",
\"featuredImageUrl\": \"\\\"https:\\/\\/example.com\\/image.jpg\\\"\",
\"regular_price\": \"100.00\",
\"sale_price\": \"80.00\",
\"saleStartDate\": \"\\\"2025-04-01 00:00:00\\\"\",
\"saleEndDate\": \"\\\"2025-04-10 00:00:00\\\"\",
\"status\": \"\\\"IN-STOCK\\\"\",
\"type\": \"\\\"SIMPLE\\\"\",
\"categories\": [
1,
2,
3
],
\"courses\": [
{
\"value\": 1
},
{
\"value\": 2
}
],
\"relatedProducts\": [
101,
102
],
\"dynamic_pricing\": true,
\"dynamicPrices\": [
{
\"minQty\": 1,
\"perPrice\": 90
}
],
\"seo_title\": \"\\\"Product SEO Title\\\"\",
\"seo_description\": \"\\\"This is a detailed product description for SEO.\\\"\",
\"membership_id\": 10,
\"subscription_price\": \"20.00\",
\"price_frequency\": \"\\\"MONTHLY\\\"\",
\"free_trial_value\": \"7\",
\"free_trial_frequency\": \"\\\"DAYS\\\"\",
\"minPurchaseQuantity\": \"1\",
\"saleTax\": \"\\\"10%\\\"\",
\"taxClassId\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/product/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"title": "\"New Course Title\"",
"description": "\"A detailed description of the course.\"",
"featuredImageUrl": "\"https:\/\/example.com\/image.jpg\"",
"regular_price": "100.00",
"sale_price": "80.00",
"saleStartDate": "\"2025-04-01 00:00:00\"",
"saleEndDate": "\"2025-04-10 00:00:00\"",
"status": "\"IN-STOCK\"",
"type": "\"SIMPLE\"",
"categories": [
1,
2,
3
],
"courses": [
{
"value": 1
},
{
"value": 2
}
],
"relatedProducts": [
101,
102
],
"dynamic_pricing": true,
"dynamicPrices": [
{
"minQty": 1,
"perPrice": 90
}
],
"seo_title": "\"Product SEO Title\"",
"seo_description": "\"This is a detailed product description for SEO.\"",
"membership_id": 10,
"subscription_price": "20.00",
"price_frequency": "\"MONTHLY\"",
"free_trial_value": "7",
"free_trial_frequency": "\"DAYS\"",
"minPurchaseQuantity": "1",
"saleTax": "\"10%\"",
"taxClassId": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Product updated successfully"
}
Example response (400):
{
"message": "Validation errors. Please check your input."
}
Example response (404):
{
"message": "Product not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete product
To delete a product, you need to use this request. Returns number of product deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/product/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 product(s) deleted 1 product(s) not deleted as it has active subscription. Please remove the subscription and try again.",
"deletedProductsCount": 2,
"unDeletedProductsCount": 1,
"unDeletedProducts": [
{
"id": 5,
"name": "Product-5"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the price of the product.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/price/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/price/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"price": 3001
}
Example response (404):
{
"error": "Product not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified product. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"product_ids\": [
3,
2
],
\"outofstock\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/product/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"product_ids": [
3,
2
],
"outofstock": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Products updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Free Trial Interval Lookup For Products
Retrieves how often the amount will be deducted in subscription of the product, the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/freeTrial/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/freeTrial/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "DAYS",
"display_value": "Days"
},
{
"db_value": "WEEKS",
"display_value": "Weeks"
},
{
"db_value": "MONTHS",
"display_value": "Months"
},
{
"db_value": "YEARS",
"display_value": "Years"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Price Frequency Lookup For Products
Retrieves how often the amount will be deducted in subscription of the product, the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/subscription-price-frequency/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/subscription-price-frequency/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "DAILY",
"display_value": "Per day"
},
{
"db_value": "WEEKLY",
"display_value": "Per week"
},
{
"db_value": "MONTHLY",
"display_value": "Per month"
},
{
"db_value": "YEARLY",
"display_value": "Per year"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone Product
Clone the product with the given ID and copies all the related mappings with the product
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"productId\": \"autem\"
}"
const url = new URL(
"https://demo.aomlms.com/api/product/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"productId": "autem"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Product Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Flash Cards Modules
A Flash Cards Module is a lesson module used as course content. Helps to perform CRUD operation to and for Flash Cards modules.
Flash Cards Modules Tabular List
Returns all the flash cards modules in a tabular list format in paginated mode. You can apply filter using search_param via moduleTypes(module type), associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/flashcards?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22moduleTypes%22%3A+%5B%22flashcards%22%5D%2CassociatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"moduleTypes": ["flashcards"],associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 14,
"recordsFiltered": 3,
"records": [
{
"id": 14,
"name": "Lesson-1",
"slug": "lesson-1",
"type": "flashcards",
"icon": "<i class=\"el-icon-collection\"></i>",
"author": "Aom Staff",
"created_at": "Aug 11, 2020 06:45 AM"
},
{
"id": 5,
"name": "The Fundamentals of LMS",
"slug": "the-fundamentals-of-lms",
"type": "flashcards",
"icon": "<i class=\"el-icon-collection\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 04:59 PM"
},
{
"id": 1,
"name": "test",
"slug": "test",
"type": "flashcards",
"icon": "<i class=\"el-icon-collection\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Flashcard Module Info
Retrieves details of flashcard module in depth. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/flashcards/{id}?id=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards/{id}"
);
const params = {
"id": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 6,
"name": "Introduction to Web Development",
"slug": "intro-to-web-development",
"content": "<p>This course covers the basics of HTML, CSS, and JavaScript for building modern websites.</p>",
"trackCompletion": true,
"estimatedCompletion": "30",
"estimationCompletedUnit": "hours",
"orientation": "Online",
"categories": [],
"courses": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create FlashCard Module
To create a flashcard module, you need to use this request. (See parameters) Created flashcard modules can be used in the course as course content/lesson.
Returns : id of the flashcard module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/flashcards" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"The Fundamentals of LMS\",
\"content\": \"<p>This is the short content here<\\/p>\",
\"orientation\": \"portrait\",
\"trackCompletion\": true,
\"categories\": [
1,
2,
3
],
\"estimatedCompletion\": 2,
\"estimationCompletedUnit\": \"minute\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "The Fundamentals of LMS",
"content": "<p>This is the short content here<\/p>",
"orientation": "portrait",
"trackCompletion": true,
"categories": [
1,
2,
3
],
"estimatedCompletion": 2,
"estimationCompletedUnit": "minute"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 9,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Flash Card Module
Updates the details of the specified flash card module. (See parameters) Flash card modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/flashcards/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Basic Concepts\",
\"content\": [
\"Flashcard content\"
],
\"orientation\": \"horizontal\",
\"trackCompletion\": true,
\"categories\": [
1,
2,
3
],
\"estimatedCompletion\": \"30\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Basic Concepts",
"content": [
"Flashcard content"
],
"orientation": "horizontal",
"trackCompletion": true,
"categories": [
1,
2,
3
],
"estimatedCompletion": "30",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Flashcard Module Info
Retrieves details of flashcard module in depth as well as different modules details that are being used as course content for the same course the current flashcard module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/flashcards/details?registrationId=1&moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/flashcards/details"
);
const params = {
"registrationId": "1",
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Web Development Basics",
"slug": "web-development-basics",
"content": "<p>This module introduces the core concepts of modern web development, including HTML, CSS, and responsive design.</p>",
"courseName": "Full Stack Web Development",
"courseSlug": "http://localhost:8000/course/full-stack-web-development",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "Introduction to HTML",
"slug": "introduction-to-html",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 week ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1
},
{
"module_id": 4,
"name": "CSS Assignment",
"slug": "css-assignment",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "css-assignment",
"status": "Completed",
"timeSpent": 6,
"statusRowId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the progress of a flashcard module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/flashcards/updateProgress?portalId=5&statusRowId=6&cardIndex=1&totalCards=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/flashcards/updateProgress"
);
const params = {
"portalId": "5",
"statusRowId": "6",
"cardIndex": "1",
"totalCards": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "Completed",
"message": "Module completed successfully",
"course_newly_completed": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Flashcard Module Info as Membership content
Retrieves details of flashcard module in depth for the same membership the current flashcard module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/flashcards/content-details?moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/flashcards/content-details"
);
const params = {
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "JavaScript Flashcards",
"slug": "javascript-flashcards",
"content": "<p>Practice key JavaScript concepts through interactive flashcards.</p>",
"url": "http://localhost:8000/storage/uploads/module/6/flashcards/flashcard1/slide1/slide1.html",
"orientation": "landscape",
"trackCompletion": true,
"timeSpent": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Front End Webhook API
Endpoints for Front end Marketing Pages. Send automated notifications to external system when some action happens.
Webhook Event Lookup
Retrieves all the events for the webhook actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/webhook/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/webhook/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "new_account_created",
"display_value": "New Account Created"
},
{
"db_value": "course_enrolled",
"display_value": "Enrolled in a course"
},
{
"db_value": "quiz_submission",
"display_value": "Submitted a Quiz"
},
{
"db_value": "assigment_submission",
"display_value": "Submitted an assignment"
},
{
"db_value": "assigment_evaluation",
"display_value": "Evaluated an assignment"
},
{
"db_value": "assigment_rejection",
"display_value": "Rejected an assignment"
},
{
"db_value": "discussion_submission",
"display_value": "Submitted a discussion"
},
{
"db_value": "new_order",
"display_value": "New Order Placed"
},
{
"db_value": "failed_order",
"display_value": "Order Failed"
},
{
"db_value": "refunded_order",
"display_value": "Order Refunded"
},
{
"db_value": "pending_payment",
"display_value": "Payment Pending"
},
{
"db_value": "new_announcement",
"display_value": "New Announcement"
},
{
"db_value": "course_completed",
"display_value": "Course Completed"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Webhook
Creates a webhook using parameters mentioned. (See parameters) Creates the webhook details using webhook ID.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webhook/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"url\": \"https:\\/\\/example.aom\",
\"description\": \"It will use to collect new user data.\",
\"eventList\": \"New Account Created\"
}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"url": "https:\/\/example.aom",
"description": "It will use to collect new user data.",
"eventList": "New Account Created"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "4",
"message": "Webhook saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webhook Actions Tabular List
Returns all the Webhook created in a tabular list format. You can apply filter using search_param.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/webhooks?order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webhooks"
);
const params = {
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"url": "https://example.aom.com",
"events": "New Account Created",
"author": "Client Admin",
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 4,
"url": "https://example.aom.com",
"events": "Enrolled in a course",
"author": "Client Admin",
"created_at": "Aug 10, 2020 12:43 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified webhook in storage.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/webhook/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"url\": \"https:\\/\\/example.aom\",
\"description\": \"It will use to collect new user data.\",
\"eventList\": \"New Account Created\"
}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"url": "https:\/\/example.aom",
"description": "It will use to collect new user data.",
"eventList": "New Account Created"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "4",
"message": "Webhook updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete the specified webhook in storage.
Example request:
curl --request DELETE \
"https://demo.aomlms.com/api/webhook/delete/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/delete/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Webhook deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webhook Log Tabular List
Returns all the webhook log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/webhook/logs/3?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/logs/3"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "new_account_created",
"data": [],
"status": "success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mailchimp Event Lookup
Retrieves all the events for the mailchimp actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/mailchimp/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/mailchimp/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "newAccount",
"display_value": "Add New Account"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new Mailchimp event
Example request:
curl --request POST \
"https://demo.aomlms.com/api/mailchimp/create?data=%5B%7B%22list_id%22%3A+%221234567890%22%2C+%22list_name%22%3A+%22Test+list%22%2C+%22event%22%3A+%22subscribe%22%7D%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/mailchimp/create"
);
const params = {
"data": "[{"list_id": "1234567890", "list_name": "Test list", "event": "subscribe"}]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Mailchimp saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all Mailchimp lists
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/mailchimp/getList" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/mailchimp/getList"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"lists": [
{
"id": "a1b2c3d4e5",
"name": "Weekly Newsletter",
"contact": {
"company": "Acme Corp",
"address1": "123 Main Street",
"address2": "Suite 400",
"city": "New York",
"state": "NY",
"zip": "10001",
"country": "US",
"phone": "+1-555-123-4567"
},
"permission_reminder": "You are receiving this email because you signed up on our website.",
"use_archive_bar": true,
"campaign_defaults": {
"from_name": "Marketing Team",
"from_email": "[email protected]",
"subject": "Your Weekly Update from Acme Corp",
"language": "en"
},
"notify_on_subscribe": "[email protected]",
"notify_on_unsubscribe": "[email protected]",
"email_type_option": true,
"visibility": "pub",
"double_optin": true,
"marketing_permissions": true,
"modules": [
"ecommerce",
"social_media"
],
"stats": {
"member_count": 2500,
"unsubscribe_count": 45,
"cleaned_count": 12,
"member_count_since_send": 30,
"unsubscribe_count_since_send": 3,
"cleaned_count_since_send": 1,
"campaign_count": 52,
"campaign_last_sent": "2024-04-10T10:00:00+00:00",
"merge_field_count": 5,
"avg_sub_rate": 2.5,
"avg_unsub_rate": 0.3,
"target_sub_rate": 3,
"open_rate": 36.5,
"click_rate": 8.7
},
"date_created": "2023-01-15T09:30:00+00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mailchimp Actions Tabular List
Returns all the Mailchimp Actions created in a tabular list format. You can apply filter using search_param.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/mailchimp/getMailchimpEvents?order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/mailchimp/getMailchimpEvents"
);
const params = {
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"list_name": "AOM",
"event": "New Account Created",
"author": "Client Admin",
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 4,
"list_name": "AOM",
"event": "Enrolled in a course",
"author": "Client Admin",
"created_at": "Aug 10, 2020 12:43 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mailchimp Log Tabular List
Returns all the Mailchimp log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/mailchimp/logs/50?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/mailchimp/logs/50"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "new_account_created",
"data": [],
"status": "success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gamification
Endpoints for managing Gamification settings.
Tabular List
Retrieves all the gamification events in a tabular list format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/gamification_events/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_events/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"records": [
{
"id": 1,
"name": "Test Gamification Event",
"triggerValue": 100,
"badgeTitle": "Test Badge",
"type": "total_money_spent",
"display_type": "Total money spent"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the types of events for gamification event settings.
Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/gamification_events/eventTypeLookUp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_events/eventTypeLookUp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
['db_value' => 'total_money_spent', 'display_value' => 'Total money spent'] ,
['db_value' => 'total_time_spent', 'display_value' => 'Total time spent learning(in hrs)'] ,
['db_value' => 'total_module_completed', 'display_value' => 'No. of modules completed'] ,
['db_value' => 'total_course_completed', 'display_value' => 'No. of courses completed'] ,
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new gamification event.
Creates a new gamification event with the given name, type, selected badge ID, and trigger value.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/gamification_event/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"\\\"New Event\\\"\",
\"eventType\": \"\\\"total_money_spent\\\"\",
\"selectedBadgeId\": \"123\",
\"triggerValue\": \"5.6\"
}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "\"New Event\"",
"eventType": "\"total_money_spent\"",
"selectedBadgeId": "123",
"triggerValue": "5.6"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 4,
"message": "Event created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific gamification event.
Fetches the details of a gamification event by its ID, including the event name, type, selected badge ID, and trigger value.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/gamification_event/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Event 1",
"eventType": "total_module_completed",
"selectedBadgeId": 123,
"triggerValue": 5.6
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a specific gamification event.
Updates the details of a gamification event by its ID, including the event name, type, selected badge ID, and trigger value.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/gamification_event/1?name=%22Event+1%22&eventType=%22total_module_completed%22&selectedBadgeId=123&triggerValue=5.6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/1"
);
const params = {
"name": ""Event 1"",
"eventType": ""total_module_completed"",
"selectedBadgeId": "123",
"triggerValue": "5.6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Event updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a specific gamification event.
Deletes a gamification event by its ID, but only if no badge has been assigned to a user for that event. If a badge has been assigned, the event cannot be deleted.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/gamification_event/delete/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/delete/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Event deleted Succesfully."
}
Example response (200):
{
"message": "Event cannot be deleted as a badge has been assigned to user for this event"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
General Settings
General Settings helps in managing general platform settings like site name, timezone, emails etc
Get site languages
Get list of all supported languages with their display name.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/siteLanguages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/siteLanguages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
[
{
"db_value": "en",
"display_value": "English (US)"
},
{
"db_value": "es",
"display_value": "Spanish"
},
{
"db_value": "en-custom",
"display_value": "Custom English"
},
{
"db_value": "fr",
"display_value": "French"
},
{
"db_value": "gr",
"display_value": "German"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get General Email Settings
Retrieves the details of the general email settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/emails/general?portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/emails/general"
);
const params = {
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"fromName": "Academy of Mine",
"fromEmail": "[email protected]",
"replyToEmail": "[email protected]",
"templateDesign": "default",
"headerLogo": "Default",
"customHeaderLogoURL": null,
"headerBgColor": "#6b15b6",
"bgColor": "#ffffff",
"bodyBgColor": "#f6f9fc",
"bodyTextColor": "#1b1e24"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update General Email Settings
To update the general email settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/emails/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fromName\": \"Academy of Mine\",
\"fromEmail\": \"[email protected]\",
\"replyToEmail\": \"[email protected]\",
\"templateDesign\": \"default\",
\"headerLogo\": \"Default\",
\"customHeaderLogoURL\": \"null\",
\"headerBgColor\": \"#6b15b6\",
\"bgColor\": \"#ffffff\",
\"bodyBgColor\": \"#f6f9fc\",
\"bodyTextColor\": \"#1b1e24\",
\"footerText\": \"Copyright © Your Company Name - All rights reserved.\",
\"logoBgColor\": \"#1b1e24\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/emails/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fromName": "Academy of Mine",
"fromEmail": "[email protected]",
"replyToEmail": "[email protected]",
"templateDesign": "default",
"headerLogo": "Default",
"customHeaderLogoURL": "null",
"headerBgColor": "#6b15b6",
"bgColor": "#ffffff",
"bodyBgColor": "#f6f9fc",
"bodyTextColor": "#1b1e24",
"footerText": "Copyright © Your Company Name - All rights reserved.",
"logoBgColor": "#1b1e24"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update email format for given type
This api is used to update the email format of given type
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/edit-template" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"upcoming_webinar\",
\"portalId\": 11,
\"area\": \"Course, Class\",
\"subject\": \"Your Upcoming Webinar\",
\"recipients\": \"User\",
\"heading\": \"Upcoming Webinar\",
\"content\": \"This is a test email\",
\"enabled\": 1,
\"admin_enabled\": 1,
\"hours\": 24,
\"days\": 7,
\"interval\": \"days\",
\"frequency\": \"1\",
\"enable_coupon\": 1,
\"coupon\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/edit-template"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "upcoming_webinar",
"portalId": 11,
"area": "Course, Class",
"subject": "Your Upcoming Webinar",
"recipients": "User",
"heading": "Upcoming Webinar",
"content": "This is a test email",
"enabled": 1,
"admin_enabled": 1,
"hours": 24,
"days": 7,
"interval": "days",
"frequency": "1",
"enable_coupon": 1,
"coupon": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Template Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Email Format
Retrieves the details of the email formats.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/get-template?portalId=1&type[]=new_account_creation&type[]=new_account_creation_others" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/get-template"
);
const params = {
"portalId": "1",
"type[0]": "new_account_creation",
"type[1]": "new_account_creation_others",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
array of objects
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
area
string
required Area of the email
type
string
required Type of the email
portalId
integer
required Portal ID
subject
string
required Subject of the email
recipients
string
required Recipients of the email
heading
string
required Heading of the email
content
string
required Content of the email
enabled
boolean
required Enabled status of the email
admin_enabled
boolean
required Enabled status of the email for admin
hours
string
required Hours for upcoming webinar reminder
days
string
required Days for course expiration
portal_admin_email
boolean
required Portal admin email enabled status
interval
string
required Interval for cart abandoned email
frequency
string
required Frequency for cart abandoned email
enable_coupon
boolean
required Enable coupon for cart abandoned email
coupon
integer
required Coupon ID for cart abandoned email
Get General Settings
Get the general settings of the site.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"siteTitle": "Academy of mine",
"adminEmail": "[email protected]",
"siteLanguage": "en",
"timeZone": "null",
"dateFormat": "M d, Y",
"timeFormat": "h:i A",
"privateSite": "no",
"customTimeZone": "tempora",
"homePage": "1",
"productCatalogPage": 2,
"cartPage": 5,
"checkoutPage": "4",
"termConditionPage": 3,
"termConditionText": "I have read and agree to the website term.",
"privacyPolicyPage": 2,
"privacyPolicyText": "Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our privacy policy."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a list of custom timezones.
Returns all available PHP timezones except a predefined custom list. Useful for showing only non-default timezones to users or filtering out common ones.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/customTimezone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/customTimezone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Bamako"
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update General Settings
Update the general settings of the site with provided values in the request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"siteTitle\": \"totam\",
\"adminEmail\": \"[email protected]\",
\"siteLanguage\": \"facilis\",
\"timeZone\": \"Asia\\/Tashkent\",
\"dateFormat\": \"ullam\",
\"timeFormat\": \"soluta\",
\"privateSite\": \"consequatur\",
\"customTimeZone\": \"\\\"America\\/New_York\\\"\",
\"homePage\": 1,
\"cartPage\": 1,
\"checkoutPage\": 6,
\"termConditionPage\": 11,
\"termConditionText\": \"voluptas\",
\"privacyPolicyPage\": 7,
\"privacyPolicyText\": \"mollitia\",
\"cookieTitle\": \"rem\",
\"cookieAccept\": \"sapiente\",
\"cookieReject\": \"reiciendis\",
\"cookieMessage\": \"pariatur\",
\"thankyouPage\": 5,
\"cookieEnable\": 10,
\"googleRecaptchaEnable\": 14,
\"googleRecaptchaSiteKey\": \"odit\",
\"googleRecaptchaSecretKey\": \"commodi\",
\"blockedEmailsDomains\": \"quia\",
\"anyOneCanRegister\": 8,
\"learnerDashboard\": \"aspernatur\",
\"customCatalogPageurl\": \"http:\\/\\/goodwin.com\\/aut-odit-incidunt-ipsam-quo-molestiae-aut\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"siteTitle": "totam",
"adminEmail": "[email protected]",
"siteLanguage": "facilis",
"timeZone": "Asia\/Tashkent",
"dateFormat": "ullam",
"timeFormat": "soluta",
"privateSite": "consequatur",
"customTimeZone": "\"America\/New_York\"",
"homePage": 1,
"cartPage": 1,
"checkoutPage": 6,
"termConditionPage": 11,
"termConditionText": "voluptas",
"privacyPolicyPage": 7,
"privacyPolicyText": "mollitia",
"cookieTitle": "rem",
"cookieAccept": "sapiente",
"cookieReject": "reiciendis",
"cookieMessage": "pariatur",
"thankyouPage": 5,
"cookieEnable": 10,
"googleRecaptchaEnable": 14,
"googleRecaptchaSiteKey": "odit",
"googleRecaptchaSecretKey": "commodi",
"blockedEmailsDomains": "quia",
"anyOneCanRegister": 8,
"learnerDashboard": "aspernatur",
"customCatalogPageurl": "http:\/\/goodwin.com\/aut-odit-incidunt-ipsam-quo-molestiae-aut"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated",
"type": "success",
"title": "Success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve branding settings
Retrieves the details of the brand settings. Helps in fetching items of the brand settings, items like primary color, body color, logo footer text(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/branding" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/branding"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"brandColors": {
"primaryColor": "#6b15b6",
"bodyBgColor": "#f6f9fc",
"bodyColor": "#1b1e24"
},
"logo": "",
"logoMini": "",
"topBarEmail": "[email protected]",
"topBarPhone": "+1-202-555-0189",
"footerText": "Copyright © Your Company Name - All rights reserved.",
"headerBgColor": "#6b15b6",
"menuTextColor": "#6b15b6",
"favicon": "favicon.ico",
"robotsTxt": "User-agent: *",
"hideSearchEngineVisibility": "no",
"learnerDashboard": "dashboard"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set branding settings
Set the branding settings of the site.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/branding" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"brandColors\": [],
\"logo\": \"\\\"logo.png\\\"\",
\"logoMini\": \"\\\"mini-logo.png\\\"\",
\"topBarEmail\": \"\\\"[email protected]\\\"\",
\"topBarPhone\": \"\\\"+1 123 456 7890\\\"\",
\"menuTextColor\": \"\\\"#6b15b6\\\"\",
\"footerText\": \"\\\"Copyright © Your Company Name - All rights reserved.\\\"\",
\"headerBgColor\": \"\\\"#6b15b6\\\"\",
\"favicon\": \"\\\"favicon.ico\\\"\",
\"robotsTxt\": \"\\\"User-agent: *\\\"\",
\"hideSearchEngineVisibility\": \"\\\"no\\\"\",
\"shouldCompileTheme\": \"\\\"true\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/branding"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"brandColors": [],
"logo": "\"logo.png\"",
"logoMini": "\"mini-logo.png\"",
"topBarEmail": "\"[email protected]\"",
"topBarPhone": "\"+1 123 456 7890\"",
"menuTextColor": "\"#6b15b6\"",
"footerText": "\"Copyright © Your Company Name - All rights reserved.\"",
"headerBgColor": "\"#6b15b6\"",
"favicon": "\"favicon.ico\"",
"robotsTxt": "\"User-agent: *\"",
"hideSearchEngineVisibility": "\"no\"",
"shouldCompileTheme": "\"true\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Branding Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the custom CSS added in the platform.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/customstyle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/customstyle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"custom_css": ".aom-button {
background-color: #fff;
}"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Custom Stylings
Updates the custom CSS added in the platform.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/customstyle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"custom_css\": \".aom-button {\\n background-color: #fff;\\n}\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/customstyle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"custom_css": ".aom-button {\n background-color: #fff;\n}"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Custom Styling Saved Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates the status of the email if the selected area of the email format as enabled or not.
If disabled, the students will not get any email from this platform for selected email format area(account, lms, ecommerce, etc) and type (account creation, enrollments, etc)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/update-state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"area\": \"account, lms, ecommerce, etc\",
\"type\": \"new_account_creation, course_enrolled, etc\",
\"isEnabled\": true,
\"admin_enabled\": true,
\"portalId\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/update-state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"area": "account, lms, ecommerce, etc",
"type": "new_account_creation, course_enrolled, etc",
"isEnabled": true,
"admin_enabled": true,
"portalId": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Email State Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Searches for courses, users, products, and modules by name or email in the whole platform or in a specific portal.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/generic-search" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"search_term\": \"\\\"John Doe\\\"\",
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/generic-search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"search_term": "\"John Doe\"",
"portalId": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"courses": [
{
"label": "Course1",
"value": "/dashboard/course/manage/1"
},
{
"label": "Course2",
"value": "/dashboard/course/manage/2"
}
],
"users": [
{
"label": "John Doe ([email protected])",
"value": "/dashboard/user/edit/1"
},
{
"label": "Jane Doe ([email protected])",
"value": "/dashboard/user/edit/2"
}
],
"products": [
{
"label": "Product1",
"value": "/dashboard/product/edit/1"
},
{
"label": "Product2",
"value": "/dashboard/product/edit/2"
}
],
"modules": [
{
"label": "Module1",
"value": "/dashboard/modules/edit/1"
},
{
"label": "Module2",
"value": "/dashboard/modules/edit/2"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the status of the gamification feature.
Retrieves the status of gamification feature. Returns a boolean value if the feature is enabled or disabled.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/gamification" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/gamification"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"is_enabled": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Gamification Settings
Updates the gamification settings based on the provided request parameters. Toggles the gamification feature on or off.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/gamification" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"is_enabled\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/gamification"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"is_enabled": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated",
"type": "success",
"title": "Success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Integration
It allows you to track learner activity and progress in the LMS, and trigger changes in HubSpot data accordingly.
Hubspot Event Lookup
Retrieves all the events for the hubspot actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/hubspot/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/hubspot/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "new_account_created",
"display_value": "New Account Created",
"crud_op": "Create",
"hubspot_crud": "[{'db_value' => 'hubspot_contact', 'display_value'=> 'Create New HubSpot Contact'}]"
},
{
"db_value": "Account Updated",
"display_value": "Account Updated",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'Update HubSpot Contact']]"
},
{
"db_value": "course_enrolled",
"display_value": "Enrolled in a course",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'Update Course Status in HubSpot Contact']]"
},
{
"db_value": "course_completed",
"display_value": "Course Completed",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'Update Course Status to complete in HubSpot Contact']]"
},
{
"db_value": "course_started",
"display_value": "Course Started",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'Update Course Status to in progress in HubSpot Contact']]"
},
{
"db_value": "course_progress",
"display_value": "Course Progress Tracking",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_deal', 'display_value'=> 'Update Course Progress in HubSpot Deal']]"
},
{
"db_value": "course_expired",
"display_value": "Course Expired",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'HubSpot Contact']]"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Field Lookup
Retrieves all the fields for the hubspot. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/hubspot/fieldLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"ut\"
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/hubspot/fieldLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "ut"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"lms_fields": [
{
"db_value": "email"
},
{
"db_value": "last_name"
},
{
"db_value": "first_name"
},
{
"db_value": "last_login_ip"
},
{
"db_value": "is_disabled"
}
]
},
{
"hubspot_fields": [
{
"db_value": "email"
},
{
"db_value": "lastname"
},
{
"db_value": "firstname"
}
]
},
{
"courses": [
{
"id": 1,
"name": "Course 1"
},
{
"id": 2,
"name": "Course 2"
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Hubspot Action
Creates a Hubspot action based on the provided parameters.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/action/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/action/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Action created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Hubspot Mapping
Saves the mapping of hubspot mapping. Helps in saving hubspot mapping using its type. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/mapping/save" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"hubspot_contact\",
\"dealIdentifierObjectAndProperties\": [
\"blanditiis\"
],
\"courseFieldProperties\": [
\"reiciendis\"
],
\"userFieldProperties\": [
\"voluptatibus\"
],
\"conditionMappingData\": [
{
\"id\": 1,
\"conditionOperator\": \"AND\",
\"conditionValue\": \"hasdeal\",
\"conditionType\": \"CONTACT\",
\"conditionOperatorValue\": \"CONTAINS\"
},
{
\"id\": 2,
\"conditionOperator\": \"OR\",
\"conditionValue\": \"hasdeal\",
\"conditionType\": \"CONTACT\",
\"conditionOperatorValue\": \"CONTAINS\"
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/mapping/save"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "hubspot_contact",
"dealIdentifierObjectAndProperties": [
"blanditiis"
],
"courseFieldProperties": [
"reiciendis"
],
"userFieldProperties": [
"voluptatibus"
],
"conditionMappingData": [
{
"id": 1,
"conditionOperator": "AND",
"conditionValue": "hasdeal",
"conditionType": "CONTACT",
"conditionOperatorValue": "CONTAINS"
},
{
"id": 2,
"conditionOperator": "OR",
"conditionValue": "hasdeal",
"conditionType": "CONTACT",
"conditionOperatorValue": "CONTAINS"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Mapping saved Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Hubspot Mapping
Retrieves the details of the hubspot mapping. Helps in fetching hubspot mapping using its type. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/mappings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"hubspot_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/mappings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "hubspot_contact"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"type": "hubspot_contact",
"userFieldProperties": [],
"courseFieldProperties": []
}
Example response (200):
{
"type": "hubspot_deal",
"dealIdentifierObjectAndProperties": [],
"courseFieldProperties": []
}
Example response (200):
{
"type": "hubspot_condition",
"conditions": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves HubSpot integrations in a tabular format with pagination.
This function handles requests for retrieving a list of HubSpot integration events in a paginated tabular format. It allows filtering by events and ordering by specified columns. The results include detailed information about each event, such as the event and object display values, action, author, and timestamp.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspots?order_by=%7B%22colName%22%3A+%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspots"
);
const params = {
"order_by": "{"colName": "created_at", "direction": "desc"}",
"search_param": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 20,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"event": "course_enrolled",
"event_display_value": "Enrolled in a Course",
"object": "hubspot_contact",
"object_display_value": "HubSpot Contact",
"action": "created",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Hubspot Action
Updates a Hubspot action based on the provided ID.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/hubspot/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"New Account Created\",
\"action\": \"create\",
\"object\": \"Hubspot Deal\"
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "New Account Created",
"action": "create",
"object": "Hubspot Deal"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Hubspot updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Hubspot Action
Deletes a Hubspot action based on the provided ID.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/action/delete/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/action/delete/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Hubspot deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Log Tabular List
Returns all the Hubspot log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/logs/50?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/logs/50"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "New Account Created",
"data": [],
"status": "success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Conditions Lookup
Retrieves all the conditions for Hubspot. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/conditionLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/conditionLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "equal_to",
"display_value": "="
},
{
"db_value": "not_equal_to",
"display_value": "!="
},
{
"db_value": "greater_than",
"display_value": ">"
},
{
"db_value": "less_than",
"display_value": "<"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Operator Lookup
Retrieves all the operators for Hubspot. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/operatorsLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/operatorsLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "and",
"display_value": "And"
},
{
"db_value": "or",
"display_value": "Or"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Import users from HubSpot.
This endpoint is used to initiate a user import process from HubSpot. It saves the provided HubSpot conditions, updates the import identifier for tracking, logs the import event, and dispatches a job to process the import in the background.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/importUser" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"hubspotConditions\": [
\"totam\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/importUser"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"hubspotConditions": [
"totam"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"success": true,
"importId": 2,
"message": "Hubspot import user sync executed and in running state. Refresh to know its status."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the status of the last HubSpot user import.
This endpoint is used to get the status of the last HubSpot user import. It returns the status of the import, which can be either 'success', 'failed', or 'queue'. If the import is still in queue, it means that the import has been initiated but has not completed yet. If the import has failed, it means that there was an error during the import process. If the import was successful, it means that the import has completed without any errors.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/import-user/status?importId=et" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/import-user/status"
);
const params = {
"importId": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"lastImportedDate": "22-Jan-2020 12:00 AM",
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Import User Logs
Returns all the Hubspot import user log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/importUserlogs/50?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/importUserlogs/50"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"importIdentifier": 1,
"event": "import_users",
"importedData": "[]",
"skippedData": "",
"message": "Import completed successfully",
"status": "success",
"display_status": "Success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false,
"queueStatus": "success"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Integrations
An integration can be used by admins to integrate this platform to other platforms. Endpoints helps in performing CRUD operation for and to integration.
Get all integrations.
Returns a list of all available integrations with their details such as name, identifier, logo, and status. The timestamps are formatted based on the app's configured timezone, language, date, and time format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/listing" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/listing"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "HubSpot",
"identifier": "hubspot",
"description": "CRM Integration with HubSpot",
"logo_url": "https://example.com/images/hubspot.png",
"is_enabled": true,
"implementer_class": "App\\Integrations\\Hubspot",
"created_by": 1,
"updated_by": 2,
"created_at": "Apr 12, 2025 10:35 AM",
"updated_at": "Apr 12, 2025 11:40 AM"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Integration Settings
Updates the integration settings for a specified integration. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/integrations/settings/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 5,
\"is_enabled\": true,
\"settings\": [
\"laborum\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/settings/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 5,
"is_enabled": true,
"settings": [
"laborum"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Integration Settings
Retrieves all the integration settings for a specified integration. Helps in mainting the data and enable status of the integration.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/settings/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/settings/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Google Analytics",
"identifier": "google-analytics",
"is_enabled": false,
"settings": {
"ga_code": "<script type=\"text/javascript\">var a = 12;</script>"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the status of an integration
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/integrations/updateStatus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"status\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/updateStatus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"status": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns all the Integrations' Settings for a given Portal in a paginated list format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/webinar/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/webinar/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"is_enabled":true,"name":"zoom"},{"is_enabled":true,"name":"goto_webinar"},{"is_enabled":true,"name":"goto_training"},{"is_enabled":true,"name":"ms_team_meet"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Shopify Product List
Return all the Shopify Product, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/shopify/product/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"search_term\": \"\\\"Introduction\\\".\"
}"
const url = new URL(
"https://demo.aomlms.com/api/shopify/product/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"search_term": "\"Introduction\"."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
"productList" => [
[
"id" => "1234567890",
"title" => "Introduction to Continuing Education"
],
[
"id" => "2345678901",
"title" => "Professional Training And Education"
]
],
"isShopifyEnabled" => true
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a product in shopify with the price and title provided in request
Example request:
curl --request POST \
"https://demo.aomlms.com/api/shopify/product/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"aut\",
\"price\": 7
}"
const url = new URL(
"https://demo.aomlms.com/api/shopify/product/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "aut",
"price": 7
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
"success" => true,
"message" => "Product created successfully",
"product_id" => 123456,
"product_title" => "Introduction to Continuing Education"
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
LTI Integration API
This controller handles all API interactions related to Learning Tools Interoperability (LTI) integration. It provides endpoints for managing LTI tool launches, handling authentication, and syncing data between the platform and external LTI-compliant systems such as learning management systems (LMS).
Endpoints in this controller facilitate the integration and communication between the platform and external educational tools or services via the LTI standard.
Add a new LTI platform
Add a new LTI platform and save its details in the database.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/lti/addPlatform?platformId=https%3A%2F%2Fcanvas.instructure.com&platformName=Canvas&clientId=1234567890&jwksUrl=https%3A%2F%2Fcanvas.instructure.com%2Fapi%2Flti%2Fsecurity%2Fjwks&accessTokenUrl=https%3A%2F%2Fcanvas.instructure.com%2Flogin%2Foauth2%2Ftoken&authEndPoint=https%3A%2F%2Fcanvas.instructure.com%2Fapi%2Flti%2Fauthorize_redirect&roles=%5B%22Student%22%2C+%22Teacher%22%5D&contentAccessible=true&teacherProvisioningMode=%22New+accounts+only%22&studentProvisioningMode=%22New+accounts+only%22&deploymentId=1234567890&courses=%5B%7B%22id%22%3A1%2C%22name%22%3A%22Course+1%22%2C%22syncGrade%22%3Atrue%7D%2C%7B%22id%22%3A2%2C%22name%22%3A%22Course+2%22%2C%22syncGrade%22%3Afalse%7D%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/lti/addPlatform"
);
const params = {
"platformId": "https://canvas.instructure.com",
"platformName": "Canvas",
"clientId": "1234567890",
"jwksUrl": "https://canvas.instructure.com/api/lti/security/jwks",
"accessTokenUrl": "https://canvas.instructure.com/login/oauth2/token",
"authEndPoint": "https://canvas.instructure.com/api/lti/authorize_redirect",
"roles": "["Student", "Teacher"]",
"contentAccessible": "true",
"teacherProvisioningMode": ""New accounts only"",
"studentProvisioningMode": ""New accounts only"",
"deploymentId": "1234567890",
"courses": "[{"id":1,"name":"Course 1","syncGrade":true},{"id":2,"name":"Course 2","syncGrade":false}]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 4,
"message": "Platform Added Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update LtiPlatform
Updates the LtiPlatform along with its deployment and contents
Example request:
curl --request POST \
"https://demo.aomlms.com/api/lti/updatePlatform" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"1\",
\"platformId\": \"example.com\",
\"platformName\": \"Example\",
\"clientId\": \"123456789\",
\"jwksUrl\": \"https:\\/\\/example.com\\/jwks\",
\"accessTokenUrl\": \"https:\\/\\/example.com\\/token\",
\"authEndPoint\": \"https:\\/\\/example.com\\/auth\",
\"deploymentId\": \"123456789\",
\"roles\": \"[\\\"Instructor\\\", \\\"Student\\\"]\",
\"contentAccessible\": \"All\",
\"teacherProvisioningMode\": \"New accounts only\",
\"studentProvisioningMode\": \"Existing and new accounts\",
\"courses\": \"[{\\\"id\\\":1,\\\"syncGrade\\\":true}]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/lti/updatePlatform"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1",
"platformId": "example.com",
"platformName": "Example",
"clientId": "123456789",
"jwksUrl": "https:\/\/example.com\/jwks",
"accessTokenUrl": "https:\/\/example.com\/token",
"authEndPoint": "https:\/\/example.com\/auth",
"deploymentId": "123456789",
"roles": "[\"Instructor\", \"Student\"]",
"contentAccessible": "All",
"teacherProvisioningMode": "New accounts only",
"studentProvisioningMode": "Existing and new accounts",
"courses": "[{\"id\":1,\"syncGrade\":true}]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Platform Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a LTI platform by id
This endpoint return a LTI platform by id with all its associated data.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/lti/getPlatform/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/lti/getPlatform/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"platformName": "Test",
"platformId": "https://canvas.instructure.com",
"clientId": "1234567890",
"jwksUrl": "https://canvas.instructure.com/api/lti/security/jwks",
"authEndPoint": "https://canvas.instructure.com/login/oauth2/auth",
"accessTokenUrl": "https://canvas.instructure.com/login/oauth2/token",
"deploymentId": "1234567890",
"contentAccessible": 1,
"teacherProvisioningMode": "new",
"studentProvisioningMode": "new",
"roles": [],
"courses": [
{
"id": 1,
"name": "Course 1",
"syncGrade": true
}
],
"id": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the LtiPlatforms in a tabular list format with pagination mode. You can apply filter using search_param via courseCategoryIds(course category ID), courseName or roleNames(user role)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/lti/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22course+1%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/lti/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"courseCategoryIds":[],"courseName":"course 1"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 4,
"records": [
{
"id": 4,
"name": "superadmin",
"displayName": "Super Admin",
"createdAt": "Aug 06, 2020 07:20 AM",
"lastLogin": "2 days ago"
},
{
"id": 2,
"name": "admin",
"displayName": "Admin",
"createdAt": "Aug 03, 2020 09:31 AM",
"lastLogin": "Never"
},
{
"id": 3,
"name": "groupadmin",
"displayName": "Group Admin",
"createdAt": "Aug 03, 2020 09:31 AM",
"lastLogin": "Never"
},
{
"id": 1,
"name": "student",
"displayName": "Student",
"createdAt": "Aug 03, 2020 09:31 AM",
"lastLogin": "Never"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an LTI platform
Deletes the LTI platform along with its associated deployments and registrations from the database.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/lti/deletePlatform" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"deleteId\": \"1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/lti/deletePlatform"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"deleteId": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Platform deleted Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Leaderboard
You can perform operations like create, edit, delete on Leaderboard Tiers.
Leaderboard Tier Tabular List
Retrieves all the leaderboard tiers in a tabular list format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/leaderboard/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"records": [
{
"id": 1,
"name": "Bronze",
"lowerLimit": 0,
"upperLimit": 100
},
{
"id": 2,
"name": "Silver",
"lowerLimit": 101,
"upperLimit": 200
},
{
"id": 3,
"name": "Gold",
"lowerLimit": 201,
"upperLimit": 300
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new Tier
Create a new Tier with name
, lowerLimit
and upperLimit
.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/leaderboard/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Tier created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a Tier
Get a Tier with id
.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/leaderboard/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Level 1",
"lowerLimit": 1,
"upperLimit": 10
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a Tier
Update a Tier with id
, name
, lowerLimit
and upperLimit
.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/leaderboard/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Tier updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a Tier
Delete a Tier with id
.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/leaderboard/delete/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/delete/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Tier deleted Succesfully.",
"success": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Paths
Learning Path Tabular List
Retrieves all the learning paths in a tabular list format in paginated mode. You can apply filter using search_param via name(learning path name).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-paths/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22name%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-paths/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"name":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "Test Learning Path",
"status": "PUBLISHED",
"display_status": "PUBLISHED",
"created_at": "Aug 03, 2020 09:31 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Learning Path
Creates a new learning path with courses, certificates, prerequisites and categories.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Learning Path 1\",
\"instructions\": \"Some Instruction\",
\"featuredImageUrl\": \"img_path\",
\"credits\": 70,
\"status\": \"publish\",
\"certificates\": [
1,
2
],
\"prerequisites\": [
1,
2
],
\"courses\": [
1,
2,
3
],
\"categories\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Learning Path 1",
"instructions": "Some Instruction",
"featuredImageUrl": "img_path",
"credits": 70,
"status": "publish",
"certificates": [
1,
2
],
"prerequisites": [
1,
2
],
"courses": [
1,
2,
3
],
"categories": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Learning Path was successfully created"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Learning Path Details
Retrieves all the details of the specified learning path.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Test Learning Path",
"slug": "test-learning-path",
"status": "DRAFT",
"instructions": "Some Instruction",
"featuredImageUrl": "img_path",
"credits": 70,
"certificates": [
1
],
"accredible_group_id": [
1
],
"courses": [
{
"label": "Course 1",
"value": 1
},
{
"label": "Course 2",
"value": 2
}
],
"prerequisites": {
"1": true,
"2": false
},
"categories": [
1,
2
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Learning Path
Updates an existing learning path with courses, certificates, prerequisites and categories.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/learning-path/edit/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"name\": \"Learning Path 1\",
\"instructions\": \"Some Instruction\",
\"featuredImageUrl\": \"img_path\",
\"credits\": 70,
\"status\": \"publish\",
\"certificates\": [
1,
2
],
\"prerequisites\": [
1,
2
],
\"courses\": [
1,
2,
3
],
\"categories\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/edit/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"name": "Learning Path 1",
"instructions": "Some Instruction",
"featuredImageUrl": "img_path",
"credits": 70,
"status": "publish",
"certificates": [
1,
2
],
"prerequisites": [
1,
2
],
"courses": [
1,
2,
3
],
"categories": [
1,
2
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Learning Path was successfully updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Learning Path
Deletes the learning paths and related mapping.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 learning path(s) deleted, 1 learning path(s) not deleted as it has enrollments. Please remove the students from the learning path and try again.",
"deletedLearningPaths": 1,
"notDeletedLearningPaths": [
1
],
"enrolledLearningPaths": [
{
"id": 1,
"name": "Learning path 1"
}
],
"notDeletedPortalLearningPaths": [
1
],
"portalLearningPaths": {
"Learning path 1": [
{
"id": 1,
"name": "Portal 1"
}
]
},
"notDeletedProductLearningPath": [
1
],
"productLearningPaths": [
{
"id": 1,
"title": "Product 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Lookup
Retrieves Learning Path details based on the search query.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"learning_paths": [
{
"value": 1,
"label": "Learning Path 1"
},
{
"value": 2,
"label": "Learning Path 2"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Students
Retrieves all enrolled students for a learning path.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/enrolled-users?learning_path_id=1&portalId=5&page_size=10&page_number=1&order_by=registered_on&search_param=%7B%22status%22%3A%5B%22Not+Started%22%2C%22In+Progress%22%5D%2C%22nameOrEmail%22%3A%22John+Doe%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/enrolled-users"
);
const params = {
"learning_path_id": "1",
"portalId": "5",
"page_size": "10",
"page_number": "1",
"order_by": "registered_on",
"search_param": "{"status":["Not Started","In Progress"],"nameOrEmail":"John Doe"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"learningPathName": "Learning Path 1",
"featuredImage": "http://localhost:8000/storage/learning_paths/1/featured_image.jpg",
"recordsTotal": 12,
"totalNotStarted": 3,
"totalInProgress": 4,
"totalCompleted": 5,
"recordsFiltered": 12,
"records": [
{
"id": 1,
"user_id": 2,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "http://localhost:8000/storage/users/2/avatar.jpg",
"status": "Not Started",
"display_status": "Not Started",
"percentComplete": 0,
"access_status": "Allowed",
"registered_on": "Aug 09, 2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "Never",
"certificate_count": 0,
"user_type": "Learner",
"raw_user_type": "learner"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enroll Students
To enroll users in a learning path, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/enroll/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"studentIds\": [
2,
3
],
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/enroll/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"studentIds": [
2,
3
],
"portalId": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) enrolled successfully",
"enrolledUsersCount": 2,
"notEnrolledUsers": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Learners
To removes users from a learning path, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/remove/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/remove/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) removed successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign Certificate
Assigns a certificate to the users enrolled in a learning path using their enrollment IDs. Checks if the learning path has a certificate template available before proceeding with the assignment.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/assignCertificate/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/assignCertificate/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"isSucess": true,
"message": "Certificate assigned successfully to 2 student(s)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Launch
This API is used to launch learning path and get the courses associated with the learning path.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/launch?info=info%3Dtrue&portalId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/launch"
);
const params = {
"info": "info=true",
"portalId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Learning Path Name",
"featuredImageUrl": "http://example.com/featured-image.jpg",
"instructions": "Learning Path Instructions",
"learningPathStatus": "Active",
"status": "Not Started",
"display_status": "Not Started",
"completionPercentage": 0,
"enrollmentDate": "22-02-2022",
"certificate": 0,
"launchSlug": "http://example.com/launch-learning-path",
"id": 2,
"rating": 4.5,
"totalEstimatedTime": "2 hours",
"courseData": [
{
"name": "Course 1",
"courseId": 3,
"rating": 4.5,
"status": "Not Started",
"completion_percentage": 0,
"featuredImageUrl": "http://example.com/featured-image.jpg",
"slug": "http://example.com/launch-course",
"display_status": "Not Started",
"expire_on": "22-02-2022",
"minimum_passing_percentage": 0,
"certificate": 0,
"certificate_expire_after": "Never",
"isExpired": false,
"isCurrent": true,
"isLocked": false,
"estimatedCompletionTime": "1 hour",
"userReviewAvailable": true,
"enableCourseRating": true
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Learning Path Details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portalLearningPathInfo?learningPathId=1&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portalLearningPathInfo"
);
const params = {
"learningPathId": "1",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
"learningPathId": 1,
"name": "Learning Path 1",
"featuredImageUrl": "http://localhost:8000/storage/learning_paths/1/featured_image.jpg",
"instructions": "Sample instructions",
"learningPathStatus": "Active",
"status": "Not Enrolled",
"display_status": "Not Enrolled",
"completionPercentage": 0,
"enrollmentDate": "null",
"certificate": 0,
"totalEstimatedTime": "1 hour",
"rating": 4.5,
"launchSlug": "http://localhost:8000/portal/5/learning_path/1/launch",
"courseList": [
{
"id": 1,
"name": "Course 1",
"description": "Sample description",
"rating": 4.5,
"estimatedCompletionTime": "1 hour",
"featuredImageUrl": "http://localhost:8000/storage/courses/1/featured_image.jpg",
"status": "Active",
"completionPercentage": 0,
"status": "Not Enrolled",
"display_status": "Not Enrolled"
}
]
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Dropdown List
Returns a list of learning paths with their ID and Name based on the provided portal ID and search term. If a valid portal ID is provided, it filters learning paths associated with the portal. If no portal ID or an invalid one (e.g., -1) is given, it returns all learning paths.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-paths/dropdownlist?portalId=5&type=public&search_term=%22Advanced%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-paths/dropdownlist"
);
const params = {
"portalId": "5",
"type": "public",
"search_term": ""Advanced"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Learning Path 1"
},
{
"id": 2,
"name": "Learning Path 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Detail Report
Retrieves learning path detail report based on the parameters provided.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path/reports/learning-path-detailed?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22registered_on%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22status%22%3A+%5B%22registered%22%2C+%22started%22%5D%2C+%22registered_on%22%3A+%5B%222021-01-01%22%2C+%222021-01-31%22%5D%2C+%22completed_on%22%3A+%5B%222021-01-01%22%2C+%222021-01-31%22%5D%2C+%22nameOrEmail%22%3A+%22John+Doe%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/reports/learning-path-detailed"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "registered_on", "direction": "desc"}",
"search_param": "{"status": ["registered", "started"], "registered_on": ["2021-01-01", "2021-01-31"], "completed_on": ["2021-01-01", "2021-01-31"], "nameOrEmail": "John Doe"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsFiltered": 10,
"records": [
{
"user_id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"learning_path_name": "Learning Path 1",
"status": "registered",
"display_status": "Registered",
"registered_on": "01-Jan-2021",
"started_on": "05-Jan-2021",
"completed_on": "10-Jan-2021",
"last_accessed_on": "10-Jan-2021",
"certifcate_issued": "Yes",
"courseDetails": [],
"total_time_spent": 10,
"expire_on": "Never",
"completed_lp_courses": 2,
"total_lp_courses": 5,
"portalName": "Portal 1"
},
{
"user_id": 2,
"first_name": "Jane",
"last_name": "Doe",
"email": "[email protected]",
"learning_path_name": "Learning Path 2",
"status": "started",
"display_status": "Started",
"registered_on": "01-Jan-2021",
"started_on": "05-Jan-2021",
"completed_on": "10-Jan-2021",
"last_accessed_on": "10-Jan-2021",
"certifcate_issued": "No",
"courseDetails": [],
"total_time_spent": 10,
"expire_on": "Never",
"completed_lp_courses": 2,
"total_lp_courses": 5,
"portalName": "Portal 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves an overview report of learning paths, including the status of enrollments.
This function aggregates the enrollment statuses (Not Started, In Progress, Completed) for each learning path, and calculates the percentage of completed enrollments. It takes into account portal-specific filters if provided.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path/reports/overview?searchPortalIds[]=1&searchPortalIds[]=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/reports/overview"
);
const params = {
"searchPortalIds[0]": "1",
"searchPortalIds[1]": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Learning Path 1",
"Learning Path 2"
],
"totalNotStarted": [
5,
3
],
"totalInProgress": [
2,
4
],
"totalCompleted": [
3,
3
],
"percentageCompleted": [
30,
50
],
"sumNotStarted": 8,
"sumInProgress": 6,
"sumCompleted": 6,
"sumPercentageCompleted": 37
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone a learning path
This function clones a learning path and its associated courses and categories. It takes into account the user who initiated the request and records the user as the creator and updater of the cloned learning path.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/clone?learningPathId=1&isDeepCopy=true" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/clone"
);
const params = {
"learningPathId": "1",
"isDeepCopy": "true",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Learning Path Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Activities
Retrieves all the activities for a learning path based on the context provided. Context can be either 'portal' or 'lp'. If context is 'portal', it will return all activities for the portal. If context is 'lp', it will return all activities for the learning path.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path-activities?learning_path_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22name%22%3A%22%22%7D&context=portal+or+lp&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path-activities"
);
const params = {
"learning_path_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"name":""}",
"context": "portal or lp",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "Test Activity",
"status": "PUBLISHED",
"created_at": "Aug 03, 2020 09:31 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Activities Lookup
Retrieves all the activities name performed by students in a learning path. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path-activities/verb/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path-activities/verb/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "ENROLLED",
"display_value": "ENROLLED"
},
{
"db_value": "STARTED",
"display_value": "STARTED"
},
{
"db_value": "ACCESSED",
"display_value": "ACCESSED"
},
{
"db_value": "COMPLETED",
"display_value": "COMPLETED"
},
{
"db_value": "ACHIEVED CERTIFICATE",
"display_value": "ACHIEVED CERTIFICATE"
},
{
"db_value": "REMOVED",
"display_value": "REMOVED"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Location
You can perform operations like create, edit, delete on locations
Create a new location.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/location/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"location_name\": \"New York\",
\"address\": \"New York, USA\",
\"city\": \"New York\",
\"country\": \"USA\",
\"zipcode\": \"10001\",
\"map_url\": \"https:\\/\\/www.google.com\\/maps\\/search\\/?api=1&query=New+York\"
}"
const url = new URL(
"https://demo.aomlms.com/api/location/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"location_name": "New York",
"address": "New York, USA",
"city": "New York",
"country": "USA",
"zipcode": "10001",
"map_url": "https:\/\/www.google.com\/maps\/search\/?api=1&query=New+York"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Location Created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Location Tabular List
Retrieves all the locations in a tabular list format with pagination mode. You can apply filter using search_param via locationName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/location/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22locationName%22%3A%22New+York%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/location/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"locationName":"New York"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "New York",
"address": "New York, USA",
"city": "New York",
"country": "USA",
"zipcode": "10001",
"map_url": "https://www.google.com/maps/search/?api=1&query=New+York",
"created_at": "Aug 11, 2020 02:12 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Location
Retrieves an existing location by given ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/location/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/location/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "New York",
"address": "New York, USA",
"city": "New York",
"country": "USA",
"zipcode": "10001",
"map_url": "https://www.google.com/maps/search/?api=1&query=New+York",
"created_by": 1,
"created_at": "2020-08-11 02:12:00"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Location
Updates an existing location's details using the provided ID.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/location/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"location_name\": \"New York\",
\"address\": \"New York, USA\",
\"city\": \"New York\",
\"country\": \"USA\",
\"zipcode\": \"10001\",
\"map_url\": \"https:\\/\\/www.google.com\\/maps\\/search\\/?api=1&query=New+York\"
}"
const url = new URL(
"https://demo.aomlms.com/api/location/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"location_name": "New York",
"address": "New York, USA",
"city": "New York",
"country": "USA",
"zipcode": "10001",
"map_url": "https:\/\/www.google.com\/maps\/search\/?api=1&query=New+York"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Location Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Location
To delete a location, you need to use this request. Returns number of location deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/location/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/location/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "3 location(s) deleted 2 location(s) not deleted as it is used in class(s). Please remove the location from the class(s) and try again.",
"deletedLocations": 3
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Location Lookup
Returns array of location data, containing location id and name.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/locations/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"search_term\": \"\\\"New York\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/locations/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"search_term": "\"New York\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "New York"
},
{
"value": 2,
"label": "Los Angeles"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Media
Endpoints for handling and managing upload/downloads static files, assets and media
Upload Media
Handles the media upload request via both chunked and non-chunked approach. The request is determined by the presence of file object in the request. If the request contains a file object, it is saved directly to s3-pending folder. If the request does not contain a file object, it is assumed to be a chunked upload request. The chunk is saved to local chunks folder and if it is the last chunk, it is combined and saved to s3-pending folder. The delete request is handled by deleting the chunks folder for the given deleteId.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media?patch=ut&deleteId=nobis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media"
);
const params = {
"patch": "ut",
"deleteId": "nobis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": null,
"uploadedMedia": {
"id": 3,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"created_at": "Aug 12, 2020 09:02 AM"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Media
Handles the media upload request via both chunked and non-chunked approach. The request is determined by the presence of file object in the request. If the request contains a file object, it is saved directly to s3-pending folder. If the request does not contain a file object, it is assumed to be a chunked upload request. The chunk is saved to local chunks folder and if it is the last chunk, it is combined and saved to s3-pending folder. The delete request is handled by deleting the chunks folder for the given deleteId.
Example request:
curl --request PATCH \
"https://demo.aomlms.com/api/media?patch=ullam&deleteId=sit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media"
);
const params = {
"patch": "ullam",
"deleteId": "sit",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": null,
"uploadedMedia": {
"id": 3,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"created_at": "Aug 12, 2020 09:02 AM"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Media
Handles the media upload request via both chunked and non-chunked approach. The request is determined by the presence of file object in the request. If the request contains a file object, it is saved directly to s3-pending folder. If the request does not contain a file object, it is assumed to be a chunked upload request. The chunk is saved to local chunks folder and if it is the last chunk, it is combined and saved to s3-pending folder. The delete request is handled by deleting the chunks folder for the given deleteId.
Example request:
curl --request DELETE \
"https://demo.aomlms.com/api/media?patch=quasi&deleteId=in" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media"
);
const params = {
"patch": "quasi",
"deleteId": "in",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": null,
"uploadedMedia": {
"id": 3,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"created_at": "Aug 12, 2020 09:02 AM"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the media in a tabular list format with pagination mode. You can apply filter using search_param via name(media name), file_type(file type).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22name%22%3A%22media+name%22%2C%22file_type%22%3A%22Images%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"name":"media name","file_type":"Images"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 4,
"records": [
{
"id": 4,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"created_at": "Aug 12, 2020 09:02 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Media
This API is used to delete the uploaded media from the storage. It will also delete the video files from MUX if the file type is Video.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media/delete?delete_ids=qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/delete"
);
const params = {
"delete_ids": "qui",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "2 media(s) deleted",
"errorMessage": "2 media(s) not deleted, Something went wrong! try again",
"fileNotDeleted": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Media Status
Returns the status of the uploaded media. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/status?id=error" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/status"
);
const params = {
"id": "error",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "Completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download Mux Video
This API is used to download the uploaded video from MUX service. If the master access is not enabled as temporary, this API will enable it. If the master access is already enabled as temporary, this API will return the download URL directly.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media/mux/download?mux_id=7K0103V01NFz01" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/mux/download"
);
const params = {
"mux_id": "7K0103V01NFz01",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "ready",
"downloadUrl": "https://stream.mux.com/7K0103V01NFz01?download=1&filename=example.mp4"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Video
This API is used to save the uploaded video media to the database. It takes videoGuid and fileName as input and returns the uploaded media.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media/saveVideo?videoGuid=d2c0faa3-9d15-49c4-ae11-9b2c9a5c0a7c&fileName=test.mp4&mimeType=video%2Fmp4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/saveVideo"
);
const params = {
"videoGuid": "d2c0faa3-9d15-49c4-ae11-9b2c9a5c0a7c",
"fileName": "test.mp4",
"mimeType": "video/mp4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": "Unable to upload the media. Please contact admin",
"uploadedMedia": {
"id": 4,
"file_name": "test.mp4",
"mime_type": "video/mp4",
"bunny_video_id": "d2c0faa3-9d15-49c4-ae11-9b2c9a5c0a7c",
"s3_url": "https://aom.b-cdn.net/d2c0faa3-9d15-49c4-ae11-9b2c9a5c0a7c/original",
"bunny_video_url": "https://aom.b-cdn.net/d2c0faa3-9d15-49c4-ae11-9b2c9a5c0a7c/playlist.m3u8",
"file_type": "Videos",
"status": "Processing",
"created_at": "2021-08-05T06:44:12.000000Z",
"updated_at": "2021-08-05T06:44:12.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get BunnyCDN Details
To get the BunnyCDN library id and api key, you need to use this request. It will return the BunnyCDN library id and api key based on the environment. If the request is from localhost, it will return the values from .env file. If the request is from production environment, it will return the values from database.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/bunnyDetails" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/bunnyDetails"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"libraryId": "a1b2c3d4-library-7890",
"apiKey": "9b7e4c08-3d2f-4a1c-86f2-1e4b2d8f1234"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Bunny Video Library
This function creates a new video library on Bunny.net. It sends a POST request to the Bunny API with the site title and replication regions. On successful creation, it updates the local configuration with the new library ID, API key, and pull zone ID. It also fetches the pull zone name and updates the meta information accordingly.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/createBunnyVideoLibrary" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/createBunnyVideoLibrary"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (201):
{
"is_success": true,
"bunny_library_id": "123456",
"bunny_api_key": "9b7e4c08-3d2f-4a1c-86f2-1e4b2d8f1234"
}
Example response (500):
{
"is_success": false,
"message": "Error message"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Memberships
Memberships are used to provide content access to users. Helps in providing course and standalone modules access to learners
Lookup memberships
Retrieves the memberships matching the search term provided in the request. If the portalId is provided, it will fetch memberships which are attached to the portal.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/memberships/lookup?search_term=membership+1&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/memberships/lookup"
);
const params = {
"search_term": "membership 1",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "membership 1"
},
{
"id": 2,
"name": "membership 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Memberships in a Tabular List
Returns a paginated list of memberships in a tabular format with optional filters and sorting.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/memberships/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22name%22%3A%22Basic+Membership%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/memberships/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"name":"Basic Membership"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 100,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Basic Membership",
"expired_at": "2023-12-31 23:59:59",
"author": "Admin",
"created_at": "2023-01-01 00:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a membership by ID
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/membership/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/membership/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Gold-membership",
"courseAccess": "all",
"moduleAccess": "all",
"expired_at": "2021-10-03 23:59:59",
"courseAccessCategories": [
1,
2
],
"moduleAccessCategories": [
5,
19
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new membership
Creates a new membership with course and module access rules.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/membership" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Gold-membership\",
\"courseAccess\": \"all\",
\"moduleAccess\": \"all\",
\"courseAccessCategories\": [
1,
2
],
\"moduleAccessCategories\": [
5,
19
],
\"expired_at\": \"\'2021-10-03 23:59:59\'\"
}"
const url = new URL(
"https://demo.aomlms.com/api/membership"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Gold-membership",
"courseAccess": "all",
"moduleAccess": "all",
"courseAccessCategories": [
1,
2
],
"moduleAccessCategories": [
5,
19
],
"expired_at": "'2021-10-03 23:59:59'"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Membership created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Membership
Updates the details of a specified membership. (See Parameters) Membership is being used as to couple courses and standalone modules for students to launch and view.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/membership/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Gold-membership\",
\"courseAccess\": \"all\",
\"moduleAccess\": \"all\",
\"courseAccessCategories\": [
1,
2
],
\"moduleAccessCategories\": [
5,
19
],
\"expired_at\": \"\'2021-10-03 23:59:59\'\"
}"
const url = new URL(
"https://demo.aomlms.com/api/membership/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Gold-membership",
"courseAccess": "all",
"moduleAccess": "all",
"courseAccessCategories": [
1,
2
],
"moduleAccessCategories": [
5,
19
],
"expired_at": "'2021-10-03 23:59:59'"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Membership created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified membership. Parameters is provided which needs to be updated.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/membership/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"membership_ids\": [
3,
2
],
\"expired_at\": \"2021-01-11 23:45:00\"
}"
const url = new URL(
"https://demo.aomlms.com/api/membership/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"membership_ids": [
3,
2
],
"expired_at": "2021-01-11 23:45:00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Memberships updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Menus
Menus are used as front end module for this platform. Endpoints for managing menus on marketing front end pages
Retrieve all the menus with all its associated items
Get all the items associated with this menu
Save or update menu items.
This endpoint accepts a list of menus with their associated items, deletes existing items, and inserts the new items accordingly.
Modules
A module is a lesson that you add as course content. Modules could be Text, Video, PDF, SCORM, Quiz, Assignments or Survey. Helps in performing CRUD operation to and for modules.
Create Blank Module
Handles the creation of a blank module with the provided name and type. Validates the request data and saves a new module record in the database. Sets the created_by and updated_by fields to the ID of the authenticated user. Returns the ID and icon of the created module in JSON format.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/addBlank" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Introduction\",
\"type\": \"text\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/addBlank"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Introduction",
"type": "text"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"id": 1,
"icon": "<i class=\"el-icon-document\"></i>"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Modules Lookup
Retrieves all the modules. Helps while showing modules names in form elements like dropdown. You can apply filters using search_term parameter. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/lookup?search_term=Introduction" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/lookup"
);
const params = {
"search_term": "Introduction",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Introduction",
"type": "text",
"icon": "<i class=\"el-icon-document\"></i>",
"value": 1,
"label": "Introduction"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Pending Module Submissions
Returns the total number of pending module submissions (status = "Submitted") across all courses. Also returns a breakdown of pending submissions grouped by course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/pendingsubmissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pendingsubmissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalPending": 25,
"data": [
{
"id": 1,
"name": "Leadership Training",
"featured_image_url": "https://example.com/images/course1.jpg",
"totalSubmission": 10
},
{
"id": 2,
"name": "Compliance Basics",
"featured_image_url": "https://example.com/images/course2.jpg",
"totalSubmission": 15
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Module Types Lookup
Retrieves all the types of modules supported by the platform. Useful for displaying options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "text",
"display_value": "Text"
},
{
"db_value": "video",
"display_value": "Video"
},
{
"db_value": "pdf",
"display_value": "PDF"
},
{
"db_value": "powerpoint",
"display_value": "Powerpoint"
},
{
"db_value": "flashcards",
"display_value": "Flash Cards"
},
{
"db_value": "scorm",
"display_value": "SCORM/xAPI"
},
{
"db_value": "quiz",
"display_value": "Quiz"
},
{
"db_value": "assignment",
"display_value": "Assignment"
},
{
"db_value": "discussion",
"display_value": "Discussion"
},
{
"db_value": "survey",
"display_value": "Survey"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Form Field Types Lookup
Retrieves all the types of form fields that are supported for surveys. Useful for displaying options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/fieldtype/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/fieldtype/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "text",
"display_value": "Survey Text"
},
{
"db_value": "textarea",
"display_value": "Text Area"
},
{
"db_value": "rating",
"display_value": "Rating"
},
{
"db_value": "radio",
"display_value": "Single Select"
},
{
"db_value": "checkbox",
"display_value": "Multiple Select"
},
{
"db_value": "dropdown",
"display_value": "Drop Down"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Modules Tabular List
Retrieves all the modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Home Page",
"slug": "home-page",
"type": "text",
"icon": "<i class=\"el-icon-document\"></i>",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit Modules
This endpoint allows bulk updating of modules and their related details based on the provided module type.
It updates fields like created_by
, updated_by
, no_of_retakes_allowed
, and minimum_percentage
for the selected modules.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"module_ids\": [
1,
2,
3
],
\"type\": \"quiz\",
\"author_id\": 5,
\"noOfRetakesAllowed\": 3,
\"minimumPassingMarks\": 60
}"
const url = new URL(
"https://demo.aomlms.com/api/module/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"module_ids": [
1,
2,
3
],
"type": "quiz",
"author_id": 5,
"noOfRetakesAllowed": 3,
"minimumPassingMarks": 60
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Modules updated Successfully"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"module_ids": [
"Please select at least one module"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes the specified modules.
This function is responsible for deleting the selected modules. The request should contain the IDs of the modules to be deleted.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
2
],
\"type\": \"quiz\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
2
],
"type": "quiz"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
"message" => "2 module(s) deleted. 1 module(s) not deleted as it is used in course(s). Please remove the modules from the course and try again.",
"deletedModules" => [1,2],
"notDeletedModules" => [3],
"usedInCourses" => [
"module1" => [
[
"id" => 1,
"name" => "Course1"
]
],
"module2" => [
[
"id" => 2,
"name" => "Course2"
]
]
]
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone a module.
Clones the module with its corresponding details and mappings. The newly generated cloned module will help to let you change the content of the module with or without letting affect the real module.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"moduleId\": 1,
\"isDeepCopy\": false
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"moduleId": 1,
"isDeepCopy": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quiz Lookup
Retrieves all the quiz modules. Helps while showing quiz names in form elements like dropdown. You can apply filters using search_term parameter. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/lookup?search_term=Final+quiz" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/lookup"
);
const params = {
"search_term": "Final quiz",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "First-quiz"
},
{
"value": 2,
"label": "Quiz-2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PDFs
A PDF Module is a lesson module used as course content. Helps to perform CRUD operation to and for PDF modules.
PDF Modules Tabular List
Returns all the PDF modules in a tabular list format in paginated mode. You can apply filter using search_param via moduleTypes(module type), associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/pdf?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22moduleTypes%22%3A+%5B%22pdf%22%5D%2CassociatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"moduleTypes": ["pdf"],associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "JavaScript Basics",
"slug": "javascript-basics",
"type": "pdf",
"icon": "<i class=\"el-icon-document\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM",
"course_count": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create PDF Module
Creates a new pdf module. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/pdf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\\/view?usp=sharing\",
\"trackCompletion\": true,
\"allowDownload\": true,
\"defaultZoom\": \"75%\",
\"showSidebar\": true,
\"categories\": [
1,
2,
3
],
\"estimatedCompletion\": \"00:30:00\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"content": "<p>This is the updated short content here<\/p>",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\/view?usp=sharing",
"trackCompletion": true,
"allowDownload": true,
"defaultZoom": "75%",
"showSidebar": true,
"categories": [
1,
2,
3
],
"estimatedCompletion": "00:30:00",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get PDF Module
Retrieves the details of the specified pdf module. Helps in fetching pdf module using module ID. (See Parameters) Returns : id, name, slug, content, url, allowDownload, trackCompletion, estimatedCompletion, estimationCompletedUnit, defaultZoom, showSidebar and categories of the pdf module created.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/pdf/6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf/6"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 6,
"name": "Getting Started",
"slug": "getting-started",
"content": " ",
"url": "https://drive.google.com/file/d/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw/view?usp=sharing",
"allowDownload": true,
"trackCompletion": true,
"estimatedCompletion": null,
"estimationCompletedUnit": null,
"defaultZoom": "page_width",
"showSidebar": true,
"categories": [
1,
2,
3
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update PDF Module
Updates the details of a specified PDF module. (See parameters) PDF modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/pdf/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\\/view?usp=sharing\",
\"trackCompletion\": true,
\"allowDownload\": true,
\"defaultZoom\": \"75%\",
\"showSidebar\": true,
\"categories\": [
1,
2,
3
],
\"estimatedCompletion\": \"00:30:00\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"content": "<p>This is the updated short content here<\/p>",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\/view?usp=sharing",
"trackCompletion": true,
"allowDownload": true,
"defaultZoom": "75%",
"showSidebar": true,
"categories": [
1,
2,
3
],
"estimatedCompletion": "00:30:00",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get PDF Module Details
To get the details of a pdf module, you need to use this request. (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/pdf/details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/pdf/details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First PDF",
"slug": "first-pdf",
"content": "A brief description",
"courseName": "First Course",
"courseSlug": "http://localhost:8000/courses/1/launch",
"url": "http://localhost:8000/courses/1/modules/2/launch",
"totalPoints": 20,
"shouldBeEvaluated": true,
"min_time_spent": 90,
"otherModules": [],
"launchCheck": {},
"prevSlug": "first-video",
"nextSlug": "second-video",
"currentUserId": 1,
"currentStudentAvatar": "http://localhost:8000/storage/avatars/1.png",
"currentUserName": "John Doe",
"status": "In Progress",
"statusRowId": 1,
"timeSpent": 0,
"course_newly_completed": false,
"timeToBeSpent": 1,
"instructorResponse": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed PDF module Info for Membership content
Retrieves details of pdf module in depth for the same membership the current pdf module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/pdf/content-details?moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/pdf/content-details"
);
const params = {
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Getting Started",
"slug": "getting-started",
"content": " ",
"url": "https://drive.google.com/file/d/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw/view?usp=sharing",
"canDownload": true,
"trackCompletion": true,
"defaultZoom": "page_width",
"showSidebar": true,
"timeSpent": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pages
Pages are Front end Marketing visuals. Page can be viewed by the different users to interact with this platform. Endpoint helps in managing pages.
Retrieve Page Layouts
Retrieves all the available page layouts in list format. Returns the list in JSON format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/layouts?context=sequi&search[title]=My+Layout&search[category][]=category+1&search[category][]=category+2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/layouts"
);
const params = {
"context": "sequi",
"search[title]": "My Layout",
"search[category][0]": "category 1",
"search[category][1]": "category 2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Layout 1",
"thumbnail": "https://example.com/layout1.jpg",
"type": "predefined",
"category": "category 1",
"data": "<div>Layout 1 HTML</div>",
"portal_id": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Page Snippets
Retrieves all the available page snippets in list format. Returns the list in JSON format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/snippets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/snippets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"identifier1": {
"name": "Snippet 1",
"html": "<div>Snippet 1 HTML</div>"
},
"identifier2": {
"name": "Snippet 2",
"html": "<div>Snippet 2 HTML</div>"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Page
Returns Page details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/page/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/page/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"title": "Home Page",
"slug": "",
"content": [],
"layout": "full_width",
"seo_title": "",
"seo_description": "",
"seo_thumbnail_url": "",
"restrictedToLoginUser": false,
"accessibleBy": "all",
"metas": [],
"userCategory": [],
"userType": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Contact form response
The request helps in sending contact form responses to the admins and instructors of the platform. Generally this form is filled and sent by the learners to enquire something regarding your product, course or the platform.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/contact-form" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"email\": \"[email protected]\",
\"phoneNo\": \"1234567890\",
\"content\": \"Question about your course?\",
\"toEmail\": \"[email protected]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/contact-form"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"phoneNo": "1234567890",
"content": "Question about your course?",
"toEmail": "[email protected]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Mail sent successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the pages in a tabular list format in paginated mode. You can apply filter using search_param via pageName(page name).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=0&type=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "0",
"type": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"title": "Home Page",
"slug": "home-page",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Page Layout
Saves a new page layout. This endpoint is being used by users to save their created page layouts.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/layouts" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"ea\",
\"context\": \"earum\",
\"data\": \"consequatur\",
\"portalId\": 8
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/layouts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "ea",
"context": "earum",
"data": "consequatur",
"portalId": 8
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Layout saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dropdown List
Retrieves a list of pages with their ID and title. Returns the list in JSON format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/dropdownlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/dropdownlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Page 1"
},
{
"id": 2,
"title": "Page 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the learner's dashboard menu and accessible pages.
This function retrieves the list of menu items for a general user and fetches pages that are accessible based on restrictions (either globally or for a specific user type).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/getlearnerDasboardList" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/getlearnerDasboardList"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"pages": [
{
"id": 1,
"title": "Home"
},
{
"id": 2,
"title": "Profile"
}
],
"menus": [
{
"id": 1,
"name": "Dashboard",
"slug": "dashboard"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Timezone List
Retrieves all the available PHP timezones in list format. Returns the list in JSON format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/timezoneList" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/timezoneList"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
["Africa/Abidjan", "Africa/Accra", ..]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Layout Lookup
Retrieves a list of available page layouts in key-value pairs. The 'db_value' represents the layout identifier used in the database, and the 'display_value' provides the user-friendly name for each layout. Returns the list in JSON format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/layout/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/layout/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "full_width",
"display_value": "Full Width"
},
{
"db_value": "fixed_width",
"display_value": "Fixed width with left/right margin gaps"
},
{
"db_value": "no_header",
"display_value": "No Header/Menus/Footer"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page Restriction Lookup
Retrieves all the available page restrictions in key-value pairs. The 'db_value' represents the restriction identifier used in the database, and the 'display_value' provides the user-friendly name for each restriction. Returns the list in JSON format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/restriction/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/restriction/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "all",
"display_value": "No Restriction"
},
{
"db_value": "user_category",
"display_value": "Restrict by User Categories"
},
{
"db_value": "user_type",
"display_value": "Restrict by User Types"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page Category Lookup
Retrieves all the page categories. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/categories/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/categories/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "call_to_action",
"display_value": "Call to Action"
},
{
"db_value": "faq",
"display_value": "FAQs"
},
{
"db_value": "features",
"display_value": "Features"
},
{
"db_value": "pages",
"display_value": "Pages "
},
{
"db_value": "products",
"display_value": "Products "
},
{
"db_value": "team",
"display_value": "Team"
},
{
"db_value": "testimonial",
"display_value": "Testimonial"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save a new Page
Creates a new page associated with given portal. Saves the page restrictions. Returns the ID of the newly created page.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Home Page\",
\"content\": \"[{\\\"type\\\": \\\"text\\\", \\\"text\\\": \\\"<p>This is a sample page.<\\/p>\\\"}]\",
\"layout\": \"full_width\",
\"seo_title\": \"null\",
\"seo_description\": \"null\",
\"seo_thumbnail_url\": \"null\",
\"restrictedToLoginUser\": true,
\"accessibleBy\": \"user_category\",
\"userCategory\": [
\"Student\",
\"Teacher\"
],
\"userType\": [
\"Student\",
\"Teacher\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Home Page",
"content": "[{\"type\": \"text\", \"text\": \"<p>This is a sample page.<\/p>\"}]",
"layout": "full_width",
"seo_title": "null",
"seo_description": "null",
"seo_thumbnail_url": "null",
"restrictedToLoginUser": true,
"accessibleBy": "user_category",
"userCategory": [
"Student",
"Teacher"
],
"userType": [
"Student",
"Teacher"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Page saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Soft Delete Page
To delete a page, you need to use this request. The pages will not be deleted permanently, it will be in draft mode. You can restore the page later. Returns page drafted(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Page moved to draft successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hard Delete Page
To delete a page, you need to use this request. The pages will be deleted permanently. In this case, you cannot restore the page after hard delete. Returns page deleted(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/harddelete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/harddelete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Pages deleted permanently"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Restore Page
To restore a page, you need to use this request. The pages will be restored from draft mode to published mode. Returns page restored(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/restore" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/restore"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Page restored successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Page Slug
Updates the slug of the page identified by 'id' with the new slug provided. The new slug is checked for uniqueness and if it already exists, a new slug is generated by appending a counter to the slug. The updated slug is then saved to the page. Returns the updated slug.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/page/update-slug/3?slug=%22about-us%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/page/update-slug/3"
);
const params = {
"slug": ""about-us"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
"about-us-1"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Page
Updates the specified page with new data including title, content, layout, SEO information, and access restrictions. The function accepts the page ID and a request object containing the new data. Validates the request data before updating the page. If the page is restricted to logged-in users, it validates the access permissions and updates user categories or types accordingly.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/page/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Home Page\",
\"content\": \"[{\\\"type\\\": \\\"text\\\", \\\"text\\\": \\\"<p>This is a sample page.<\\/p>\\\"}]\",
\"layout\": \"full_width\",
\"seo_title\": \"null\",
\"seo_description\": \"null\",
\"seo_thumbnail_url\": \"null\",
\"restrictedToLoginUser\": true,
\"accessibleBy\": \"user_category\",
\"userCategory\": [
\"Student\",
\"Teacher\"
],
\"userType\": [
\"Student\",
\"Teacher\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/page/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Home Page",
"content": "[{\"type\": \"text\", \"text\": \"<p>This is a sample page.<\/p>\"}]",
"layout": "full_width",
"seo_title": "null",
"seo_description": "null",
"seo_thumbnail_url": "null",
"restrictedToLoginUser": true,
"accessibleBy": "user_category",
"userCategory": [
"Student",
"Teacher"
],
"userType": [
"Student",
"Teacher"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Page updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Animation Lookup
Retrieves all the animation classes supported by animate.css
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/getAnimationLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/getAnimationLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"label": "bounce",
"value": "animate__animated animate__bounce"
},
{
"label": "flash",
"value": "animate__animated animate__flash"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Portal
The Portal API controller handles various operations related to the portal's functionality.
All endpoints within this controller are responsible for providing and managing data related to the portal's core operations.
Create a new portal.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalName\": \"\\\"EduPortal\\\"\",
\"portalSlug\": \"\\\"eduportal\\\"\",
\"totalSeat\": \"100\",
\"expiryDate\": \"\\\"2023-12-31\\\"\",
\"expiryMessage\": \"\\\"This portal has expired.\\\"\",
\"accessPermission\": \"\\\"all\\\"\",
\"seatAccess\": \"\\\"first-come-first-served\\\"\",
\"logoImageUrl\": \"\\\"https:\\/\\/example.com\\/logo.png\\\"\",
\"miniLogoImageUrl\": \"\\\"https:\\/\\/example.com\\/mini-logo.png\\\"\",
\"brandColor\": \"\\\"#3498db\\\"\",
\"bodyBackgroundColor\": \"\\\"#ffffff\\\"\",
\"bodyTextColor\": \"\\\"#333333\\\"\",
\"headerBackgroundColor\": \"\\\"#2c3e50\\\"\",
\"selectedPrimaryLanguage\": \"\\\"en\\\"\",
\"isActive\": \"true\",
\"selectedCourses\": \"[1, 2, 3]\",
\"selectedMembership\": \"1\",
\"enrollMembershipId\": \"2\",
\"isPortalAdminLearner\": \"false\",
\"portalAdminType\": \"\\\"super-admin\\\"\",
\"addExistingUser\": \"[3, 4, 5]\",
\"selectedUsers\": \"[1, 2]\",
\"selectedCategoriesIds\": \"[10, 11]\",
\"enrollCoursesIds\": \"[101, 102]\",
\"enrollLearningPathIds\": \"[201, 202]\",
\"learnerDashboard\": \"10\",
\"customStyle\": \"\\\".portal-header { background-color: #333; }\\\"\",
\"customFont\": \"\\\"Arial, sans-serif\\\"\",
\"customCode\": \"\\\"<script>console.log(\'Hello World\');<\\/script>\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalName": "\"EduPortal\"",
"portalSlug": "\"eduportal\"",
"totalSeat": "100",
"expiryDate": "\"2023-12-31\"",
"expiryMessage": "\"This portal has expired.\"",
"accessPermission": "\"all\"",
"seatAccess": "\"first-come-first-served\"",
"logoImageUrl": "\"https:\/\/example.com\/logo.png\"",
"miniLogoImageUrl": "\"https:\/\/example.com\/mini-logo.png\"",
"brandColor": "\"#3498db\"",
"bodyBackgroundColor": "\"#ffffff\"",
"bodyTextColor": "\"#333333\"",
"headerBackgroundColor": "\"#2c3e50\"",
"selectedPrimaryLanguage": "\"en\"",
"isActive": "true",
"selectedCourses": "[1, 2, 3]",
"selectedMembership": "1",
"enrollMembershipId": "2",
"isPortalAdminLearner": "false",
"portalAdminType": "\"super-admin\"",
"addExistingUser": "[3, 4, 5]",
"selectedUsers": "[1, 2]",
"selectedCategoriesIds": "[10, 11]",
"enrollCoursesIds": "[101, 102]",
"enrollLearningPathIds": "[201, 202]",
"learnerDashboard": "10",
"customStyle": "\".portal-header { background-color: #333; }\"",
"customFont": "\"Arial, sans-serif\"",
"customCode": "\"<script>console.log('Hello World');<\/script>\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Portal created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns a list of courses for a given portal
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/courses?portalId=1&page_size=10&page_number=1&order_by[column]=name&order_by[direction]=asc&search_param[name]=John+Doe&search_param[type]=assignment&search_param[status]=Submitted" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/courses"
);
const params = {
"portalId": "1",
"page_size": "10",
"page_number": "1",
"order_by[column]": "name",
"order_by[direction]": "asc",
"search_param[name]": "John Doe",
"search_param[type]": "assignment",
"search_param[status]": "Submitted",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"portalName": "portal name",
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"courseId": 1,
"portalId": 1,
"name": "course name",
"courseImage": "http://localhost:8000/storage/courses/1/featured_image.jpg",
"last24hCount": 5,
"stats": {
"notStarted": 5,
"inProgress": 0,
"completed": 0,
"total": 5
}
},
{
"id": 2,
"courseId": 2,
"portalId": 2,
"name": "course name",
"courseImage": "http://localhost:8000/storage/courses/2/featured_image.jpg",
"last24hCount": 0,
"stats": {
"notStarted": 0,
"inProgress": 0,
"completed": 0,
"total": 0
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path List
Retrieves learning paths associated with the portal.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/learningPaths?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22learningPathName%22%3A+%22Learning+Path+1%22%7D&type=all+or+active" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/learningPaths"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "desc"}",
"search_param": "{"learningPathName": "Learning Path 1"}",
"type": "all or active",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"portalName": "Portal 1",
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"learningPathId": 1,
"learningPathName": "Learning Path 1",
"learningPathImage": "http://example.com/learning-path-image.jpg",
"last24hCount": 5,
"learningPathStatistics": {
"notStarted": 3,
"inProgress": 2,
"completed": 5
}
},
{
"learningPathId": 2,
"learningPathName": "Learning Path 2",
"learningPathImage": "http://example.com/learning-path-image.jpg",
"last24hCount": 2,
"learningPathStatistics": {
"notStarted": 1,
"inProgress": 1,
"completed": 0
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve portal admin permissions.
Fetches a list of permissions available for portal administrators.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal-permissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal-permissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Manage Users"
},
{
"id": 2,
"name": "Edit Content"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves a paginated and filtered list of users for a given portal, including their enrollment statistics.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/users?page_size=10&page_number=1&order_by[colName]=firstName&order_by[direction]=asc&search_param[nameOrEmail]=John+Doe&portalId=5&userType=%22portal_admin%22&isInPortal=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by[colName]": "firstName",
"order_by[direction]": "asc",
"search_param[nameOrEmail]": "John Doe",
"portalId": "5",
"userType": ""portal_admin"",
"isInPortal": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"portalName": "Portal Name",
"recordsTotal": 100,
"recordsFiltered": 10,
"recordIdsFiltered": [
1,
2,
3
],
"records": [
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"userType": "learner",
"email": "[email protected]",
"avatar": "https://example.com/avatar.jpg",
"stats": {
"notStarted": 2,
"inProgress": 3,
"completed": 5,
"total": 10
},
"status": "active",
"lastLogin": "2 days ago",
"createdBy": "Admin User",
"createdAt": "2023-10-01 12:00:00",
"portals": "Portal 1, Portal 2",
"portalNameForAdmins": "Main Portal",
"portalUserType": "portal_admin",
"is_learner": true,
"userCategory": "Category1, Category2",
"permissionsDisplayNames": "View, Edit",
"permissionsNames": [
"view",
"edit"
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get courses for a given membership
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/membership/courses/1?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%22courseName%22%3A+%22Course+1%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/membership/courses/1"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "{"courseName": "Course 1"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Course 1",
"slug": "course-1",
"status": "active",
"display_status": "Active",
"categories": "Category 1",
"author": "John Doe",
"created_at": "05 Jun 2020 12:00 PM",
"stats": {
"total_enrolled": 5,
"total_completed": 2
},
"last24hCount": 2
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get modules for a given membership
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/membership/modules/1?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%22moduleName%22%3A+%22Module+1%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/membership/modules/1"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "{"moduleName": "Module 1"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Module 1",
"type": "assignment"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Page
Retrieves the details of a specified portal page by its ID. Returns the page's id, title, slug, content, and layout if found, otherwise returns an empty response.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/page/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/page/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"title": "About Us",
"slug": "about-us",
"content": "<p>Welcome to our page</p>",
"layout": "full_width"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Page
Updates an existing page associated with given portal.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/portal/page/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Home Page\",
\"content\": \"[{\\\"type\\\": \\\"text\\\", \\\"text\\\": \\\"<p>This is a sample page.<\\/p>\\\"}]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/page/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Home Page",
"content": "[{\"type\": \"text\", \"text\": \"<p>This is a sample page.<\/p>\"}]"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Page updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get pages for a given portal
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/pages/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=0&type=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "0",
"type": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"title": "Home Page",
"slug": "home-page",
"content": "This is the home page content",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save a new Portal Page
Validates and saves a new portal page with the provided title, content, and portal ID. The page is associated with the user creating it. Returns the ID of the newly created portal page along with a success message.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/pages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"\\\"Welcome Page\\\"\",
\"content\": [
{
\"type\": \"text\",
\"text\": \"<p>Welcome to our portal.<\\/p>\"
}
],
\"portalId\": 123
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "\"Welcome Page\"",
"content": [
{
"type": "text",
"text": "<p>Welcome to our portal.<\/p>"
}
],
"portalId": 123
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Page saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Soft Delete Page
To delete a page, you need to use this request. The pages will not be deleted permanently, it will be in draft mode. You can restore the page later. Returns page drafted(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/page/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/page/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Page moved to draft successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hard Delete Page
Permanently deletes pages specified by the provided page IDs. Once deleted, these pages cannot be restored. Logs the activity for each deleted page.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/pages/harddelete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages/harddelete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Pages deleted permanently"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Restore Page
Restores the pages from draft mode to published mode. Logs the activity for each restored page.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/pages/restore" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages/restore"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Page restored successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Portal Course Catalog
Returns the list of available courses (and learning paths, if any) for a given portal and user. Allows optional filtering by course name and course category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/getPortalCourseCatalog" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 12,
\"userId\": 45,
\"search\": {
\"contentName\": \"\\\"Leadership\\\"\",
\"courseCategoryIds\": [
1,
2,
3
]
}
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/getPortalCourseCatalog"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 12,
"userId": 45,
"search": {
"contentName": "\"Leadership\"",
"courseCategoryIds": [
1,
2,
3
]
}
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"courses": [
{
"courseId": 101,
"contentName": "Effective Communication",
"featureImage": "https://example.com/images/comm.jpg",
"isEnrolled": true,
"launchUrl": "yourportal/course/effective-communication/launch",
"categoryIds": [
2,
3
]
}
],
"learningPaths": [],
"categoryIds": [
2,
3
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the portal settings
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/getPortalCustomDomainSettings?domain=%27example.com%27" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/getPortalCustomDomainSettings"
);
const params = {
"domain": "'example.com'",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"portalCustomDomainEnabled": "yes|no",
"verifiedDomain": "yes|no",
"ipAddress": "127.0.0.1",
"enabledCustomDomain": "yes|no"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enable or disable custom domain for portals
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/enableCustomDomain" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"isEnabled\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/enableCustomDomain"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"isEnabled": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Portal Settings Updated Successfully."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Verify the custom domain for portals
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/verifyDomain?string=id" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/verifyDomain"
);
const params = {
"string": "id",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Domain Verified Successfully."
}
Example response (404):
{
"is_success": false,
"message": "Domain Verify Unsuccessfully."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add Portal Admins
Adds new or existing users as portal admins to the specified portal. This method handles:
- Creating new users and assigning them admin roles.
- Assigning existing users as admins.
- Seat validation (restricted vs. unrestricted).
- Permission assignment for admins.
- Learner seat allocation sync with parent or current portal.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/addPortalAdmins" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 12,
\"portalAdmins\": [
\"molestiae\"
],
\"portalAdminPermissions\": [
\"can_manage_courses\",
\"can_edit_settings\"
],
\"isPortalAdminLearner\": true,
\"selectedExUsers\": [
3,
4,
5
],
\"portalAdminType\": \"newPortalAdmin\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/addPortalAdmins"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 12,
"portalAdmins": [
"molestiae"
],
"portalAdminPermissions": [
"can_manage_courses",
"can_edit_settings"
],
"isPortalAdminLearner": true,
"selectedExUsers": [
3,
4,
5
],
"portalAdminType": "newPortalAdmin"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Portal Admin added successfully"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"availableSeats": [
"The learner limit is reached. You can add only 2 learners."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add learners to a portal.
This endpoint allows adding new learners to a portal either manually, via bulk import, or by selecting existing users. It also supports enrolling learners in courses, learning paths, and memberships, with proper seat availability validation and email domain blocking.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/addPortalLearners" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 12,
\"learners\": [
\"rerum\"
],
\"selectedCategoriesIds\": [
1,
2
],
\"enrollCoursesIds\": [
101,
102
],
\"enrollLearningPathIds\": [
201,
202
],
\"enrollMembershipId\": 301,
\"selectExistingUsers\": [
5,
9
],
\"userAddedType\": \"addManually\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/addPortalLearners"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 12,
"learners": [
"rerum"
],
"selectedCategoriesIds": [
1,
2
],
"enrollCoursesIds": [
101,
102
],
"enrollLearningPathIds": [
201,
202
],
"enrollMembershipId": 301,
"selectExistingUsers": [
5,
9
],
"userAddedType": "addManually"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"blockedEmailDomainsmessage": "Email or domain is blocked for user with email [email protected]. Please contact Admin.",
"blockedEmails": [
"[email protected]"
]
}
Example response (201):
{
"message": "Learner added successfully"
}
Example response (422):
{
"availableSeats": "The learner limit is reached. You can add only 0 new learners."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the permissions of a portal admin
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/updatePermissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalAdminPermissions\": [
\"ipsa\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/updatePermissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalAdminPermissions": [
"ipsa"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Permissions updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Removes users from a given portal and its sub-portals based on the given user IDs and type.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/remove" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userIds\": [
\"totam\"
],
\"portalId\": 5,
\"type\": \"dolore\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/remove"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userIds": [
"totam"
],
"portalId": 5,
"type": "dolore"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Portal user removed successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the status of a portal user
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/update-status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userIds\": [
\"repellat\"
],
\"status\": \"est\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/update-status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userIds": [
"repellat"
],
"status": "est"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Portal user status updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get detailed portal information.
This endpoint retrieves detailed information about a specific portal, including branding, configuration settings, seat usage, sub-portals, and selected content (courses, paths, memberships).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/{portalId}?portalId=42" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/{portalId}"
);
const params = {
"portalId": "42",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 42,
"portalName": "My Portal",
"portalSlug": "my-portal",
"parentPortalId": null,
"referralCode": "ABCD1234",
"seatAccess": "limited",
"accessPermission": "invite_only",
"expiryMessage": "Your access has expired.",
"totalSeats": 100,
"totalSeatAccess": 100,
"expiryDate": "30-Dec-2025",
"logoImageUrl": "https://cdn.example.com/logo.png",
"miniLogoImageUrl": "https://cdn.example.com/mini-logo.png",
"brandColor": "#FF5733",
"bodyBackgroundColor": "#ffffff",
"bodyTextColor": "#000000",
"headerBackgroundColor": "#f5f5f5",
"selectedPrimaryLanguage": "en",
"customStyle": ".custom { color: red; }",
"customFont": "Roboto",
"customCode": "<script>console.log('custom');</script>",
"isActive": true,
"totalPortalAdmins": 5,
"totalLearner": 120,
"usedSeats": 80,
"availableSeats": 20,
"subPortalCount": 2,
"parentPortalSlug": null,
"parentPortalName": null,
"allowedEmails": [
"[email protected]"
],
"portalCustomDomainEnabled": true,
"publicSelectedCourses": [
101,
102
],
"privateSelectedCourses": [
201,
202
],
"selectedPublicLearningPaths": [
301,
302
],
"selectedPublicLearningPathNames": [
"Beginner Path",
"Intermediate Path"
],
"selectedPrivateLearningPaths": [
401
],
"selectedPrivateLearningPathNames": [
"Advanced Path"
],
"selectedPrivateMembership": 501,
"selectedPrivateMembershipName": "Gold Membership",
"selectedContent": {
"publicCourseIds": [
101,
102
],
"privateCourseIds": [
201,
202
],
"publicLearningPathIds": [
301,
302
],
"publicLearningPathNames": [
"Beginner Path",
"Intermediate Path"
],
"privateLearningPathIds": [
401
],
"privateLearningPathNames": [
"Advanced Path"
],
"privateMembershipId": 501,
"privateMembershipName": "Gold Membership"
},
"learnerDashboard": "dashboard"
}
Example response (404):
{
"message": "Portal not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a portal
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/portal/{portalId}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalName\": \"et\",
\"portalSlug\": \"libero\",
\"totalSeatAccess\": \"veniam\",
\"expiryDate\": \"officia\",
\"expiryMessage\": \"nostrum\",
\"accessPermission\": \"ea\",
\"seatAccess\": \"sed\",
\"logoImageUrl\": \"http:\\/\\/www.halvorson.org\\/laudantium-odit-sit-quas-sed-occaecati-provident\",
\"miniLogoImageUrl\": \"http:\\/\\/www.towne.com\\/voluptatem-quibusdam-reprehenderit-aut-minus-sint-et.html\",
\"brandColor\": \"quo\",
\"bodyBackgroundColor\": \"vero\",
\"bodyTextColor\": \"sit\",
\"headerBackgroundColor\": \"perspiciatis\",
\"selectedPrimaryLanguage\": \"delectus\",
\"isActive\": \"illo\",
\"publicSelectedCourses\": \"est\",
\"privateSelectedCourses\": \"iste\",
\"selectedPublicLearningPaths\": \"alias\",
\"selectedPrivateLearningPaths\": \"numquam\",
\"selectedPrivateMembership\": \"nam\",
\"customStyle\": \"maiores\",
\"customFont\": \"natus\",
\"customCode\": \"laboriosam\",
\"allowedEmails\": \"architecto\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/{portalId}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalName": "et",
"portalSlug": "libero",
"totalSeatAccess": "veniam",
"expiryDate": "officia",
"expiryMessage": "nostrum",
"accessPermission": "ea",
"seatAccess": "sed",
"logoImageUrl": "http:\/\/www.halvorson.org\/laudantium-odit-sit-quas-sed-occaecati-provident",
"miniLogoImageUrl": "http:\/\/www.towne.com\/voluptatem-quibusdam-reprehenderit-aut-minus-sint-et.html",
"brandColor": "quo",
"bodyBackgroundColor": "vero",
"bodyTextColor": "sit",
"headerBackgroundColor": "perspiciatis",
"selectedPrimaryLanguage": "delectus",
"isActive": "illo",
"publicSelectedCourses": "est",
"privateSelectedCourses": "iste",
"selectedPublicLearningPaths": "alias",
"selectedPrivateLearningPaths": "numquam",
"selectedPrivateMembership": "nam",
"customStyle": "maiores",
"customFont": "natus",
"customCode": "laboriosam",
"allowedEmails": "architecto"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Portal updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the branding settings of a portal
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/updateBranding" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"logoImageUrl\": \"https:\\/\\/example.com\\/logo.png\",
\"miniLogoImageUrl\": \"https:\\/\\/example.com\\/mini-logo.png\",
\"brandColor\": \"#2e1e55\",
\"bodyBackgroundColor\": \"#f8f8f8\",
\"bodyTextColor\": \"#1b1e24\",
\"headerBackgroundColor\": \"#2e1e55\",
\"selectedPrimaryLanguage\": \"en\",
\"customStyle\": \"CSS code\",
\"customCode\": \"JavaScript code\",
\"customFont\": \"font family name\",
\"learnerDashboard\": \"{\\\"type\\\": \\\"page\\\", \\\"id\\\": 1} or {\\\"type\\\": \\\"menu\\\", \\\"id\\\": \\\"menu-name\\\"}\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/updateBranding"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"logoImageUrl": "https:\/\/example.com\/logo.png",
"miniLogoImageUrl": "https:\/\/example.com\/mini-logo.png",
"brandColor": "#2e1e55",
"bodyBackgroundColor": "#f8f8f8",
"bodyTextColor": "#1b1e24",
"headerBackgroundColor": "#2e1e55",
"selectedPrimaryLanguage": "en",
"customStyle": "CSS code",
"customCode": "JavaScript code",
"customFont": "font family name",
"learnerDashboard": "{\"type\": \"page\", \"id\": 1} or {\"type\": \"menu\", \"id\": \"menu-name\"}"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Portal branding updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a sub portal to the given portal
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/addSubPortals" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"subPortal\": \"[{\\\"name\\\": \\\"Sub Portal 1\\\", \\\"referralCode\\\": \\\"sp1\\\"}, {\\\"name\\\": \\\"Sub Portal 2\\\", \\\"referralCode\\\": \\\"sp2\\\"}]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/addSubPortals"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"subPortal": "[{\"name\": \"Sub Portal 1\", \"referralCode\": \"sp1\"}, {\"name\": \"Sub Portal 2\", \"referralCode\": \"sp2\"}]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Sub Portal added successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a portal
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Portal deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete multiple sub portals
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/sub-portal-delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/sub-portal-delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Sub Portals deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save the menu items for the given portal. The menu items should be an array of objects with the following properties:
- id: The ID of the menu item.
- label: The label to display for the menu item.
- icon: The icon to display for the menu item.
- type: The type of the menu item. Can be "page" or "custom_link".
- page_id: The ID of the page if the type is "page".
- custom_link: The link to redirect to if the type is "custom_link".
- css_class: The CSS class to apply to the menu item.
- level: The level of the menu item.
- items: An array of submenu items.
Add users to learner list of the portal.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/addToLearner" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userIds\": [
\"similique\"
],
\"portalId\": 17
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/addToLearner"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userIds": [
"similique"
],
"portalId": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "User updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a user to portal admin
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/updateToPortalAdmin" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userId\": 19,
\"portalId\": 1,
\"portalAdminPermissions\": [
\"distinctio\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/updateToPortalAdmin"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userId": 19,
"portalId": 1,
"portalAdminPermissions": [
"distinctio"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "User updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the status of a given portal(s)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/updatePortalStatus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"ids\": [
\"illum\"
],
\"status\": \"earum\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/updatePortalStatus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"ids": [
"illum"
],
"status": "earum"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Status updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a paginated list of portals in a tabular format.
Fetches portals with optional filtering by status and portal name, and returns the results in a paginated format with sorting options. The function also provides the total and filtered records count.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A%22desc%22%7D&search_param=%7B%22status%22%3A%22active%22%2C+%22portalName%22%3A%22Example+Portal%22%7D&portalId=velit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction":"desc"}",
"search_param": "{"status":"active", "portalName":"Example Portal"}",
"portalId": "velit",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 100,
"recordsFiltered": 20,
"records": [
{
"id": 1,
"name": "Portal Name",
"parentPortalId": "Parent Portal",
"referralCode": "ABC123",
"totalSeat": 50,
"usedSeat": 25,
"seatAccess": "full",
"status": "active",
"slug": "portal-name",
"portalAdmins": "Admin Name",
"portalAdminsCount": 3,
"created_by": "Creator Name",
"created_at": "Sep 10, 2023 10:00 AM",
"totalLearner": 10
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lookup Portals
Retrieves portals based on the specified type, portal ID, and search term. If the portal ID is provided and not -1, it fetches sub-portals or reports/portals based on the type. If a search term is provided, it filters portals by name. Returns a list of portals with their ID, name, total seats, used seats, and available seats.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/lookup?type=subPortals&portalId=5&search_term=Portal+1&user_id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/lookup"
);
const params = {
"type": "subPortals",
"portalId": "5",
"search_term": "Portal 1",
"user_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Portal 1",
"totalSeats": 100,
"usedSeat": 50,
"availableSeats": 50
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves all the menus with all its associated items
Get the permissions of a portal admin
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/admin/permissions/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/admin/permissions/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"portalUsers": [
{
"portalId": 1,
"portalName": "Portal 1",
"permissions": [
"manage_course",
"manage_learning_path",
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page dropdown list
Returns a list of pages of the associated portal with their ID and Name based on the provided portal ID and search term. If a valid portal ID is provided, it filters pages associated with the portal. If no portal ID or an invalid one (e.g., -1) is given, it returns all pages.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/pages/dropdownlist?portalId=5&search_term=%22Advanced%22" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/pages/dropdownlist"
);
const params = {
"portalId": "5",
"search_term": ""Advanced"",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Page 1"
},
{
"id": 2,
"title": "Page 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the menu and pages for a specific portal.
This endpoint retrieves the list of pages associated with a given portal and the sidebar menu items for the portal user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/pages/getPortalLearnerPagesMenu" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 123
}"
const url = new URL(
"https://demo.aomlms.com/api/portals/pages/getPortalLearnerPagesMenu"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 123
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"pages": [
{
"id": 1,
"title": "Home Page"
},
{
"id": 2,
"title": "About Us"
}
],
"menus": [
"Dashboard",
"My Profile",
"Settings"
]
}
Example response (400):
{
"message": "Invalid request. Portal ID is required."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve checkout details for a portal order
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/checkout" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": \"dolore\",
\"qty\": \"laboriosam\",
\"billingAddress\": \"dolorum\",
\"shippingAddress\": \"sunt\",
\"selectedBillingAddress\": \"tempore\",
\"selectedShippingAddress\": \"animi\",
\"isShippingSameAsBilling\": \"in\",
\"shippingMethodId\": \"aliquid\"
}"
const url = new URL(
"https://demo.aomlms.com/api/portals/checkout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": "dolore",
"qty": "laboriosam",
"billingAddress": "dolorum",
"shippingAddress": "sunt",
"selectedBillingAddress": "tempore",
"selectedShippingAddress": "animi",
"isShippingSameAsBilling": "in",
"shippingMethodId": "aliquid"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"recurringItems": [],
"hasSubscriptionWithFreeTrial": false,
"hasSubscriptionProduct": false,
"productDetails": [],
"totalTax": 0,
"conditions": [],
"taxRates": [],
"taxSettings": {},
"total": 0,
"subtotal": 0,
"itemQuantity": 1,
"portalId": 1,
"currentPortalSeats": 0,
"cartErrors": {
"message": null,
"portalMessages": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates the current portal for a user
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/portal/users/updateCurrentPortal?portalId=1&userId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/updateCurrentPortal"
);
const params = {
"portalId": "1",
"userId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Current portal updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Portal Details Report
Provides detailed report information for portals based on the specified parameters.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/details/report?page_size=10&page_number=1&order_by=doloremque" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/details/report"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "doloremque",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 100,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "Portal 1",
"parentPortalName": "Parent Portal",
"totalSeat": 100,
"usedSeat": 50,
"status": "active",
"seatAccess": "open",
"portalUserIds": [
1,
2,
3
],
"portalAdminsCount": 2,
"created_by": "Admin User",
"created_at": "2023-01-01 12:00:00",
"portalExpireOn": "2024-01-01 12:00:00",
"totalLearner": 50,
"portalUserDetails": [
{
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"isLearner": true,
"isAdmin": "admin"
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone a portal and optionally its sub-portal.
This endpoint clones a portal and its associated data (such as branding, settings, etc.), including an optional sub-portal. A new referral code is generated for each cloned portal.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"portalId\": 5,
\"portalName\": \"My Cloned Portal\",
\"subPortals\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/portal/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"portalId": 5,
"portalName": "My Cloned Portal",
"subPortals": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Portal Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Powerpoint
A Powerpoint Module is used as course content. Helps to perform CRUD operation to and for Powerpoint modules.
Powerpoint Modules Tabular List
Returns all the powerpoint modules in a tabular list format with pagination. Filters can be applied using search parameters such as moduleCategoryIds, associatedCourse, and moduleName. Data can be sorted using order_by.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/powerpoint?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22moduleCategoryIds%22%3A+%5B%5D%2C+%22associatedCourse%22%3A+%22%22%2C+%22moduleName%22%3A+%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"moduleCategoryIds": [], "associatedCourse": "", "moduleName": ""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 5,
"records": [
{
"id": 1,
"name": "Powerpoint Module 1",
"slug": "powerpoint-module-1",
"type": "powerpoint",
"icon": "<i class=\"el-icon-presentation\"></i>",
"author": "John Doe",
"showMappedCourses": false,
"created_at": "Aug 03, 2020 09:56 AM",
"course_count": 2
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new Powerpoint module
Creates a new Powerpoint module. Returns the ID of the newly created module.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/powerpoint?name=Getting+Started&viewer=microsoft_office&content=%3Cp%3EThis+is+the+content+for+the+module%3C%2Fp%3E&url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw%2Fview%3Fusp%3Dsharing&estimatedCompletion=30&estimationCompletedUnit=hour&categories[]=1&categories[]=2&categories[]=3&categories[]=Category+1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint"
);
const params = {
"name": "Getting Started",
"viewer": "microsoft_office",
"content": "<p>This is the content for the module</p>",
"url": "https://drive.google.com/file/d/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw/view?usp=sharing",
"estimatedCompletion": "30",
"estimationCompletedUnit": "hour",
"categories[0]": "1",
"categories[1]": "2",
"categories[2]": "3",
"categories[3]": "Category 1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 6,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a Powerpoint Module
Retrieves a Powerpoint module by given id. Returns its details and associated courses.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/powerpoint/6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint/6"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 6,
"name": "Getting Started",
"slug": "getting-started",
"content": "<p>This is the content for the module</p>",
"url": "https://drive.google.com/file/d/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw/view?usp=sharing",
"estimatedCompletion": 1,
"estimationCompletedUnit": "hour",
"categories": [
1,
2
],
"courses": [
{
"course_id": 1,
"course_name": "Course 1"
},
{
"course_id": 2,
"course_name": "Course 2"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Powerpoint Module
Updates the details of the specified powerpoint module. (See parameters) Powerpoint modules can be used in the course as course content/lesson.
Returns : successfull message
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/powerpoint/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"6\",
\"viewer\": \"<iframe src=\\\"https:\\/\\/view.officeapps.live.com\\/op\\/embed.aspx?src=https:\\/\\/example.com\\/powerpoint.pptx\\\" width=\\\"100%\\\" height=\\\"600px\\\"><\\/iframe>\",
\"name\": \"My-powerpoint-lesson\",
\"content\": \"<p>This is the content for the module<\\/p>\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw\\/view?usp=sharing\",
\"estimatedCompletion\": 30,
\"estimationCompletedUnit\": \"hour\",
\"categories\": [
1,
2,
3,
\"Category 1\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "6",
"viewer": "<iframe src=\"https:\/\/view.officeapps.live.com\/op\/embed.aspx?src=https:\/\/example.com\/powerpoint.pptx\" width=\"100%\" height=\"600px\"><\/iframe>",
"name": "My-powerpoint-lesson",
"content": "<p>This is the content for the module<\/p>",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw\/view?usp=sharing",
"estimatedCompletion": 30,
"estimationCompletedUnit": "hour",
"categories": [
1,
2,
3,
"Category 1"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Powerpoint Module Details
To get the details of a powerpoint module, you need to use this request. (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/powerpoint/details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/powerpoint/details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First Powerpoint",
"slug": "first-powerpoint",
"content": "A brief description",
"courseName": "First Course",
"courseSlug": "http://localhost:8000/courses/1/launch",
"url": "http://localhost:8000/courses/1/modules/2/launch",
"totalPoints": 20,
"shouldBeEvaluated": true,
"min_time_spent": 90,
"otherModules": [],
"launchCheck": {},
"prevSlug": "first-video",
"nextSlug": "second-video",
"currentUserId": 1,
"currentStudentAvatar": "http://localhost:8000/storage/avatars/1.png",
"currentUserName": "John Doe",
"status": "In Progress",
"statusRowId": 1,
"timeSpent": 0,
"course_newly_completed": false,
"timeToBeSpent": 1,
"instructorResponse": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Powerpoint Module Info
Retrieves details of a Powerpoint module for the current user. Returns related fields such as module name, slug, viewer type, URL, content, and time spent on the module.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/powerpoint/content-details?moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/powerpoint/content-details"
);
const params = {
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Module Name",
"slug": "module-slug",
"viewer": "google_viewer",
"url": "//docs.google.com/viewer?url=...",
"content": "Module content here...",
"timeSpent": 120
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Questions
Manage Questions. Questions can be added in the Quiz module for learners to answer. Helps to perform CRUD operations for and to questions.
Questions Tabular List
Returns all the questions in a tabular list format in paginated mode. You can apply filter using search_param via questionTypes, questionCategoryIds, quizModuleId and questionName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/questions/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%22questionTypes%22%3A%5B%5D%2C%22questionCategoryIds%22%3A%5B%5D%2C%22quizModuleId%22%3A%22%22%2C%22questionName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/questions/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "{"questionTypes":[],"questionCategoryIds":[],"quizModuleId":"","questionName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"title": "Question-1",
"type": "multiple_choice",
"display_type": "Multiple Choice",
"categories": "Category-1",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lookup for question types.
Returns an array of all available question types.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/questions/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/questions/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"db_value": "multiple_choice",
"display_value": "Multiple Choice"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lookup for questions.
Searches for questions based on a search term provided in the request. Returns a list of questions with their IDs and titles that match the search term. The response is formatted to include 'value' as the question ID and 'label' as the question title for each matching question.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/question/lookup?search_term=nobis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/question/lookup"
);
const params = {
"search_term": "nobis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "Question Title 1"
},
{
"value": 2,
"label": "Question Title 2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified question. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/questions/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"question_ids\": [
3,
2
],
\"author_id\": 1,
\"categories_id\": [
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/questions/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"question_ids": [
3,
2
],
"author_id": 1,
"categories_id": [
6
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Questions updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new question with the given details.
Validates the question details and stores the question in the database.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/questions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Q1\",
\"content\": \"<p>This is the short content here<\\/p>\",
\"type\": \"multiple_choice\",
\"hint\": \"SpaceX owner\",
\"explanation\": \"Elon owns Tesla car company\",
\"categories\": [
12,
16
],
\"options\": [
\"soluta\"
],
\"matchPossibilities\": \"{ \\\"item\\\": \\\"Apple\\\", \\\"match\\\": \\\"Fruit\\\" }\"
}"
const url = new URL(
"https://demo.aomlms.com/api/questions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Q1",
"content": "<p>This is the short content here<\/p>",
"type": "multiple_choice",
"hint": "SpaceX owner",
"explanation": "Elon owns Tesla car company",
"categories": [
12,
16
],
"options": [
"soluta"
],
"matchPossibilities": "{ \"item\": \"Apple\", \"match\": \"Fruit\" }"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 4,
"message": "Question saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the details of a specified question. Helps in fetching question using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/question/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/question/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 4,
"title": "Q1",
"content": "<p>This is the short content here</p>",
"hint": "SpaceX owner",
"explanation": "Elon owns Tesla car company",
"type": "multiple_choice",
"categories": [
12,
16
],
"options": [
{
"value": "Elon Musk",
"is_correct": true
},
{
"value": "Jeff bezos",
"is_correct": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Question
Updates the details of a specified question. (See parameters) Questions can be used in the quizzes as quiz's content.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/question/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"7\",
\"title\": \"Q1\",
\"content\": \"<p>This is the short content here<\\\\\\/p>\",
\"type\": \"multiple_choice\",
\"hint\": \"Hint here\",
\"explanation\": \"This is the explanation\",
\"options\": \"[{value: \\\\\\\"Elon Musk\\\\\\\", is_correct: true}, {value: \\\\\\\"Jeff bezos\\\\\\\", is_correct: false}]\",
\"categories\": [
3,
4
],
\"matchPossibilities\": \"Possibility 1, Possibility 2\"
}"
const url = new URL(
"https://demo.aomlms.com/api/question/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "7",
"title": "Q1",
"content": "<p>This is the short content here<\\\/p>",
"type": "multiple_choice",
"hint": "Hint here",
"explanation": "This is the explanation",
"options": "[{value: \\\"Elon Musk\\\", is_correct: true}, {value: \\\"Jeff bezos\\\", is_correct: false}]",
"categories": [
3,
4
],
"matchPossibilities": "Possibility 1, Possibility 2"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Question updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete question
To delete a question, you need to use this request. Returns number of question deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/question/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/question/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "3 question(s) deleted 2 question(s) not deleted as it is used in quiz. Please remove the question(s) from the quiz and try again.",
"deletedQuestions": [
1,
2,
3
],
"notDeletedQuestions": [
5,
6
],
"usedInPlaces": {
"Question Category-1": [
{
"id": 1,
"name": "Quiz-1"
}
],
"Question Category-2": [
{
"id": 2,
"name": "Quiz-2"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk upload questions from CSV file
Example request:
curl --request POST \
"https://demo.aomlms.com/api/question/bulkUpload" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"questionList\": [
\"deserunt\"
],
\"quizIds\": [
\"at\"
],
\"quiztype\": \"non\",
\"newQuiz\": \"labore\"
}"
const url = new URL(
"https://demo.aomlms.com/api/question/bulkUpload"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"questionList": [
"deserunt"
],
"quizIds": [
"at"
],
"quiztype": "non",
"newQuiz": "labore"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"message": "Question(s) uploaded successfully",
"status": "success",
"title": "Success",
"errors": [
[
"Row #1 : Question Type is not correct.",
"Row #2 : Empty Title/Title too large(It must be under 500 characters).",
"Row #2 : Multiple Choice - Incorrect value in Correct_Answer column. Correct_Answer column must contain only Numbers(>0)"
]
],
"successfulRow": 4,
"skipped": 2,
"insertedQuestions": [
{
"id": 1,
"title": "Question1"
},
{
"id": 2,
"title": "Question2"
},
{
"id": 3,
"title": "Question3"
},
{
"id": 4,
"title": "Question4"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
QuickBooks Integration
This controller handles all API interactions related to QuickBooks integration. * Endpoints in this controller are responsible for managing QuickBooks-specific operations, ensuring seamless integration between the system and QuickBooks.
Returns all the QuickBooks logs in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quickbooks/logs?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22entity%22%3A+%22order%22%2C+%22entityId%22%3A+10%2C+%22status%22%3A+%22success%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quickbooks/logs"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"entity": "order", "entityId": 10, "status": "success"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "new_account_created",
"data": [],
"status": "success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quizzes
A Quiz Module is a quiz used as course content. Helps to perform CRUD operation to and for quiz modules.
Quizzes Tabular List
Returns all the quizzes in a tabular list format with pagination. Filters can be applied using search parameters for associated courses and module names.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/quiz?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22associatedCourse%22%3A+%22%22%2C+%22moduleName%22%3A+%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"associatedCourse": "", "moduleName": ""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 5,
"records": [
{
"id": 1,
"name": "Quiz 1",
"slug": "quiz-1",
"type": "quiz",
"totalQuestions": 5,
"icon": "<i class=\"el-icon-tickets\"></i>",
"author": "John Doe",
"showMappedCourses": false,
"created_at": "Aug 03, 2020 09:56 AM",
"course_count": 2
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new Quiz Module.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/quiz" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"nam\",
\"content\": \"aut\",
\"type\": \"eius\",
\"showCorrectAnswerOption\": \"dolorum\",
\"shuffleQuestions\": false,
\"forceSequential\": false,
\"realTimeGrading\": true,
\"noOfRetakesAllowed\": 7,
\"minimumPassingMarks\": 18,
\"questions\": \"vero\",
\"questionCategories\": \"praesentium\",
\"maxSpentHour\": 5,
\"maxSpentMinutes\": 8,
\"estimatedCompletion\": \"autem\",
\"estimationCompletedUnit\": \"qui\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "nam",
"content": "aut",
"type": "eius",
"showCorrectAnswerOption": "dolorum",
"shuffleQuestions": false,
"forceSequential": false,
"realTimeGrading": true,
"noOfRetakesAllowed": 7,
"minimumPassingMarks": 18,
"questions": "vero",
"questionCategories": "praesentium",
"maxSpentHour": 5,
"maxSpentMinutes": 8,
"estimatedCompletion": "autem",
"estimationCompletedUnit": "qui"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Quiz Module
Returns the details of the specified quiz module.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/quiz/{id}?id=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/{id}"
);
const params = {
"id": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 8,
"name": "Quiz-2",
"slug": "quiz-2",
"content": "<p>afegrshtdh</p>",
"type": "static",
"shuffleQuestions": true,
"forceSequential": true,
"realTimeGrading": true,
"showCorrectAnswerOption": "always",
"noOfRetakesAllowed": 3,
"minimumPassingMarks": null,
"questions": [
{
"id": 3,
"title": "Is red a color?"
}
],
"questionCategories": [],
"maxSpentMinutes": "",
"maxSpentHour": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Quiz Module
Updates the details of a specified quiz module. This includes both static and dynamic types. Validates and processes the module details, including questions or question categories, and updates the associated database records accordingly.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/quiz/5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Quiz-1\",
\"content\": \"<p>Quiz content<\\/p>\",
\"type\": \"et\",
\"showCorrectAnswerOption\": \"qui\",
\"shuffleQuestions\": true,
\"forceSequential\": true,
\"realTimeGrading\": false,
\"noOfRetakesAllowed\": 4,
\"minimumPassingMarks\": 4,
\"questions\": [
\"voluptatem\"
],
\"questionCategories\": [
\"dolorum\"
],
\"maxSpentHour\": 16,
\"maxSpentMinutes\": 11,
\"estimatedCompletion\": \"00:30:00\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/5"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Quiz-1",
"content": "<p>Quiz content<\/p>",
"type": "et",
"showCorrectAnswerOption": "qui",
"shuffleQuestions": true,
"forceSequential": true,
"realTimeGrading": false,
"noOfRetakesAllowed": 4,
"minimumPassingMarks": 4,
"questions": [
"voluptatem"
],
"questionCategories": [
"dolorum"
],
"maxSpentHour": 16,
"maxSpentMinutes": 11,
"estimatedCompletion": "00:30:00",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"id": 5,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the details of the specified quiz module. Helps in fetching quiz module using module ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/quiz/details?moduleId=1®istrationId=2&portalId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/quiz/details"
);
const params = {
"moduleId": "1",
"registrationId": "2",
"portalId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Quiz-2",
"slug": "quiz-2",
"content": "<p>afegrshtdh</p>",
"courseId": 6,
"courseName": "Course 1",
"courseSlug": "/course/1/launch",
"type": "static",
"shuffleQuestion": true,
"forceSequential": true,
"realTimeGrading": true,
"showCorrectAnswerOption": "always",
"minimumPassingMarks": null,
"maxTimer": "",
"maxRetakesAllowed": 0,
"min_time_spent": 0,
"questions": [],
"otherModules": [],
"launchCheck": {
"canbeLaunched": true,
"reason": ""
},
"userId": 1,
"showInstructionButton": true,
"prevSlug": "",
"nextSlug": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save the answer of the question in the quiz module
Saves the answer of the question in the quiz module. Updates the status of quiz to completed if student is finished the quiz and submits. (See Parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/quiz/{id}/saveAnswer?questionId=1&moduleStatusId=10&isAnswerSubmitted=true&markedAnswer=A" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/{id}/saveAnswer"
);
const params = {
"questionId": "1",
"moduleStatusId": "10",
"isAnswerSubmitted": "true",
"markedAnswer": "A",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Answer saved successfully",
"isCorrect": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Submits the quiz after attempting all the questions of the quiz. Updates the status of quiz to completed if student is finished the quiz and submits.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/quiz/{id}/submitQuiz?portalId=1&questions=%5B%7B%22id%22%3A1%2C%22type%22%3A%22multiple_choice%22%2C%22markedAnswer%22%3A%22A%22%7D%5D&statusRowId=10&retakeCounter=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/{id}/submitQuiz"
);
const params = {
"portalId": "1",
"questions": "[{"id":1,"type":"multiple_choice","markedAnswer":"A"}]",
"statusRowId": "10",
"retakeCounter": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Quiz Submitted Successfully",
"course_newly_completed": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Quiz Module Results
Retrieves the quiz module results based on the status row ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/quiz/results?statusRowId=10&studentId=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/quiz/results"
);
const params = {
"statusRowId": "10",
"studentId": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Quiz 1",
"slug": "quiz-1",
"status": "Completed",
"questions": [
{
"id": 1,
"title": "Question 1",
"type": "Multiple Choice",
"content": "What is your question?",
"explanation": "This is the explanation",
"is_correct": true,
"marked_answer": "A",
"correct_answer": "A",
"created_at": "2020-03-03 10:30:00"
}
],
"studentName": "John Doe",
"totalQuestions": 5,
"totalCorrect": 4,
"totalInCorrect": 1,
"minimumPassingAchieved": true,
"score": 80,
"percentAchieved": 80,
"showCorrectAnswerOption": true,
"courseCompleted": false,
"totalRetakeallowed": 3,
"attemptCount": 2,
"timeSpent": "00:30:00",
"minimumPassingMarks": 90,
"isRetakeAllowed": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quiz Lookup
Retrieves all the quiz modules. Helps while showing quiz names in form elements like dropdown. You can apply filters using search_term parameter. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/dropdownlist?search_term=molestiae" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/dropdownlist"
);
const params = {
"search_term": "molestiae",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "First-quiz"
},
{
"value": 2,
"label": "Quiz-2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns the analysis details of a quiz, including the questions, options selected, percentages etc.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/quizAnalysis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_size\": 17,
\"page_number\": 14,
\"search_param\": \"aspernatur\",
\"quiz_id\": 10
}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/quizAnalysis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_size": 17,
"page_number": 14,
"search_param": "aspernatur",
"quiz_id": 10
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"quizName": "Quiz Example",
"totalSubmissions": 5,
"questionDetails": [
{
"id": 1,
"name": "What is your name?",
"questionType": "Multiple Choice",
"correctOption": [
1,
2
],
"optionsWithPercentage": {
"Option A": 20,
"Option B": 40,
"Option C": 40
}
},
{
"id": 2,
"name": "What is your age?",
"questionType": "Short Answer",
"correctOption": [],
"optionsWithPercentage": {
"18-24": 60,
"25-34": 20,
"35-44": 20
}
}
],
"totalQuestions": 5,
"recordsFiltered": 5,
"quizStatistics": {
"averageScore": 80,
"averageTimeSpent": "00:30:00",
"totalSubmissions": 5
},
"averageTimeSpent": "00:30:00",
"totalAttempts": 10,
"headers": [
"optionName_1",
"markedPercentageOfOption_1",
"optionName_2",
"markedPercentageOfOption_2",
"optionName_3",
"markedPercentageOfOption_3"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the question submission details
Retrieves the question submission details based on the question ID and quiz ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/getQuestionSubmissionDetails?quiz_id=1&question_id=1&page_size=10&page_number=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/getQuestionSubmissionDetails"
);
const params = {
"quiz_id": "1",
"question_id": "1",
"page_size": "10",
"page_number": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalRecords": 100,
"records": [
{
"courseName": "Course 1",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"questionType": "Multiple Choice",
"markedAnswer": "A",
"isCorrectResponse": "Yes"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Downloads the quiz response as a PDF.
Generates a PDF file containing the details of the quiz response, including the name, retake information, time spent, questions, answers, and scores. The PDF is then returned as a downloadable file.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/pdf/{id}?statusRowId=consequuntur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/pdf/{id}"
);
const params = {
"statusRowId": "consequuntur",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
PDF file containing the quiz response details.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send the quiz score achieved by the user to the LTI consumer.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/quiz/sendScore?statusRowId=10&userId=2<iRegistrationId=1&courseId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/sendScore"
);
const params = {
"statusRowId": "10",
"userId": "2",
"ltiRegistrationId": "1",
"courseId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Score submitted successfully."
}
Example response (500):
{
"status": "error",
"message": "Error occured while submitting the score in a LTI. ModuleStatusId #<statusRowId> Error = <error message>"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the quiz module content details
Retrieves the quiz module content details based on the quiz ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/quiz/content-details?id=1&name=Quiz+1&content=Quiz+1+content&type=static&shuffleQuestions=true&forceSequential=true&realTimeGrading=true&slug=quiz-1&showCorrectAnswerOption=always&noOfRetakesAllowed=2&questionCategories=%5B%7B%22categoryId%22%3A+1%2C+%22numOfQuestions%22%3A+2%7D%5D&questions=%5B%7B%22id%22%3A+1%2C+%22title%22%3A+%22Question+1%22%2C+%22content%22%3A+%22Question+1+content%22%2C+%22type%22%3A+%22multiple_choice%22%2C+%22hint%22%3A+%22Hint+1%22%2C+%22explanation%22%3A+%22Explanation+1%22%7D%5D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/quiz/content-details"
);
const params = {
"id": "1",
"name": "Quiz 1",
"content": "Quiz 1 content",
"type": "static",
"shuffleQuestions": "true",
"forceSequential": "true",
"realTimeGrading": "true",
"slug": "quiz-1",
"showCorrectAnswerOption": "always",
"noOfRetakesAllowed": "2",
"questionCategories": "[{"categoryId": 1, "numOfQuestions": 2}]",
"questions": "[{"id": 1, "title": "Question 1", "content": "Question 1 content", "type": "multiple_choice", "hint": "Hint 1", "explanation": "Explanation 1"}]",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Quiz 1",
"content": "Quiz 1 content",
"type": "static",
"shuffleQuestions": true,
"forceSequential": true,
"realTimeGrading": true,
"slug": "quiz-1",
"showCorrectAnswerOption": "always",
"noOfRetakesAllowed": 2,
"questionCategories": [
{
"categoryId": 1,
"numOfQuestions": 2
}
],
"questions": [
{
"id": 1,
"title": "Question 1",
"content": "Question 1 content",
"type": "multiple_choice",
"hint": "Hint 1",
"explanation": "Explanation 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORM Packages
SCORM packages can be used in course as course scorm module. Endpoints for managing SCORM Packages.
Tabular List
Retrieves all the SCORM packages in a tabular list format in paginated mode. You can apply filter using search_param via name(package name), scormTypes(scorm type).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackages/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%22name%22%3A+%22my+package%22%2C+%22scormTypes%22%3A+%5B%22SCORM+1.2%22%2C+%22xAPI%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackages/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "{"name": "my package", "scormTypes": ["SCORM 1.2", "xAPI"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"name": "My Package",
"url": "https://example.com/scorm/1",
"uploadId": 1,
"launchFile": "launch.html",
"status": "Completed",
"downloadStatus": "Completed",
"downloadPath": "https://example.com/scorm/1.zip",
"full_url": "https://example.com/scorm/1.zip",
"version": "SCORM 1.2",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve scorm type lookup
Returns all the supported scorm types in a list format.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackages/scormTypeLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackages/scormTypeLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{'db_value' : 'SCORM 1.2', 'display_value' : 'Scorm version 1.2'},
{'db_value' : 'SCORM 2004', 'display_value' : 'Scorm version 2004'},
{'db_value' : 'xAPI', 'display_value' : 'xAPI'}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Scorm Package
Fetch the details of a specified scorm package. (See parameters) Scorm packages can be used in course as course content/lesson.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackage/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "New Scorm",
"url": "https://aomlms.com/scorm/sample-course/scormcontent/index.html",
"version": "1.2",
"launch_file": "index_lms.html"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deletes a scorm package.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "1 package(s) deleted 0 package(s) not deleted as it is used in Module. Please remove the scorm Package from the module and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download a SCORM package
This endpoint downloads a SCORM package by ID. After download, the status is reset to "Not Started" and the download path is cleared. The file is automatically deleted after being sent.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage/download" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/download"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
file binary The SCORM package ZIP file.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export Scorm Package
Only admin, owner and staff can export the scorm package.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage/export" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/export"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "In Progress"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns the status of a scorm package.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackage/getDownloadStatus/aperiam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/getDownloadStatus/aperiam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "Not Started"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORMs
An SCORM Module is used as course content. Helps to perform CRUD operation to and for SCORM modules.
Get fake Tin Can state
Returns a JSON response of true.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"success": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get fake Tin Can state
Returns a JSON response of true.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"success": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get fake Tin Can state
Returns a JSON response of true.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan-fake/v1/statements" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan-fake/v1/statements"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"success": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get TinCan (xAPI) state for a module in a course registration.
This endpoint retrieves the SCORM/xAPI state (like suspend_data or other tracking keys)
for a specific module within a registered course. The state is retrieved based on the
stateId
and a given registration string.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/aom-tincan/v1/activities/state?stateId=suspend_data&activityId=http%3A%2F%2Fexample.com%2Factivity®istration=123%7C456%7C789" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan/v1/activities/state"
);
const params = {
"stateId": "suspend_data",
"activityId": "http://example.com/activity",
"registration": "123|456|789",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"suspend_data": "c2Vzc2lvbl9zdGF0ZT0yMDE=",
"progress": "75%",
"lesson_status": "incomplete"
}
Example response (404):
{
"message": "Course registration or module not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update TinCan (xAPI) state for a module in a course registration.
This endpoint allows updating a SCORM/xAPI state value (e.g., suspend_data or lesson_status) for a specific module within a course registration. If a state already exists, it will be updated; otherwise, a new state record will be created.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan/v1/activities/state?stateId=suspend_data&activityId=http%3A%2F%2Fexample.com%2Factivity®istration=123%7C456%7C789" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"string\": \"{\\\"score\\\":85,\\\"lesson_status\\\":\\\"completed\\\"}\"
}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan/v1/activities/state"
);
const params = {
"stateId": "suspend_data",
"activityId": "http://example.com/activity",
"registration": "123|456|789",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"string": "{\"score\":85,\"lesson_status\":\"completed\"}"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
true
Example response (404):
{
"message": "Course registration or module not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save TinCan (xAPI) statement for course progress tracking.
This endpoint accepts and stores xAPI statements sent by a learning module. It handles different types
of verbs like attempted
, completed
, passed
, failed
, and answered
, and processes scoring, progress,
and interactions accordingly.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan/v1/statements" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"verb\": {
\"id\": \"http:\\/\\/adlnet.gov\\/expapi\\/verbs\\/completed\"
},
\"object\": [],
\"result\": {
\"score\": {
\"raw\": 90,
\"max\": 100
},
\"success\": true,
\"completion\": true
},
\"timestamp\": \"2024-05-01T10:00:00Z\"
}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan/v1/statements"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"verb": {
"id": "http:\/\/adlnet.gov\/expapi\/verbs\/completed"
},
"object": [],
"result": {
"score": {
"raw": 90,
"max": 100
},
"success": true,
"completion": true
},
"timestamp": "2024-05-01T10:00:00Z"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
true
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORM Modules Tabular List
Returns all the SCORM modules in a tabular list format in paginated mode. You can apply filter using search_param via moduleTypes(module type), associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/scorm?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22moduleTypes%22%3A+%5B%22scorm%22%5D%2CassociatedCourse%3A%22%22%2CmoduleName%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"moduleTypes": ["scorm"],associatedCourse:"",moduleName:""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "test",
"slug": "test",
"type": "scorm",
"icon": "<i class=\"el-icon-document\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM",
"course_count": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create SCORM Module
This function creates a new SCORM module with the provided details. It validates the request, saves module details, and associates categories.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/scorm" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"New Scorm Module\",
\"trackCompletion\": \"true\",
\"scormPackageId\": \"1\",
\"launchNewWindow\": \"true\",
\"categories\": \"[1, \\\"New Category\\\"]\",
\"estimatedCompletion\": \"10\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "New Scorm Module",
"trackCompletion": "true",
"scormPackageId": "1",
"launchNewWindow": "true",
"categories": "[1, \"New Category\"]",
"estimatedCompletion": "10",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"id": 1,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update SCORM Module
This function updates an existing SCORM module with the provided details. It validates the request, saves module details, and associates categories.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/scorm/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"1\",
\"name\": \"Updated Scorm Module\",
\"trackCompletion\": \"true\",
\"launchNewWindow\": \"true\",
\"scormPackageId\": \"1\",
\"categories\": \"[1, \\\"New Category\\\"]\",
\"estimatedCompletion\": \"10\",
\"estimationCompletedUnit\": \"minutes\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1",
"name": "Updated Scorm Module",
"trackCompletion": "true",
"launchNewWindow": "true",
"scormPackageId": "1",
"categories": "[1, \"New Category\"]",
"estimatedCompletion": "10",
"estimationCompletedUnit": "minutes"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Scorm Module
Fetch the details of a specified scorm module. (See parameters) Scorm modules can be used in the course as course content/lesson.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/scorm/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "New Scorm",
"slug": "new-scorm",
"trackCompletion": true,
"launchNewWindow": false,
"scormPackageId": 1,
"scormPackageFullUrl": "https://aomlms.com/scorm/sample-course/scormcontent/index.html",
"scormProxyUrl": "https://aomlms.com/scorm-proxy",
"estimatedCompletion": null,
"estimationCompletedUnit": null,
"categories": [
1,
2,
3
],
"courses": [
{
"course_id": 1,
"course_name": "Testing"
},
{
"course_id": 2,
"course_name": "Testing 2"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Scorm Module Info
Retrieves detailed information about a SCORM module including its name, slug, content, associated course details, SCORM URL, tracking and launching options, and more. It also handles the SCORM package versioning and generates authorization tokens for xAPI integration if applicable. The function checks and updates the module status, calculates time spent, and fetches SCORM keys for the module.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/scorm/details?registrationId=16&moduleId=11&portalId=5&openInNewWindow=true" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/scorm/details"
);
const params = {
"registrationId": "16",
"moduleId": "11",
"portalId": "5",
"openInNewWindow": "true",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"name": "Module Name", "slug": "module-slug", "content": "Module content if available", "courseName": "Course Name", "courseSlug": "Course Launch URL", "packageId": 1, "scormUrl": "https://scorm.url", "scormProxyUrl": "https://scorm-proxy.url", "version": "SCORM Version", "trackCompletion": true, "launchNewWindow": false, "min_time_spent": 0, "otherModules": [], "launchCheck": {...}, "prevSlug": "previous-module-slug", "nextSlug": "next-module-slug", "scormKeys": {...}, "status": "In Progress", "statusRowId": 19, "timeSpent": 13, "course_newly_completed": false, "timeToBeSpent": 0}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get scorm module report details
Returns the scorm module report details for the given module status id.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scorm-report" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scorm-report"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"moduleName": "Sample Scorm",
"moduleId": 1,
"score": 100,
"studentName": "Aom Staff",
"interactions": [
{
"slide": "1",
"question": "What is your name?",
"questionType": "text",
"studentResponse": "John Doe",
"correctResponse": "",
"result": "correct",
"time": "2022-01-01 12:00:00 PM"
},
{
"slide": "2",
"question": "What is your email?",
"questionType": "text",
"studentResponse": "[email protected]",
"correctResponse": "",
"result": "correct",
"time": "2022-01-01 12:00:00 PM"
}
],
"courseId": 1,
"courseName": "Sample Course"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get TinCan (xAPI) report for a specific module attempt.
This endpoint retrieves the TinCan (xAPI) interaction report for a given learner's module status. It includes detailed interaction logs, score calculations, and context information for analysis.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scorm-activity-report?modulesStatusId=42&studentId=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scorm-activity-report"
);
const params = {
"modulesStatusId": "42",
"studentId": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"score": 90,
"studentName": "John Doe",
"moduleName": "Workplace Safety 101",
"interactions": [
{
"id": 123,
"modulesStatusId": 42,
"verb": "http://adlnet.gov/expapi/verbs/completed",
"activity": "Completed",
"objectType": "Activity",
"objectName": "Introduction Slide",
"statementRaw": null,
"createdBy": 7,
"createdAt": "April 16, 2025 02:45 PM",
"message": "You completed 'Introduction Slide'"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generate SCORM report as PDF
This endpoint generates a PDF report of SCORM interactions and scores for a given module status ID. It includes question responses, time spent, score percentage, and interaction details. The PDF is returned as a downloadable file.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scorm-report-pdf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"modulesStatusId\": 42
}"
const url = new URL(
"https://demo.aomlms.com/api/scorm-report-pdf"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"modulesStatusId": 42
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
file binary The downloadable PDF report for the specified SCORM module status.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get scorm module content details
Returns the scorm module content details.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/scorm/content-details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/scorm/content-details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Sample Scorm",
"slug": "sample-scorm",
"content": "Sample Scorm Content",
"scormUrl": "https://staging.aomlms.com/storage/scorm/sample-course/scormcontent/index.html",
"scormProxyUrl": "https://aom-s3-proxy.herokuapp.com",
"version": "1.2",
"trackCompletion": true,
"scormKeys": {
"cmi.suspend_data": "",
"cmi.core.lesson_location": "",
"cmi.core.lesson_mode": "normal",
"cmi.mode": "normal",
"cmi.core.lesson_status": "incomplete",
"cmi.success_status": "",
"cmi.completion_status": "incomplete",
"cmi.core.student_id": 2,
"cmi.core.student_name": "Aom Staff",
"cmi.location": ""
},
"timeSpent": "0h 0m"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salesforce Integration
It allows you to track learner activity and progress in the LMS, and trigger changes in Salesforce data accordingly.
Salesforce Event Lookup
Retrieves all the events for the salesforce actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/salesforce/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/salesforce/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"events": [
{
"db_value": "new_account_created",
"display_value": "New Account Created",
"crud_op": "Create",
"salesforce_crud": [
{
"db_value": "salesforce_contact",
"display_value": "Salesforce Contacts"
}
]
},
{
"db_value": "account_updated",
"display_value": "Account Updated",
"crud_op": "Update",
"salesforce_crud": [
{
"db_value": "salesforce_contact",
"display_value": "Salesforce Contacts"
}
]
},
{
"db_value": "course_enrolled",
"display_value": "Enrolled in a course",
"crud_op": "Update",
"salesforce_crud": [
{
"db_value": "salesforce_custom_registration_object",
"display_value": "Salesforce Custom Course Registration Object"
}
]
},
{
"db_value": "course_completed",
"display_value": "Course Completed",
"crud_op": "Update",
"salesforce_crud": [
{
"db_value": "salesforce_custom_registration_object",
"display_value": "Salesforce Custom Course Registration Object"
}
]
},
{
"db_value": "course_started",
"display_value": "Course Started",
"crud_op": "Update",
"salesforce_crud": [
{
"db_value": "salesforce_custom_registration_object",
"display_value": "Salesforce Custom Course Registration Object"
}
]
},
{
"db_value": "course_progress",
"display_value": "Course Progress Tracking",
"crud_op": "Update",
"salesforce_crud": [
{
"db_value": "salesforce_custom_registration_object",
"display_value": "Salesforce Custom Course Registration Object"
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Field Lookup
Retrieves all the fields for the given object type - contact or custom_course_object. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/salesforce/fieldLookup?type=contact" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/salesforce/fieldLookup"
);
const params = {
"type": "contact",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"lms_fields": [
{
"db_value": "email"
},
{
"db_value": "last_name"
},
{
"db_value": "first_name"
},
{
"db_value": "last_login_ip"
},
{
"db_value": "is_disabled"
}
],
"salesforce_fields": [
{
"db_value": "email"
},
{
"db_value": "lastName"
},
{
"db_value": "firstName"
}
],
"courses": [
{
"id": 1,
"name": "Course 1"
},
{
"id": 2,
"name": "Course 2"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the salesforce integrations in a tabular list format in paginated mode. You can apply filter using search_param via events(salesforce integration events).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/salesforces?order_by=%7B%22colName%22%3A+%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=0&page_size=10&page_number=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/salesforces"
);
const params = {
"order_by": "{"colName": "name", "direction": "asc"}",
"search_param": "0",
"page_size": "10",
"page_number": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"event": "course_enrolled",
"event_display_value": "Enrolled in a Course",
"object": "salesforce_contact",
"object_display_value": "Salesforce Contact",
"action": "created",
"author": "John Doe",
"created_at": "2021-01-01 12:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Salesforce Action
To create a Salesforce Action, you need to use this request. Provide event, action and object and it will be created. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/salesforce/action/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"course_enrolled\",
\"action\": \"create.\",
\"object\": \"salesforce_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/action/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "course_enrolled",
"action": "create.",
"object": "salesforce_contact"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Action created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Salesforce Mapping
Saves the mapping of salesforce mapping. Helps in saving salesforce mapping using its type. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/salesforce/mapping/save" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"salesforce_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/mapping/save"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "salesforce_contact"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Mapping saved Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Salesforce Mapping
Retrieves the details of the salesforce mapping. Helps in fetching salesforce mapping using its type. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/salesforce/mappings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"salesforce_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/mappings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "salesforce_contact"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"type": "salesforce_contact",
"userFieldProperties": [],
"courseFieldProperties": []
}
Example response (200):
{
"type": "salesforce_course_and_registration_custom_object",
"courseFieldProperties": [],
"courseRegistrationFieldProperties": [],
"sfCustomObjectNames": [],
"isSyncCourseCompleted": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Salesforce Action
Updates a Salesforce action based on the provided ID.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/salesforce/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"New Account Created\",
\"action\": \"create\",
\"object\": \"Salesforce Contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "New Account Created",
"action": "create",
"object": "Salesforce Contact"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Salesforce updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Salesforce Action
To delete a Salesforce Action, you need to use this request. Provide id and it will be deleted. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/salesforce/action/delete/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/action/delete/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Salesforce deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves Salesforce logs in a paginated format.
This function returns logs related to a specific Salesforce action identified by its ID. The logs are presented in a tabular format, allowing pagination and optional sorting.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/salesforce/logs/50?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/logs/50"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 100,
"recordsFiltered": 50,
"records": [
{
"id": 1,
"event": "New Account Created",
"data": [],
"status": "success",
"display_status": "Success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Staffs
You can perform staff management tasks like creating, deleting and updating staffs.
Tabular List
Retrieves all the staffs in a tabular list format with pagination mode. You can apply filter using search_param via name or email.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staffs/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22John+Doe%22%2C%22membershipId%22%3A1%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staffs/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"nameOrEmail":"John Doe","membershipId":1}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 4,
"records": [
{
"id": 4,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\"/><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"user_type": "general",
"display_user_type": "General",
"created_at": "Aug 06, 2020 07:20 AM",
"last_login": "2 days ago"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves detailed report for all staffs.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staff/report?page_size=10&page_number=1®istered_between=%7B%22first_name%22%3A%22John%22%2C%22last_name%22%3A%22Doe%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/report"
);
const params = {
"page_size": "10",
"page_number": "1",
"registered_between": "{"first_name":"John","last_name":"Doe"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalNotStarted": 1,
"totalInProgress": 0,
"totalCompleted": 0,
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"user_type": "General",
"created_at": "Aug 09, 2020",
"last_login": "Oct 09, 2020"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new staff member.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/staff/create?firstName=John&lastName=Doe&email=john.doe%40example.com&password=Nv10%3D80l%5E&staffPermissions=%5B1%2C2%2C3%5D&userType=staff" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/create"
);
const params = {
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"password": "Nv10=80l^",
"staffPermissions": "[1,2,3]",
"userType": "staff",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Staff created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Staff By ID
This endpoint returns the staff details based on the ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staff/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"lastLoggedIn": "2 hours ago",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\" viewBox=\"0 0 100 100\"><circle cx=\"50\" cy=\"50\" r=\"50\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"50\" y=\"50\" font-size=\"40\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"disabled": false,
"userType": "staff",
"currentLoggedUserType": "owner",
"membership": {
"id": 1,
"name": "Silver",
"expiryDate": null
},
"customUserMetas": {
"full_name": {
"type": "text",
"label": "Full Name",
"submitted_value": "John Doe",
"placeholder_value": ""
},
"user_type": {
"type": "dropdown",
"label": "User Type",
"submitted_value": 1,
"placeholder_value": "",
"option_label": [
"Staff",
"Owner"
],
"option_value": [
1,
2
]
}
},
"internal_note": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Staff/Owner details
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/staff/8" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"2\",
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"email\": \"[email protected]\",
\"disabled\": \"0\",
\"internal_note\": \"This is a note.\",
\"customUserMetas\": \"{\\\"meta_key1\\\":{\\\"type\\\":\\\"text\\\",\\\"submitted_value\\\":\\\"value1\\\"},\\\"meta_key2\\\":{\\\"type\\\":\\\"checkbox\\\",\\\"submitted_value\\\":[1,2,3]}}\",
\"userType\": \"staff\"
}"
const url = new URL(
"https://demo.aomlms.com/api/staff/8"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "2",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"disabled": "0",
"internal_note": "This is a note.",
"customUserMetas": "{\"meta_key1\":{\"type\":\"text\",\"submitted_value\":\"value1\"},\"meta_key2\":{\"type\":\"checkbox\",\"submitted_value\":[1,2,3]}}",
"userType": "staff"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Owner/Staff updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Staff Permissions
Returns all permissions for the staff
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staff/permissions/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/permissions/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"permissions": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Staff Permissions
Update the permissions of a staff member
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/staff/updatePermission/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"permissions\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/staff/updatePermission/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"permissions": [
1,
2,
3
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Permissions updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Products
A subscription product whose amount will be paid in subscriptions (in between intervals) by your learners. Helps in performing CRUD operations for and to subscription products.
Retrieve Subscription
To retrieve a subscription, you need to use this request. (See parameters)
Returns : success status and successfull message
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "ACTIVE",
"endDate": "2020-10-01 00:00:00",
"nextPaymentDate": "2020-10-01 00:00:00",
"userName": "John Doe (#1 - [email protected])",
"paymentGatewayId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the product details for a given subscription id.
Returns product title, price, and image url.
Retrieves the related orders of a given subscription id.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/orders/tabularlist?subscription_id=recusandae&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22orderStatus%22%3A+%5B%22IN-PROGRESS%22%2C+%22COMPLETED%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/orders/tabularlist"
);
const params = {
"subscription_id": "recusandae",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"orderStatus": ["IN-PROGRESS", "COMPLETED"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"total": 100,
"status": "IN-PROGRESS",
"relationship": "Parent Order",
"created_at": "Jan 01, 2021 12:00 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Subscription
Creates a new subscription based on an order, selected subscription products, and optional coupon/payment token.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/subscription/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"orderId\": 1001,
\"paymentToken\": \"sk_test_abc123\",
\"productQuantity\": {
\"12\": 1,
\"15\": 2
}
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"orderId": 1001,
"paymentToken": "sk_test_abc123",
"productQuantity": {
"12": 1,
"15": 2
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (201):
{
"success": true,
"message": "Subscription has been created"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the subscriptions in a tabular list format with pagination mode. You can apply filter using search_param via productTitle, subscriptionStatus(active, cancelled, expired, on-hold), nameOrEmail and subscriptionOrderMonth.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscriptions/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22productTitle%22%3A+%22%22%2C+%22subscriptionStatus%22%3A+%5B%22ACTIVE%22%2C+%22CANCELLED%22%5D%2C+%22nameOrEmail%22%3A+%22john%40example.com%22%2C+%22subscriptionOrderMonth%22%3A+%222020-01%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscriptions/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"productTitle": "", "subscriptionStatus": ["ACTIVE", "CANCELLED"], "nameOrEmail": "[email protected]", "subscriptionOrderMonth": "2020-01"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 10,
"recordsFiltered": 10,
"records": [
{
"id": 1,
"user_name": "John Doe",
"user_id": 1,
"product": "Product 1",
"product_id": 1,
"subscription_price": "$10.00 / month",
"next_payment_date": "Jan 01, 2021 12:00 AM",
"status": "ACTIVE",
"created_at": "Jan 01, 2021 12:00 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Status Lookup
Retrieves all the statuses for a subscription the platform offers like Active, Cancelled, Expired, On-Hold. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "ACTIVE",
"display_value": "Active"
},
{
"db_value": "CANCELLED",
"display_value": "Cancelled"
},
{
"db_value": "EXPIRED",
"display_value": "Expired"
},
{
"db_value": "ON-HOLD",
"display_value": "On-Hold"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Subscription
To update a subscription, you need to use this request. (See parameters) Subscription can be only created by purchasing subscription product.
Returns : success status and successfull message
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/subscription/{id}?id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"status\": \"ACTIVE\",
\"endDate\": \"2020-10-01 00:00:00\",
\"nextPaymentDate\": \"2020-10-01 00:00:00\"
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/{id}"
);
const params = {
"id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"status": "ACTIVE",
"endDate": "2020-10-01 00:00:00",
"nextPaymentDate": "2020-10-01 00:00:00"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Subscription updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit Subscriptions
Updates the status of the specified subscriptions in bulk.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/subscription/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"subscription_ids\": [
1,
2
],
\"status\": \"\\\"ACTIVE\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"subscription_ids": [
1,
2
],
"status": "\"ACTIVE\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Subscriptions updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Process Subscription Action
Perform a specific action on the subscription like process renewal.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/subscription/process-subscription-action" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"action\": \"PROCESS_RENEWAL\"
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/process-subscription-action"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"action": "PROCESS_RENEWAL"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"success": true,
"message": "Process Renewal Successfully completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Action Lookup
Retrieves all the actions that can be performed on a subscription like Process renewal. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/action/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/action/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "PROCESS_RENEWAL",
"display_value": "Process renewal"
},
{
"db_value": "CREATE_PENDING_RENEWAL_ORDER",
"display_value": "Create pending renewal order"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Survey Modules
A survey module is a feedback module that you can add as course content to get learners feedback about your course(How they felt about course, ratings, etc). Helps in performing CRUD operation to and for survey modules.
Get paginated list of survey modules.
Returns a paginated, searchable, and sortable list of survey-type modules with metadata such as author, course mapping, and timestamps.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/survey?page_size=10&page_number=1&order_by[colName]=name&order_by[direction]=asc" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by[colName]": "name",
"order_by[direction]": "asc",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 52,
"recordsFiltered": 7,
"records": [
{
"id": 12,
"name": "Employee Feedback Survey",
"slug": "employee-feedback-survey",
"type": "survey",
"icon": "fa-poll",
"author": "Jane Smith",
"showMappedCourses": false,
"created_at": "April 15, 2025 03:20 PM",
"course_count": 3
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates a new survey module
Creates a new survey module using form fields provided in the request body.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/survey" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Feedback\",
\"content\": \"This is the short content here\",
\"submitButtonText\": \"Submit Survey\",
\"submitOption\": \"save_to_db\",
\"fields\": [
{
\"type\": \"text\",
\"label\": \"How you left\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": []
},
{
\"type\": \"rating\",
\"label\": \"How you rate us\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": []
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Feedback",
"content": "This is the short content here",
"submitButtonText": "Submit Survey",
"submitOption": "save_to_db",
"fields": [
{
"type": "text",
"label": "How you left",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
},
{
"type": "rating",
"label": "How you rate us",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified survey module in storage.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/survey/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": \"1\",
\"name\": \"Feedback\",
\"content\": \"A brief Description\",
\"trackCompletion\": false,
\"estimatedCompletion\": 60,
\"estimationCompletedUnit\": \"minutes\",
\"submitButtonText\": \"Submit Form\",
\"submitOption\": \"send_email\",
\"fields\": [
\"quos\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1",
"name": "Feedback",
"content": "A brief Description",
"trackCompletion": false,
"estimatedCompletion": 60,
"estimationCompletedUnit": "minutes",
"submitButtonText": "Submit Form",
"submitOption": "send_email",
"fields": [
"quos"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the details of the specified survey module.
Retrieves the details of the specified survey module. Helps in fetching survey module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/survey/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Feedback",
"slug": "feedback",
"content": "A brief Description",
"redirect": null,
"trackCompletion": false,
"submitButtonText": "Submit Survey",
"submitOption": "save_to_db",
"fields": [
{
"id": 1,
"type": "text",
"label": "How you left",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
},
{
"id": 2,
"type": "rating",
"label": "How you rate us",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Survey Module Details
Retrieves the details of a survey module including its name, slug, content, course information, track completion status, launch checks, and form field data for a specific course registration and module.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"name": "Survey Module", "slug": "survey-module", "content": "Detailed content here", "courseName": "Course 1", "courseSlug": "http://localhost:8000/courses/1/launch", "trackCompletion": true, "min_time_spent": 90, "otherModules": [], "launchCheck": {...}, "errors": [], "course_id": 1, "prevSlug": "previous-module", "nextSlug": "next-module", "status": "In Progress", "timeSpent": 0, "statusRowId": 1, "form_id": 3, "has_form_fields": true, "form_fields": [], "timeToBeSpent": 1}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Survey Module
Updates the status of the survey module to completed. Changes the completion percentage to 100% and marks completed the survey module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/survey/markComplete?statusRowId=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/markComplete"
);
const params = {
"statusRowId": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Module Completed Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Student Response
Returns all the survey module user response of the course in a tabular list format in paginated mode. You can apply filter using search_param via name and scormType(version).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/student-details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/student-details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"question": [
"How you felt",
"How you rate us"
],
"answer": [
"Awesome course it was",
"5"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Survey User Response
Retrieves all the survey modules user response of the course in a tabular list format in paginated mode. You can apply filter using search_param via name and scormType(version).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/course-details?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22userName%22%3A%22%22%7D&course_id=4&portalId=1&type=export" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/course-details"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"userName":""}",
"course_id": "4",
"portalId": "1",
"type": "export",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"headers": [
"student_id",
"student_name",
"student_email",
"first_name",
"last_name",
"email",
"submitted_on"
],
"form_data": [
{
"student_id": 1,
"student_name": "John Doe",
"student_email": "[email protected]",
"Question 1": "Answer 1",
"Question 2": "Answer 2",
"Submitted On": "10-Aug-2020"
}
],
"form_id": [
1,
2
],
"course_name": "My Course Name"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves the count of the maximum number of the form submissions in a single form in a specified course.
Used to estimiate the number of seperate requests are needed to fetch all responses in chunks. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/course-details-count?course_id=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/course-details-count"
);
const params = {
"course_id": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"max_form_data_count": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Survey Report
Retrieves a paginated list of courses along with their associated survey modules. The result can be filtered by course name or ID, and restricted to specific portals. The function also supports ordering of the result set based on specified columns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/survey-count?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22name%22%2C+%22direction%22%3A+%22asc%22%7D&search_param=%7B%22courseName%22%3A%22Math%22%2C+%22courseId%22%3A1%7D&portalId=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/survey-count"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"name", "direction": "asc"}",
"search_param": "{"courseName":"Math", "courseId":1}",
"portalId": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 100,
"recordsFiltered": 50,
"records": [
{
"id": 1,
"name": "Course Name",
"survey": [
{
"id": 1,
"name": "Survey Name",
"formId": 123,
"count": 10
}
],
"count": 10
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get All Users’ Survey Responses by Course and Module
Retrieves paginated survey/form responses submitted by users for a specific module within a course. Supports search filtering, sub-portal filtering, and returns processed answers per question.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/survey/survey-check?page_size=10&page_number=1&course_id=42&module_id=108&portalId=3&search_param=%7B%22userName%22%3A%22John%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/survey/survey-check"
);
const params = {
"page_size": "10",
"page_number": "1",
"course_id": "42",
"module_id": "108",
"portalId": "3",
"search_param": "{"userName":"John"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"form_data": [
{
"submissions": [
{
"question": "How would you rate this course?",
"answer": "5"
},
{
"question": "Any comments?",
"answer": "Very helpful!"
}
],
"name": "John Doe",
"email": "[email protected]"
}
],
"courseName": "Introduction to Programming",
"moduleName": "Module 1: Basics",
"form_data_count": 1,
"recordsTotal": 10,
"recordsFiltered": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Saves the survey form submission data
Saves the survey form submission data and returns the id of the saved form submission
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/survey/save-response" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"content\": \"A brief Description\",
\"form_id\": 1,
\"name\": \"Feedback\",
\"form_fields\": [
{
\"type\": \"text\",
\"label\": \"How you left\",
\"submitted_value\": \"\",
\"options_label\": [],
\"options_value\": []
},
{
\"type\": \"rating\",
\"label\": \"How you rate us\",
\"submitted_value\": 5,
\"options_label\": [],
\"options_value\": []
}
],
\"statusRowId\": \"7\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/save-response"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"content": "A brief Description",
"form_id": 1,
"name": "Feedback",
"form_fields": [
{
"type": "text",
"label": "How you left",
"submitted_value": "",
"options_label": [],
"options_value": []
},
{
"type": "rating",
"label": "How you rate us",
"submitted_value": 5,
"options_label": [],
"options_value": []
}
],
"statusRowId": "7"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Form saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Text Modules
A Text Module is a lesson module used as course content. Helps to perform CRUD operation to and for Text modules.
Text Modules Tabular List
Returns all the text modules in a tabular list format in paginated mode. You can apply filter using search_param via moduleTypes(module type), associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/text?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22moduleTypes%22%3A+%5B%22text%22%5D%2CassociatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"moduleTypes": ["text"],associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"recordsTotal":1,"recordsFiltered":1,"records":[{"id":1,"name":"test","slug":"test","type":"text","icon":"<i class=\"el-icon-document\"><\/i>","author":"Aom Staff","created_at":"Aug 03, 2020 09:56 AM","course_count":1}]}}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Text Module
Retrieves the details of the specified text module. Helps in fetching text module using module ID. (See Parameters) Returns : id, name, slug, content, trackCompletion, estimatedCompletion, estimationCompletedUnit and categories of the text module created.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/text/6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text/6"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 6,
"name": "Getting Started",
"slug": "getting-started",
"content": " ",
"trackCompletion": false,
"estimatedCompletion": null,
"estimationCompletedUnit": null,
"categories": [
1,
2,
3
],
"courses": [
{
"course_id": 1,
"course_name": "Course Name"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Text Module
Creates a new text module. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/text" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"trackCompletion\": true,
\"estimatedCompletion\": \"00:30:00\",
\"estimationCompletedUnit\": \"minutes\",
\"categories\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"content": "<p>This is the updated short content here<\/p>",
"trackCompletion": true,
"estimatedCompletion": "00:30:00",
"estimationCompletedUnit": "minutes",
"categories": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Text Module
Updates the details of the specified text module. (See parameters) Text modules can be used in the course as course content/lesson.
Returns : Successfull message
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/text/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"My-text-lesson\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"trackCompletion\": true,
\"estimatedCompletion\": \"00:30:00\",
\"estimationCompletedUnit\": \"minutes\",
\"categories\": [
1,
2,
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "My-text-lesson",
"content": "<p>This is the updated short content here<\/p>",
"trackCompletion": true,
"estimatedCompletion": "00:30:00",
"estimationCompletedUnit": "minutes",
"categories": [
1,
2,
3
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Text Module Details
To get the details of a text module, you need to use this request. (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/text/details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/text/details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"name": "First Text", "slug": "first-text", "content": "A brief description", "courseName": "First Course", "courseSlug": "http://localhost:8000/courses/1/launch", "url": "http://localhost:8000/courses/1/modules/2/launch", "totalPoints": 20, "shouldBeEvaluated": true, "min_time_spent": 90, "otherModules": []], "launchCheck": {...}, "prevSlug": "first-video", "nextSlug": "second-video", "currentUserId": 1, "currentStudentAvatar": "http://localhost:8000/storage/avatars/1.png", "currentUserName": "John Doe", "status": "In Progress", "statusRowId": 1, "timeSpent": 0, "course_newly_completed": false, "timeToBeSpent": 1, "instructorResponse": null}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Text Module
Updates the status of the text module to completed. Changes the completion percentage to 100% and marks completed the text module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/text/markComplete?statusRowId=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/text/markComplete"
);
const params = {
"statusRowId": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Module Completed Successfully",
"course_newly_completed": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Text Module Info for Membership content
Retrieves details of text module in depth for the same membership the current text module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/text/content-details?moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/text/content-details"
);
const params = {
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Getting Started",
"slug": "getting-started",
"content": " ",
"trackCompletion": true,
"timeSpent": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Videos
A Video Module is a lesson module used as course content. Helps to perform CRUD operation to and for Video modules.
Video Modules Tabular List
Returns all the video modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/video?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "test",
"slug": "test",
"type": "video",
"icon": "<i class=\"el-icon-document\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM",
"course_count": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Video Module
Creates a new video module with the provided details. (See parameters) Video modules can be used in the course as course content/lesson.
Returns : id of the video module created and success message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/video" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"My-video-lesson\",
\"content\": \"Brief Description\",
\"url\": \"https:\\/\\/player.vimeo.com\\/video\\/382947752\",
\"provider\": \"vimeo\",
\"coverUrl\": \"https:\\/\\/picsum.photos\\/200\\/300\",
\"trackCompletion\": true,
\"estimatedCompletion\": \"00:30:00\",
\"estimationCompletedUnit\": \"minutes\",
\"disableForwardSeek\": true,
\"categories\": [
1,
2,
3
],
\"subtitleType\": \"upload\",
\"interactions\": [
{
\"type\": \"quiz\",
\"time\": \"00:05:00\"
}
],
\"subtitles\": [
{
\"language\": \"en\",
\"subtitleContent\": \"Subtitle text\"
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "My-video-lesson",
"content": "Brief Description",
"url": "https:\/\/player.vimeo.com\/video\/382947752",
"provider": "vimeo",
"coverUrl": "https:\/\/picsum.photos\/200\/300",
"trackCompletion": true,
"estimatedCompletion": "00:30:00",
"estimationCompletedUnit": "minutes",
"disableForwardSeek": true,
"categories": [
1,
2,
3
],
"subtitleType": "upload",
"interactions": [
{
"type": "quiz",
"time": "00:05:00"
}
],
"subtitles": [
{
"language": "en",
"subtitleContent": "Subtitle text"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Video Module Details
Returns a video module details given its Id. This API is used by the course player to fetch the video module details while playing the course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/video/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "test",
"slug": "test",
"content": "This is a test video module.",
"provider": "vimeo",
"url": "https://vimeo.com/123456789",
"coverUrl": "https://picsum.photos/200/300",
"disableForwardSeek": false,
"trackCompletion": false,
"estimatedCompletion": null,
"estimationCompletedUnit": null,
"subtitleType": "",
"subtitleFilePath": [
{
"language": "en",
"filePath": "/storage/vtt/en_1.vtt"
}
],
"categories": [
1,
2
],
"courses": [
{
"course_id": 1,
"course_name": "My Course"
}
],
"subtitleDetails": [
{
"subtitleContent": "This is a test subtitle.",
"language": "en"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified video module in storage.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/video/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Video Module Details
Returns a video module details given its Id. This API is used by the course player to fetch the video module details while playing the course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/video/details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/video/details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "This is a test video module.",
"courseName": "My Course",
"courseSlug": "my-course",
"min_time_spent": 5,
"otherModules": [
{
"module_id": 1,
"module_name": "Module 1",
"module_slug": "module-1",
"display_order": 1
},
{
"module_id": 2,
"module_name": "Module 2",
"module_slug": "module-2",
"display_order": 2
}
],
"subtitleType": "",
"subtitleFilePath": [
{
"language": "en",
"filePath": "/storage/vtt/en_1.vtt"
}
],
"launchCheck": {
"canbeLaunched": true,
"errDesc": ""
},
"prevSlug": "module-1",
"nextSlug": "module-2",
"provider": "vimeo",
"coverUrl": "https://picsum.photos/200/300",
"url": "https://vimeo.com/123456789",
"disableForwardSeek": false,
"trackCompletion": false,
"interactions": [],
"courseStatus": "In Progress",
"status": "In Progress",
"statusRowId": 1,
"timeSpent": 0,
"lastWatchedTime": 0,
"isReady": true,
"course_newly_completed": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Video Module
Updates the status of the video module to completed. Changes the completion percentage to 100% and marks completed the video module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/video/markComplete?statusRowId=4&videoDuration=90&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/video/markComplete"
);
const params = {
"statusRowId": "4",
"videoDuration": "90",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"status": true,
"message": "Module completed successfully",
"course_newly_completed": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Video Module Info for Membership content
This function retrieves details of a video module, including its name, slug, content, provider, cover URL, and URL. It checks if the video is ready to be viewed, updates the time spent and last watched time, and indicates whether the video is part of membership content. If the video is not ready, an error message is included in the response.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/video/content-details?moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/video/content-details"
);
const params = {
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Module Name",
"slug": "module-slug",
"content": "Content of the module",
"provider": "in-house",
"coverUrl": "https://example.com/cover.jpg",
"url": "https://example.com/video.mp4",
"disableForwardSeek": false,
"trackCompletion": true,
"timeSpent": 120,
"lastWatchedTime": 30,
"isPartOfMembershipContent": true,
"isReady": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webinar Management API
This controller handles all API interactions related to webinar management within the platform. It provides endpoints for creating, updating, deleting, and retrieving webinar details, as well as managing attendee registrations, webinar sessions, and related content.
Endpoints in this controller are focused on managing the lifecycle of webinars, from setup to attendee interactions and webinar reporting.
Delete a webinar module
Deletes a webinar module and it's associated schedules.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webinar/deleteWebinar?webinarId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/deleteWebinar"
);
const params = {
"webinarId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Webinar deleted successfully"
}
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new webinar module with recurrence.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webinar/recurrence-webinar" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"attendanceThreshold\": 17,
\"startDate\": \"rerum\",
\"startTime\": \"veniam\",
\"endTime\": \"numquam\",
\"location\": 18,
\"instructor\": 12,
\"serviceProvider\": \"quibusdam\",
\"enableCloudRecording\": false,
\"allowDownload\": false,
\"meetingUrl\": \"http:\\/\\/www.maggio.info\\/in-repellat-repellendus-vero-praesentium-commodi-dolor\",
\"enableAutoAttendance\": false,
\"enableRecurrence\": false,
\"frequency\": \"error\",
\"interval\": 6,
\"end\": \"tenetur\",
\"webinarDays\": 13
}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/recurrence-webinar"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"attendanceThreshold": 17,
"startDate": "rerum",
"startTime": "veniam",
"endTime": "numquam",
"location": 18,
"instructor": 12,
"serviceProvider": "quibusdam",
"enableCloudRecording": false,
"allowDownload": false,
"meetingUrl": "http:\/\/www.maggio.info\/in-repellat-repellendus-vero-praesentium-commodi-dolor",
"enableAutoAttendance": false,
"enableRecurrence": false,
"frequency": "error",
"interval": 6,
"end": "tenetur",
"webinarDays": 13
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"recurrenceWebinar": [
{
"startDate": "2020-01-01",
"endDate": "2020-01-01",
"startTime": "10:00:00",
"endTime": "11:00:00",
"location": 1,
"instructor": 1,
"showEdit": false,
"serviceProvider": "zoom",
"enableCloudRecording": true,
"allowDownload": true,
"meetingUrl": "https://zoom.us/j/1234567890",
"enableAutoAttendance": true,
"attendanceThreshold": 80
}
],
"message": "Webinar created successfully",
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Validate the webinar request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webinar/validate-webinar" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"attendanceThreshold\": 8,
\"startDate\": \"architecto\",
\"startTime\": \"sequi\",
\"endTime\": \"eveniet\"
}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/validate-webinar"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"attendanceThreshold": 8,
"startDate": "architecto",
"startTime": "sequi",
"endTime": "eveniet"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Webinar updated successfully",
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a webinar for the given course
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webinar/update-webinar" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_id\": 4,
\"id\": 20,
\"webinarList\": [
\"similique\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/update-webinar"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_id": 4,
"id": 20,
"webinarList": [
"similique"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Webinar updated successfully",
"status": "success"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"message": [
"Start date and time cannot be in the past."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new webinar in the database.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webinar/add-webinar" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_id\": 14,
\"webinarList\": [
\"error\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/add-webinar"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_id": 14,
"webinarList": [
"error"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Webinar created successfully",
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export attendance report for a given webinar
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/webinar/export-attendance" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"webinarId\": 7,
\"pageSize\": 12,
\"pageNumber\": 16,
\"portalId\": 14
}"
const url = new URL(
"https://demo.aomlms.com/api/webinar/export-attendance"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"webinarId": 7,
"pageSize": 12,
"pageNumber": 16,
"portalId": 14
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"courseName": "Course Name",
"startDate": "2020-12-01 10:00:00",
"endDate": "2020-12-01 11:00:00",
"recordsTotal": 100,
"totalAttended": 50,
"totalNoShow": 20,
"totalCancelled": 10,
"totalPartiallyAttended": 20,
"records": [
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"status": "Attended",
"attendanceRecordingType": "Manual",
"notes": "Test notes",
"recordedAt": "2020-12-01 10:00:00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webinars
A Webinar Module is used as course content. Helps to perform CRUD operation to and for Webinar modules.
Handle Zoom Webhook
Receives Zoom webhook events. When a meeting.ended
event is received, it processes webinar attendance.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/zoom/webhook" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"meeting.ended\",
\"payload\": []
}"
const url = new URL(
"https://demo.aomlms.com/api/zoom/webhook"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "meeting.ended",
"payload": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Event received"
}
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Launch Details
Retrieves the launch details for the webinar modules. Returned data includes webinar provider name(like vimeo, zoom, big blue button, etc), whether webinar is created successfully or not, etc This information helps while launching the webinar for learners.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/webinar/launch?moduleId=12&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/webinar/launch"
);
const params = {
"moduleId": "12",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"provider": "zoom",
"webinarDetails": {
"is_success": true,
"message": "Meeting started successfully",
"url": "https://zoom.us/j/11111111111"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Webinar Module
Updates the status of the webinar module to completed. Changes the completion percentage to 100% and marks completed the webinar module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/webinar/markComplete?statusRowId=4&portalId=5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/webinar/markComplete"
);
const params = {
"statusRowId": "4",
"portalId": "5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Module completed successfully",
"course_newly_completed": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.