AS
ALOC Stationdeveloper docs
DOCS/DEVELOPER PORTAL
v1.0.0
folio 1.3 — upgrade path

Migrating from Legacy ALOC Endpoints to ALOC Station

A comprehensive migration blueprint for developers transitioning from legacy questions.aloc.com.ng endpoints to modern ALOC Station assessment infrastructure.

Official Migration Window: July 2026 – July 31, 2027
1-Year Grace Period

The legacy endpoint service (questions.aloc.com.ng) continues to support over 3,000 active developers until July 31, 2027. While legacy endpoints remain operational for existing applications, all new features, curriculum taxonomy (L2), AI step-by-step worked solutions (L3), official SDKs, and Model Context Protocol (MCP) tooling are exclusive to ALOC Station.

Architecture Evolution: What Changes?

Legacy ALOC was designed as a flat question retrieval feed. ALOC Station transforms this into a multi-layered assessment engine with psychometric seeding, anti-cheating sessions, and deep curriculum taxonomy.

DimensionLegacy (v1/v2 aloc-endpoints)ALOC Station (Modern)
Base URLhttps://questions.aloc.com.ng/api/v2https://dev.aloc.com.ng/api/v1
AuthenticationAccessToken: <token> headerX-API-Key: aloc_live_... / Bearer header
Developer ToolingRaw HTTP / cURL onlyTypeScript SDK, Python SDK, MCP Server
Data DepthRaw question & static answer (L1)L1 (Raw), L2 (Taxonomy), L3 (Solutions), L4 (Vector)
Exam Session StateManual client state managementBuilt-in candidate session lifecycle & seeding
Exam IsolationSilent fallback to JAMB when type is missingStrict examType validation (400 / 404 hints, zero cross-exam fallback)
Monthly QuotaLegacy plan rates1,000 Free Credits/mo + Instant top-ups

Endpoint Mapping Matrix

Use this cheat-sheet to replace legacy API requests with their Station equivalents:

Legacy: GET /api/v2/q?subject=chemistrySingle Question
Station: GET /api/v1/questions?subject=chemistry&limit=1Layer: L1
Legacy: GET /api/v2/m?subject=chemistryBatch Questions (40 fixed)
Station: POST /api/v1/assessments/generate (up to 60) or GET /api/v1/questions?limit=15Layer: L1/Assessment
Legacy: GET /api/v2/q-by-id/:id?subject=chemistryLookup by ID
Station: GET /api/v1/questions/:idLayer: L1
Legacy: Not AvailableStep-by-Step Worked Solutions
Station: POST /api/v1/questions/:id/explainLayer: L3

Code Migration Examples

JavaScript / TypeScript Migration
Before (Legacy HTTP)
const res = await fetch(
  "https://questions.aloc.com.ng/api/v2/q?subject=chemistry&year=2020",
  { headers: { "AccessToken": process.env.ALOC_TOKEN } }
);
const data = await res.json();
After (ALOC SDK)
import { QuestionsApi, Configuration } from "@massteck/aloc-sdk";
const api = new QuestionsApi(new Configuration({ apiKey: process.env.ALOC_API_KEY }));
const { data } = await api.listQuestions({ subject: "chemistry", year: 2020 });
console.log(data[0].text, data[0].metadata?.topic);
Python Migration
Before (Legacy Requests)
import requests
res = requests.get(
    "https://questions.aloc.com.ng/api/v2/q",
    headers={"AccessToken": "YOUR_TOKEN"},
    params={"subject": "physics", "type": "utme"}
)
After (Official Python SDK)
from aloc_sdk import AlocClient

client = AlocClient(api_key="aloc_live_YOUR_API_KEY")
res = client.questions.list_questions(subject="physics", exam_type="jamb")
print(res.data[0].text, res.data[0].metadata.topic)
5-Minute Drop-In Adapter (Zero UI Rewrites)

Keep Your Existing UI Components with the Legacy /q & /m Adapter

Already have dozens of React, Vue, Next.js, or Python templates wired to legacy question, singular option, answer, examtype: "utme", and examyear fields? Both official SDKs include a built-in compatibility layer that maps legacy parameters (including routing 40-question /m batches automatically to POST /v1/assessments/generate) and returns the exact legacy JSON shape—while attaching Station L2 metadata under _station.

1. TypeScript / Next.js SDK Drop-In (@massteck/aloc-sdk)
import { Configuration, fetchLegacyCompat } from "@massteck/aloc-sdk";

const config = new Configuration({ apiKey: process.env.ALOC_API_KEY });

// Single /q call -> { subject, status: 200, data: { question, option, answer, examtype: "utme", _station } }
const single = await fetchLegacyCompat(config, {
  subject: "chemistry",
  type: "utme",
  year: "2020",
});

// 40-item /m batch -> auto-routes to POST /v1/assessments/generate (5 credits)
const paper40 = await fetchLegacyCompat(config, {
  subject: "mathematics",
  type: "wassce",
  count: 40,
});
2. Python SDK Drop-In (aloc-sdk)
from aloc_sdk import AlocClient

client = AlocClient(api_key="aloc_live_YOUR_API_KEY")

# Accepts legacy type="utme"|"wassce", string year, and count up to 60
legacy_payload = client.legacy.fetch(subject="physics", type="utme", count=40)
first = legacy_payload["data"][0]
print(first["question"], first["option"]["a"], first["_station"]["metadata"])
3. Optional Next.js Proxy Route (app/api/q/route.ts — For Shipped Frontends)
import { NextResponse } from "next/server";
import { Configuration, fetchLegacyCompat } from "@massteck/aloc-sdk";

const config = new Configuration({ apiKey: process.env.ALOC_API_KEY });

export async function GET(req: Request) {
  const sp = new URL(req.url).searchParams;
  const payload = await fetchLegacyCompat(config, {
    subject: sp.get("subject") ?? "mathematics",
    type: sp.get("type") ?? sp.get("examtype") ?? undefined,
    year: sp.get("year") ?? sp.get("examyear") ?? undefined,
    count: sp.get("count") ? Number(sp.get("count")) : undefined,
  });
  return NextResponse.json(payload);
}

3 Simple Steps to Complete Your Migration

  1. Generate an ALOC Station API Key: Create your free developer account at aloc.com.ng/register to receive 1,000 free monthly credits.
  2. Install an Official SDK: Run npm install @massteck/aloc-sdk or pip install aloc-sdk — or call the REST endpoint directly.
  3. Explore the Interactive Playground: Test questions, taxonomy, and step-by-step solutions instantly on the API Playground.
Need dedicated migration assistance for high-volume enterprise pipelines?Contact Engineering Support →