Chronodat Subscription Admin

Sign in

Enter your admin credentials to view the internal API reference.

Chronodat Admin
Home SPFx guide Portal
Analytics Subscriptions API reference SPFx guide Logs
Internal

API reference

Endpoint catalogue for integrations and operations. Base URL:

SPFx integration guide

Health & catalog

MethodPathAuthPurpose
GET/healthNoneService and database health
GET/api/productsNonePublic product catalog for subscribe page

SPFx subscription API (v1)

Called from SharePoint web parts. CORS enabled for SharePoint Online origins when APP_ORIGIN includes sharepoint-online.

MethodPathNotes
GET/api/subscription/statustenantId, siteUrl, siteId?, productSlug? — creates site on first call
POST/api/subscription/activatelicenseKey, tenantId, siteUrl, siteId?, productSlug?
POST/api/subscription/checkouttenantId, siteUrl, userEmail, successUrl, cancelUrl
POST/api/subscription/portaltenantId, siteUrl, returnUrl
POST/api/subscription/webhookStripe webhook (raw body, Stripe signature)

SPFx subscription API (v2 — AAD required)

Same operations as v1 with Entra ID token required on every request. See SPFx guide for AadHttpClient setup.

MethodPath
GET/api/v2/subscription/status
POST/api/v2/subscription/activate
POST/api/v2/subscription/checkout
POST/api/v2/subscription/portal

Notifications & telemetry

MethodPathAuthNotes
POST/api/notifications/sendActive subscriptionSPFx public send — requires trial/active access
POST/api/v2/notifications/sendAAD + subscriptionv2 send with Entra token
POST/api/logsNoneClient log ingest → spfx_app_logs

Sample — public notification send

POST /api/notifications/send
{
  "tenantId": "00000000-0000-0000-0000-000000000000",
  "productSlug": "people-hub",
  "appName": "People Hub",
  "to": ["user@contoso.com"],
  "subject": "Action required",
  "html": "<p>Message body</p>"
}

LearnFlex Quiz API

Customer-facing quiz generation powered by Gemini. Requires Authorization: Bearer <LFLEX-api-key>. Issue keys from the admin route below.

MethodPathPurpose
GET/api/learnflex/quizzesService info (requires API key)
POST/api/learnflex/quizzesGenerate quiz from text or topic

Sample — create quiz

POST /api/learnflex/quizzes
{
  "sourceType": "text",
  "content": "Photosynthesis converts light energy into chemical energy...",
  "settings": {
    "questionCount": 10,
    "difficulty": "medium",
    "questionTypes": ["multiple_choice"],
    "language": "en"
  }
}

Admin API

All routes require Authorization: Bearer <admin token> from POST /api/admin/login.

MethodPathPurpose
POST/api/admin/loginIssue admin bearer token
GET/api/admin/statsTenant subscription summary
GET/PATCH/api/admin/tenantsList or update tenant subscriptions
GET/PATCH/api/admin/sitesSite installations (?stats=1 for counts)
GET/POST/PATCH/api/admin/productsProduct catalog management
GET/POST/PATCH/api/admin/license-keysOffline license keys
GET/POST/PATCH/api/admin/learnflex-api-keysLearnFlex customer API keys (?stats=1)
GET/api/admin/analyticsInstall and usage analytics
GET/POST/PATCH/DELETE/api/admin/email-templatesEmail template CRUD
GET/DELETE/api/admin/email-notificationsEmail delivery history and preview (?id=, ?stats=1). Delete one with ?id= or clear with ?all=1
POST/api/admin/notifications/sendAdmin send (optional skipAccessCheck)
GET/PATCH/POST/api/admin/cron/trial-follow-upTrial follow-up cron settings & manual run
GET/api/admin/cron/jobsAll scheduled cron jobs
GET/api/admin/cron/runsCron job history (?stats=1, ?report=1 for yesterday, filters: jobId, source, status, hideChecks=1)
GET/api/admin/requestsAPI request log (?stats=1)
DELETE/api/admin/requestsDelete by ?id= or purge with ?olderThanDays=30|90|180|365 (optional ?app=)
GET/DELETE/api/admin/logsApp log viewer
GET/api/admin/eventsSubscription events for a tenant
GET/api/admin/settings/statusSettings store availability

Scheduled jobs

SchedulePathAuth
Hourly poll/api/cron/trial-follow-upCRON_SECRET
Hourly poll/api/cron/trial-welcomeCRON_SECRET
Hourly poll/api/cron/trial-expiring-soonCRON_SECRET
Hourly poll/api/cron/trial-endedCRON_SECRET
Hourly poll/api/cron/subscription-thank-youCRON_SECRET

Configure jobs in Cron jobs and review invocations on Cron history. Vercel cron definitions live in vercel.json.