Teachable
  • 15 Aug 2024
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Teachable

  • Dark
    Light
  • PDF

Article summary

Teachable API

API Documentation Link


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 to 2021-01-01 00:00:00.

API Resources

Resource$resource_name$base_endpoint$base_data_key$per_page$fetch_endpoint$fetch_data_key$primary_key
Coursescoursesv1/courses/{identifier}20v1/coursescourses
Courses - Enrollmentscourses_enrollmentsv1/courses/{identifier}/enrollmentsenrollments20v1/coursescourses{user_id}-{__list_identifier}
Pricing Planspricing_plansv1/pricing_plans/{identifier}pricing_plan5v1/pricing_planspricing_plans
Transactionstransactionsv1/transactionstransactions20
Usersusersv1/users/{identifier}20v1/usersusers

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: Checkbox.png
  • 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: Checkbox.png
  • 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: Checkbox.png
  • 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 nameColumn value
    lastTimeSucceed$incremental_starting_value
  • Incremental value date format: yyyy-dd-MM HH:mm:ss

Was this article helpful?