Course Subscription

View as Markdown
The `POST /api/user/addUserSubscription`endpoint is used to subscribe a user to a course. ### Request - Method: POST - Base URL: {{baseUrl}} - Path: /api/user/userStats - Headers: - Content-Type: application/x-www-form-urlencoded - Body: - `idst` (text): The user ID - `course_id` (text): The course ID - `user_level`(text): The user level assigned to the course upon subscription. ### Response - `success` (boolean): Indicates the success of the request. - `message` (string): Provides additional information - `course` (object): Represents a course with various properties. - `idCourse` (string): The unique identifier for the course. - `idCategory` (string): The category ID the course belongs to. - `code` (string): The code associated with the course. - `name` (string): The name of the course. - `description` (string): The description of the course. - `box_description` (string): The box description of the course. - `lang_code` (string): The language code for the course. - `status` (string): The status of the course. - `course_type` (string): The type of course it is. - `subscribe_method` (string): The method for subscribing to the course. - `0` - Only Admin can subscribe users to the course - `1` - Subscription requires admin approval - `2` - Subscription is free to all - `mediumTime` (string) - `show_rules` (string): Indicates wether to display rules. - `selling` (string): The selling status of the course. - `prize` (string): The price of the course. - `course_demo` (string): The course demo. - `create_date` (string): The date the course was created. - `course_edition` (string): The course edition ID. - `can_subscribe` (string): The subscription availability status. - `0` - Subscription is closed - `1` - Subscription is open at all times - `2` - Subscription is open only when the current date is within the subscription start and end date set on the course (Key: sub_start_date sub_end_date - `sub_start_date` (string): The start date for subscription. - `sub_end_date` (string): The end date for subscription. - `date_begin` (string): The start date of the course. - `date_end` (string): The end date of the course. - `img_course` (string): The path/source to the course image

Request

This endpoint expects an object.
idststringRequired

Unique identifier (ID) of the user.

course_idstringRequired

Unique identifier (ID) of the course.

user_levelstringRequired
Access level of the user

Response

Successful response