Created
June 4, 2025 17:29
-
-
Save ahmedrowaihi/5bf54f171b7fdec7df2120f84c02b6d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.2", | |
"info": { | |
"title": "teachable-public-api", | |
"description": "The documentation for the Teachable Public API. All endpoints are currently\nsubject to change.", | |
"version": "0.0.1" | |
}, | |
"paths": { | |
"/v1/courses": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch all courses at your school.", | |
"operationId": "ListCourses", | |
"parameters": [ | |
{ | |
"name": "name", | |
"in": "query", | |
"description": "Filter courses by course name", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "is_published", | |
"in": "query", | |
"description": "Filter courses by published status. If true, return published courses. If false, return unpublished courses.", | |
"required": false, | |
"schema": { | |
"type": "boolean" | |
} | |
}, | |
{ | |
"name": "author_bio_id", | |
"in": "query", | |
"description": "Filter courses by a specific course author via the course author's bio ID.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "created_at", | |
"in": "query", | |
"description": "Return courses by the date & time of course creation. Formatted in ISO8601.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
{ | |
"name": "page", | |
"in": "query", | |
"description": "Used in pagination when number of courses exceed the maximum amount of results per page", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "per", | |
"in": "query", | |
"description": "Used in pagination to define amount of courses per page, when not defined the maximum is 20", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListCoursesResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch a specific course by ID.", | |
"operationId": "ShowCourse", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return a course by its unique ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/CourseResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/enrollments": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch active enrolled students and student progress for a specific course.", | |
"operationId": "ShowCourseEnrollments", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return enrollments for a specific course by the unique course ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "enrolled_in_after", | |
"in": "query", | |
"description": "Search for students who are enrolled after a specific date/time. Formatted in ISO8601.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
{ | |
"name": "enrolled_in_before", | |
"in": "query", | |
"description": "Search for students who are enrolled before a specific date/time. Formatted in ISO8601.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
{ | |
"name": "sort_direction", | |
"in": "query", | |
"description": "Enrollments are sorted by the 'enrolled_at' datetime. You can choose the direction by including the sort_direction param.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"enum": ["asc", "desc"] | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListCourseEnrollmentsResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/lectures/{lecture_id}": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch content of a specific course lecture.", | |
"operationId": "ShowLecture", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return results by unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "lecture_id", | |
"in": "path", | |
"description": "Return results by unique lecture ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/LectureResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/lectures/{lecture_id}/mark_complete": { | |
"post": { | |
"tags": ["Courses"], | |
"description": "Mark a specific course lecture as complete.", | |
"operationId": "MarkLectureComplete", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "The unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "lecture_id", | |
"in": "path", | |
"description": "The unique lecture ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/User" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"204": { | |
"description": "204 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
}, | |
"409": { | |
"description": "409 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/progress": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch a specific user's course progress.", | |
"operationId": "CourseProgress", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "The unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "user_id", | |
"in": "query", | |
"description": "The unique ID of the user.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "page", | |
"in": "query", | |
"description": "Used in pagination when number of courses exceed the maximum amount of results per page", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "per", | |
"in": "query", | |
"description": "Used in pagination to define amount of courses per page, when not defined the maximum is 20", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/CourseProgressesResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/lectures/{lecture_id}/quizzes": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch an id list of quizzes in a specific course lecture.", | |
"operationId": "ListQuizzes", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return results by unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "lecture_id", | |
"in": "path", | |
"description": "Return results by unique lecture ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/QuizzesResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/lectures/{lecture_id}/quizzes/{quiz_id}": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch a specific quiz information.", | |
"operationId": "ShowQuiz", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return results by unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "lecture_id", | |
"in": "path", | |
"description": "Return results by unique lecture ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "quiz_id", | |
"in": "path", | |
"description": "Return results by unique quiz attachment ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/QuizInformationResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/lectures/{lecture_id}/quizzes/{quiz_id}/responses": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch the responses of quiz.", | |
"operationId": "ShowQuizResponses", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return results by unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "lecture_id", | |
"in": "path", | |
"description": "Return results by unique lecture ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "quiz_id", | |
"in": "path", | |
"description": "Return results by unique quiz attachment ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/QuizResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/courses/{course_id}/lectures/{lecture_id}/videos/{video_id}": { | |
"get": { | |
"tags": ["Courses"], | |
"description": "Fetch a specific video information.", | |
"operationId": "ShowVideo", | |
"parameters": [ | |
{ | |
"name": "course_id", | |
"in": "path", | |
"description": "Return results by unique course ID that contains the lecture.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "lecture_id", | |
"in": "path", | |
"description": "Return results by unique lecture ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "video_id", | |
"in": "path", | |
"description": "Return results by unique video attachment ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
}, | |
{ | |
"name": "user_id", | |
"in": "query", | |
"description": "Specify the user who is watching the video", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"video": { | |
"$ref": "#/components/schemas/VideoResponse" | |
} | |
}, | |
"required": ["video"] | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/users": { | |
"post": { | |
"tags": ["Users"], | |
"description": "Create a new user", | |
"operationId": "CreateUser", | |
"parameters": [], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/CreateUserRequest" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"201": { | |
"description": "201 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/UserResponse" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "400 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"get": { | |
"tags": ["Users"], | |
"description": "Get a list of users", | |
"operationId": "ListUsers", | |
"parameters": [ | |
{ | |
"name": "page", | |
"in": "query", | |
"description": "Used in pagination when number of users exceed the maximum amount of results per page", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "per", | |
"in": "query", | |
"description": "Used in pagination to define amount of users per page, when not defined the maximum is 20", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "search_after", | |
"in": "query", | |
"description": "Used when number of users exceeds 10,000 records. Use the search_after value in the parameters to search the next set of records.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "email", | |
"in": "query", | |
"description": "Filter users by user email.", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListUsersResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/users/{user_id}": { | |
"get": { | |
"tags": ["Users"], | |
"description": "List a specific user and their course enrollments by user ID.", | |
"operationId": "ShowUser", | |
"parameters": [ | |
{ | |
"name": "user_id", | |
"in": "path", | |
"description": "The unique ID of the user.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/UserResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"patch": { | |
"tags": ["Users"], | |
"description": "Update the name or src of a user.", | |
"operationId": "UpdateUser", | |
"parameters": [ | |
{ | |
"name": "user_id", | |
"in": "path", | |
"description": "The unique ID of the user.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/UpdateUserRequest" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/UserResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/enroll": { | |
"post": { | |
"tags": ["Enroll"], | |
"description": "Enroll a user in a course.", | |
"operationId": "EnrollUser", | |
"parameters": [], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Enrollment" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"204": { | |
"description": "204 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
}, | |
"422": { | |
"description": "422 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/unenroll": { | |
"post": { | |
"tags": ["Enroll"], | |
"description": "Unenroll a user from a course.", | |
"operationId": "UnenrollUser", | |
"parameters": [], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Enrollment" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"204": { | |
"description": "204 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/webhooks": { | |
"get": { | |
"tags": ["Webhooks"], | |
"description": "Fetch all webhook events for your school.", | |
"operationId": "ListWebhooks", | |
"parameters": [], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListWebhooksResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/webhooks/{webhook_id}/events": { | |
"get": { | |
"tags": ["Webhooks"], | |
"description": "Fetch all the events for a webhook.", | |
"operationId": "ShowWebhookEvents", | |
"parameters": [ | |
{ | |
"name": "webhook_id", | |
"in": "path", | |
"description": "The unique ID of the webhook.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "response_http_status_gte", | |
"in": "query", | |
"description": "Filter responses by HTTP status code of the webhook event, greater than or equal to the provided value (i.e., enter 200 to search for webhook events that had an HTTP status code of 200 or greater).", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "response_http_status_lte", | |
"in": "query", | |
"description": "Filter responses by HTTP status of the webhook event, less than or equal to the provided value. (e.g., enter 200 to search for webhook events that had an HTTP status code of 200 or less).", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "created_before", | |
"in": "query", | |
"description": "Search for webhook events that were created before a specific date/time. Formatted in ISO 8601.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time", | |
"default": "2020-04-17T19:44:03Z" | |
} | |
}, | |
{ | |
"name": "created_after", | |
"in": "query", | |
"description": "Search for webhook events that were created after a specific date/time. Formatted in ISO 8601.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time", | |
"default": "2020-04-17T19:44:03Z" | |
} | |
}, | |
{ | |
"name": "page", | |
"in": "query", | |
"description": "Set the page number to be returned. (i.e., If you have two pages of results with 20 results per page, set the page value to 1 to receive results 1 through 20, or set the page value to 2 to receive results 21-40).", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "per", | |
"in": "query", | |
"description": "Set the maximum number of results to be returned by page. By default, each page will return 20 results.", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListWebhookEventsResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/pricing_plans/{pricing_plan_id}": { | |
"get": { | |
"tags": ["Pricing Plans"], | |
"description": "Fetch details of a specific pricing plan. Currently only supports pricing plans associated with courses.", | |
"operationId": "ShowPricingPlans", | |
"parameters": [ | |
{ | |
"name": "pricing_plan_id", | |
"in": "path", | |
"description": "Search for a pricing plan by its unique ID.", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1 | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/PricingPlanResponse" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "404 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ErrorResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/pricing_plans": { | |
"get": { | |
"tags": ["Pricing Plans"], | |
"description": "Fetch all the pricing plans at your school", | |
"operationId": "ListPricingPlans", | |
"parameters": [ | |
{ | |
"name": "page", | |
"in": "query", | |
"description": "Used in pagination when number of pricing plans exceeds the maximum amount of results per page", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "per", | |
"in": "query", | |
"description": "Used in pagination to define amount of pricing plans per page, when not defined the maximum is 5", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListPricingPlansResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/transactions": { | |
"get": { | |
"tags": ["Transactions"], | |
"description": "Fetch a list of sales transactions made in your school. (New transactions can take up to two minutes to be returned via API call from the time of sale.)", | |
"operationId": "ListTransactions", | |
"parameters": [ | |
{ | |
"name": "user_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "affiliate_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "course_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "pricing_plan_id", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "is_fully_refunded", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "boolean" | |
} | |
}, | |
{ | |
"name": "is_chargeback", | |
"in": "query", | |
"required": false, | |
"schema": { | |
"type": "boolean" | |
} | |
}, | |
{ | |
"name": "start", | |
"in": "query", | |
"description": "The beginning of the time period to return results for (exclusive), in ISO8601 format.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
{ | |
"name": "end", | |
"in": "query", | |
"description": "The end of the time period to return results for (inclusive), in ISO8601 format.", | |
"required": false, | |
"schema": { | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
{ | |
"name": "page", | |
"in": "query", | |
"description": "Used in pagination when number of transactions exceed the maximum amount of results per page", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "per", | |
"in": "query", | |
"description": "Used in pagination to define amount of transactions per page, when not defined the maximum is 20", | |
"required": false, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ListTransactionsResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"SalesSummary": { | |
"type": "object", | |
"properties": { | |
"revenue_day": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"earnings_day": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"sales_day": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"chargeback_rate_day": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"order_bump_day": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"revenue_one_day_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"earnings_one_day_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"sales_one_day_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"chargeback_rate_one_day_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"order_bump_one_day_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"revenue_30_days": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"earnings_30_days": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"sales_30_days": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"chargeback_rate_30_days": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"order_bump_30_days": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"revenue_30_days_one_month_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"earnings_30_days_one_month_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"sales_30_days_one_month_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"chargeback_rate_30_days_one_month_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"order_bump_30_days_one_month_ago": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"teachable_fees_last_month": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"lifetime_revenue": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
"required": [ | |
"revenue_day", | |
"earnings_day", | |
"sales_day", | |
"chargeback_rate_day", | |
"order_bump_day", | |
"revenue_one_day_ago", | |
"earnings_one_day_ago", | |
"sales_one_day_ago", | |
"chargeback_rate_one_day_ago", | |
"order_bump_one_day_ago", | |
"revenue_30_days", | |
"earnings_30_days", | |
"sales_30_days", | |
"chargeback_rate_30_days", | |
"order_bump_30_days", | |
"revenue_30_days_one_month_ago", | |
"earnings_30_days_one_month_ago", | |
"sales_30_days_one_month_ago", | |
"chargeback_rate_30_days_one_month_ago", | |
"order_bump_30_days_one_month_ago", | |
"teachable_fees_last_month", | |
"lifetime_revenue" | |
] | |
}, | |
"SalesSummaryResponse": { | |
"type": "object", | |
"properties": { | |
"sales": { | |
"$ref": "#/components/schemas/SalesSummary" | |
} | |
}, | |
"required": ["sales"] | |
}, | |
"CouponSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"name": { | |
"type": "string" | |
} | |
}, | |
"required": ["id", "name"] | |
}, | |
"PaginationMeta": { | |
"type": "object", | |
"properties": { | |
"total": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The total number of items." | |
}, | |
"page": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The current page." | |
}, | |
"from": { | |
"type": "integer", | |
"format": "int32", | |
"description": "First item number on page." | |
}, | |
"to": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Last item number on page." | |
}, | |
"per_page": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The number of items displayed per page." | |
}, | |
"number_of_pages": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The total number of pages." | |
} | |
}, | |
"required": [ | |
"total", | |
"page", | |
"from", | |
"to", | |
"per_page", | |
"number_of_pages" | |
] | |
}, | |
"ListCouponsResponse": { | |
"type": "object", | |
"properties": { | |
"coupons": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/CouponSummary" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["coupons", "meta"] | |
}, | |
"CouponDetail": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"created_at": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"is_published": { | |
"type": "boolean" | |
}, | |
"code": { | |
"type": "string" | |
}, | |
"discount_percent": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"discount_amount": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"duration_kind": { | |
"type": "string", | |
"enum": ["forever", "once", "repeating"] | |
}, | |
"expiration_date": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"number_available": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"product_id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"scope_type": { | |
"type": "string", | |
"enum": ["course"] | |
} | |
}, | |
"required": [ | |
"id", | |
"created_at", | |
"is_published", | |
"code", | |
"discount_percent", | |
"discount_amount", | |
"duration_kind", | |
"expiration_date", | |
"name", | |
"number_available", | |
"product_id", | |
"scope_type" | |
] | |
}, | |
"CouponResponse": { | |
"type": "object", | |
"properties": { | |
"coupon": { | |
"$ref": "#/components/schemas/CouponDetail" | |
} | |
}, | |
"required": ["coupon"] | |
}, | |
"UpdateCouponRequest": { | |
"type": "object", | |
"properties": { | |
"expiration_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"number_available": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"is_published": { | |
"type": "boolean" | |
} | |
}, | |
"required": ["is_published"] | |
}, | |
"CourseSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1, | |
"description": "The unique ID of the course." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the course." | |
}, | |
"heading": { | |
"type": "string", | |
"nullable": true, | |
"description": "The course subtitle, as set in the Information tab of your course admin. If blank, the return value is null." | |
}, | |
"description": { | |
"type": "string", | |
"nullable": true, | |
"description": "The course description, as set in the Course Description block on sales pages created in Page Editor 1.0. If empty, the return value is null." | |
}, | |
"is_published": { | |
"type": "boolean", | |
"description": "The published status of the course. If published, the return value is true. If unpublished, the return value is false." | |
}, | |
"image_url": { | |
"type": "string", | |
"nullable": true, | |
"description": "The url of the course image, as set in the Information tab of your course admin." | |
} | |
}, | |
"required": [ | |
"id", | |
"name", | |
"heading", | |
"description", | |
"is_published", | |
"image_url" | |
] | |
}, | |
"ListCoursesResponse": { | |
"type": "object", | |
"properties": { | |
"courses": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/CourseSummary" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["courses", "meta"] | |
}, | |
"LectureSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the lecture." | |
}, | |
"position": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The position of the lecture within the section (1 is first, 2 is second, etc.)" | |
}, | |
"is_published": { | |
"type": "boolean", | |
"description": "The published status of the lecture. If published, the return value is true. If unpublished, the return value is false." | |
} | |
}, | |
"required": ["id", "position", "is_published"] | |
}, | |
"LectureSection": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the section." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the section." | |
}, | |
"is_published": { | |
"type": "boolean", | |
"description": "The published status of the section. If published, the return value is true. If unpublished, the return value is false." | |
}, | |
"position": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The position of the section within the course curriculum (1 is first, 2 is second, etc.)" | |
}, | |
"lectures": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LectureSummary" | |
} | |
} | |
}, | |
"required": ["id", "name", "is_published", "position", "lectures"] | |
}, | |
"CourseDetail": { | |
"type": "object", | |
"properties": { | |
"lecture_sections": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LectureSection" | |
} | |
}, | |
"author_bio": { | |
"type": "object", | |
"properties": { | |
"profile_image_url": { | |
"type": "string", | |
"nullable": true, | |
"description": "TThe image URL of the author bio image." | |
}, | |
"bio": { | |
"type": "string", | |
"nullable": true, | |
"description": "The body of the author bio that is assigned to the course." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the author bio that is assigned to the course." | |
}, | |
"user_id": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The unique ID of the user that is associated with the author bio." | |
} | |
}, | |
"required": ["profile_image_url", "bio", "name", "user_id"] | |
}, | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"minimum": 1, | |
"description": "The unique ID of the course." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the course." | |
}, | |
"heading": { | |
"type": "string", | |
"nullable": true, | |
"description": "The course subtitle, as set in the Information tab of your course admin. If blank, the return value is null." | |
}, | |
"description": { | |
"type": "string", | |
"nullable": true, | |
"description": "The course description, as set in the Course Description block on sales pages created in Page Editor 1.0. If empty, the return value is null." | |
}, | |
"is_published": { | |
"type": "boolean", | |
"description": "The published status of the course. If published, the return value is true. If unpublished, the return value is false." | |
}, | |
"image_url": { | |
"type": "string", | |
"nullable": true, | |
"description": "The url of the course image, as set in the Information tab of your course admin." | |
} | |
}, | |
"required": [ | |
"lecture_sections", | |
"author_bio", | |
"id", | |
"name", | |
"heading", | |
"description", | |
"is_published", | |
"image_url" | |
] | |
}, | |
"CourseResponse": { | |
"type": "object", | |
"properties": { | |
"course": { | |
"$ref": "#/components/schemas/CourseDetail" | |
} | |
}, | |
"required": ["course"] | |
}, | |
"ErrorResponse": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"oneOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
} | |
}, | |
"required": ["message"] | |
}, | |
"UserEnrollment": { | |
"type": "object", | |
"properties": { | |
"user_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique user ID of the student." | |
}, | |
"enrolled_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the user was enrolled in the course. Formatted in ISO8601." | |
}, | |
"expires_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The date and time the user's enrollment in the course expires, if applicable. Formatted in ISO8601. If the enrollment does not have an expiration, the return value is null." | |
}, | |
"completed_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The date and time the student completed the course. Formatted in ISO8601. If the student has not completed the course, the return value is null." | |
}, | |
"percent_complete": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The percentage of the course that has been marked complete by the student." | |
} | |
}, | |
"required": [ | |
"user_id", | |
"enrolled_at", | |
"expires_at", | |
"completed_at", | |
"percent_complete" | |
] | |
}, | |
"ListCourseEnrollmentsResponse": { | |
"type": "object", | |
"properties": { | |
"enrollments": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/UserEnrollment" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["enrollments", "meta"] | |
}, | |
"QuizQuestion": { | |
"type": "object", | |
"properties": { | |
"question": { | |
"type": "string", | |
"description": "The text content of the question." | |
}, | |
"question_type": { | |
"type": "string", | |
"description": "The type of question. If there is only one correct answer, response value is single. If there are multiple correct answers, the response value is multiple." | |
}, | |
"answers": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"description": "List of possible answers for the quiz question." | |
}, | |
"correct_answers": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"description": "The correct answer(s) for the question." | |
}, | |
"graded": { | |
"type": "boolean", | |
"description": "If the quiz is set as graded, the response value is true. If the quiz is set as ungraded, the response value is false." | |
} | |
}, | |
"required": [ | |
"question", | |
"question_type", | |
"answers", | |
"correct_answers", | |
"graded" | |
] | |
}, | |
"Quiz": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the quiz." | |
}, | |
"questions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/QuizQuestion" | |
} | |
} | |
}, | |
"required": ["id", "questions"] | |
}, | |
"Attachment": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the lecture attachment, file, or added content." | |
}, | |
"name": { | |
"type": "string", | |
"nullable": true, | |
"description": "The name of the uploaded file. (Only applicable to uploaded video, audio, image, and PDF files. If the attachment kind is text, native_comments, quiz, code_display, code_embed, or upsell, the return value is null.)" | |
}, | |
"kind": { | |
"type": "string", | |
"description": "The type of lecture attachment (e.g., text, native comments, video, image, pdf, quiz, code display, code embed, or upsell)." | |
}, | |
"url": { | |
"type": "string", | |
"nullable": true, | |
"description": "The URL of the lecture attachment. (Only applicable to uploaded video, audio, image, and PDF files. If the attachment kind is text, native_comments, quiz, code_display, code_embed, or upsell, the return value is null.)" | |
}, | |
"text": { | |
"type": "string", | |
"nullable": true, | |
"description": "The text, or body content, of the lecture attachment. (Only applicable if the attachment kind is text, code_display, or code_embed. For other attachment kind types, the return value is null.)" | |
}, | |
"position": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The position of the lecture attachment within the lecture (i.e., 1 is first, 2 is second, etc.)." | |
}, | |
"file_size": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The size of the file, in bytes, for video, PDF, audio, or image attachment kinds. For other attachment kinds, the return value is null." | |
}, | |
"file_extension": { | |
"type": "string", | |
"nullable": true, | |
"description": "The file extension type for uploaded files (e.g., png or jpg for images)." | |
}, | |
"quiz": { | |
"$ref": "#/components/schemas/Quiz", | |
"nullable": true | |
} | |
}, | |
"required": ["id", "name", "kind", "position"] | |
}, | |
"Lecture": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the lecture." | |
}, | |
"name": { | |
"type": "string", | |
"nullable": true, | |
"description": "The name of the lecture." | |
}, | |
"is_published": { | |
"type": "boolean", | |
"description": "The published status of the lecture. If published, the return value is true. If unpublished, the return value is false." | |
}, | |
"position": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The position of the lecture within the section (1 is first, 2 is second, etc.)" | |
}, | |
"lecture_section_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the section that contains the lecture." | |
}, | |
"attachments": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Attachment" | |
} | |
} | |
}, | |
"required": [ | |
"id", | |
"name", | |
"is_published", | |
"position", | |
"lecture_section_id", | |
"attachments" | |
] | |
}, | |
"LectureResponse": { | |
"type": "object", | |
"properties": { | |
"lecture": { | |
"$ref": "#/components/schemas/Lecture" | |
} | |
}, | |
"required": ["lecture"] | |
}, | |
"User": { | |
"type": "object", | |
"properties": { | |
"user_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the user." | |
} | |
}, | |
"required": ["user_id"] | |
}, | |
"Certificate": { | |
"type": "object", | |
"properties": { | |
"issued_at": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The date and time the certificate was issued to the user. Formatted in ISO8601." | |
}, | |
"page_id": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The unique ID of the page of the certificate." | |
}, | |
"serial_number": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The unique serial number of the certificate." | |
} | |
}, | |
"required": ["issued_at", "page_id", "serial_number"] | |
}, | |
"LectureProgress": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the lecture." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the lecture." | |
}, | |
"completed_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The date and time the student completed the course. Formatted in ISO8601. If the student has not completed the course, the return value is null." | |
}, | |
"is_completed": { | |
"type": "boolean", | |
"description": "The completed status of the lecture. If completed, the return value is true. If uncompleted, the return value is false." | |
} | |
}, | |
"required": ["id", "name", "completed_at", "is_completed"] | |
}, | |
"LectureProgresses": { | |
"type": "object", | |
"properties": { | |
"lecture_progress": { | |
"$ref": "#/components/schemas/LectureProgress" | |
} | |
}, | |
"required": ["lecture_progress"] | |
}, | |
"LectureSectionProgress": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the lecture section." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the lecture section." | |
}, | |
"lectures": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LectureProgresses" | |
} | |
} | |
}, | |
"required": ["id", "name", "lectures"] | |
}, | |
"LectureSectionProgresses": { | |
"type": "object", | |
"properties": { | |
"lecture_section_progress": { | |
"$ref": "#/components/schemas/LectureSectionProgress" | |
} | |
} | |
}, | |
"CourseProgressResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the student's course progress." | |
}, | |
"certificate": { | |
"$ref": "#/components/schemas/Certificate" | |
}, | |
"completed_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The date and time the student completed the course. Formatted in ISO8601. If the student has not completed the course, the return value is null." | |
}, | |
"enrolled_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the user was enrolled in the course. Formatted in ISO8601." | |
}, | |
"lecture_sections": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LectureSectionProgresses" | |
} | |
}, | |
"percent_complete": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The percentage of the course that has been marked complete by the student." | |
} | |
}, | |
"required": [ | |
"id", | |
"enrolled_at", | |
"lecture_sections", | |
"percent_complete" | |
] | |
}, | |
"CourseProgressesResponse": { | |
"type": "object", | |
"properties": { | |
"course_progress": { | |
"$ref": "#/components/schemas/CourseProgressResponse" | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["course_progress", "meta"] | |
}, | |
"QuizzesResponse": { | |
"type": "object", | |
"properties": { | |
"quiz_ids": { | |
"type": "array", | |
"items": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"description": "List of unique ID of quizzes in a lecture." | |
} | |
}, | |
"required": ["quiz_ids"] | |
}, | |
"QuizInformation": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"type": { | |
"type": "string", | |
"enum": ["Quiz"] | |
}, | |
"questions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/QuizQuestion" | |
} | |
} | |
}, | |
"required": ["id", "type", "questions"] | |
}, | |
"QuizInformationResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"kind": { | |
"type": "string", | |
"enum": ["quiz"] | |
}, | |
"url": { | |
"type": "string", | |
"nullable": true | |
}, | |
"text": { | |
"type": "string", | |
"nullable": true | |
}, | |
"position": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"quiz": { | |
"$ref": "#/components/schemas/QuizInformation" | |
} | |
}, | |
"required": ["id", "name", "kind", "url", "text", "position", "quiz"] | |
}, | |
"QuizStudentResponses": { | |
"type": "object", | |
"properties": { | |
"student_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the student." | |
}, | |
"student_name": { | |
"type": "string", | |
"description": "The name of the student." | |
}, | |
"student_email": { | |
"type": "string", | |
"description": "The email of the student." | |
}, | |
"submitted_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "Dated when the student submitted the quiz." | |
}, | |
"percent_correct": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Percentage of correct answers." | |
} | |
}, | |
"required": [ | |
"student_id", | |
"student_name", | |
"student_email", | |
"submitted_at", | |
"percent_correct" | |
] | |
}, | |
"QuizResponse": { | |
"type": "object", | |
"properties": { | |
"course_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the course." | |
}, | |
"course_name": { | |
"type": "string", | |
"description": "The name of the course." | |
}, | |
"lecture_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the lecture." | |
}, | |
"lecture_name": { | |
"type": "string", | |
"description": "The name of the lecture." | |
}, | |
"graded": { | |
"type": "boolean", | |
"description": "Indicates if the quiz is graded." | |
}, | |
"responses": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/QuizStudentResponses" | |
} | |
} | |
}, | |
"required": [ | |
"course_id", | |
"course_name", | |
"lecture_id", | |
"lecture_name", | |
"graded", | |
"responses" | |
] | |
}, | |
"VideoAsset": { | |
"type": "object", | |
"properties": { | |
"url": { | |
"type": "string", | |
"description": "The M3U8 file URL responsible for containing the playlist and starting streaming." | |
}, | |
"content_type": { | |
"type": "string", | |
"description": "Content type for video streaming." | |
} | |
}, | |
"required": ["url", "content_type"] | |
}, | |
"VideoResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the video response." | |
}, | |
"video_asset": { | |
"$ref": "#/components/schemas/VideoAsset" | |
}, | |
"status": { | |
"type": "string", | |
"enum": [ | |
"READY", | |
"PROCESSING", | |
"PARTIALLY_READY", | |
"QUEUED", | |
"THUMBNAIL_READY", | |
"FAILED" | |
], | |
"description": "Status of video." | |
}, | |
"url_thumbnail": { | |
"type": "string", | |
"description": "URL containing the video poster image." | |
}, | |
"media_type": { | |
"type": "string", | |
"description": "Type of the media. It will always return \"VIDEO\"." | |
}, | |
"media_duration": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Total video duration time in seconds." | |
} | |
}, | |
"required": [ | |
"id", | |
"video_asset", | |
"status", | |
"url_thumbnail", | |
"media_type", | |
"media_duration" | |
] | |
}, | |
"UserCourse": { | |
"type": "object", | |
"properties": { | |
"course_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the course." | |
}, | |
"enrolled_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time of enrollment. Formatted in ISO8601." | |
}, | |
"is_active_enrollment": { | |
"type": "boolean", | |
"description": "If the user is currently enrolled in the course, response value is true. If the user is no longer enrolled in the course, response value is false." | |
}, | |
"completed_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The date and time the course was completed. Formatted in ISO8601. If the course has not been completed, return value is null." | |
}, | |
"course_name": { | |
"type": "string", | |
"description": "The name of the course.." | |
}, | |
"percent_complete": { | |
"type": "number", | |
"format": "double", | |
"description": "The percentage of the course that has been marked complete by the student." | |
} | |
}, | |
"required": [ | |
"course_id", | |
"enrolled_at", | |
"is_active_enrollment", | |
"completed_at", | |
"course_name", | |
"percent_complete" | |
] | |
}, | |
"UserTag": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"description": "Name of the tag" | |
} | |
}, | |
"required": ["name"] | |
}, | |
"UserResponse": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"nullable": true, | |
"description": "The name of the user." | |
}, | |
"email": { | |
"type": "string", | |
"description": "The email address of the user." | |
}, | |
"role": { | |
"type": "string", | |
"description": "The role of the user (e.g., student, owner, affiliate, author, custom, etc.). All newly created users will have the student role by default." | |
}, | |
"last_sign_in_ip": { | |
"type": "string", | |
"nullable": true, | |
"description": "The last signin IP address of the user. If the user has not yet signed in to their account, the return value is null." | |
}, | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the user." | |
}, | |
"courses": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/UserCourse" | |
}, | |
"description": "A list of courses the user is or has been enrolled in. (Note: If the user is newly created, they will not be enrolled in any courses. If you attempt to create a user with the email address of an existing user, any enrollments of that existing user will be listed here.)" | |
}, | |
"tags": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/UserTag" | |
}, | |
"description": "Tags related to the user" | |
} | |
}, | |
"required": [ | |
"name", | |
"email", | |
"role", | |
"last_sign_in_ip", | |
"id", | |
"courses", | |
"tags" | |
] | |
}, | |
"CreateUserRequest": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"description": "The name of the new user." | |
}, | |
"email": { | |
"type": "string", | |
"description": "The email address of the new user.." | |
}, | |
"password": { | |
"type": "string", | |
"description": "The password of the new user. Must be at least 6 characters. If no password is set, the student will be sent an email to set a password and confirm their account." | |
}, | |
"src": { | |
"type": "string", | |
"description": "The [signup source](https://support.teachable.com/hc/en-us/articles/219571648#TrackSignupSourceshttps://support.teachable.com/hc/en-us/articles/219571648#TrackSignupSources) of the user, Information tab of the user profile.\nSRC can also be used as a custom value when creating users in your school.\nFor example, if you use any unique identifiers to help manage your users in multiple external systems (such as unique IDs, tags, etc.),\nyou can use the src field to keep this identifier associated with your user in Teachable." | |
} | |
}, | |
"required": ["email"] | |
}, | |
"IndexUserResponse": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"nullable": true | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
"required": ["name", "email", "id"] | |
}, | |
"ListUsersResponse": { | |
"type": "object", | |
"properties": { | |
"users": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/IndexUserResponse" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["users", "meta"] | |
}, | |
"UpdateUserRequest": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"description": "The name of the user." | |
}, | |
"src": { | |
"type": "string", | |
"description": "The signup source of the user, which is displayed on the Information tab of the user profile. ." | |
} | |
} | |
}, | |
"Enrollment": { | |
"type": "object", | |
"properties": { | |
"user_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the user." | |
}, | |
"course_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the course." | |
} | |
}, | |
"required": ["user_id", "course_id"] | |
}, | |
"Webhook": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the webhook." | |
}, | |
"workflow_state": { | |
"type": "string", | |
"description": "The state of the webhook (e.g., verified, pending, failed)." | |
}, | |
"url": { | |
"type": "string", | |
"description": "The webhook URL.." | |
}, | |
"event_trigger": { | |
"type": "string", | |
"description": "The title of the event that triggers the webhook (e.g., Comment.created, Enrollment.created, etc.)." | |
}, | |
"webhook_events_count": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The number of times the webhook event has occurred." | |
} | |
}, | |
"required": [ | |
"id", | |
"workflow_state", | |
"url", | |
"event_trigger", | |
"webhook_events_count" | |
] | |
}, | |
"ListWebhooksResponse": { | |
"type": "object", | |
"properties": { | |
"webhooks": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Webhook" | |
} | |
} | |
}, | |
"required": ["webhooks"] | |
}, | |
"WebhookEventSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the webhook." | |
}, | |
"workflow_state": { | |
"type": "string", | |
"description": "The state of the webhook (e.g., verified, pending, failed)." | |
}, | |
"webhook_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the webhook." | |
}, | |
"attempt_count": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The attempt number of the webhook event. (A webhook will attempt to send events four times before the webhook itself permanently fails. When a webhook permanently fails, any additional webhook event attempts will be cancelled.)" | |
}, | |
"last_attempted_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The date and time the webhook event was last attempted. Formatted in ISO8601." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the webhook event was initially created. Formatted in ISO8601." | |
}, | |
"object_type": { | |
"type": "string", | |
"description": "The resource group of the webhook event trigger (i.e., if you are using the “User.created” webhook event, the object_type is User)." | |
}, | |
"object_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Fetch all the events for a webhook." | |
}, | |
"response_http_status": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The HTTP response code of the webhook event (e.g., an HTTP response code of 200 is successful, a response code of 410 is cancelled or permanently failed.)" | |
} | |
}, | |
"required": [ | |
"id", | |
"workflow_state", | |
"webhook_id", | |
"attempt_count", | |
"last_attempted_at", | |
"created_at", | |
"object_type", | |
"object_id", | |
"response_http_status" | |
] | |
}, | |
"ListWebhookEventsResponse": { | |
"type": "object", | |
"properties": { | |
"events": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/WebhookEventSummary" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["events", "meta"] | |
}, | |
"PageSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"friendly_url": { | |
"type": "string" | |
}, | |
"title": { | |
"type": "string" | |
} | |
}, | |
"required": ["id", "friendly_url", "title"] | |
}, | |
"ListPagesResponse": { | |
"type": "object", | |
"properties": { | |
"pages": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/PageSummary" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["pages", "meta"] | |
}, | |
"Block": { | |
"type": "object", | |
"properties": { | |
"position": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"data": { | |
"type": "object", | |
"properties": { | |
"image_url": { | |
"type": "string" | |
}, | |
"alt_text": { | |
"type": "string" | |
}, | |
"heading_text": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"body": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"required": ["position", "data"] | |
}, | |
"PageDetail": { | |
"type": "object", | |
"properties": { | |
"blocks": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Block" | |
} | |
}, | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"friendly_url": { | |
"type": "string" | |
}, | |
"title": { | |
"type": "string" | |
} | |
}, | |
"required": ["blocks", "id", "friendly_url", "title"] | |
}, | |
"ShowPageResponse": { | |
"type": "object", | |
"properties": { | |
"page": { | |
"$ref": "#/components/schemas/PageDetail" | |
} | |
}, | |
"required": ["page"] | |
}, | |
"Frequency": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string", | |
"description": "The type of pricing plan. Pricing plan types are free, one_time_payment, subscription, or payment_plan)." | |
}, | |
"billing_interval": { | |
"type": "string", | |
"nullable": true, | |
"description": "The billing interval cadence of the pricing plan. (Subscriptions can have a billing_interval cadence of week, month, or year. Free, one-time payment, and payment plan pricing types default to the month value.)" | |
}, | |
"billing_interval_count": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The number of intervals between subscription billings. For example, a billing_interval of “month\" with a billing_interval_count of “3” bills every three months. A billing_interval_count of “week” with a billing_interval_count of “1” bills every week." | |
}, | |
"access_limit_date": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true, | |
"description": "The specific date/time students are set to lose access to the course, formatted in ISO8601. (Only applicable if the pricing plan has limited access duration where all students lose product access on a specific date. Otherwise, value is null.)" | |
}, | |
"access_limit_interval": { | |
"type": "string", | |
"nullable": true, | |
"description": "The interval cadence (either day, week, month, or year) for pricing plans with limited access duration where students lose course access after a set period of time." | |
}, | |
"access_limit_duration": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
} | |
}, | |
"required": [ | |
"type", | |
"billing_interval", | |
"billing_interval_count", | |
"access_limit_date", | |
"access_limit_interval", | |
"access_limit_duration" | |
] | |
}, | |
"PricingPlanDetails": { | |
"type": "object", | |
"properties": { | |
"frequency": { | |
"$ref": "#/components/schemas/Frequency" | |
}, | |
"description": { | |
"type": "string", | |
"nullable": true, | |
"description": "The subtitle of the pricing plan." | |
}, | |
"free_trial_length": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The length of the free trial period, in days. Only available for subscriptions. If there is no free trial period, return value is null." | |
}, | |
"enrollment_cap": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true, | |
"description": "The number of enrollments available on the pricing plan. If there is no enrollment cap set, return value is null." | |
}, | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the pricing plan." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the pricing plan was created. Formatted in ISO8601." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the pricing plan was last updated. Formatted in ISO8601." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the pricing plan." | |
}, | |
"price": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The set price of the pricing plan. The value is a positive integer representing how much the price is in the smallest currency unit (e.g., 100 cents = $1.00 USD)." | |
}, | |
"currency": { | |
"type": "string", | |
"description": "The currency of the pricing plan. Formatted in ISO4217 alphabetic code." | |
}, | |
"course_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The ID of the course that contains the pricing plan." | |
} | |
}, | |
"required": [ | |
"frequency", | |
"description", | |
"id", | |
"created_at", | |
"updated_at", | |
"name", | |
"price", | |
"currency", | |
"course_id" | |
] | |
}, | |
"PricingPlanResponse": { | |
"type": "object", | |
"properties": { | |
"pricing_plan": { | |
"$ref": "#/components/schemas/PricingPlanDetails" | |
} | |
}, | |
"required": ["pricing_plan"] | |
}, | |
"PricingPlanSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The unique ID of the pricing plan." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the pricing plan was created. Formatted in ISO8601." | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "The date and time the pricing plan was last updated. Formatted in ISO8601." | |
}, | |
"name": { | |
"type": "string", | |
"description": "The name of the pricing plan." | |
}, | |
"price": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The set price of the pricing plan. The value is a positive integer representing how much the price is in the smallest currency unit (e.g., 100 cents = $1.00 USD)." | |
}, | |
"currency": { | |
"type": "string", | |
"description": "The currency of the pricing plan. Formatted in ISO4217 alphabetic code." | |
}, | |
"course_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The ID of the course that contains the pricing plan." | |
} | |
}, | |
"required": [ | |
"id", | |
"created_at", | |
"updated_at", | |
"name", | |
"price", | |
"currency", | |
"course_id" | |
] | |
}, | |
"ListPricingPlansResponse": { | |
"type": "object", | |
"properties": { | |
"pricing_plans": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/PricingPlanSummary" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["pricing_plans", "meta"] | |
}, | |
"TransactionSummary": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"user_id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"pricing_plan_id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"sale_id": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Multiple transactions can be grouped to one sale" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"purchased_at": { | |
"type": "string", | |
"format": "date-time", | |
"description": "Purchased at date could differ from created at date if part of a recurring pricing plan" | |
}, | |
"charge": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The total charge price paid by the user, this is calculated in USD by default" | |
}, | |
"final_price": { | |
"type": "integer", | |
"format": "int32", | |
"description": "The listed price in currency of choice, excluding fees and taxes" | |
}, | |
"currency": { | |
"type": "string" | |
}, | |
"tax_charge": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Taxes in currency of choice" | |
}, | |
"revenue": { | |
"type": "integer", | |
"format": "int32", | |
"description": "Total revenue collected, this is calculated in USD by default" | |
}, | |
"status": { | |
"type": "string", | |
"nullable": true, | |
"description": "The status of a transaction can be either paid or null (unpaid)" | |
}, | |
"has_chargeback": { | |
"type": "boolean", | |
"nullable": true, | |
"description": "A chargeback indicates the transaction was marked as fraudulent" | |
}, | |
"chargeback_fee": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
}, | |
"affiliate_id": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
}, | |
"affiliate_fees": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"author_id": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
}, | |
"author_fees": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"coupon_id": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
}, | |
"refunded_at": { | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"amount_refunded": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
"required": [ | |
"id", | |
"user_id", | |
"pricing_plan_id", | |
"sale_id", | |
"created_at", | |
"purchased_at", | |
"charge", | |
"final_price", | |
"currency", | |
"tax_charge", | |
"revenue", | |
"status", | |
"has_chargeback", | |
"chargeback_fee", | |
"affiliate_id", | |
"affiliate_fees", | |
"author_id", | |
"author_fees", | |
"coupon_id", | |
"refunded_at", | |
"amount_refunded" | |
] | |
}, | |
"ListTransactionsResponse": { | |
"type": "object", | |
"properties": { | |
"transactions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/TransactionSummary" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["transactions", "meta"] | |
}, | |
"SessionData": { | |
"type": "object", | |
"properties": { | |
"ip": { | |
"type": "string" | |
}, | |
"user_id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"user_agent": { | |
"type": "string" | |
}, | |
"last_seen_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"revoked_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
"required": [ | |
"ip", | |
"user_id", | |
"user_agent", | |
"last_seen_at", | |
"revoked_at", | |
"created_at" | |
] | |
}, | |
"ListUserSessionsResponse": { | |
"type": "object", | |
"properties": { | |
"sessions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/SessionData" | |
} | |
}, | |
"meta": { | |
"$ref": "#/components/schemas/PaginationMeta" | |
} | |
}, | |
"required": ["sessions", "meta"] | |
} | |
}, | |
"securitySchemes": { | |
"ApiKeyAuth": { | |
"type": "apiKey", | |
"in": "header", | |
"name": "apiKey" | |
} | |
} | |
}, | |
"servers": [ | |
{ | |
"url": "https://developers.teachable.com/", | |
"description": "The production API server" | |
} | |
], | |
"security": [ | |
{ | |
"ApiKeyAuth": [] | |
} | |
], | |
"x-readme": { | |
"explorer-enabled": true, | |
"proxy-enabled": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment