> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tangerine365.com/llms.txt.
> For full documentation content, see https://docs.tangerine365.com/llms-full.txt.

# Get Recommendations

POST https://localhost:8090//api/user/recommended
Content-Type: application/x-www-form-urlencoded

The `POST /api/user/recommended`endpoint is used to retrieve recommeded courses by a user based on the username.

### Request

- Method: POST
    
- Base URL: {{baseUrl}}
    
- Path: /api/user/recommended
    
- Headers:
    
    - Content-Type: application/x-www-form-urlencoded
        
- Body:
    
    - `idst` (text): User ID
        
    - `auth` (text): The authentication token
        

### Response

- The response will be in JSON format with the following structure:
    
    - `success` (boolean): Indicates the success of the request.
        
    - `enrollment` (array): An array of coursees enrolled in.
        
    - `completed` (array): An array of coursees completed.
        
    - `recommended` (array): An array of courses recommended.
        
        - `recommend_by_course_name` (string)
            
        - `recommend_by_course_id` (string)
            
        - `courseList` (array): Array of objects, each representing a course with the following 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.
                
            - `level_show_user` (string)
                
            - `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
                    
            - `linkSponsor` (string)
                
            - `imgSponsor` (string)
                
            - `img_course` (string): The path/source to the course image
                
            - `img_material` (string)
                
            - `img_othermaterial` (string)
                
            - `mediumTime` (string)
                
            - `permCloseLO` (string)
                
            - `userStatusOp` (string)
                
            - `show_rules` (string): Indicates wether to display rules.
                
            - `selling` (string): The selling status 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.
                
            - `prize` (string): Course price
                
            - `course_type` (string): Course type
                
            - `policy_point` (string)
                
            - `point_to_all` (string)
                
            - `course_edition` (string) Course Edition
                
            - `classrooms` (array): Classrooms the course belongs to
                
            - `certificates` (string): Course certificates
                
            - `security_code` (string)
                
            - `imported_from_connection` (string)
                
            - `course_quota` (string0
                
            - `used_space` (string)
                
            - `course_vote` (string)
                
            - `allow_overbooking` (string)
                
            - `direct_play` (string)
                
            - `use_logo_in_courselist` (string)
                
            - `show_result` (string)
                
            - `credits` (string)
                
            - `auto_unsubscribe` (string)
                
            - `unsubscribe_date_limit` (string)
                
            - `id_menucustom` (string)
                
            - `sendCalendar` (string)
                
            - `calendarId` (string)
                
            - `created_at` (string)
                
            - `updated_at` (string)
                
            - `escaped_name` (string)
                
            - `level_icon` (boolean)
                
            - `is_enrolled` (boolean)
                
            - `canEnter` (boolean)
                
            - `editions` (boolean)
                
            - `course_full` (boolean)
                
            - `in_cart` (boolean)
                
            - `waiting` (boolean)
                
            - `userCanUnsubscribe` (boolean)
                
            - `show_options` (boolean)
                
            - `courseBoxEnabled` (boolean)

Reference: https://docs.tangerine365.com/tangerine-365-enterprise/get-recommendations

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tangerine365 Enterprise
  version: 1.0.0
paths:
  //api/user/recommended:
    post:
      operationId: get-recommendations
      summary: Get Recommendations
      description: >-
        The `POST /api/user/recommended`endpoint is used to retrieve recommeded
        courses by a user based on the username.


        ### Request


        - Method: POST
            
        - Base URL: {{baseUrl}}
            
        - Path: /api/user/recommended
            
        - Headers:
            
            - Content-Type: application/x-www-form-urlencoded
                
        - Body:
            
            - `idst` (text): User ID
                
            - `auth` (text): The authentication token
                

        ### Response


        - The response will be in JSON format with the following structure:
            
            - `success` (boolean): Indicates the success of the request.
                
            - `enrollment` (array): An array of coursees enrolled in.
                
            - `completed` (array): An array of coursees completed.
                
            - `recommended` (array): An array of courses recommended.
                
                - `recommend_by_course_name` (string)
                    
                - `recommend_by_course_id` (string)
                    
                - `courseList` (array): Array of objects, each representing a course with the following 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.
                        
                    - `level_show_user` (string)
                        
                    - `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
                            
                    - `linkSponsor` (string)
                        
                    - `imgSponsor` (string)
                        
                    - `img_course` (string): The path/source to the course image
                        
                    - `img_material` (string)
                        
                    - `img_othermaterial` (string)
                        
                    - `mediumTime` (string)
                        
                    - `permCloseLO` (string)
                        
                    - `userStatusOp` (string)
                        
                    - `show_rules` (string): Indicates wether to display rules.
                        
                    - `selling` (string): The selling status 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.
                        
                    - `prize` (string): Course price
                        
                    - `course_type` (string): Course type
                        
                    - `policy_point` (string)
                        
                    - `point_to_all` (string)
                        
                    - `course_edition` (string) Course Edition
                        
                    - `classrooms` (array): Classrooms the course belongs to
                        
                    - `certificates` (string): Course certificates
                        
                    - `security_code` (string)
                        
                    - `imported_from_connection` (string)
                        
                    - `course_quota` (string0
                        
                    - `used_space` (string)
                        
                    - `course_vote` (string)
                        
                    - `allow_overbooking` (string)
                        
                    - `direct_play` (string)
                        
                    - `use_logo_in_courselist` (string)
                        
                    - `show_result` (string)
                        
                    - `credits` (string)
                        
                    - `auto_unsubscribe` (string)
                        
                    - `unsubscribe_date_limit` (string)
                        
                    - `id_menucustom` (string)
                        
                    - `sendCalendar` (string)
                        
                    - `calendarId` (string)
                        
                    - `created_at` (string)
                        
                    - `updated_at` (string)
                        
                    - `escaped_name` (string)
                        
                    - `level_icon` (boolean)
                        
                    - `is_enrolled` (boolean)
                        
                    - `canEnter` (boolean)
                        
                    - `editions` (boolean)
                        
                    - `course_full` (boolean)
                        
                    - `in_cart` (boolean)
                        
                    - `waiting` (boolean)
                        
                    - `userCanUnsubscribe` (boolean)
                        
                    - `show_options` (boolean)
                        
                    - `courseBoxEnabled` (boolean)
      tags:
        - ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get Recommendations_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                auth:
                  type: string
                idst:
                  type: string
              required:
                - auth
                - idst
servers:
  - url: https://localhost:8090
components:
  schemas:
    ApiUserRecommendedPostResponsesContentApplicationJsonSchemaEnrollment:
      type: object
      properties:
        courselist:
          type: array
          items:
            description: Any type
        recommend_by_course_id:
          type: string
        recommend_by_course_name:
          type: string
      required:
        - courselist
        - recommend_by_course_id
        - recommend_by_course_name
      title: ApiUserRecommendedPostResponsesContentApplicationJsonSchemaEnrollment
    ApiUserRecommendedPostResponsesContentApplicationJsonSchemaRecommendedCourselistItems:
      type: object
      properties:
        rel:
          type: string
        code:
          type: string
        name:
          type: string
        level:
          type: string
        prize:
          type: string
        status:
          type: string
        advance:
          type: string
        credits:
          type: string
        in_cart:
          type: boolean
        selling:
          type: string
        waiting:
          type: boolean
        canEnter:
          type: boolean
        date_end:
          description: Any type
        editions:
          type: boolean
        hour_end:
          type: string
        idCourse:
          type: string
        difficult:
          type: string
        lang_code:
          type: string
        show_time:
          type: string
        tenant_id:
          description: Any type
        calendarId:
          description: Any type
        classrooms:
          description: Any type
        created_at:
          type: string
        date_begin:
          description: Any type
        hour_begin:
          type: string
        idCategory:
          type: string
        imgSponsor:
          type: string
        img_course:
          type: string
          format: uri
        level_icon:
          type: boolean
        mediumTime:
          type: string
        show_rules:
          type: string
        updated_at:
          type: string
        used_space:
          type: string
        valid_time:
          type: string
        course_demo:
          type: string
        course_full:
          type: boolean
        course_type:
          type: string
        course_vote:
          description: Any type
        create_date:
          type: string
        description:
          type: string
        direct_play:
          type: string
        is_enrolled:
          type: boolean
        linkSponsor:
          type: string
        permCloseLO:
          type: string
        show_result:
          type: string
        useLightBox:
          type: boolean
        certificates:
          description: Any type
        course_quota:
          type: string
        escaped_name:
          type: string
        img_material:
          type: string
        point_to_all:
          type: string
        policy_point:
          type: string
        sendCalendar:
          type: string
        show_options:
          type: boolean
        sub_end_date:
          description: Any type
        userStatusOp:
          type: string
        can_subscribe:
          type: string
        id_menucustom:
          type: string
        security_code:
          description: Any type
        show_progress:
          type: string
        course_edition:
          type: string
        max_sms_budget:
          description: Any type
        sub_start_date:
          description: Any type
        box_description:
          type: string
        level_show_user:
          type: string
        show_extra_info:
          type: string
        show_who_online:
          type: string
        auto_unsubscribe:
          type: string
        courseBoxEnabled:
          type: boolean
        subscribe_method:
          type: string
        allow_overbooking:
          type: string
        img_othermaterial:
          type: string
        is_default_course:
          type: string
        max_num_subscribe:
          type: string
        min_num_subscribe:
          type: string
        userCanUnsubscribe:
          type: boolean
        autoregistration_code:
          type: string
        unsubscribe_date_limit:
          description: Any type
        use_logo_in_courselist:
          type: string
        imported_from_connection:
          type: string
      required:
        - rel
        - code
        - name
        - level
        - prize
        - status
        - advance
        - credits
        - in_cart
        - selling
        - waiting
        - canEnter
        - editions
        - hour_end
        - idCourse
        - difficult
        - lang_code
        - show_time
        - created_at
        - hour_begin
        - idCategory
        - imgSponsor
        - img_course
        - level_icon
        - mediumTime
        - show_rules
        - updated_at
        - used_space
        - valid_time
        - course_demo
        - course_full
        - course_type
        - create_date
        - description
        - direct_play
        - is_enrolled
        - linkSponsor
        - permCloseLO
        - show_result
        - useLightBox
        - course_quota
        - escaped_name
        - img_material
        - point_to_all
        - policy_point
        - sendCalendar
        - show_options
        - userStatusOp
        - can_subscribe
        - id_menucustom
        - show_progress
        - course_edition
        - box_description
        - level_show_user
        - show_extra_info
        - show_who_online
        - auto_unsubscribe
        - courseBoxEnabled
        - subscribe_method
        - allow_overbooking
        - img_othermaterial
        - is_default_course
        - max_num_subscribe
        - min_num_subscribe
        - userCanUnsubscribe
        - autoregistration_code
        - use_logo_in_courselist
        - imported_from_connection
      title: >-
        ApiUserRecommendedPostResponsesContentApplicationJsonSchemaRecommendedCourselistItems
    ApiUserRecommendedPostResponsesContentApplicationJsonSchemaRecommended:
      type: object
      properties:
        courselist:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiUserRecommendedPostResponsesContentApplicationJsonSchemaRecommendedCourselistItems
        recommend_by_course_id:
          description: Any type
        recommend_by_course_name:
          description: Any type
      required:
        - courselist
      title: ApiUserRecommendedPostResponsesContentApplicationJsonSchemaRecommended
    Get Recommendations_Response_200:
      type: object
      properties:
        success:
          type: boolean
        completed:
          type: array
          items:
            description: Any type
        enrollment:
          $ref: >-
            #/components/schemas/ApiUserRecommendedPostResponsesContentApplicationJsonSchemaEnrollment
        recommended:
          $ref: >-
            #/components/schemas/ApiUserRecommendedPostResponsesContentApplicationJsonSchemaRecommended
      required:
        - success
        - completed
        - enrollment
        - recommended
      title: Get Recommendations_Response_200

```

## SDK Code Examples

```python Get Recommendations_example
import requests

url = "https://localhost:8090//api/user/recommended"

payload = ""
headers = {"Content-Type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript Get Recommendations_example
const url = 'https://localhost:8090//api/user/recommended';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Recommendations_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://localhost:8090//api/user/recommended"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Recommendations_example
require 'uri'
require 'net/http'

url = URI("https://localhost:8090//api/user/recommended")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java Get Recommendations_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://localhost:8090//api/user/recommended")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php Get Recommendations_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://localhost:8090//api/user/recommended', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
```

```csharp Get Recommendations_example
using RestSharp;

var client = new RestClient("https://localhost:8090//api/user/recommended");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift Get Recommendations_example
import Foundation

let headers = ["Content-Type": "application/x-www-form-urlencoded"]

let request = NSMutableURLRequest(url: NSURL(string: "https://localhost:8090//api/user/recommended")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```