Ksiopea·
OpenAPI
Ksiopea · Integration

Timetable API

Read the timetable Ksiopea generates, so a school's management system and other tools can consume it without personal credentials. Read-only, per school, versioned. The contract is OpenAPI 3.1: import it into Postman, Insomnia or a client generator, and the backend is built against that same document.

Specification · integration draft

AuthenticationPer-school API key

Each school generates its key from the admin panel. It is shown once and stored hashed; read-only scope, revocable at any time. It is sent in the header:

Authorization: Bearer ksio_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

For integration testing, sandbox keys (ksio_test_...) are issued against a sample school.

Base and versioningStable routes

A breaking change bumps the route version (/v2); /v1 is never broken silently.

ResourcesEndpoints

MethodPathReturns
GET/centerSchool metadata (name, stages, active year).
GET/schedulesPublished timetables.
GET/schedules/{sid}Header + period frames (daily bells).
GET/schedules/{sid}/groupsGroups with their code.
GET/schedules/{sid}/teachersTeachers with their code (idnumber/nick).
GET/schedules/{sid}/roomsRooms with their code.
GET/schedules/{sid}/subjectsSubjects with their code.
GET/schedules/{sid}/timetableWith no filter, the full timetable; with group, teacher or room, that entity. format=cifra returns Cifra codes.
GET/schedules/{sid}/icsSubscribable ICS feed (Google/Microsoft).

Use current as the sid for the timetable in force, without listing.

ExampleA group's timetable

curl "https://api.ksiopea.com/v1/schedules/sched_2526_def/timetable?group=3esoA" \
  -H "Authorization: Bearer ksio_live_xxxx"
{
  "schedule_id": "sched_2526_def",
  "entity": { "id": "3esoA", "code": "3ESOA", "name": "Year 9 A" },
  "sessions": [
    {
      "day": 2, "slot": 2, "start": "09:55", "end": "10:50",
      "subject": { "id": "MAT", "name": "Mathematics" },
      "teacher": { "id": "a1b2", "code": "P034", "name": "Teacher 34" },
      "room":    { "id": "r12",  "code": "12",   "name": "Room 12" },
      "kind": "class"
    }
  ]
}

Periods follow the group's frame (bells offset between stages are already resolved). No student data is exposed.

FormatsAny SIS · Cifra and ICS

The native format is the general one and serves any management system. format=cifra is just a convenience to reconcile with that SIS, not an exclusive integration.

ErrorsResponses

Errors come as { "error": { "code", "message" } } with the matching HTTP status:

HTTPcodeWhen
401unauthorizedKey missing or invalid.
403forbiddenKey revoked or out of scope.
404not_foundResource does not exist.
400bad_requestInvalid parameters.
429rate_limitedPer-key limit; retry per Retry-After.

IntegrateFirst steps

Hablemos de integración

Cuéntanos de tu sistema y lo vemos con tu equipo.