> 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.

# Course Info

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

The API endpoint `{{baseUrl}}/api/course/course`is a POST request that is used to retrieve a course based on the courseID

### Request

- Method: POST
    
- Base URL: {{baseUrl}}
    
- Path: /api/course/course
    
- Headers:
    
    - Content-Type: application/x-www-form-urlencoded
        

### Request Body

The request body type is **`x-www-form-urlencoded`**

- `idst` (string) - optional: User ID
    
- `auth` (string): Authentication token is required
    
- `course_id` (string): Course ID
    

### Response

The response will be in JSON format and will include the following fields:

- `success` (boolean): Indicates the success status of the request.
    
- `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

Reference: https://docs.tangerine365.com/tangerine-365-enterprise/course-info

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tangerine365 Enterprise
  version: 1.0.0
paths:
  //api/course/course:
    post:
      operationId: course-info
      summary: Course Info
      description: >-
        The API endpoint `{{baseUrl}}/api/course/course`is a POST request that
        is used to retrieve a course based on the courseID


        ### Request


        - Method: POST
            
        - Base URL: {{baseUrl}}
            
        - Path: /api/course/course
            
        - Headers:
            
            - Content-Type: application/x-www-form-urlencoded
                

        ### Request Body


        The request body type is **`x-www-form-urlencoded`**


        - `idst` (string) - optional: User ID
            
        - `auth` (string): Authentication token is required
            
        - `course_id` (string): Course ID
            

        ### Response


        The response will be in JSON format and will include the following
        fields:


        - `success` (boolean): Indicates the success status of the request.
            
        - `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
      tags:
        - ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Course Info_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                auth:
                  type: string
                idst:
                  type: string
                course_id:
                  type: string
              required:
                - auth
                - idst
                - course_id
servers:
  - url: https://localhost:8090
components:
  schemas:
    ApiCourseCoursePostResponsesContentApplicationJsonSchemaCourse:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        prize:
          type: string
        status:
          type: string
        selling:
          type: string
        date_end:
          description: Any type
        idCourse:
          type: string
        lang_code:
          type: string
        date_begin:
          description: Any type
        idCategory:
          type: string
        img_course:
          type: string
        mediumTime:
          type: string
        show_rules:
          type: string
        course_demo:
          type: string
        course_type:
          type: string
        create_date:
          type: string
        description:
          type: string
        sub_end_date:
          description: Any type
        can_subscribe:
          type: string
        course_edition:
          type: string
        sub_start_date:
          description: Any type
        box_description:
          type: string
        subscribe_method:
          type: string
      required:
        - code
        - name
        - prize
        - status
        - selling
        - idCourse
        - lang_code
        - idCategory
        - img_course
        - mediumTime
        - show_rules
        - course_demo
        - course_type
        - create_date
        - description
        - can_subscribe
        - course_edition
        - box_description
        - subscribe_method
      title: ApiCourseCoursePostResponsesContentApplicationJsonSchemaCourse
    Course Info_Response_200:
      type: object
      properties:
        course:
          $ref: >-
            #/components/schemas/ApiCourseCoursePostResponsesContentApplicationJsonSchemaCourse
        success:
          type: boolean
      required:
        - course
        - success
      title: Course Info_Response_200

```

## SDK Code Examples

```python Course Info_example
import requests

url = "https://localhost:8090//api/course/course"

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

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

print(response.json())
```

```javascript Course Info_example
const url = 'https://localhost:8090//api/course/course';
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 Course Info_example
package main

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

func main() {

	url := "https://localhost:8090//api/course/course"

	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 Course Info_example
require 'uri'
require 'net/http'

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

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 Course Info_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Course Info_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Course Info_example
using RestSharp;

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

```swift Course Info_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://localhost:8090//api/course/course")! 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()
```