Skilljar API endpoint reference
This page documents API endpoints supported by the Skilljar platform. It is auto-generated from our source code and therefore kept up to date as we add additional operations. To learn about the Skilljar API and get an overview of how objects are structured within the course platform, it's better to start with the following articles:
domains
list
List domains. Returns a paginated response (100 results per page) of domains. Example Response: { "count": 1, "next": null, "previous": null, "results": [ { "id": "abcdefg123456", "name": "example.com", "catalog_title": "<h1 style=\"font-weight: 400; font-size: 28px;\">All Courses</h1>", "access": "PUBLIC", "access_code_message_html": "", "marketing_message": "" } ] }
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
read
Get domain details. Example Response: { "id": "abcdefg123456", "name": "example.com", "catalog_title": "<h1 style=\"font-weight: 400; font-size: 28px;\">All Courses</h1>", "private": true, "access": "PUBLIC", "access_code_message_html": "", "marketing_message": "" }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
update
Update domain details. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
catalog_title | HTML content displayed at the top of the catalog page |
access | Domain access settings |
access_code_message_html | |
marketing_message | Private domain marketing opt-in message, shown with checkbox on the signup page |
partial_update
Update domain details. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
catalog_title | HTML content displayed at the top of the catalog page |
access | Domain access settings |
access_code_message_html | |
marketing_message | Private domain marketing opt-in message, shown with checkbox on the signup page |
access-code-pools > list
List access code pools for a domain. Returns a paginated list (100 results per page) of access code pools.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
name | Filter returned access code pools by name |
access-code-pools > create
Create an empty pool of domain access codes.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | Name of the access code pool. This may have been auto-generated when creating individual codes in the dashboard. |
active | |
start_date | |
end_date | |
expire_linked_to_domain_membership | When this is true and an end_date is set, a user who registers with a code from this pool will lose access to the domain on the end_date. |
access-code-pools > read
Retrieve access code pool details. Example Response: { "id": "abcde1234", "name": "example-pool", "active": true, "start_date": 2016-01-29T00:22:00.590250Z, "end_date": null, "expire_linked_to_domain_membership": false, "channel": "api", "code_count": 1 }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required |
access-code-pools > update
Update access code pool. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name | Name of the access code pool. This may have been auto-generated when creating individual codes in the dashboard. |
active | |
start_date | |
end_date | |
expire_linked_to_domain_membership | When this is true and an end_date is set, a user who registers with a code from this pool will lose access to the domain on the end_date. |
access-code-pools > partial_update
Update access code pool. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name | Name of the access code pool. This may have been auto-generated when creating individual codes in the dashboard. |
active | |
start_date | |
end_date | |
expire_linked_to_domain_membership | When this is true and an end_date is set, a user who registers with a code from this pool will lose access to the domain on the end_date. |
access-code-pools > access-codes > list
List access codes in a pool. Returns a paginated list (1000 results per page) of access codes. Example Response: { "count": 1, "next": null, "previous": null, "results": [ { "id": "abcde12345", "code": "examplecode", "active": true, "max_uses": 3, "use_count": 2, "duration": null, "duration_unit": "MONTHS" } ] }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
access-code-pools > access-codes > create
Add an access code to a pool.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code | |
active | |
max_uses | |
duration | |
duration_unit |
access-code-pools > access-codes > read
Retrieve access code details. Example Response: { "code": "examplecode", "active": true, "max_uses": 3, "use_count": 2, "duration": null, "duration_unit": "Months" "users": [ { "id": "abcdef12345", "email": "janedoe@example.com", "first_name": "Jane", "last_name": "Doe" }, { "id": "bcdeg23456", "email": "jamesdoe@example.com", "first_name": "James", "last_name": "Doe" }, ] }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required | |
access_code_id required |
access-code-pools > access-codes > update
Update access code. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required | |
access_code_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code | |
active | |
max_uses | |
duration | |
duration_unit |
access-code-pools > access-codes > partial_update
Update access code. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
access_code_pool_id required | |
access_code_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code | |
active | |
max_uses | |
duration | |
duration_unit |
course-series > list
List course series on a domain.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
course-series > published-courses > list
List published courses in a course series
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
course_series_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
published-courses > list
List courses published to a domain. Returns a paginated list (100 results per page) of published courses. Example Response: { "count": 1, "next": null, "previous": null, "results": [ { "id": "abcdefg123456", "course": { "id": "cdefghi345678", "title": "Example Title" }, "slug": "example-course", "course_url": "http://learn.example.com/example-course", "hidden": false, "registration_required": true, "registration_starts_at": "2017-11-28T08:00:00Z", "registration_ends_at": "2018-09-30T06:00:00Z", "timezone": "US/Pacific", "offer": { "id": "bcdefgh234567", "registration_open": true, "registration_url": "http://learn.example.com/checkout/bcdefgh234567", "price": { "amount": "100.00", "currency_code": "USD" } } } ] }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
include_searchable_content | If set to True, the response also includes the following fields ('lesson_list', 'tags', 'short_description', 'long_description_html', 'search_keywords') |
search | URL encoded string, return the results and the order as if a catalog search |
published-courses > read
Retrieve course details.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
published_course_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
include_searchable_content | If set to True, the response also includes the following fields ('lesson_list', 'tags', 'short_description', 'long_description_html', 'search_keywords') |
published-courses > enrollments > list
List enrollments for a PublishedCourse. A user may have multiple enrollments, and will have access to a course if at least one of the enrollments is active and not expired. If an enrollment was created in association with a purchase, or registration through the course platform UI, the purchase details are included in the response. Returns a paginated list (1000 results per page) of enrollments. Example Response: { "count": 1, "next": null, "previous": null, "results": [ { "id": "abcdefg123456", "user": { "id": "bcdefga123456", "email": "jane@doe.com", "first_name": "Jane", "last_name": "Doe", }, "enrolled_at": "2015-01-29T00:22:00.590250Z", "expires_at": null, "active": true, "purchase": { "order_id": "", "offer_price": { "amount": "100.00", "currency_code": "USD" }, "purchase_price": { "amount": "50.00", "currency_code": "USD" }, "quantity": 1, "purchase_state": "SUCCESS", "payment_processor": "STRIPE" } } ] }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
published_course_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
published-courses > enrollments > create
Enroll a user in a PublishedCourse. This operation is idempotent on the user.id & enrolled_at combination. POSTing multiple times to this endpoint will NOT create a new enrollment for an existing user.id & enrolled_at combination. However, each call will create a new enrollment if either the user.id or enrolled_at parameter does not match an existing enrollment. purchase_state = 'CREATED', 'PENDING', 'SUCCESS', 'FAILED', 'REFUNDED', 'CANCELLED', or 'FLAGGED' Example POST body (if POSTing JSON rather than form-encoded parameters): { "user": { "id": "abcde12345", }, "enrolled_at" : "2018-03-12T10:12:45Z", "expires_at" : "2018-05-12T10:12:45Z", "active": true, "purchase": { "purchase_state": "SUCCESS", "purchase_price": { "amount": "5.00", "currency_code": "USD" }, "purchased_at": "2018-02-12T10:12:45Z", "tax_price_cents": 100 } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
published_course_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
user required | |
enrolled_at | |
expires_at | |
active | |
purchase |
published-courses > enrollments > read
Get enrollment details. If an enrollment was created in association with a purchase, or registration through the course platform UI, the purchase details are included in the response.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
published_course_id required | |
enrollment_id required |
published-courses > enrollments > update
Update enrollment details. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
published_course_id required | |
enrollment_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
expires_at | |
active |
published-courses > enrollments > partial_update
Update enrollment details. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
published_course_id required | |
enrollment_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
expires_at | |
active |
signup-fields > list
List signup fields for a domain.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
users > list
List users for a domain. Returns a paginated list (1000 results per page) of domain user details. Example Response: { "count": 2, "next": null, "previous": null, "results": [ { "user": { "id": "opqrstu345678", "email": "joe@example.com", "first_name": "Joe", "last_name": "User" }, "active": true, "marketing_optin": null, "enrolled_at": "2015-01-29T00:22:00.590250Z", "expires_at": null, "access_code": null }, { "user": { "id": "cdefghi567890", "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe" }, "active": false, "marketing_optin": null, "enrolled_at": "2015-02-15T00:43:10.123456Z", "expires_at": null, "access_code": { "id": "defghij678901", "code": "opensesame", "pool": { "id": "efghijk789012", "name": "Genie Codes" } } } ] }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
user__email | Filter domain users by email address |
user__first_name | Filter domain users by first name - case sensitive |
user__last_name | Filter domain users by last name - case sensitive |
active | Filter domain users by active (true or false) |
access_code__code | Filter domain users by access code used - case sensitive |
access_code__id | Filter domain users by id of access code used - not case sensitive |
access_code__pool__id | Filter domain users by id of access code pool used - not case sensitive |
access_code | Use a value of "null" to see domain users who accessed the domain without an access code. No other values are accepted for this query. |
users > create
Add a user to a domain. Users must have unique email addresses. You may POST an existing user (existing email address) to the domain, and the call will still return successfully with the existing user details. If you POST a new user email to the domain, the call will create a new user within the system. Example POST body (if POSTing JSON rather than form-encoded parameters): { "user": { "email": "bob@example.com", "first_name": "Bob", "last_name": "User" } } Example Response: { "user": { "id": "qrstuvw321098", "email": "bob@example.com", "first_name": "Bob", "last_name": "User" }, "active": true, "marketing_optin": null, "enrolled_at": "2015-01-29T00:22:00.590250Z", "expires_at": null, "access_code": null, "login_token": "qrstuvw321098-3xn-a1b23cd456dfg7890hijk" }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
user required | User details |
active | Only active users have access to a private domain |
marketing_optin | Indicates user has accepted or rejected the marketing optin message. Null indicates no marketing option message was shown to user |
expires_at | ISO 8601 formatted datetime string indicating when the access to the domain will expire - ignored on public domains |
users > update
Update domain user. Only active and expires_at may be updated. Access codes may also be removed by setting the entire access_code to null. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
user_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
active | |
expires_at | |
access_code | Information about the access code entered by the user, if they used one to join a private domain |
users > partial_update
Update domain user. Only active and expires_at may be updated. Access codes may also be removed by setting the entire access_code to null. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
user_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
active | |
expires_at | |
access_code | Information about the access code entered by the user, if they used one to join a private domain |
users > invites > list
List all invites for a user on this domain
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
user_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
users > invites > create
Create domain user invite. This will send the user an invitation via email unless send_email is set to False. User must have already been added to the domain. ---
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
user_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
send_email | Whether or not to send the user an email inviting them to the domain. Defaults to True |
users > signup-fields > list
List a user's signup fields.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
user_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
users > signup-fields > create
Create or update a user's signup field value. If the user does not have a current value assigned to the POSTed signup field, this endpoint will create a new signup field value for the user. If the user already has a value associated with the signup field, it will be updated to the POSTed value. Example POST body (if POSTing JSON rather than form-encoded parameters): { "signup_field": { "id": "abcd1234" }, "value": "My Signupfield Value" }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
domain_name required | |
user_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
signup_field required | |
value required |
groups
list
List groups. Returns a paginated list (1000 results per page) of groups. name -- filter groups by exact match on group name
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
name | Filter groups by exact match on group name |
update
Update group details. Currently you may only change the name of the group. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
group_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | Unique name of the group |
partial_update
Update group details. Currently you may only change the name of the group. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
group_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name | Unique name of the group |
access-code-pools > list
List access code pools for a group. Returns a paginated list (1000 results per page) of access code pool details.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
group_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
access-code-pools > create
Add an access code pool to a group. Example POST body (if POSTing JSON rather than form-encoded parameters): { "access_code_pool": { "id": "abcde12345", } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
group_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
access_code_pool required |
users > list
List users in a group. Returns a paginated list (1000 results per page) of group user details. Example Response: { "count": 2, "next": null, "previous": null, "results": [ { "user": { "id": "opqrstu345678", "email": "joe@example.com", "first_name": "Joe", "last_name": "User" }, "created_at": "2015-02-19T19:20:24.671362Z" }, { "user": { "id": "cdefghi567890", "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe" }, "created_at": "2015-02-18T10:37:48.543927Z" } ] }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
group_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
users > create
Add a user to a group. Example POST body (if POSTing JSON rather than form-encoded parameters): { "user": { "id": "abcde12345", } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
group_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
user required | User details |
lesson-progress
update
Update for lesson progress. PUT and PATCH are identical - both do partial updates. Setting finished_at indicates that the student has finished the content. This will also mark the lesson complete unless the lesson requires validation, such as a review of proctoring. To un-complete the lesson, set completed_at to null.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
lesson_progress_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
finished_at | ISO 8601 formatted datetime string indicating when the user finished the lesson content. Setting this field will also mark the lesson complete unless the lesson requires validation, such as a review of proctoring. |
completed_at | ISO 8601 formatted datetime string indicating when the user completed the lesson. If null, the user has not completed the lesson. |
success_status | 'PASSED', 'FAILED' or null |
score | Score received |
max_score | Max possible score |
custom_data | |
validation_status | 'PASSED', 'FAILED' or null |
validation_data | JSON formatted. Ignored if the lesson does not require validation. |
partial_update
Partial update for lesson progress. PUT and PATCH are identical - both do partial updates. Setting finished_at indicates that the student has finished the content. This will also mark the lesson complete unless the lesson requires validation, such as a review of proctoring. To un-complete the lesson, set completed_at to null.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
lesson_progress_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
finished_at | ISO 8601 formatted datetime string indicating when the user finished the lesson content. Setting this field will also mark the lesson complete unless the lesson requires validation, such as a review of proctoring. |
completed_at | ISO 8601 formatted datetime string indicating when the user completed the lesson. If null, the user has not completed the lesson. |
success_status | 'PASSED', 'FAILED' or null |
score | Score received |
max_score | Max possible score |
custom_data | |
validation_status | 'PASSED', 'FAILED' or null |
validation_data | JSON formatted. Ignored if the lesson does not require validation. |
offers
list
List Offers. Returns a paginated list (1000 results per page) based upon the filters supplied.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
ping
progresstokens
update
Update the progress based on the given progress token. May update the corresponding lesson progress for the user, and update course status if this action completes the course.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
progress_token_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
completed_at | ISO 8601 formatted datetime string indicating when the user completed the task |
success_status | |
score | Score received |
max_score | Max possible score |
partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
progress_token_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
completed_at | ISO 8601 formatted datetime string indicating when the user completed the task |
success_status | |
score | Score received |
max_score | Max possible score |
promo-code-pools
list
List PromoCodePools. Returns a paginated list (1000 results per page) based upon the filters supplied.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
offer_id | Filter results by the id of a Offer |
name | Filter results by PromoCodePool name |
create
Create a PromoCodePool Example POST body (if POSTing JSON rather than form-encoded parameters): { "name": "promo-code-pool-name-1", "active": true, "discount_type": "PERCENT_OFF", "percent_off": 100, "single_use_per_user": false, "starts_at": "2018-03-16T16:45:55.946094Z", "expires_at": "2018-10-16T16:45:55.946094Z", } Or { "name": "promo-code-pool-name-1", "active": true, "discount_type": "PRICE_OVERRIDE", "price_cents": 5000, "single_use_per_user": false, "starts_at": "2018-03-16T16:45:55.946094Z", "expires_at": "2018-10-16T16:45:55.946094Z", }
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
active | |
starts_at required | ISO 8601 formatted datetime string indicating the start of the promo code pool |
expires_at | ISO 8601 formatted datetime string indicating the expiration of the promo code pool |
discount_type required | |
price_cents | |
percent_off | |
single_use_per_user |
update
Update for promo-code-pools.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_pool_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
active | |
starts_at required | |
expires_at | ISO 8601 formatted datetime string indicating the expiration of the promo code pool |
partial_update
Update for promo-code-pools. PUT and PATCH are identical - both do partial updates
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_pool_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name | |
active | |
starts_at | |
expires_at | ISO 8601 formatted datetime string indicating the expiration of the promo code pool |
delete
Deletes a PromoCodePool record. As a result, the associated PromoCode will also be deleted. Any purchases that used the previously associated PromoCode will now be updated to have a null value for code_used. This action cannot be undone.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_pool_id required |
offers > list
List PromoCodePoolOffers. Returns a paginated list (1000 results per page) based upon the filters supplied.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_pool_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
offers > create
Attach an Offer to a PromoCodePool. There is a limit of 500 offers that can be added to a PromoCodePool per transaction. Example POST body (if POSTing JSON rather than form-encoded parameters): { "id": "abcde12345" } Or [ {"id": "bcdef23456"}, {"id": "cdefg34567"}, {"id": "defgh45678"}, {"id": "efghi56789"} ]
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_pool_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
id | Offer ID you wish to attach to a PromoCodePool |
promo-codes
list
List PromoCodes. Returns a paginated list (1000 results per page) based upon the filters supplied.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
promo_code_pool_id | Filter results by the id of a Offer |
code | Filter results by the code used - case sensitive |
active | Filter results by active (true or false) |
create
Create a PromoCode. A PromoCodePool must exist before attempting to post to this endpoint. Example POST body (if POSTing JSON rather than form-encoded parameters): { "code": "6hhzj2ea-v5j3ak3d", "max_uses": 30, "active": true, "promo_code_pool_id": "9uips0sdja", }
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code required | |
max_uses required | |
active | |
promo_code_pool_id required |
update
Update for promo-codes. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code required | |
max_uses required | |
active |
partial_update
Update for promo-codes. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
promo_code_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code | |
max_uses | |
active |
purchases
update
Update purchase details. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
purchase_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
state | 'PENDING', 'SUCCESS', 'FAILED', 'REFUNDED', or 'CANCELLED' |
refunded_at | |
refund_cents | |
price_cents | |
tax_price_cents |
partial_update
Update purchase details. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
purchase_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
state | 'PENDING', 'SUCCESS', 'FAILED', 'REFUNDED', or 'CANCELLED' |
refunded_at | |
refund_cents | |
price_cents | |
tax_price_cents |
fulfill
Fulfill specific purchase. Updates the purchase state, and if "SUCCESS", fulfills the purchase, creating any necessary course or domain registrations.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
purchase_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
state required | 'SUCCESS', 'FAILED', or 'CANCELLED' |
error_msg | Optional: This error message will be presented to the user after they return to Skilljar, and will be set as the status_msg on the Purchase |
payment_processor_order_id | Optional: The id of the transaction within the payment processor system, for reference only |
payment_processor_response_data | Optional: Purchase metadata. For reference only. JSON format is recommended |
users
list
List users who have registered on at least one domain. Returns a paginated list (1000 results per page) of users.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
email | Filter users by email address |
first_name | Filter users by first name - case sensitive |
last_name | Filter users by last name - case sensitive |
update
Update for user details. Only name and email address may be changed. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email | Email address |
first_name | First name |
last_name | Last name |
partial_update
Partial update for user details. Only name and email address may be changed. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email | Email address |
first_name | First name |
last_name | Last name |
anonymize
Obfuscate all data that could be used to identify the user, either directly, or indirectly. This will permanently update the user, deleting sensitive information and preventing future usage of the platform. This action is not reversible.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
groups > list
List groups of which a user is a member.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
published-courses > list
List published courses with progress details for a user. Returns a paginated list (1000 results per page) of course progress details for a user.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
published-courses > update
Update course progress for a user. PUT and PATCH are identical - both do partial updates. To mark a course as complete, you only need to set the completed_at within the course progress. For example: { "course_progress": { "completed_at": "2015-06-03T01:02:03.012345Z", "success_status": "PASSED" } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required | |
published_course_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
published_course_id | ID of the PublishedCourse |
course_progress required |
published-courses > partial_update
Partial update course progress for a user. PUT and PATCH are identical - both do partial updates. To mark a course as complete, you only need to set the completed_at within the course progress. For example: { "course_progress": { "completed_at": "2015-06-03T01:02:03.012345Z", "success_status": "PASSED" } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required | |
published_course_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
published_course_id | ID of the PublishedCourse |
course_progress |
published-courses > lessons > list
List lessons with progress details for a user in a particular course. Returns a paginated list (100 results per page) of lesson progress details for a user.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required | |
published_course_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
published-courses > lessons > update
Update lesson progress for a user. PUT and PATCH are identical - both do partial updates. To mark a lesson as complete, you only need to set the completed_at within the lesson progress. For example: { "lesson_progress": { "completed_at": "2015-06-03T01:02:03.012345Z" } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required | |
published_course_id required | |
lesson_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
lesson_progress required |
published-courses > lessons > partial_update
Partial update lesson progress for a user. PUT and PATCH are identical - both do partial updates. To mark a lesson as complete, you only need to set the completed_at within the lesson progress. For example: { "lesson_progress": { "completed_at": "2015-06-03T01:02:03.012345Z" } }
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
user_id required | |
published_course_id required | |
lesson_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
lesson_progress |
vilt-session-events
list
List ViltSessionEvents. Returns a paginated list based upon the filters supplied.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
session__lesson__course__id | Filter ViltSessionEvents by exact match of a Course ID |
session__lesson__id | Filter ViltSessionEvents by exact match of a Lesson ID |
starts_at__gte | Filter where a ViltSessionEvent is greater than or equal to the starts at value. Datetime format |
ends_at__lte | Filter where a ViltSessionEvent is less than or equal to the ends at value. Datetime format |
vilt-session-registrations
list
List ViltSessionRegistrations. Returns a paginated list (1000 results per page) based upon the filters supplied.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
session__id | Filter results by the id of a ViltSession |
create
Register a user to a vilt_session. An enrollment for this user must exist before attempting to post to this endpoint. Example POST body (if POSTing JSON rather than form-encoded parameters): { "vilt_session": { "id": "jaso89ajs", }, "enrollment_id": "9uips0sdja" }
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
vilt_session | |
enrollment_id |
update
Update for vilt-session-registrations. Only attendance may be changed. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
vilt_session_registration_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
attended required |
partial_update
Update for vilt-session-registrations. Only attendance may be changed. PUT and PATCH are identical - both do partial updates.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
vilt_session_registration_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
attended |
webhooks
list
List webhooks. Returns a paginated response (100 results per page) of webhooks. Example Response: { "count": 1, "next": null, "previous": null, "results": [ { "id": "abcd1234", "target_url": "http://example.com/skilljar-hook-processor", "active": true, "deactivate_reason": null } ] }
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
create
Create a webhook. The Skilljar system will send HTTP POST requests to the given URL when events occur within the platform. Events include: when a user enrolls in a course, when a user completes a course, and when a user signs up on a domain.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
target_url required | |
active |
update
Update webhook details.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
webhook_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
target_url required | |
active |
partial_update
Update webhook details.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
webhook_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
target_url | |
active |
sample-course-completion > list
Returns a single-item list of sample course completion events. The sample event returned by this API is either the most recent COURSE_COMPLETION event, or a sample event with sample data if there are no course completions. This API is used internally to generate sample data; the body of an actual webhook notification will be a single JSON event that is NOT contained within a list.
sample-course-enrollment > list
Returns a single-item list of sample course enrollment events. The sample event returned by this API is either the most recent COURSE_ENROLLMENT event, or a sample event with sample data if there are no course enrollments. This API is used internally to generate sample data; the body of an actual webhook notification will be a single JSON event that is NOT contained within a list.
sample-domain-enrollment > list
Returns a single-item list of sample domain enrollment events. The sample event returned by this API is either the most recent DOMAIN_ENROLLMENT event (if the most recent domain membership has signup info that corresponds with current active signup fields), or a sample event with sample data if there are no domain memberships. This API is used internally to generate sample data; the body of an actual webhook notification will be a single JSON event that is NOT contained within a list.
sample-lesson-completion > list
Returns a single-item list of sample lesson completion events. The sample event returned by this API is either the most recent LESSON_COMPLETION event, or a sample event with sample data if there are no lesson completions. This API is used internally to generate sample data; the body of an actual webhook notification will be a single JSON event that is NOT contained within a list.
sample-purchase-fulfillment > list
Returns a single-item list of sample purchase fulfillment events. The sample event returned by this API is either the most recent PURCHASE_FULFILLMENT event, or a sample event with sample data if there are no purchase fulfillment events. This API is used internally to generate sample data; the body of an actual webhook notification will be a single JSON event that is NOT contained within a list.
sample-quiz-completion > list
Returns a single-item list of sample quiz completion events. The sample event returned by this API is either the most recent QUIZ_COMPLETION event, or a sample event with sample data if there are no quiz completions. This API is used internally to generate sample data; the body of an actual webhook notification will be a single JSON event that is NOT contained within a list.