Overview
The Assessment APIs provide comprehensive functionality for the Strength Finder personality assessment system, including saving assessment results, retrieving assessment data, clearing data, and generating PDF reports.
Base URL
https://talentg.vercel.app/api
Authentication
All assessment endpoints require user authentication. Users must be signed in to save or access their assessment data.
Authorization : Bearer <supabase_jwt_token>
Content-Type : application/json
Strength Finder Assessment
Save Assessment Results
Get Assessment Results
Get Pre-assessment Data
PDF Generation
Request PDF Generation
Check PDF Status
PDF Cleanup
Test Endpoints
Test PDF Generation
Test Google Services
Error Handling
Common Error Codes
Code HTTP Status Description
UNAUTHORIZED401 User not authenticated VALIDATION_ERROR400 Invalid input data NOT_FOUND404 Assessment not found PDF_GENERATION_FAILED500 PDF generation process failed STORAGE_ERROR500 File storage operation failed
{
"success" : false ,
"error" : {
"code" : "VALIDATION_ERROR" ,
"message" : "Invalid assessment data" ,
"details" : {
"field" : "overallScore" ,
"message" : "Score must be between 0 and 100"
}
}
}
Rate Limiting
Save assessment : 10 requests per hour per user
Get assessment data : 100 requests per hour per user
PDF generation : 5 requests per hour per user
Status checks : 200 requests per hour per user
SDK Examples
JavaScript - Save Assessment
Python - Get Assessment Results
const saveAssessment = async ( assessmentData ) => {
const token = await getSupabaseToken ();
const response = await fetch ( '/api/assessments/strength-finder/save' , {
method: 'POST' ,
headers: {
'Authorization' : `Bearer ${ token } ` ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ( assessmentData )
});
return response . json ();
};
// Usage
const result = await saveAssessment ({
name: "John Doe" ,
category: "working_professional" ,
overallScore: 85 ,
starRating: 4 ,
sectionScores: [ ... ],
completedAt: new Date (). toISOString ()
});
Assessment Categories
The following categories are supported for Strength Finder assessments:
Category Target Audience
class_3_5Students in grades 3-5 class_6_8Students in grades 6-8 class_9_12Students in grades 9-12 graduateRecent graduates postgraduatePostgraduate students working_professionalWorking professionals
PDF Generation Process
Assessment Completion : User completes the assessment
Data Save : Assessment data is saved to database
PDF Request : User requests PDF generation
Processing : AI analysis and PDF generation (2-5 minutes)
Storage : PDF is stored and URL provided
Download : User can download the completed report
PDF generation is a resource-intensive process. Users are limited to 5 PDF generations per hour.