Fetch Payment Prerequisites
Get Academic Prerequisites
GraphQL API Documentation
Supabase PostgreSQL GraphQL API documentation for fetching academic prerequisites
GraphQL Endpoint
https://api.edupaid.2hourlearning.com/functions/v1/graphql
Authentication
The API requires an API key in the Authorization header and a valid JWT token.
Prerequisites Query Example
query GetAcademicPrerequisites {
prerequisites(
filter: { category: { in: ["CASEItemMastery", "CASEItem2X"] } }
) {
edges {
node {
id
name
category
academic_year
description
certifier
reporter
}
}
}
}
Response Fields
Prerequisites
academic_year
: The academic year for the prerequisitecategory
: Type of prerequisite (e.g., CASEItemMastery, CASEItem2X)certifier
: Entity responsible for certificationdescription
: Detailed description of the prerequisitename
: Unique 1EdTech CASEItem IDreporter
: Entity responsible for reporting
Usage Notes
The query supports filtering by category using GraphQL filters
Results are paginated using the edges/node pattern
Error handling should be implemented for failed requests
The API requires proper authentication headers
All requests must be made over HTTPS
Get Payment Prerequisites For School
GraphQL API Documentation for fetching payment prerequisites for a school
GraphQL Endpoint
https://api.edupaid.2hourlearning.com/functions/v1/graphql
Authentication
The API requires an API key in the Authorization
header and a valid JWT token.
Prerequisites Query Example
query GetPaymentPrerequisitesForSchool($schoolId: String!) {
schoolLearningBlocks {
id
name
academic_year
grade
payout
state {
id
name
code
}
prerequisites {
prerequisites {
id
name
}
}
}
}
Response Fields
Learning Block
id
: Unique identifier for the learning blockname
: Name of the learning blockacademic_year
: The academic year for the learning blockgrade
: Grade level (e.g., K, Grade_1, Grade_2, etc.)payout
: Payment amount for the learning blockstate
: State informationid
: State identifiername
: State namecode
: State code
prerequisites
: Array of prerequisitesprerequisites
: Prerequisite detailsid
: Prerequisite identifiername
: Unique identifier for the prerequisite itemcategory
: Type of prerequisite (e.g., CASEItem2X, CASEItemMastery)edu_type
: Education type (e.g., VirtualCharterSchool, ESA, MTSS)quantity
: Required quantity to fulfill the prerequisitereporter
: Entity responsible for reporting (e.g., StudyReel, Rep)state_id
: State identifier the prerequisite applies tocertifier
: Entity responsible for certification (e.g., StudyReel, EduPaid, Rep)frequency
: Frequency of the prerequisite (SpecificDay, Annually, Monthly, Daily)created_at
: Timestamp of prerequisite creationupdated_at
: Timestamp of last prerequisite updatedescription
: Human-readable description of the prerequisiteacademic_year
: Academic year the prerequisite applies tofulfill_level
: Level at which prerequisite must be fulfilled (School or Student)evidence_description
: Description of required evidence for fulfillment
Usage Notes
The query requires a valid
schoolId
parameterResults include learning blocks associated with the specified school
Each learning block includes its associated prerequisites
Error handling should be implemented for failed requests
The API requires proper authentication headers
All requests must be made over HTTPS
Get Prerequisites For Student
GraphQL API Documentation for fetching payment prerequisites for a student and a school
GraphQL Endpoint
https://api.edupaid.2hourlearning.com/functions/v1/graphql
Authentication
The API requires an API key in the Authorization
header and a valid JWT token.
Prerequisites Query Example
query GetPaymentPrerequisitesForStudent($schoolId: String!, $studentId: String!) {
studentLearningBlocks {
id
name
grade
payout
academic_year
state {
id
name
code
}
prerequisite_slots {
prerequisite {
id
name
description
fulfill_level
frequency
}
date
month
token_date
token
}
}
}
Response Fields
studentLearningBlocks
: Array of learning blocks associated with the studentid
: Unique identifier for the learning blockname
: Name of the learning blockgrade
: Grade level (e.g., Grade_4)payout
: Payment amount for the learning blockacademic_year
: Academic year for the learning block (e.g., "2024-2025")state
: State informationid
: State identifiercode
: State code (e.g., "AZ")name
: State name (e.g., "Arizona")
prerequisite_slots
: Array of prerequisite slotsprerequisite
: Prerequisite informationid
: Unique identifier for the prerequisitename
: Identifier name for the prerequisitefrequency
: Frequency of validation (e.g., "Annually")description
: Human-readable description of the prerequisitefulfill_level
: Level at which prerequisite must be fulfilled (e.g., "Student")
date
: Date of prerequisite completion (nullable)month
: Month of prerequisite completion (nullable)token_date
: Date of token issuance (nullable)token
: Validation token (nullable)
Usage Notes
The query requires
studentId
andschoolId
parametersResults include prerequisites associated with each learning block that is associated with the specified student and school
Error handling should be implemented for failed requests
The API requires proper authentication headers
All requests must be made over HTTPS
Last updated