{"openapi":"3.0.3","info":{"title":"Education SendPulse Project API Definition","description":"This is the REST API endpoints definition for Education SendPulse project","version":"1.0.0"},"servers":[{"url":"https:\/\/api.sendpulse.com\/edu\/public\/v1","description":"Production server"}],"tags":[{"name":"Courses","description":""},{"name":"Homeworks","description":""}],"paths":{"\/courses":{"get":{"tags":["Courses"],"summary":"Get all courses for user","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Course"}}}}}}}}}},"\/courses\/{courseId}\/tariffs":{"get":{"tags":["Course tariffs"],"summary":"Get course tariffs","parameters":[{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","description":"List of tariffs available for the specified course.","items":{"$ref":"#\/components\/schemas\/ShortCourseTariffResource"}}}}}}}}}},"\/schools":{"get":{"tags":["Schools"],"summary":"Get list of schools","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/School"}}}}}}},"\/students":{"post":{"tags":["Students"],"summary":"Create student","requestBody":{"description":"Payload to create a new student and enroll to a course\/tariff.","content":{"application\/json":{"schema":{"properties":{"courseId":{"type":"integer","description":"ID of the course to enroll the student in."},"email":{"type":"string","description":"Student email address."},"firstName":{"type":"string","description":"Student first name."},"lastName":{"type":"string","description":"Student last name."},"tagIds":{"type":"array","description":"List of tag IDs to assign to the student.","items":{"type":"integer"}},"language":{"type":"string","example":"uk_UA","description":"Preferred language\/locale code (e.g., uk_UA)."},"courseTariffId":{"type":"integer","description":"ID of the course tariff to enroll the student on."},"marketingOptIn":{"type":"boolean","nullable":true,"description":"Consent to marketing emails. Omitted or null means no consent.\n"}}}}}},"responses":{"201":{"description":"Created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Student"}}}},"409":{"description":"Student is already registered on the course. Nothing was changed \u2014 in particular the student stays on their current tariff. Use the change-tariff endpoint to move them.\n","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Student already registered on course."},"code":{"type":"string","example":"student_already_on_course"},"data":{"$ref":"#\/components\/schemas\/Student"}}}}}}}}},"\/students\/auditory":{"post":{"tags":["Students"],"summary":"Get auditory","requestBody":{"description":"Filters to search and paginate the auditory list.","content":{"application\/json":{"schema":{"properties":{"offset":{"type":"integer","description":"Pagination offset (number of records to skip)."},"limit":{"type":"integer","description":"Pagination limit (maximum number of records to return)."},"tags":{"type":"array","description":"Filter by tag IDs assigned to students.","items":{"type":"integer"}},"firstName":{"type":"string","description":"Filter by student first name (substring match)."},"lastName":{"type":"string","description":"Filter by student last name (substring match)."},"email":{"type":"string","description":"Filter by email address (substring match)."},"courseStatus":{"type":"array","description":"Filter by student status on courses.","items":{"type":"string","enum":["registered","inProgress","success","failed","certificated"]}},"orderBy":{"type":"string","description":"Field to sort by.","enum":["firstName","studentStatusOnCourse","studentTest","studentDateRegistrationOnCourse"]},"sort":{"type":"string","description":"Sort direction.","enum":["asc","desc"]},"isPaid":{"type":"boolean","description":"Filter by whether the student has paid for at least one course."},"dateRegistrationOnCourse":{"type":"object","nullable":true,"description":"Date range filter for the date of registration on a course.","properties":{"dateFrom":{"type":"string","format":"date","description":"Start date (inclusive) in YYYY-MM-DD format."},"dateTo":{"type":"string","format":"date","description":"End date (inclusive) in YYYY-MM-DD format."}}},"dateLastEntry":{"type":"object","nullable":true,"description":"Date range filter for the last entry\/login date.","properties":{"dateFrom":{"type":"string","format":"date","description":"Start date (inclusive) in YYYY-MM-DD format."},"dateTo":{"type":"string","format":"date","description":"End date (inclusive) in YYYY-MM-DD format."}}},"promoCodeIds":{"type":"array","description":"Filter by promo code IDs used by students.","items":{"type":"integer"}},"usedPromoCode":{"type":"boolean","nullable":true,"description":"Filter by whether any promo code was used."},"searchString":{"type":"string","description":"Free-text search across student attributes (name, email, etc.)."},"courseId":{"type":"integer","description":"Filter by a specific course ID."},"courseRestrictions":{"type":"string","description":"Filter by course access restriction type.","enum":["none","open","closed"]},"paidCoursesCondition":{"type":"string","description":"Comparison operator to apply to paidCoursesValue.","enum":["=",">=","<="]},"paidCoursesValue":{"type":"integer","description":"Numeric value used with paidCoursesCondition to filter by the number of paid courses."}},"required":["offset","limit"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","description":"Auditory search results (list of students matching filters).","items":{"type":"object","properties":{"id":{"type":"integer","description":"Student ID."},"uuid":{"type":"string","description":"Unique student UUID."},"email":{"type":"string","description":"Student email address."},"domainId":{"type":"integer","description":"Domain ID the student belongs to."},"schoolId":{"type":"integer","description":"School ID the student belongs to."},"firstName":{"type":"string","description":"Student first name."},"lastName":{"type":"string","description":"Student last name."},"contactFirstName":{"type":"string","nullable":true,"description":"Contact first name (nullable)."},"contactLastName":{"type":"string","nullable":true,"description":"Contact last name (nullable)."},"status":{"type":"string","description":"Overall student status."},"responsibleId":{"type":"integer","description":"User ID."},"tags":{"type":"array","description":"List of tag IDs assigned to the student.","items":{"type":"integer"}},"language":{"type":"string","description":"Preferred language\/locale code (e.g., uk_UA)."},"avatar":{"type":"string","nullable":true,"description":"URL to the student's avatar image."},"courses":{"type":"array","description":"List of courses associated with the student in the search results.","items":{"type":"object","properties":{"courseId":{"type":"integer","description":"Course ID."},"courseName":{"type":"string","description":"Course name."},"coverImage":{"type":"string","nullable":true,"description":"Course cover image URL."},"studentStatus":{"type":"string","description":"Student status on this course."},"paymentStatus":{"type":"string","nullable":true,"description":"Payment status for this course."},"promoCode":{"type":"string","nullable":true,"description":"Applied promo code (if any)."},"discount":{"type":"integer","nullable":true,"description":"Discount value applied for this course."},"studentDateRegistrationOnCourse":{"type":"string","format":"date-time","description":"Registration date and time on this course."},"studentLastEntry":{"type":"string","format":"date-time","description":"Last entry date and time on this course."},"courseAvailableDate":{"type":"string","format":"date-time","nullable":true,"description":"Date when the course becomes available to the student."},"hasPaidTariff":{"type":"boolean","description":"Whether the student has a paid tariff for this course."},"courseTariffId":{"type":"integer","nullable":true,"description":"Tariff ID for the course (nullable)."},"courseTariffName":{"type":"string","nullable":true,"description":"Tariff name for the course (nullable)."},"studentTariffStatus":{"type":"string","nullable":true,"description":"Student's tariff status for the course (nullable)."}}}}}}},"meta":{"type":"object","description":"Additional metadata for the auditory results.","properties":{"searchString":{"type":"string","description":"Echo of the search string used to filter results (if provided)."},"total":{"type":"integer","description":"Total number of matching records across all pages."}}}}}}}}}}},"\/students\/course-statistics\/{studentId}":{"get":{"tags":["Students"],"summary":"Get students course statistic","parameters":[{"name":"studentId","in":"path","required":true,"description":"Student identifier.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"schools":{"type":"array","description":"List of schools associated with the student's courses","items":{"type":"object","properties":{"schoolId":{"type":"integer","description":"Identifier of the school"},"schoolName":{"type":"string","description":"Name of the school"},"isLms":{"type":"boolean","description":"Indicates whether the school is a Learning Management System"},"marketingOptIn":{"type":"boolean","nullable":true,"description":"Whether the student consented to marketing emails in this school. Null means the consent row is missing."},"courses":{"type":"array","description":"List of courses the student is enrolled in at this school","items":{"type":"object","properties":{"id":{"type":"integer","description":"Identifier of the course"},"status":{"type":"string","description":"Current status of the course","enum":["blocked","inProgress","inactive"]},"name":{"type":"string","description":"Name of the course"},"statusStudentOnCourse":{"type":"string","description":"Student's current status in the course","enum":["unPaid","registered","inProgress","paid","success","failed","certificated","deletedFromCourse","invited"]},"studentDateRegistrationOnCourse":{"type":"string","format":"date-time","description":"Date and time when the student registered for the course"},"studentEmail":{"type":"string","description":"Email address of the student"},"studentLastEntry":{"type":"string","format":"date-time","description":"Date and time of student's last access to the course"},"courseAvailableDate":{"type":"string","format":"date-time","description":"Date and time when the course becomes available to the student"},"studentMetadata":{"type":"object","description":"Additional metadata related to the student in the context of this course"},"landingUrl":{"type":"string","description":"URL of the course landing page"},"feedback":{"type":"object","nullable":true,"description":"Student's feedback for the course","properties":{"rate":{"type":"integer","description":"Rating given by the student (typically 1-5)"},"message":{"type":"string","description":"Feedback message from the student"},"date":{"type":"string","format":"date-time","description":"Date and time when feedback was submitted"}}},"sections":{"type":"array","description":"List of course sections","items":{"type":"object","properties":{"id":{"type":"integer","description":"Identifier of the section"},"name":{"type":"string","description":"Name of the section"},"order":{"type":"integer","description":"Order of the section within the course"},"status":{"type":"string","description":"Current status of the section","enum":["closed","opened","deleted","planned"]},"lessons":{"type":"array","description":"List of lessons in the section","items":{"type":"object","properties":{"id":{"type":"integer","description":"Identifier of the lesson"},"name":{"type":"string","description":"Name of the lesson"},"statusStudentOnLesson":{"type":"object","description":"Student's progress status for this lesson","properties":{"status":{"type":"string","description":"Current status of the student in the lesson","enum":["doNotStarted","started","completed"]},"updatedAt":{"type":"string","description":"Last update time of the student's lesson status"}}},"status":{"type":"string","description":"Current status of the lesson","enum":["closed","opened","deleted","planned"]},"feedback":{"type":"object","nullable":true,"description":"Student's feedback for the lesson","properties":{"rate":{"type":"integer","description":"Rating given by the student for the lesson"},"message":{"type":"string","description":"Feedback message for the lesson"},"date":{"type":"string","format":"date-time","description":"Date and time when lesson feedback was submitted"}}}}}},"certificateSections":{"type":"array","description":"List of certificate sections in the course","items":{"properties":{"id":{"type":"integer","description":"Identifier of the certificate section"},"name":{"type":"string","description":"Name of the certificate section"},"sectionId":{"type":"integer","description":"Identifier of the associated section"},"order":{"type":"integer","description":"Order of the certificate section within the course"},"dateReceived":{"type":"string","format":"date-time","description":"Date and time when the certificate section was received"},"status":{"type":"string","description":"Current status of the certificate section","enum":["active","inactive","planned","hidden"]},"questionsCount":{"type":"integer","description":"Number of questions in the certificate section"},"answeredQuestionsCount":{"type":"integer","description":"Number of questions answered by the student in the certificate section"},"studentStatus":{"type":"string","description":"Current status of the student in the certificate section","enum":[null,"running","finished","blocked","failed"]}}}},"forms":{"type":"array","description":"List of forms associated with the course","items":{"properties":{"id":{"type":"integer","description":"Identifier of the form"},"name":{"type":"string","description":"Name of the form"},"sectionId":{"type":"integer","description":"Identifier of the associated section"},"order":{"type":"integer","description":"Order of the form within the course"},"status":{"type":"string","description":"Current status of the form","enum":[null,"completed","started"]}}}}}}},"tests":{"type":"array","description":"List of tests associated with the course","items":{"type":"object","properties":{"id":{"type":"integer","description":"Identifier of the test"},"name":{"type":"string","description":"Name of the test"},"studentStatus":{"nullable":true,"type":"string","description":"Current status of the student in the test","enum":[null,"running","finished","blocked","failed"]},"score":{"type":"object","description":"Student's test score information","properties":{"userScore":{"type":"integer","description":"Points earned by the student"},"maxScore":{"type":"integer","description":"Maximum possible points for the test"},"minScore":{"type":"integer","description":"Minimum passing score for the test"}}},"relatedEntityType":{"type":"string","description":"Type of entity the test is related to"},"relatedEntityId":{"type":"integer","description":"Identifier of the related entity"},"order":{"type":"integer","description":"Order of the test within the course"},"status":{"type":"string","description":"Current status of the test","enum":["active","inactive","planned"]},"feedback":{"type":"object","nullable":true,"description":"Student's feedback for the test","properties":{"rate":{"type":"integer","description":"Rating given by the student for the test"},"message":{"type":"string","description":"Feedback message for the test"},"date":{"type":"string","format":"date-time","description":"Date and time when test feedback was submitted"}}}}}},"homeworks":{"type":"array","description":"List of homeworks associated with the course","items":{"type":"object","properties":{"lessonId":{"type":"integer","description":"Identifier of the lesson associated with the homework"},"name":{"type":"string","description":"Name of the homework"},"status":{"type":"string","description":"Current status of the homework","nullable":true,"enum":["checking","accepted","declined","autoAccepted","rework","acceptedWithoutAnswer"]}}}},"hideOrder":{"type":"boolean","description":"Indicates whether the order of course elements is hidden"},"promoCode":{"type":"string","nullable":true,"description":"Promo code used by the student for this course"},"promoCodeDiscount":{"type":"integer","nullable":true,"description":"Discount percentage applied through the promo code"},"studentTariff":{"type":"object","nullable":true,"description":"Information about the tariff the student is enrolled in for this course","properties":{"id":{"type":"integer","description":"Identifier of the tariff"},"courseId":{"type":"integer","description":"Identifier of the course associated with the tariff"},"name":{"type":"string","description":"Name of the tariff"},"isMain":{"type":"boolean","description":"Indicates whether this is the main tariff for the course"},"isPaid":{"type":"boolean","description":"Indicates whether the tariff is paid"},"studentTariffStatus":{"type":"string","description":"Current status of the student's tariff","enum":["paid","unPaid"]},"functionalityAccesses":{"type":"array","description":"List of functionalities accessible under this tariff","items":{"$ref":"#\/components\/schemas\/FunctionalityResource"}},"courseTariffSetting":{"$ref":"#\/components\/schemas\/CourseTariffSettingResource"}}}}}}}}}}}}}}}}}}},"\/students\/{studentId}":{"delete":{"tags":["Students"],"summary":"Delete student from school","parameters":[{"name":"studentId","in":"path","required":true,"description":"Student identifier.","schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"}}}},"\/students\/{studentId}\/{courseId}":{"delete":{"tags":["Students"],"summary":"Delete student from course","parameters":[{"name":"studentId","in":"path","required":true,"description":"Student identifier.","schema":{"type":"integer"}},{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"}}}},"\/students\/by-course\/{courseId}":{"post":{"tags":["Students"],"summary":"Get students by course","parameters":[{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"offset":{"type":"integer","description":"Pagination offset (number of records to skip)."},"limit":{"type":"integer","description":"Pagination limit (maximum number of records to return)."},"tags":{"type":"array","description":"Filter by tag IDs assigned to students.","items":{"type":"integer"}},"tagsCondition":{"type":"string","enum":["all","any"],"description":"Condition for tag filtering 'all' for students with all tags, 'any' for students with any tag."},"lessonId":{"type":"integer","description":"Filter by lesson ID."},"firstName":{"type":"string","description":"Filter by student first name (substring match)."},"lastName":{"type":"string","description":"Filter by student last name (substring match)."},"email":{"type":"string","description":"Filter by email address (substring match)."},"courseStatus":{"type":"array","description":"Filter by student status on courses.","items":{"type":"string","enum":["registered","inProgress","success","failed","certificated"]}},"orderBy":{"type":"string","enum":["firstName","studentStatusOnCourse","studentTest","studentDateRegistrationOnCourse"],"description":"Field to sort by."},"sort":{"type":"string","enum":["asc","desc"],"description":"Sort direction."},"isPaid":{"type":"boolean","description":"Filter by whether the student has paid for at least one course."},"dateRegistrationOnCourse":{"type":"object","nullable":true,"description":"Date range filter for the date of registration on a course.","properties":{"dateFrom":{"type":"string","format":"date","description":"Start date (inclusive) in YYYY-MM-DD format."},"dateTo":{"type":"string","format":"date","description":"End date (inclusive) in YYYY-MM-DD format."}}},"dateLastEntry":{"type":"object","nullable":true,"description":"Date range filter for the last entry\/login date.","properties":{"dateFrom":{"type":"string","format":"date","description":"Start date (inclusive) in YYYY-MM-DD format."},"dateTo":{"type":"string","format":"date","description":"End date (inclusive) in YYYY-MM-DD format."}}},"promoCodeIds":{"type":"array","description":"Filter by promo code IDs used by students.","items":{"type":"integer"}},"usedPromoCode":{"type":"boolean","nullable":true,"description":"Filter by whether any promo code was used."},"searchString":{"type":"string","description":"Free-text search across student attributes (name, email, etc.)."},"tariffIds":{"type":"array","description":"Filter by tariff IDs assigned to students.","items":{"type":"integer"}},"progress":{"type":"object","description":"Filter by student progress in lessons, tests, or certificates.","properties":{"lessons":{"type":"array","description":"List of lesson IDs for progress filtering.","items":{"type":"integer"}},"tests":{"type":"array","description":"List of test IDs for progress filtering.","items":{"type":"integer"}},"certificates":{"type":"array","description":"List of certificate IDs for progress filtering.","items":{"type":"integer"}}}},"withoutTariff":{"type":"boolean","nullable":true,"description":"The field must be omitted if you pass tariff IDs in the filter. If set to true, it will return all students without a tariff; if set to false, it will return all students with a tariff."}},"required":["offset","limit"]}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","description":"List of students enrolled in the specified course.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Student identifier."},"uuid":{"type":"string","description":"Student UUID."},"domainId":{"type":"integer","description":"Domain identifier."},"schoolId":{"type":"integer","description":"School identifier."},"domainName":{"type":"string","description":"Domain name."},"firstName":{"type":"string","description":"Student first name."},"lastName":{"type":"string","description":"Student last name."},"contactFirstName":{"type":"string","description":"Contact first name."},"contactLastName":{"type":"string","description":"Contact last name."},"status":{"type":"string","description":"Student status."},"responsibleId":{"type":"integer","description":"Responsible user identifier."},"tags":{"type":"array","description":"List of tag IDs assigned to the student.","items":{"type":"integer"}},"language":{"type":"string","description":"Student language\/locale code."},"avatar":{"type":"string","description":"Student avatar URL."},"studentStatusOnCourse":{"type":"string","description":"Student status on the specified course."},"studentDateRegistrationOnCourse":{"type":"string","format":"date-time","description":"Date and time when the student registered for the specified course."},"studentLastEntry":{"type":"string","format":"date-time","description":"Date and time of the student's last entry\/login."},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp of the last update to the student's information."},"phone":{"type":"string","description":"Student phone number."},"promoCode":{"type":"string","description":"Promo code used by the student for the specified course."},"promoCodeDiscount":{"type":"integer","description":"Discount percentage applied through the promo code."},"groups":{"type":"array","description":"List of group IDs the student belongs to.","items":{"type":"object","properties":{"groupId":{"type":"integer","description":"Group identifier."},"courseId":{"type":"integer","description":"Course identifier."},"groupName":{"type":"string","description":"Group name."},"groupColor":{"type":"string","description":"Group color."},"responsibleUserId":{"type":"integer","description":"Responsible user identifier for the group."}}}},"responsible":{"type":"object","description":"Information about the responsible user for the student.","properties":{"courseId":{"type":"integer","description":"Course identifier."},"responsibleUserId":{"type":"integer","description":"Responsible user identifier."}}},"studentTariff":{"type":"object","description":"Information about the tariff the student is enrolled in for the specified course.","properties":{"id":{"type":"integer","description":"Tariff identifier."},"courseId":{"type":"integer","description":"Course identifier."},"name":{"type":"string","description":"Tariff name."},"isMain":{"type":"boolean","description":"Indicates whether this is the main tariff for the course."},"isPaid":{"type":"boolean","description":"Indicates whether the tariff is paid."},"studentTariffStatus":{"type":"string","description":"Current status of the student's tariff.","enum":["paid","unPaid"]},"functionalityAccesses":{"type":"array","description":"List of functionalities accessible under this tariff.","items":{"$ref":"#\/components\/schemas\/FunctionalityResource"}},"courseTariffSetting":{"$ref":"#\/components\/schemas\/CourseTariffSettingResource"}}},"timezone":{"type":"string","nullable":true,"description":"Student timezone."},"dateFormat":{"type":"string","nullable":true,"description":"Preferred date format for the student."},"timeFormat":{"type":"string","nullable":true,"description":"Preferred time format for the student."}}}}}}}}}}}},"\/students\/{courseId}\/mark-as-paid":{"post":{"tags":["Students"],"summary":"Mark student as paid","parameters":[{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer"}}],"requestBody":{"description":"List of student IDs to mark as paid for the specified course.","content":{"application\/json":{"schema":{"properties":{"ids":{"type":"array","description":"Array of student IDs to mark as paid for the specified course.","items":{"type":"integer"}}}}}}},"responses":{"204":{"description":"No Content"}}}},"\/students\/{courseId}\/change-status":{"post":{"tags":["Students"],"summary":"Change student course completion status","parameters":[{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer","example":1024}}],"requestBody":{"description":"Student and the course completion status to set.","content":{"application\/json":{"schema":{"required":["studentId","status"],"properties":{"studentId":{"type":"integer","description":"Identifier of a student enrolled on the course.","example":5501},"status":{"type":"string","description":"Course completion status to set. Setting `certificated` makes the course certificate available to the student exactly as changing the status in the interface does. Repeating the same status is idempotent.","enum":["registered","inProgress","success","certificated"],"example":"success"}}},"example":{"studentId":5501,"status":"success"}}}},"responses":{"204":{"description":"No Content \u2014 status changed successfully."},"403":{"description":"Forbidden \u2014 the course does not belong to the authenticated user."},"404":{"description":"Not Found \u2014 the student is not enrolled on this course."},"422":{"description":"Validation error."}}}},"\/students\/{courseId}\/change-progress":{"post":{"tags":["Students"],"summary":"Change student progress on lessons and tests","parameters":[{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer","example":1024}}],"requestBody":{"description":"Lessons and tests to mark as passed or not passed. At least one lesson or test identifier must be provided across `passed` and `notPassed`, otherwise the request is rejected with 422 instead of silently changing nothing. Every identifier must belong to the course, otherwise the whole request is rejected with 422 and nothing is applied. The same identifier must not appear in both `passed` and `notPassed`.","content":{"application\/json":{"schema":{"required":["studentId"],"properties":{"studentId":{"type":"integer","description":"Identifier of a student enrolled on the course.","example":5501},"passed":{"type":"object","nullable":true,"description":"Lessons and tests to mark as passed.","properties":{"lessons":{"type":"array","description":"Lesson identifiers belonging to this course.","items":{"type":"integer"},"example":[301,302]},"tests":{"type":"array","description":"Test identifiers belonging to this course.","items":{"type":"integer"},"example":[77]}}},"notPassed":{"type":"object","nullable":true,"description":"Lessons and tests to reset back to not passed.","properties":{"lessons":{"type":"array","description":"Lesson identifiers belonging to this course.","items":{"type":"integer"},"example":[303]},"tests":{"type":"array","description":"Test identifiers belonging to this course.","items":{"type":"integer"},"example":[78]}}}}},"example":{"studentId":5501,"passed":{"lessons":[301,302],"tests":[77]},"notPassed":{"lessons":[303],"tests":[78]}}}}},"responses":{"204":{"description":"No Content \u2014 progress changed successfully."},"403":{"description":"Forbidden \u2014 the course does not belong to the authenticated user."},"404":{"description":"Not Found \u2014 the student is not enrolled on this course."},"422":{"description":"Validation error."}}}},"\/groups\/{courseId}":{"get":{"tags":["Students groups"],"summary":"List students groups by course","parameters":[{"name":"courseId","in":"path","required":true,"description":"Course identifier.","schema":{"type":"integer"}}],"responses":{"200":{"description":"items","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/StudentGroup"}}}}}}}},"\/homeworks\/list\/checking":{"get":{"tags":["Homeworks"],"summary":"Get list of student homeworks pending checking","parameters":[{"name":"limit","in":"query","required":true,"description":"Maximum number of records to return (1\u20131000).","schema":{"type":"integer","minimum":1,"maximum":1000,"example":50}},{"name":"offset","in":"query","required":true,"description":"Number of records to skip (pagination offset).","schema":{"type":"integer","minimum":0,"example":0}},{"name":"courseId","in":"query","description":"Filter by course identifier.","schema":{"type":"integer","nullable":true,"example":12571}},{"name":"schoolId","in":"query","description":"Filter by school identifier.","schema":{"type":"integer","nullable":true,"example":12224}},{"name":"status","in":"query","description":"Homework status filter. Defaults to \"checking\" if omitted.","schema":{"type":"string","example":"checking"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","description":"List of student homework records.","items":{"type":"object","properties":{"studentHomeworkId":{"type":"integer","description":"Student homework record identifier.","example":2142},"schoolId":{"type":"integer","description":"School identifier.","example":12224},"courseId":{"type":"integer","description":"Course identifier.","example":12571},"homeworkId":{"type":"integer","description":"Homework identifier.","example":501},"lessonId":{"type":"integer","description":"Lesson identifier.","example":8842},"lessonName":{"type":"string","description":"Lesson name.","example":"Introduction to Variables"},"studentId":{"type":"integer","description":"Student identifier.","example":3391},"studentName":{"type":"string","description":"Student full name.","example":"John Doe"}}}},"meta":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of matching homework records.","example":3}}}}}}}}}}},"\/homeworks\/{studentHomeworkId}":{"get":{"tags":["Homeworks"],"summary":"Get student homework by ID","parameters":[{"name":"studentHomeworkId","in":"path","required":true,"description":"Student homework record identifier.","schema":{"type":"integer","example":2142}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"homework":{"type":"object","properties":{"id":{"type":"integer","description":"Homework identifier.","example":501},"name":{"type":"string","description":"Homework name.","example":"Practice: variables and data types"},"lessonId":{"type":"integer","description":"Lesson identifier.","example":8842},"content":{"type":"string","description":"Homework content as plain text (HTML tags stripped).","example":"Write a script that declares three variables of different types."},"filesPaths":{"type":"array","nullable":true,"description":"List of file paths attached to the homework.","items":{"type":"string"},"example":["homeworks\/501\/task.pdf"]}}},"answer":{"type":"object","nullable":true,"description":"Student's answer to the homework.","properties":{"message":{"type":"string","nullable":true,"description":"Answer text from the student.","example":"Here is my solution, please check it."},"filesPaths":{"type":"array","nullable":true,"description":"List of file paths attached to the student's answer.","items":{"type":"string"},"example":["answers\/2142\/solution.zip"]}}}}}}}}}},"403":{"description":"Forbidden \u2014 the authenticated user does not own this homework record."},"404":{"description":"Not found \u2014 no homework record with the given ID exists."}}}},"\/homeworks\/{studentHomeworkId}\/rate":{"post":{"tags":["Homeworks"],"summary":"Rate (accept or send for rework) a student homework","parameters":[{"name":"studentHomeworkId","in":"path","required":true,"description":"Student homework record identifier.","schema":{"type":"integer","example":2142}}],"requestBody":{"description":"Rating decision and optional feedback message.","content":{"application\/json":{"schema":{"required":["status"],"properties":{"status":{"type":"string","description":"Rating decision for the homework.","enum":["accepted","rework"],"example":"accepted"},"message":{"type":"object","nullable":true,"description":"Optional feedback message to send to the student.","required":["text"],"properties":{"text":{"type":"string","description":"Message text (max 5000 characters).","maxLength":5000,"example":"Good job, well done!"},"type":{"type":"string","nullable":true,"description":"Message type (optional).","example":"text"}}}}},"example":{"status":"accepted","message":{"text":"Good job, well done!"}}}}},"responses":{"204":{"description":"No Content \u2014 homework rated successfully."},"403":{"description":"Forbidden \u2014 the authenticated user does not own this homework record."},"422":{"description":"Validation error."}}}},"\/tags":{"get":{"tags":["Tags"],"summary":"Get list of tags","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","description":"List of available tags.","items":{"$ref":"#\/components\/schemas\/Tag"}}}}}}}}}}},"components":{"schemas":{"CourseListItem":{"type":"object","properties":{"id":{"type":"integer","description":"Course identifier"},"name":{"type":"string","description":"Course name"},"isPaid":{"type":"boolean","description":"Whether the course is paid"},"totalDuration":{"type":"integer","description":"Total course duration in minutes"},"hasCertificate":{"type":"boolean","description":"Whether a certificate is issued upon completion"},"previewImageUrl":{"type":"string","description":"Course preview image URL"},"courseUrl":{"type":"string","description":"Link to the course page"},"status":{"type":"string","description":"Course availability status","enum":["inProgress","inactive","planned"]}}},"Course":{"type":"object","properties":{"id":{"type":"integer","description":"Course identifier"},"schoolId":{"type":"integer","description":"School identifier"},"userId":{"type":"integer","description":"Owner user identifier"},"status":{"type":"string","description":"Current course status","enum":["inProgress","inactive","planned"]},"domainId":{"type":"integer","description":"Domain identifier"},"landingId":{"type":"integer","description":"Landing identifier"},"pageId":{"type":"integer","description":"Page identifier"},"name":{"type":"string","description":"Course name"},"slug":{"type":"string","description":"URL-friendly course identifier (slug)"},"landingImage":{"type":"string","nullable":true,"description":"Main course image URL"},"coverImage":{"type":"string","nullable":true,"description":"Cover image URL"},"startDate":{"type":"string","nullable":true,"description":"Course start date in ISO 8601 format"},"endDate":{"type":"string","nullable":true,"description":"Course end date in ISO 8601 format"},"timezone":{"type":"string","nullable":true,"description":"Timezone identifier"},"passingScore":{"type":"integer","nullable":true,"description":"Minimum score to pass"},"isLinear":{"type":"boolean","description":"Indicates whether course is linear"},"completionCriterion":{"type":"string","description":"Completion criterion"},"createdAt":{"type":"string","description":"Creation timestamp in ISO 8601 format"},"wasStarted":{"type":"boolean","description":"Indicates whether the user started the course"},"needRegeneration":{"type":"boolean","description":"Flag that course page needs regeneration"},"redirectUrl":{"type":"string","nullable":true,"description":"Redirect URL after success"},"failedRedirectUrl":{"type":"string","nullable":true,"description":"Redirect URL after failure"},"studentCount":{"type":"integer","description":"Number of students enrolled"},"courseSettings":{"type":"array","description":"Course settings","items":{"type":"object"}},"isCourseHasCertifiedStudents":{"type":"boolean","description":"Indicates whether there are certified students for the course"},"sectionsWithLessons":{"type":"array","description":"Sections with lessons","items":{"type":"object"}},"userTariffStatus":{"type":"string","nullable":true,"description":"Current user tariff status"},"categoriesIds":{"type":"array","description":"IDs of attached categories","items":{"type":"integer"}},"promoCodeExists":{"type":"boolean","description":"Whether a promo code is available"},"isCertificate":{"type":"boolean","description":"Whether the course issues a certificate"},"hasPaidTariffs":{"type":"boolean","description":"Indicates whether the course has paid tariffs"},"groupId":{"type":"integer","nullable":true,"description":"Group identifier"}}},"Section":{"type":"object","properties":{"id":{"type":"integer","description":"Section identifier"},"name":{"type":"string","description":"Section name"},"description":{"type":"string","description":"Section description"},"order":{"type":"integer","description":"Section order within the course"},"status":{"type":"string","description":"Section status","enum":["closed","opened","deleted","planned"]},"duration":{"type":"integer","description":"Total section duration in minutes"},"startDate":{"type":"string","description":"Section availability start date (ISO 8601)"},"intervalDate":{"type":"integer","description":"Number of days offset from course start to open"},"lessons":{"type":"array","description":"Section lessons","items":{"$ref":"#\/components\/schemas\/Lesson"}},"tests":{"type":"array","description":"Section tests","items":{"$ref":"#\/components\/schemas\/Test"}}}},"Lesson":{"type":"object","properties":{"id":{"type":"integer","description":"Lesson identifier"},"name":{"type":"string","description":"Lesson name"},"order":{"type":"integer","description":"Lesson order within the section"},"sectionId":{"type":"integer","description":"Identifier of the section this lesson belongs to"},"status":{"type":"string","description":"Lesson status","enum":["closed","opened","deleted","planned"]},"content":{"type":"string","description":"Lesson content (HTML\/Markdown or other format)"},"startDate":{"type":"string","description":"Lesson open date (ISO 8601)"},"intervalDate":{"type":"integer","description":"Number of days offset relative to course start"}}},"Test":{"type":"object","properties":{"id":{"type":"integer","description":"Test identifier"},"name":{"type":"string","description":"Test name"},"description":{"type":"string","description":"Test description"},"status":{"type":"string","description":"Test status","enum":["active","inactive","planned"]},"order":{"type":"integer","description":"Test order"},"minimumScore":{"type":"integer","description":"Minimum passing score"},"score":{"type":"integer","description":"User's obtained score (if available)"},"tries":{"type":"integer","description":"Number of allowed attempts"},"showAnswers":{"type":"boolean","description":"Whether to show correct answers after completion"},"showExplanations":{"type":"boolean","description":"Whether to show explanations for answers"},"randomDirection":{"type":"boolean","description":"Whether to randomize the order of questions\/answers"},"randomAnswersDirection":{"type":"boolean","description":"Whether to randomize the order of answer variants for each question"},"questionsLimit":{"type":"integer","nullable":true,"description":"Limit number of questions shown to student (paid tariff only)"},"startDate":{"type":"string","description":"Test open date (ISO 8601)"},"intervalDate":{"type":"integer","description":"Number of days offset relative to course start"}}},"CourseTariffResource":{"type":"object","properties":{"id":{"type":"integer","description":"Unique tariff identifier"},"status":{"type":"string","description":"Tariff status","enum":["active","inactive"]},"name":{"type":"string","description":"Tariff name"},"wasStarted":{"type":"boolean","description":"Whether learning under this tariff has already started"},"succeedRedirectUrl":{"type":"string","nullable":true,"description":"Redirect URL after successful payment"},"failedRedirectUrl":{"type":"string","nullable":true,"description":"Redirect URL after failed payment"},"order":{"type":"integer","nullable":true,"description":"Display order of the tariff"},"courseAccessRestrictionSettings":{"$ref":"#\/components\/schemas\/CourseAccessRestrictionSettingsResource"},"paymentMethods":{"type":"array","description":"Available payment methods","items":{"$ref":"#\/components\/schemas\/PaymentMethodResource"}},"studentBaseStateSetting":{"$ref":"#\/components\/schemas\/StudentBaseStateSettingResource"},"contentAccesses":{"type":"array","description":"Content access settings","items":{"$ref":"#\/components\/schemas\/ContentAccessesResource"}},"functionalityAccesses":{"type":"array","description":"Available functionalities under the tariff","items":{"$ref":"#\/components\/schemas\/FunctionalityResource"}},"courseTariffSetting":{"$ref":"#\/components\/schemas\/CourseTariffSettingResource"}}},"ShortCourseTariffResource":{"type":"object","properties":{"id":{"type":"integer","description":"Unique tariff identifier"},"courseId":{"type":"integer","description":"Course identifier"},"name":{"type":"string","description":"Tariff name"},"isMain":{"type":"boolean","description":"Whether this is the main tariff for the course"},"isPaid":{"type":"boolean","description":"Whether the tariff is paid"},"succeedRedirectUrl":{"type":"string","nullable":true,"description":"Redirect URL after successful payment"},"failedRedirectUrl":{"type":"string","nullable":true,"description":"Redirect URL after failed payment"},"status":{"type":"string","description":"Tariff status","enum":["active","inactive"]},"order":{"type":"integer","nullable":true,"description":"Display order of the tariff"},"countOfStudents":{"type":"integer","description":"Number of students enrolled under this tariff"},"accessRestrictionSettingsVO":{"$ref":"#\/components\/schemas\/CourseAccessRestrictionSettingsResource"},"paymentMethodsCollection":{"type":"array","description":"Available payment methods","items":{"$ref":"#\/components\/schemas\/PaymentMethodResource"}},"studentBaseStateSettingDTO":{"$ref":"#\/components\/schemas\/StudentBaseStateSettingResource"},"contentAccesses":{"type":"array","description":"Content access settings","items":{"$ref":"#\/components\/schemas\/ContentAccessesResource"}},"functionalityAccesses":{"type":"array","description":"Available functionalities under the tariff","items":{"$ref":"#\/components\/schemas\/FunctionalityResource"}},"courseTariffSettingDTO":{"$ref":"#\/components\/schemas\/CourseTariffSettingResource"},"wasStarted":{"type":"boolean","description":"Whether learning under this tariff has already started"}}},"CourseTariffSettingResource":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time","nullable":true,"description":"Tariff start date"},"endDate":{"type":"string","format":"date-time","nullable":true,"description":"Tariff end date"},"timezone":{"type":"string","nullable":true,"description":"Time zone used for tariff dates"}}},"StudentBaseStateSettingResource":{"type":"object","properties":{"group":{"type":"integer","description":"Default student group ID"},"responsible":{"type":"integer","description":"Responsible manager ID"},"tags":{"type":"array","description":"List of tag IDs to assign to the student","items":{"type":"integer"}},"dealCreation":{"type":"object","description":"Settings for creating a CRM deal upon payment","properties":{"createDealOnPayment":{"type":"boolean","description":"Create a deal after successful payment"},"pipelineId":{"type":"integer","description":"CRM sales pipeline ID"},"stepId":{"type":"integer","description":"Sales pipeline stage ID"},"dealName":{"type":"string","description":"Deal name template"}}}}},"ContentAccessesResource":{"type":"object","properties":{"contentType":{"type":"string","description":"Type of content being granted access to","enum":["lesson","test","certificate"]},"entityId":{"type":"integer","description":"Entity ID (lesson\/test\/certificate)"}}},"FunctionalityResource":{"type":"object","properties":{"type":{"type":"string","description":"Type of available functionality","enum":["chat"]}}},"PaymentMethodResource":{"type":"object","properties":{"id":{"type":"integer","description":"Unique payment method identifier"},"name":{"type":"string","description":"Payment method name"},"price":{"type":"integer","description":"Price in the smallest currency units (e.g., cents)"},"currency":{"type":"string","description":"Payment currency (ISO 4217)"},"paymentId":{"type":"string","format":"uuid","description":"Payment identifier in the payment system"},"paymentType":{"type":"string","description":"Payment system type\/provider","enum":["YooKassa","Fondy","PayPal","YooMoney","ROBOKASSA","Stripe","MERCADOPAGO","LiqPay","Wayforpay","Flutterwave"]}}},"CourseAccessRestrictionSettingsResource":{"type":"object","properties":{"courseId":{"type":"integer","description":"Course ID to which the restriction applies"},"restrictedDays":{"type":"integer","description":"Number of restricted access days"},"restrictedToDate":{"type":"string","description":"Date until which the restriction applies (ISO 8601)"},"timezone":{"type":"string","description":"Time zone for calculating restriction dates"},"typeUpdate":{"type":"string","description":"Type of restriction settings update"}}},"School":{"type":"object","properties":{"id":{"type":"integer","description":"School identifier"},"userId":{"type":"integer","description":"School owner (user) ID"},"domainId":{"type":"integer","description":"Domain ID associated with the school"},"landingId":{"type":"integer","description":"Landing page ID"},"pageId":{"type":"integer","description":"School page ID"},"name":{"type":"string","description":"School name"},"studentsName":{"type":"string","description":"Custom name for students (e.g., pupils\/audience)"},"isLms":{"type":"boolean","description":"Indicates that this is an LMS school"},"status":{"type":"string","description":"School status","enum":["active","inactive","deleted"]},"coursesCount":{"type":"integer","description":"Number of courses in the school"},"order":{"type":"integer","nullable":true,"description":"Display order in lists"},"iconUrl":{"type":"string","description":"School icon URL"},"groups":{"type":"array","nullable":true,"description":"List of groups in the school","items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Group ID"},"name":{"type":"string","description":"Group name"},"schoolId":{"type":"integer","description":"School ID"}}}}}}},"StudentGroup":{"type":"object","properties":{"id":{"type":"integer","description":"Group identifier"},"userId":{"type":"integer","description":"Group owner (user) ID"},"responsibleId":{"type":"integer","nullable":true,"description":"Responsible ID for the group (may be absent)"},"courseId":{"type":"integer","description":"Course ID the group belongs to"},"name":{"type":"string","description":"Group name"},"color":{"type":"string","description":"Group color (hex or other format)"}}},"Tag":{"type":"object","properties":{"id":{"type":"integer","description":"Unique tag identifier"},"name":{"type":"string","description":"Tag name"},"colorBackground":{"type":"string","description":"Tag color (hex or other format)"},"colorText":{"type":"string","description":"Tag color (hex or other format)"},"contactCount":{"type":"integer","description":"Number of contacts\/students with this tag"},"taskCount":{"type":"integer","description":"Number of tasks associated with this tag"}}},"Student":{"type":"object","properties":{"id":{"type":"integer","description":"Unique student identifier"},"uuid":{"type":"string","description":"Universally unique identifier for the student"},"firstName":{"type":"string","description":"Student's first name"},"lastName":{"type":"string","description":"Student's last name"},"status":{"type":"string","description":"Current status of the student"},"responsibleId":{"type":"integer","description":"User ID of the person responsible for the student"},"email":{"type":"string","description":"Student's email address"},"domainId":{"type":"integer","description":"Domain identifier the student belongs to"},"language":{"type":"string","description":"Preferred language\/locale code (e.g., uk_UA)"},"phone":{"type":"string","nullable":true,"description":"Student's phone number (nullable)"},"avatar":{"type":"string","nullable":true,"description":"URL to the student's avatar image (nullable)"},"schoolId":{"type":"integer","description":"School identifier the student is enrolled in"},"timezone":{"type":"string","nullable":true,"description":"Student's timezone (nullable)"},"dateFormat":{"type":"string","nullable":true,"description":"Preferred date format for the student (nullable)"},"timeFormat":{"type":"string","nullable":true,"description":"Preferred time format for the student (nullable)"},"recommendedLangs":{"type":"string","nullable":true,"description":"Recommended languages for the student (nullable)"}}}},"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https:\/\/api.sendpulse.com\/oauth\/access_token","scopes":[]}}}}},"security":[{"OAuth2":["read","write"]}]}