Api Contract Kampus Komerce (1.0.0)
Download OpenAPI specification:Download
This is an Api Contract for Kampus Komerce project. use Token to consumes endpoint.
Logs user into the system
Request Body schema: application/json
username required | string |
password required | string <password> |
Responses
Request samples
- Payload
{- "username": "string",
- "password": "pa$$word"
}
Response samples
- 200
- 400
{- "status": "success",
- "code": "200",
- "data": {
- "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMGQyMzE4NTg0YWNmYTU4MGQxYjM1ZWM1NzczNTFlYThjYzY2ZTA4MjNhODdkMWZiODJlYjVlYWQxYTUxNzA1M2RhMjVmYTk0MGI2NzExMDEiLCJpYXQiOjE2MjczNjc3MjMsIm5iZiI6MTYyNzM2NzcyMywiZXhwIjoxNjU4OTAzNzIzLCJzdWIiOiIyIiwic2NvcGVzIjpbXX0.Swq2EdjNWL7JrRZFu1Gh9x5ZHwo7jmCioZz4Z19IQB2rTIGUDyhkds276ZzPHh-pDwkrD2uEWhceOuXrKnlOwtvJOu3Kf3VymsabIKqJpb8e4dq76FWPbUD6k-WexL7QKQan9gH1LwoQey2nMKFi5hd7_3A9sFLRrQerqh3qugWdD7RqqYS3vYY9M3VqHf108w5iQa_GHkRx2KRv0PxRVRqofkTCBBf-Oc-kcvLkau8N6BVojkYDJ8Cl8uG5XcS0F1RjbNy6SuiuTyqq1BqaZmcasi87zwJEeuJSgdqBfnNch608impEBu9q_ON1kMIgK9LZvqL8_Uk1vP5qosUq39VgJj8qbFDpCKsKus6fjO78G-zeYbZ32D-s03QwPr9FkwoZXg_HaiyTDvsbTcgH63wU-Q7ycor8IgSKPsfkJN1OytohleJMWYOObiN-IKqKGbXnf85DnJrhZuOZB9tQdoq4fIXYx68LQgmiLSVemXUbHMtRmXbYWwAIFy3QexPRGtHxK8wCzqEH-whXh66RKBy31gf1Fu9wxHHEb95U_UfYYynbbDxapwurJHzgxUswdBWDNguNoAJZslZfwVMguAmgtylFvNYzIlEWkENTk5fcTNOJsmVWDYuO-QJyWwCStB7_a7jcPFHLqcs7pwu9cvV-X1__x0BgRD6E9VBfYQg",
- "token_type": "Bearer",
- "expires_at": "2022-07-27 13:35:23",
- "user_id": "1",
- "username": "john_doe",
}
}
Response samples
- 200
- 400
{- "status": "success",
- "code": "200",
- "message": "logout successful"
}
Change password for authenticate user
Authorizations:
query Parameters
old_password required | string old password |
new_password required | string New password, 8 character minimum |
Responses
Response samples
- 200
- 400
{- "status": "success",
- "code": "200",
- "message": "Password changed successfully"
}
Response samples
- 200
- 400
{- "status": "success",
- "code": "200",
- "message": "Refresh Token successful",
- "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMGQyMzE4NTg0YWNmYTU4MGQxYjM1ZWM1NzczNTFlYThjYzY2ZTA4MjNhODdkMWZiODJlYjVlYWQxYTUxNzA1M2RhMjVmYTk0MGI2NzExMDEiLCJpYXQiOjE2MjczNjc3MjMsIm5iZiI6MTYyNzM2NzcyMywiZXhwIjoxNjU4OTAzNzIzLCJzdWIiOiIyIiwic2NvcGVzIjpbXX0.Swq2EdjNWL7JrRZFu1Gh9x5ZHwo7jmCioZz4Z19IQB2rTIGUDyhkds276ZzPHh-pDwkrD2uEWhceOuXrKnlOwtvJOu3Kf3VymsabIKqJpb8e4dq76FWPbUD6k-WexL7QKQan9gH1LwoQey2nMKFi5hd7_3A9sFLRrQerqh3qugWdD7RqqYS3vYY9M3VqHf108w5iQa_GHkRx2KRv0PxRVRqofkTCBBf-Oc-kcvLkau8N6BVojkYDJ8Cl8uG5XcS0F1RjbNy6SuiuTyqq1BqaZmcasi87zwJEeuJSgdqBfnNch608impEBu9q_ON1kMIgK9LZvqL8_Uk1vP5qosUq39VgJj8qbFDpCKsKus6fjO78G-zeYbZ32D-s03QwPr9FkwoZXg_HaiyTDvsbTcgH63wU-Q7ycor8IgSKPsfkJN1OytohleJMWYOObiN-IKqKGbXnf85DnJrhZuOZB9tQdoq4fIXYx68LQgmiLSVemXUbHMtRmXbYWwAIFy3QexPRGtHxK8wCzqEH-whXh66RKBy31gf1Fu9wxHHEb95U_UfYYynbbDxapwurJHzgxUswdBWDNguNoAJZslZfwVMguAmgtylFvNYzIlEWkENTk5fcTNOJsmVWDYuO-QJyWwCStB7_a7jcPFHLqcs7pwu9cvV-X1__x0BgRD6E9VBfYQg"
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "class_id": "1",
- "class_skill": "Advertiser",
- "total_module": "5",
- "class_status": "publish"
}
]
}
Get class by class_id
Authorizations:
path Parameters
class_id required | string class_id from class list. This responses can be applied at edit page and detail page |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "class_trailer_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "class_status": "publish"
}
}
Store new Class
Authorizations:
query Parameters
class_skill required | string Enum: "Advertiser" "Customer Service" "Admin Marketplace" Post the id from class_skill |
class_trailer_url required | string video url |
class_trailer_description required | string short explanation of the class |
class_status required | string Enum: "draft" "publish" publish status |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Class has been stored successfully."
}
Update current Class
Authorizations:
query Parameters
class_skill required | string Enum: "Advertiser" "Customer Service" "Admin Marketplace" Post the id from class_skill |
class_trailer_url required | string video url |
class_trailer_description required | string short explanation of the class |
class_status required | string Enum: "draft" "publish" publish status |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "class_trailer_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "class_status": "publish"
}
}
Delete Class
Rules: cannot delete class if class has module, if class already publish, if class already has user joined
Authorizations:
query Parameters
class_id required | integer id of the class |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Class has been deleted successfully."
}
Returns module data
action add, edit, delete
Authorizations:
query Parameters
class_id required | integer |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "modules": [
- {
- "module_id": "1",
- "module_class_id": "1",
- "module_title": "Modul 1",
- "module_subtitle": "Subtitle 1.A",
- "module_trainer": "John Doe",
- "module_status": "publish"
}
]
}
}
Returns module data
action add, edit, delete
Authorizations:
path Parameters
class_id required | integer |
search required | string |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "modules": [
- {
- "module_id": "1",
- "module_class_id": "1",
- "module_title": "Modul 1",
- "module_subtitle": "Subtitle 1.A",
- "module_trainer": "John Doe",
- "module_status": "publish"
}
]
}
}
Get module by module_id
Authorizations:
path Parameters
module_id required | string module_id from module list. This responses can be applied at edit page and detail page |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "module_id": "1",
- "module_class_id": "1",
- "module_title": "Lorem ipsum dolor sit amet",
- "module_subtitle": "Lorem ipsum dolor sit amet",
- "module_trainer": "John Doe",
- "module_status": "publish"
}
}
Store new Module
Authorizations:
query Parameters
module_title required | string Unique values. Duplicate module_title not allowed |
module_subtitle required | string |
module_trainer required | integer select option |
module_status required | string Enum: "draft" "publish" publish status |
module_class_id required | integer |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Module has been stored successfully."
}
Update current Module
Authorizations:
query Parameters
module_title required | string Unique values. Duplicate module_title not allowed |
module_subtitle required | string |
module_trainer required | integer select option |
module_status required | string Enum: "draft" "publish" publish status |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "module_id": "1",
- "module_class_id": "1",
- "module_title": "Lorem ipsum dolor sit amet",
- "module_subtitle": "Lorem ipsum dolor sit amet",
- "module_trainer": "John Doe",
- "module_status": "publish"
}
}
Delete Module
Rules: cannot delete module if module has lessons, if module already publish
Authorizations:
query Parameters
module_id required | integer id of the module |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Module has been deleted successfully."
}
Returns lesson data
action add, edit, delete
Authorizations:
query Parameters
module_id required | integer |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "module_id": "1",
- "module_title": "Module 1",
- "module_subtitle": "Module 1",
- "module_status": "publish",
- "module_trainer_name": "John Doe",
- "lessons": [
- {
- "lesson_id": "1",
- "lesson_module_id": "1",
- "lesson_title": "Lesson 1",
- "lesson_video_description": "Lorem ipsum dolor sit amet",
- "lesson_status": "publish"
}
]
}
}
Returns lesson data
action add, edit, delete
Authorizations:
path Parameters
module_id required | integer |
filter_title required | integer |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "module_id": "1",
- "module_title": "Module 1",
- "module_subtitle": "Module 1",
- "module_status": "publish",
- "module_trainer_name": "John Doe",
- "lessons": [
- {
- "lesson_id": "1",
- "lesson_module_id": "1",
- "lesson_title": "Lesson 1",
- "lesson_video_description": "Lorem ipsum dolor sit amet",
- "lesson_status": "publish"
}
]
}
}
Get lesson by lesson_id
Authorizations:
path Parameters
lesson_id required | string lesson_id from lesson list. This responses can be applied at edit page and detail page |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "lesson_id": "1",
- "lesson_module_id": "1",
- "lesson_title": "Modul 1",
- "lesson_video_description": "Lorem ipsum dolor sit amet",
- "edumo_lesson_id": "dee303e7-0381-4f07-8eb3-71115ceeb71c",
- "lesson_status": "publish"
}
}
Store new Lesson
Authorizations:
query Parameters
lesson_title required | string Unique values. Duplicate lesson_title not allowed |
lesson_video_description required | string |
lesson_video_url required | string |
lesson_status required | string Enum: "draft" "publish" publish status |
lesson_class_id required | integer |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Lesson has been stored successfully."
}
Update current Lesson
Authorizations:
query Parameters
lesson_title required | string Unique values. Duplicate lesson_title not allowed |
lesson_video_description required | string |
lesson_video_url required | string |
lesson_status required | string Enum: "draft" "publish" publish status |
lesson_class_id required | integer |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "lesson_id": "1",
- "lesson_module_id": "1",
- "lesson_title": "Modul 1",
- "lesson_video_description": "Lorem ipsum dolor sit amet",
- "edumo_lesson_id": "dee303e7-0381-4f07-8eb3-71115ceeb71c",
- "lesson_status": "publish"
}
}
Delete Lesson
Rules: cannot delete lesson if lesson has lessons, if lesson already publish
Authorizations:
query Parameters
lesson_id required | integer id of the lesson |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Lesson has been deleted successfully."
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "lesson_id": "1",
- "quiz_id": "dee303e7-0381-4f07-8eb3-71115ceebkj0",
- "question": [
- {
- "id": "dee303e7-0381-4f07-8eb3-71115ceeb71c",
- "question": "1 + 1 =",
- "type": "text",
- "answers_type": "choices",
- "position": "0",
- "answers": [
- {
- "id": "4ba0ba74-f1ca-4944-9d0c-aa1f97139d77",
- "answer": "2",
- "correct_answer": true,
- "position": 0
}, - {
- "id": "59a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "3",
- "correct_answer": false,
- "position": 1
}, - {
- "id": "56a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "5",
- "correct_answer": false,
- "position": 2
}, - {
- "id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "4",
- "correct_answer": false,
- "position": 3
}
]
}
]
}
}
Returns quiz data
Authorizations:
Request Body schema: application/json
quiz_id | uuid |
question_id | uuid |
question | string |
type | string |
answers_type | string |
position | integer |
Array of objects (answers) [ items ] |
Responses
Request samples
- Payload
{- "quiz_id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "question_id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "question": "1 + 1 =",
- "type": "text",
- "answers_type": "choices",
- "position": "0",
- "answers": [
- {
- "id": "4ba0ba74-f1ca-4944-9d0c-aa1f97139d77",
- "answer": "2",
- "correct_answer": true,
- "position": 0
}, - {
- "id": "59a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "3",
- "correct_answer": false,
- "position": 1
}, - {
- "id": "56a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "5",
- "correct_answer": false,
- "position": 2
}, - {
- "id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "4",
- "correct_answer": false,
- "position": 3
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "message": "quiz has been stored successfully."
}
quiz-update
Authorizations:
Request Body schema: application/json
quiz_id | uuid |
question_id | uuid |
question | string |
type | string |
answers_type | string |
position | integer |
Array of objects (answers) [ items ] |
Responses
Request samples
- Payload
{- "quiz_id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "question_id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "question": "1 + 1 =",
- "type": "text",
- "answers_type": "choices",
- "position": "0",
- "answers": [
- {
- "id": "4ba0ba74-f1ca-4944-9d0c-aa1f97139d77",
- "answer": "2",
- "correct_answer": true,
- "position": 0
}, - {
- "id": "59a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "3",
- "correct_answer": false,
- "position": 1
}, - {
- "id": "56a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "5",
- "correct_answer": false,
- "position": 2
}, - {
- "id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "4",
- "correct_answer": false,
- "position": 3
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "id": "dee303e7-0381-4f07-8eb3-71115ceeb71c",
- "question": "1 + 1 =",
- "type": "text",
- "answers_type": "choices",
- "position": "0",
- "answers": [
- {
- "id": "4ba0ba74-f1ca-4944-9d0c-aa1f97139d77",
- "answer": "2",
- "correct_answer": true,
- "position": 0
}, - {
- "id": "59a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "3",
- "correct_answer": false,
- "position": 1
}, - {
- "id": "56a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "5",
- "correct_answer": false,
- "position": 2
}, - {
- "id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "4",
- "correct_answer": false,
- "position": 3
}
]
}
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "id": "1",
- "name": "john doe",
- "skill_id": "Advertiser",
- "phone": "081 2214 211214",
- "bank_name": "BCA",
- "bank_account_number": "3909199187",
- "bank_account_name": "John Doe",
- "npwp": "1212187873651",
- "province": {
- "id": 1002,
- "name": "Jawa Tengah"
}, - "regency": {
- "id": 1011,
- "name": "Purbalingga"
}, - "district": {
- "id": 1092,
- "name": "Karangmoncol"
}, - "address": "jl. Karangmoncol no 21 a rt 10 rw IV",
- "xml": null
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "schema": {
- "id": "1",
- "name": "john doe",
- "skill_id": "Advertiser",
- "phone": "081 2214 211214",
- "bank_name": "BCA",
- "bank_account_number": "3909199187",
- "bank_account_name": "John Doe",
- "npwp": "1212187873651",
- "province": {
- "id": 1002,
- "name": "Jawa Tengah"
}, - "regency": {
- "id": 1011,
- "name": "Purbalingga"
}, - "district": {
- "id": 1092,
- "name": "Karangmoncol"
}, - "address": "jl. Karangmoncol no 21 a rt 10 rw IV",
- "xml": null
}
}
Returns trainer data
Authorizations:
query Parameters
name required | string name |
skill_id required | string Enum: "Advertiser" "Customer Service" "Admin Marketplace" Post the id from skill_id |
phone required | string phone |
email required | string |
bank_name required | string bank_name |
bank_account_number required | string bank_account_number |
bank_account_name required | string bank_account_name |
npwp required | string npwp |
province_id required | integer |
regency_id required | integer |
distric_id required | integer |
address required | string detail address |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "message": "Trainer has been stored successfully."
}
trainer-update
Authorizations:
Request Body schema: application/json
id | integer |
name | string |
skill_id | integer Enum: "Advertiser" "Customer Service" "Admin Marketplace" |
phone | string |
string | |
photo_profile | string |
bank_name | string |
bank_account_number | char |
bank_account_name | string |
npwp | char |
cv | string |
province_id | char |
regency_id | char |
distric_id | char |
address | string |
Responses
Request samples
- Payload
{- "id": "1",
- "name": "john doe",
- "skill_id": "Advertiser",
- "phone": "081 2214 211214",
- "bank_name": "BCA",
- "bank_account_number": "3909199187",
- "bank_account_name": "John Doe",
- "npwp": "1212187873651",
- "province_id": "1212",
- "regency_id": "1000",
- "distric_id": "1090",
- "address": "jl. Karangmoncol no 21 a rt 10 rw IV"
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "message": "trainer has been updated successfully."
}
Returns dasboard data
Data for admin dashboard, cart object filtered by default with start_date = {current_year}/01/01 and end_date = {current_year}/12/31
Authorizations:
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class": [
- {
- "class_skill": "Advertiser",
- "total_student_joined": 1000,
- "total_student_finished": 710,
- "progress_student": 71
}, - {
- "class_skill": "Customer Service",
- "total_student_joined": 2121,
- "total_student_finished": 1211,
- "progress_student": 67
}, - {
- "class_skill": "Admin Marketplace",
- "total_student_joined": 1444,
- "total_student_finished": 311,
- "progress_student": 21
}
], - "cart": {
- "student_joined": 35,
- "student_finished": 800,
- "lines": {
- "joined": [
- {
- "total": "190",
- "date": "2021-03-11"
}
], - "finished": [
- {
- "total": "190",
- "date": "2021-03-11"
}
]
}
}, - "certificate_downloaded": 2300
}
}
Returns dasboard data
only return data for displaying cart
Authorizations:
query Parameters
start_date | string <YY/MM/DD> Example: start_date=2021/01/01 |
end_date | string <YY/MM/DD> Example: end_date=2021/12/31 |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "cart": {
- "student_joined": 35,
- "student_finished": 800,
- "lines": {
- "joined": [
- {
- "total": "190",
- "date": "2021-03-11"
}
], - "finished": [
- {
- "total": "190",
- "date": "2021-03-11"
}
]
}
}
}
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "joined": [
- {
- "class_skill": "Advertiser",
- "student": [
- {
- "student_user_id": 1,
- "student_name": "Bambang",
- "student_score": "90",
- "student_finished_at": "12/11/2021"
}, - {
- "student_user_id": 2,
- "student_name": "Bambang 2",
- "student_score": "80",
- "student_joined_at": "12/12/2021"
}
]
}
], - "finished": [
- {
- "class_skill": "Advertiser",
- "student": [
- {
- "student_user_id": 1,
- "student_name": "Bambang",
- "student_score": "90",
- "student_finished_at": "12/11/2021"
}, - {
- "student_user_id": 2,
- "student_name": "Bambang 2",
- "student_score": "80",
- "student_joined_at": "12/12/2021"
}
]
}
]
}
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "province_id": "1002",
- "province_name": "JAWA TENGAH",
- "regencies": [
- {
- "regency_id": "1992",
- "regency_name": "PURBALINGGA",
- "districts": [
- {
- "district_id": 1212,
- "district_name": "TEUPAH SELATAN"
}, - {
- "district_id": 1212,
- "district_name": "SIMEULUE TIMUR"
}, - {
- "district_id": 1212,
- "district_name": "TEUPAH BARAT"
}, - {
- "district_id": 1212,
- "district_name": "TEUPAH TENGAH"
}, - {
- "district_id": 1212,
- "district_name": "SIMEULUE TENGAH"
}
]
}
]
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "skill_id": "1",
- "skill_name": "Advertiser"
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "user_id": "1",
- "user_name": "adv123",
- "user_fullname": "Advertiser",
- "user_birth_date": "31/12/1990",
- "user_gender": "1 | Laki-laki",
- "user_marital_status": "0 | Belum Menikah",
- "user_phone": "081212323454",
- "user_province_id": "1000",
- "user_regency_id": "1000",
- "user_district_id": "1000",
- "user_education": "Sarjana",
- "user_address": "jln. Karangmoncol no 13",
- "user_has_work_experience": 1,
- "user_work_experience": "< 1 year"
}
]
}
Get user by user_id
Authorizations:
path Parameters
user_id required | string user_id from list. This responses can be applied at edit page and detail page |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "user_id": "1",
- "user_name": "Adv123",
- "user_fullname": "Advertiser",
- "user_birth_date": "31/12/1990",
- "user_gender": "1 | Laki-laki",
- "user_marital_status": "0 | Belum Menikah",
- "user_phone": "081212323454",
- "user_province_id": "1000",
- "user_regency_id": "1000",
- "user_district_id": "1000",
- "user_education": "Sarjana",
- "user_address": "jln. Karangmoncol no 13",
- "user_has_work_experience": 1,
- "user_work_experience": "< 1 year",
- "user_course_score": "100",
}
}
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "is_complete": true
}
}
Store new Profile Deprecated
Authorizations:
query Parameters
user_name required | string user_name |
user_birth_date required | date <dd-mm-yyyy> user_birth_date |
user_gender required | enum Enum: "1 | Laki-laki" "2 | Perempuan" user_gender |
user_marital_status required | enum Enum: "0 | Belum Menikah" "1 | Menikah" "else | -" user_marital_status |
user_email required | string user_email |
user_phone required | string user_phone |
user_province_id required | integer user_province_id |
user_regency_id required | integer user_regency_id |
user_regency_id required | integer user_regency_id |
user_education required | enum Enum: "Sarjana" "SMA/SMK" "SMP" "SD" user_education |
user_address required | string user_address |
user_email required | string user_email |
user_has_work_experience required | boolean 1=true,0=false |
user_work_experience required | enum Enum: "< 1 year" "1 year" "2 years" "3 years" user_work_experience |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Profile has been stored successfully."
}
Update current Profile
send only field which need to be updated, no need to sent all the field.
Authorizations:
query Parameters
user_fullname | string user_fullname |
user_birth_date | date <dd-mm-yyyy> user_birth_date |
user_gender | enum Enum: "1 | Laki-laki" "2 | Perempuan" user_gender |
user_marital_status | enum Enum: "0 | Belum Menikah" "1 | Menikah" "else | -" user_marital_status |
user_email | string user_email |
user_phone | string user_phone |
user_province_id | integer user_province_id |
user_regency_id | integer user_regency_id |
user_regency_id | integer user_regency_id |
user_education | enum Enum: "Sarjana" "SMA/SMK" "SMP" "SD" user_education |
user_address | string user_address |
user_email | string user_email |
user_has_work_experience | boolean 1=true,0=false |
user_work_experience | enum Enum: "< 1 year" "1 year" "2 years" "3 years" user_work_experience |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "user_id": "1",
- "user_name": "Adv123",
- "user_fullname": "Advertiser",
- "user_birth_date": "31/12/1990",
- "user_gender": "1 | Laki-laki",
- "user_marital_status": "0 | Belum Menikah",
- "user_phone": "081212323454",
- "user_province_id": "1000",
- "user_regency_id": "1000",
- "user_district_id": "1000",
- "user_education": "Sarjana",
- "user_address": "jln. Karangmoncol no 13",
- "user_has_work_experience": 1,
- "user_work_experience": "< 1 year",
- "user_course_score": "100",
}
}
Response samples
- 200
- 503
{- "status": "success",
- "code": "200",
- "data": [
- {
- "class_id": "1",
- "class_skill": "Advertiser",
- "total_module": "5",
- "class_status": "publish"
}
]
}
Get class by class_id for no auth user
path Parameters
class_id required | string class_id from class list. This responses can be applied at detail page |
Responses
Response samples
- 200
- 400
- 503
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "class_trailer_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "class_status": "publish"
}
}
Response samples
- 200
- 503
{- "status": "success",
- "code": "200",
- "data": [
- {
- "testimonial_id": "1",
- "testimonial_url": "www.blog.com/articles/user-020292829282928",
- "user_fullname": "John Doe",
- "testimonial_description": "Lorem ipsum dolor sit amet",
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "class_id": "1",
- "class_skill": "Advertiser",
- "total_module": "5",
- "class_trailer_url": {
- "otp": "20160313versASE3237sLsL5eYqzwAWu3mUCasE3xzQZa7qkeVgSpbxxkXiR8Gg5",
- "playbackInfo": "eyJ2aWRlb0lkIjoiZWRhYThiNjU2MmIxNGY2NmJkZTY0NmNmMGJmY2Q2ZDIifQ=="
}, - "class_trailer_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "class_status": "publish"
}
]
}
Get class by class_id
Authorizations:
path Parameters
class_id required | string class_id from class list. This responses can be applied at edit page and detail page |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "total_module": "5",
- "user_joined": "50",
- "class_trailer_url": {
- "otp": "20160313versASE3237sLsL5eYqzwAWu3mUCasE3xzQZa7qkeVgSpbxxkXiR8Gg5",
- "playbackInfo": "eyJ2aWRlb0lkIjoiZWRhYThiNjU2MmIxNGY2NmJkZTY0NmNmMGJmY2Q2ZDIifQ=="
}, - "class_trailer_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "class_status": "publish",
- "is_joined": true
}
}
Get class with module. only published class and module
Authorizations:
path Parameters
class_id required | string class_id from class list. This responses can be applied at edit page and detail page |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_id": "1",
- "class_skill": "Advertiser",
- "modules": [
- {
- "module_id": "1",
- "module_title": "Modul 1",
- "module_subtitle": "Subtitle 1.A",
}
]
}
}
join Class
generate row for my-module and my-lesson which the first object`s status is unlocked and the rest are locked.
Authorizations:
query Parameters
class_id required | int Example: class_id=1 Post the id |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Class has been stored successfully."
}
Get module with Lesson . only published module and Lesson
Authorizations:
path Parameters
module_id required | string |
Responses
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "module_id": "success",
- "module_title": "Module 1",
- "module_subtitle": "Module 1",
- "module_status": "publish",
- "module_trainer_name": "John Doe",
- "class_name": "Advertiser",
- "lessons": [
- {
- "lesson_id": "1",
- "lesson_module_id": "1",
- "lesson_title": "Modul 1",
- "lesson_video_description": "Lorem ipsum dolor sit amet",
- "lesson_status": "publish"
}
]
}
}
Returns quiz data
Authorizations:
query Parameters
lesson_id required | int Example: lesson_id=1 |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "lesson_id": "1",
- "quiz_id": "dee303e7-0381-4f07-8eb3-71115ceebkj0",
- "question": [
- {
- "id": "dee303e7-0381-4f07-8eb3-71115ceeb71c",
- "question": "1 + 1 =",
- "type": "text",
- "answers_type": "choices",
- "position": "0",
- "answers": [
- {
- "id": "4ba0ba74-f1ca-4944-9d0c-aa1f97139d77",
- "answer": "2",
- "correct_answer": true,
- "position": 0
}, - {
- "id": "59a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "3",
- "correct_answer": false,
- "position": 1
}, - {
- "id": "56a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "5",
- "correct_answer": false,
- "position": 2
}, - {
- "id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "4",
- "correct_answer": false,
- "position": 3
}
]
}
]
}
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "my_class_id": "1",
- "class_id": "1",
- "class_skill": "Advertiser",
- "total_module": "5",
- "class_progress": "70"
}
]
}
Returns my module data
class_id = id from lms_class_id
Authorizations:
query Parameters
class_id required | string |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "my_class_id": "1",
- "class_id": "1",
- "class_skill": "Advertiser",
- "module": [
- {
- "my_module_id": "1",
- "module_title": "Modul 1",
- "module_trainer": "John Doe",
- "my_module_status": "unlocked"
}
]
}
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "class_trainer": "1",
- "class_skill": "Advertiser",
- "lesson_title": "First Lesson",
- "lesson_video_url": {
- "otp": "20160313versASE3237sLsL5eYqzwAWu3mUCasE3xzQZa7qkeVgSpbxxkXiR8Gg5",
- "playbackInfo": "eyJ2aWRlb0lkIjoiZWRhYThiNjU2MmIxNGY2NmJkZTY0NmNmMGJmY2Q2ZDIifQ=="
}, - "lesson_video_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "lessons": [
- {
- "my_lesson_id": 1,
- "lesson_id": 11,
- "lesson_title": "Lorem ipsum dolor sit amet",
- "lesson_video_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "my_lesson_status": "unlocked"
}, - {
- "my_lesson_id": 2,
- "lesson_id": 12,
- "lesson_title": "Lorem ipsum dolor sit amet",
- "lesson_video_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "my_lesson_status": "locked"
}, - {
- "my_lesson_id": 3,
- "lesson_id": 13,
- "lesson_title": "Lorem ipsum dolor sit amet",
- "lesson_video_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "my_lesson_status": "locked"
}
]
}
}
Returns quiz data
answers sort by position
Authorizations:
query Parameters
lesson_id required | integer |
Responses
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "lesson_id": "1",
- "quiz_id": "dee303e7-0381-4f07-8eb3-71115ceebkj0",
- "question": [
- {
- "id": "dee303e7-0381-4f07-8eb3-71115ceeb71c",
- "question": "1 + 1 =",
- "type": "text",
- "answers_type": "choices",
- "position": "0",
- "answers": [
- {
- "id": "4ba0ba74-f1ca-4944-9d0c-aa1f97139d77",
- "answer": "2",
- "correct_answer": true,
- "position": 0
}, - {
- "id": "59a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "3",
- "correct_answer": false,
- "position": 1
}, - {
- "id": "56a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "5",
- "correct_answer": false,
- "position": 2
}, - {
- "id": "55a0ba74-f1ca-4944-9d0c-bb2397139d7k",
- "answer": "4",
- "correct_answer": false,
- "position": 3
}
]
}
]
}
}
Submit Quiz to save score
if score > 50 then is_pass = 1 and finish lesson, and unlocked next lesson or finish lesson, or unlocked new module or finish module, or finish class
Authorizations:
Request Body schema: application/json
lesson_id | integer |
score | integer |
Responses
Request samples
- Payload
{- "lesson_id": "1",
- "score": "70"
}
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Quiz Finished!"
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "my_class_id": "1",
- "class_id": "1",
- "class_skill": "Advertiser",
}
]
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": {
- "my_class_id": "1",
- "class_id": "1",
- "class_skill": "Advertiser",
}
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "data": [
- {
- "notif_id": "1",
- "notif_title": "Sertifikat Terbit",
- "notif_message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
- "notif_is_read": 1
}
]
}
Response samples
- 200
- 400
- 401
{- "status": "success",
- "code": "200",
- "message": "Notification updated successfully."
}
Response samples
- 200
- 401
{- "status": "success",
- "code": "200",
- "message": "Notification updated successfully."
}