Teachable
- 15 Aug 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
Teachable
- Updated on 15 Aug 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Teachable API
Configuration Parameters
Any instance where an entry in the below configuration has a leading $ represents a parameter that needs to be replaced with a static value.
Parameters in this document:
- $api_key - The API Key will provide access to the Teachable API. Documentation on how to generate an API Key can be found here.
- $resource_name - The Resource Name represents the name of the resource to be appended and used as part of the Destination Table name. The value that should be used here can be found in the API Resources table below.
- $base_endpoint - The Base Endpoint represents the base data that you would like to ingest into Panoply from the Teachable API. The value of this parameter can be found in the API Resources section below.
- $base_data_key - The Base Data Key represents the location of the data in the API response from Teachable.
- $per_page - The Per Page value represents the number of records returned by the API per page.
- $fetch_endpoint - The Fetch Endpoint represents the fetch data that you would like to use to ingest data into Panoply from the Teachable API. The value of this parameter can be found in the API Resources section below.
- $fetch_data_key -The Fetch Data Key represents the location of the data in the Fetch List API response from Teachable.
- $primary_key - Primary keys are used to ensure the uniqueness of the rows in a table. The Primary Key is comprised of one or more columns that can be used to identify the row in the data warehouse. The process guarantees that no two rows have the same value in their primary key. For values of this parameter, where applicable, see the table below in API Resources.
- $incremental_starting_value - The Incremental Starting Value represents the earliest date that data should be collected for, given in
yyyy-dd-MM HH:mm:ss
format. For example, if you would like your historical data to go back to the start of 2021, this value would be set to2021-01-01 00:00:00
.
API Resources
Resource | $resource_name | $base_endpoint | $base_data_key | $per_page | $fetch_endpoint | $fetch_data_key | $primary_key |
---|---|---|---|---|---|---|---|
Courses | courses | v1/courses/{identifier} | 20 | v1/courses | courses | ||
Courses - Enrollments | courses_enrollments | v1/courses/{identifier}/enrollments | enrollments | 20 | v1/courses | courses | {user_id}-{__list_identifier} |
Pricing Plans | pricing_plans | v1/pricing_plans/{identifier} | pricing_plan | 5 | v1/pricing_plans | pricing_plans | |
Transactions | transactions | v1/transactions | transactions | 20 | |||
Users | users | v1/users/{identifier} | 20 | v1/users | users |
This configuration section is for the Courses, Courses - Enrollments, Pricing Plans, and Users resources only. If you would like to ingest the Transactions resource, see the next section below.
Connector configuration
- Base url: https://developers.teachable.com/$base_endpoint
- Method: GET
- Headers: {"accept":"application/json"}
Destination Table naming convention is ultimately up to you as the data owner. One common structure used for the Teachable API is teachable_$resource_name.
Authorization
- Authorization: API Key
- Key: apiKey
- Value: $api_key
- Add to: Headers
Fetch list
- Enable:
- Fetch List From: API
- Fetch url: $fetch_endpoint
- Method: GET
- URL Parameters: per=$per_page
- Headers: {"accept":"application/json"}
- Data key: $fetch_data_key
- Data identifier key: id
- Enable Pagination:
- Get next page value: Static (integer to be incremented)
- Start page: 1
- Page step: 1
- Use next page value: As a URL parameter value
- URL/body key: page
- Stop iterating when: Total pages in response
- Key in response: meta.number_of_pages
- Use identifiers: As a single value
Advanced Settings
- Data key: $base_data_key
This configuration section is for the Transactions resource only. If you would like to ingest a resource other than Transactions, see the above section.
Connector configuration
- Base url: https://developers.teachable.com/v1/transactions
- Method: GET
- URL Parameters: per=20&start={incval}
- Headers: {"accept":"application/json"}
Destination Table naming convention is ultimately up to you as the data owner. One common structure used for the Teachable API is teachable_transactions
.
Authorization
- Authorization: API Key
- Key: apiKey
- Value: $api_key
- Add to: Headers
Pagination
- Enable:
- Get next page value: Static (integer to be incremented)
- Start page: 1
- Page step: 1
- Use next page value: As a URL parameter value
- URL/body key: page
- Stop iterating when: Total pages in response
- Key in response: meta.number_of_pages
Advanced Settings
- Data key: transactions
- Incremental Key:
Column name Column value lastTimeSucceed $incremental_starting_value - Incremental value date format: yyyy-dd-MM HH:mm:ss
Was this article helpful?