Skip to content

API Reference

Complete REST API documentation for integrating with Quanta programmatically.

All API requests require authentication via API key.

  1. Log in to Quanta
  2. Go to SettingsAPI Keys
  3. Click Generate New Key
  4. Copy your key
  5. Store securely (never share)

Header-based (Recommended)

Terminal window
Authorization: Bearer YOUR_API_KEY

Query Parameter

GET /api/students?api_key=YOUR_API_KEY
Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.quanta.com/v1/students
https://api.quanta.com/v1

All responses return JSON:

{
"success": true,
"data": {
"id": "student-123",
"name": "Sarah Ahmed"
},
"meta": {
"timestamp": "2024-07-23T10:30:00Z"
}
}
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Missing required field: name"
},
"meta": {
"timestamp": "2024-07-23T10:30:00Z"
}
}

Get all students in your account.

GET /students

Query Parameters

ParameterTypeDescription
limitintegerResults per page (default: 20, max: 100)
offsetintegerPagination offset (default: 0)
statusstringFilter by status (active, inactive, graduated)
sortstringSort field (name, created_at, enrollment_date)

Example

Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.quanta.com/v1/students?limit=20&status=active"

Response

{
"success": true,
"data": [
{
"id": "student-123",
"name": "Sarah Ahmed",
"email": "sarah@example.com",
"phone": "555-0101",
"status": "active",
"enrollment_date": "2024-07-01",
"tier": "lite"
}
],
"meta": {
"total": 150,
"limit": 20,
"offset": 0
}
}

Retrieve single student by ID.

GET /students/{student_id}

Example

Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.quanta.com/v1/students/student-123"

Add new student.

POST /students

Request Body

{
"name": "John Smith",
"email": "john@example.com",
"phone": "555-0102",
"enrollment_date": "2024-07-23"
}

Response

{
"success": true,
"data": {
"id": "student-456",
"name": "John Smith",
"email": "john@example.com",
"phone": "555-0102",
"status": "active",
"enrollment_date": "2024-07-23",
"tier": "free"
}
}

Modify existing student.

PUT /students/{student_id}

Request Body

{
"name": "John Smith Jr.",
"phone": "555-0199",
"status": "inactive"
}

Remove student from system.

DELETE /students/{student_id}

Get all sessions.

GET /sessions

Query Parameters

ParameterTypeDescription
student_idstringFilter by student
start_datedateStart date (YYYY-MM-DD)
end_datedateEnd date (YYYY-MM-DD)
statusstringFilter by status

Example

Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.quanta.com/v1/sessions?student_id=student-123&status=completed"

Log new session.

POST /sessions

Request Body

{
"student_id": "student-123",
"date": "2024-07-23",
"time": "15:00",
"duration": 60,
"status": "completed",
"notes": "Covered algebra basics"
}

Response

{
"success": true,
"data": {
"id": "session-789",
"student_id": "student-123",
"date": "2024-07-23",
"time": "15:00",
"duration": 60,
"status": "completed",
"notes": "Covered algebra basics",
"created_at": "2024-07-23T15:30:00Z"
}
}

Get all payments.

GET /payments

Query Parameters

ParameterTypeDescription
student_idstringFilter by student
statusstringFilter by status (pending, completed, failed, refunded)
date_fromdateStart date (YYYY-MM-DD)
date_todateEnd date (YYYY-MM-DD)

Process payment.

POST /payments

Request Body

{
"student_id": "student-123",
"amount": 50.00,
"method": "card",
"date": "2024-07-23",
"reference": "INV-2024-0451"
}

Response

{
"success": true,
"data": {
"id": "payment-456",
"student_id": "student-123",
"amount": 50.00,
"method": "card",
"status": "completed",
"date": "2024-07-23",
"reference": "INV-2024-0451"
}
}
CodeStatusMeaning
INVALID_REQUEST400Invalid request parameters
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
CONFLICT409Resource already exists
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error

API rate limits vary by tier:

TierRequests/MinuteRequests/Day
Free301,000
Lite10010,000
Pro500100,000
MaxUnlimitedUnlimited

List endpoints support pagination:

Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.quanta.com/v1/students?limit=20&offset=40"

Response includes:

{
"meta": {
"total": 150,
"limit": 20,
"offset": 40,
"has_more": true
}
}

Receive real-time updates about events:

  • student.created - New student added
  • student.updated - Student information changed
  • session.completed - Session finished
  • payment.processed - Payment recorded
  1. Go to SettingsWebhooks
  2. Click Add Webhook
  3. Enter endpoint URL
  4. Select events
  5. Save
{
"event": "session.completed",
"timestamp": "2024-07-23T15:30:00Z",
"data": {
"id": "session-789",
"student_id": "student-123",
"duration": 60,
"status": "completed"
}
}
import requests
api_key = "YOUR_API_KEY"
headers = {"Authorization": f"Bearer {api_key}"}
# Get students
response = requests.get(
"https://api.quanta.com/v1/students",
headers=headers
)
students = response.json()["data"]
# Create session
session_data = {
"student_id": "student-123",
"date": "2024-07-23",
"duration": 60,
"status": "completed"
}
response = requests.post(
"https://api.quanta.com/v1/sessions",
json=session_data,
headers=headers
)
const apiKey = "YOUR_API_KEY";
const headers = {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
};
// Get students
const response = await fetch(
"https://api.quanta.com/v1/students",
{ headers }
);
const students = (await response.json()).data;
// Create session
const sessionData = {
student_id: "student-123",
date: "2024-07-23",
duration: 60,
status: "completed"
};
const createResponse = await fetch(
"https://api.quanta.com/v1/sessions",
{
method: "POST",
headers,
body: JSON.stringify(sessionData)
}
);
  • Documentation - See Integration Guide
  • Issues - Report at github.com/quanta/api-issues
  • Status Page - api.quanta.com/status

Next: Learn about Integrations or view Advanced Topics