# Course Attributes

# Required Attributes

# id

Type: UUID

The course's ID at Classpert. If no id is during course creation, it will create an random UUID as the course ID. In that case, use GET to find the course and retrieve the course's ID.

# name

Type: String

The course's name

# url

Type: String

The course's URL. Must be a valid URL on one of the user's register provider domains.

# slug

Type: String

The course's slug. It's generated automatically with a prefix based on the course's name attribute, asscified, and a random sufix. Since it uses only ASCII characters, there's the possibility of loss of information in titles using characters outside the Roman alphabet

User slug-prefix definition via will be implemented soon

# short_description

Type: String

Attribute used for search highlighting. For the description that's displayed at the course card, please check long_description. It does not support formatting.

# long_description

Type: String

Long description. It does not support formatting.

# audio

Type: String Array

An array of strings, each describing an available audio language code for the courser. The string may also include an country code following the language code, both separated by an hyphen.

Language codes must follow ISO 639 alpha-2, while country codes must follow ISO 3166-1 alpha-2

Example:

["en-US", "es", "pt-BR"]

# provider_id

Type: UUID

The course's provider, that is, which site it's hosted on. Must be one of the providers belonging to the API key's user account. Please use the provider's API to check the desired provider id.

# prices

Type JSON

An array with JSONs describing with all the available prices for the course, including if it is included in a subscription.

key type notes
type string single course if the course can be purchased independently, and subscription if it's part of a subscription plan
price string The price as a string
currency string The price's currency. It should be an ISO 4217 code
plan_type string Possible values are regular or premium
total_price string The total price of a subscription, as a string. This field is only set if the price type is subscription
subscription_period JSON A JSON containing the keys unit and value. The unit should be one of the following strings: days, weeks, months or years. value must be a number. This field is only set if the price type is subscription
payment_period JSON A JSON containing the keys unit and value. The unit should be one of the following strings: days, weeks, months or years. value must be a number. This field is only set if the price type is subscription
trial_period JSON A JSON containing the keys unit and value. The unit should be one of the following strings: days, weeks, months or years. value must be a number. This field is only set if the price type is subscription

Example:

[
  {
    "type":      "single_course",
    "price":     "29.99",
    "currency":  "BRL",
    "plan_type": "regular"
  },
  {
      "type": "subscription",
      "currency": "USD",
      "price": "10.00",
      "plan_type": "regular",
      "total_price": "120.00",
      "customer_type": "individual",
      "subscription_period": {"unit": "months", "value": 12},
      "payment_period": {"unit": "months", "value": 12},
      "trial_period": {"unit": "months", "value": 12}
  }
]

# pace

Type: String

Whether the course is self_paced or instructor_paced. Those are the only two possible values.

A self_paced course can be completed in the student's place, while an instructor_paced course has the lessons paced according to a schedule defined by the course's instructor. An instructor_paced courses usually have live lessons.

# published

Type: Boolean

Whether the courses is going to be shown ("published") in the site or not. If no value is passed, it defaults to true.

You can 'unpublish' a course by updating this value to false using the PATCH request method on the API.

# Optional Attributes

# certificate

Type: JSON

Course certificate data.

key type notes
type string This is the only required field. There are three types: free, included, and paid. The other fields are only used if the type is paid
price string The price as a string. This field should only be ser if the type is paid
currency string The price's currency. It should be an ISO 4217 code. The price as a string. This field should only be ser if the type is paid

Examples:

If the course requires an payment for it's completion certificate, it should be of type paid even if the course is free:

{
  "type":     "paid",
  "price":    "15.99",
  "currency": "USD"
}

Free courses with fee certificates should be of the type free.

{
  "type":     "free",
}

Paid courses that include a certificate, should be of the type included.

{
  "type":     "included",
}

# offered_by

Type: JSON

key type notes
type string Must be in ["university", "company", "other"]
name string Organization name
main boolean Optional field, to be used in case there is a main organization on the offered_by array

Example:

[
  {
    "type": "university",
    "name": "Example University",
    "main": true
  },
  {
    "type": "company",
    "name": "Example Company",
    "main": false
  }
]

# video

Type: JSON

An object describing the course's trailer / promo video. It has the following possible structures.

# Self hosted:

This is the most common video data structure. The type must be self_hosted

{
  "type":          "self_hosted",
  "url":           "video_url",
  "thumbnail_url": "video_thumbnail_url"
}

# Vimeo or Youtube:

Another common video data structure. The type must be vimeo or youtube. Instead of the URL, the video id is required. Example:

{
  "type":          "youtube",
  "id":            "video_id",
  "thumbnail_url": "thumbnail_url"
}

# provider_rating

Type: JSON

A JSON to deal with the diversity of rating styles present in differnt provider websites.

It contains the following keys:

key type notes
type string Must be in ["scale", "positive_ratio", "likes"]
min numeric Used only if the type is "scale". Minimum possible rating
max numeric Used only if the type is "scale". Maximun possible rating
value numeric The value of the rating. If the rating type is scale, the value must not be less than min nor exceed max. If the rating type is positive_ratio, it sould be normalized to a value between 0 and 100. If the rating type is likes, the value must be a positive integer
rating_count integer The total number of user ratings for this course
enrollment_count integer The total number of enrollments for this course
review_count integer The total number of user reviews written for the course

The keys rating_count, enrollment_count and review_count are not required. The keys min and max are only required if type and value are present, and type equals scale

Examples:

{
  "type": "scale",
  "min": 1,
  "max": 5,
  "value": 4.2
}

{
  "type": "scale",
  "min": 0,
  "max": 100,
  "value": 79,
  "rating_count": 456,
  "enrollment_count": 873,
  "review_count": 54
}

{
  "type": "positive_ratio",
  "value": 94
}

{
  "type": "likes",
  "value": 218,
  "enrollment_count": 873
}

{
  "rating_count": 456,
  "enrollment_count": 873,
  "review_count": 54
}

{
  "enrollment_count": 873
}

# free_content

Type: Boolean

Whether the course has any free content This does not mean it's not possible for the course to have paid content at the same time, e.g.: a free course with a paid certificate

Type: Boolean

Whether the course has any paid content. This does not mean it's not possible for the course to have free content at the same time, e.g.: a free course with a paid certificate

# level

Type: String Array

The course's level of difficulty. Possible values are: beginner, intermediate and advanced The array can have more than one value

Example:

["begginer", "intermediate"]

# instructors

Type: JSON

An array of instructors. Each instructor must be on a JSON with the following key-value pairs:

key type notes
name string The instructor's name
distinguished boolean Optional parameter. Whether the instructor is distinguished in the course's field
main boolean Optional parameter. Whether the instructor is one of the main instructors for the course or not

The only required field is name. All others are optional

Examples:

[
  {
    "name": "John Skillo",
    "distinguished": false,
    "main": true
  },
  {
    "name": "Joe Skillo",
    "distinguished": false,
    "main": false
  }
]

# what_you_will_learn

Type JSON

This attribute is used to describe the list of topics covered in the course. Array of JSON objects. Each object is composed of the following key-value pairs:

key type notes
title string A title describing one of the topics covered in the course
description string or string array A detailed, optional description of the topic. Please use the string array if you want to separate the description in different paragraphs

Example:

[
  {
    "title": "Some topic",
    "description": "Some description"
  },
  {
    "title": "Some other topic",
    "description": ["paragraph 1", "paragraph 2"]
  }
]

# syllabus

Type JSON

This attribute is used to describe the lessons covered in the course. Array of JSON objects. Each object is composed of the following key-value pairs:

key type notes
title string A title describing one of the topics covered in the course
description string or string array A detailed, optional description of the topic. Please use the string array if you want to separate the description in different paragraphs
duration JSON An optional JSON object, describing each lesson's duration. It composed of "value", which shoud be a number, and an "unit", the time unit for the lesson's duration. Possible "unit" values are "hours", "minutes" or "seconds"

example:

[
  {
    "title": "1st Lesson",
    "description": "1st lesson description",
    "duration": { "value": 2, "unit": "hours"}
  },
  {
    "title": "1st Lesson",
    "description": ["paragraph 1", "paragraph 2"],
    "duration": { "value": 50, "unit": "minutes"}
  }
]

The presence of the keys description and duration on each of the array items are optional. So, in it's simplest form, is an array of lesson titles.

# subtitles_text

Type: String Array

An array of strings, each describing an available subtitle language code. The string may also include an country code following the language code, both separated by an hyphen.

Language codes must follow ISO 639 alpha-2, while country codes must follow ISO 3166-1 alpha-2

Example:

["en-US", "es", "pt-BR"]

# image_url

Type: String

Thumbnail image url, to be used in case there is no video attribute set up. Must be an valid image URL.

# number_of_lessons

Type: Number

If a course is divided in lessons, the number of the lessons the course has. Otherwhise, defaults to 1

# assessments

Type: Boolean

Whether if the course has an final accessment for to student to take. If it's not set, it defaults to false.

# assignments

Type: Boolean

Whether if it is required for the student to complete assignments to complete the course. If it's not set, it defaults to false.

# duration_in_hours

Type: Number

Total duration of the course in hours.