Skip to content

Membership Plans API

Membership Plans

This document describes the query operations available for membership plans in the Teachify Admin API.

Overview

Membership plans define the subscription options available to students in your school. Each plan has specific features, pricing, and duration settings.

Available Queries

The API provides the following membership plan-related query:

Query Details

membershipPlans

Returns a paginated list of membership plans for the authenticated school.

Parameters

ParameterTypeDescription
subdomainString!School’s subdomain
filterAdminMembershipPlanFilterFilter criteria (see Filtering)
pageIntPage number for pagination
perPageIntNumber of items per page (default: 20, maximum: 50)
limitIntAlternative to perPage

Returns

Returns a MembershipPlanPage object with:

  • nodes - Array of membership plan objects
  • currentPage - Current page number
  • hasNextPage - Whether there is a next page
  • hasPreviousPage - Whether there is a previous page
  • nodesCount - Total number of membership plans matching the filter

Example

query {
membershipPlans(
subdomain: "myschool",
filter: {
active: true
},
page: 1,
perPage: 10
) {
nodes {
id
name
description
amount
currency
currencySymbol
intervalCount
interval
planType
recurring
courses {
id
name
}
createdAt
}
currentPage
hasNextPage
hasPreviousPage
nodesCount
}
}

Types

MembershipPlan

FieldTypeDescription
idString!Unique identifier for the membership plan
nameString!Name of the membership plan
descriptionStringDescription of the membership plan
amountFloat!Price of the membership plan
currencyString!Currency code (e.g., USD, EUR) in ISO 4217 format
currencySymbolString!Currency symbol (e.g., $, €, £, ¥)
intervalStringBilling interval (month, year, day)
intervalCountIntNumber of intervals (e.g., 1, 3, 6)
planTypeString!Plan type (recurring, fixed_date, specific_length)
recurringBoolean!Whether the plan is recurring
maxIntervalCountIntMaximum number of intervals for subscription
isPurchasedBoolean!Whether the user has joined this plan
courses[Course!]!Courses included in this plan
coverPhotoStringURL to the plan’s cover photo
slugString!URL-friendly identifier
quantityIntAvailable quantity
soldItemsCountIntNumber of sold items
remainingItemsCountIntNumber of remaining items
bodyStringAdditional content
endedAtIntWhen the plan ends (Unix timestamp)
faqSections[FaqSection!]FAQ sections for this plan

Filtering

The membershipPlans query accepts a filter parameter of type AdminMembershipPlanFilter:

input AdminMembershipPlanFilter {
id: StringOperator
active: Boolean
visible: Boolean
}
FieldDescription
idFilter by ID with string operations
activeFilter by active status
visibleFilter by visibility

Example with Filtering

query {
membershipPlans(
subdomain: "myschool",
filter: {
active: true,
visible: true
},
page: 1,
perPage: 10
) {
nodes {
id
name
amount
currency
}
nodesCount
}
}