Skip to content

Your first call

These calls need no credential. Each one is a single curl.

Reference.

Terminal window
curl https://app.jadwigo.pl/api/health
{ "status": "ok" }

Reference.

Terminal window
curl https://app.jadwigo.pl/api/v1/featured-lessons
{
"lessons": [
{
"assignment_id": "asg_…",
"lesson_id": "les_…",
"title": "…",
"language": "pl"
}
]
}

Keep an assignment_id. You start an attempt at an assignment, not at a lesson.

Reference.

Terminal window
curl -X POST https://app.jadwigo.pl/api/v1/assignments/$ASSIGNMENT_ID/attempts \
-H "Content-Type: application/json" \
-d '{"mode": "preview"}'

201 means the attempt started. The reply is the attempt’s snapshot:

  • attempt: the record. attempt.id is the handle for every call that follows.
  • plan: the whole lesson, in order, so you know its length from the start.
  • questions: what has been asked so far. The open question is last.
  • open_seq: the seq of the question waiting for an answer, or null once the attempt ends.

A preview attempt counts toward no learner and is never claimed. Use it to try the API. Leave mode out, or send "real", for a child’s real play.

The body is strict. A field the API does not know, or one the server owns, is 400.

Reference.

Terminal window
curl https://app.jadwigo.pl/api/v1/attempts/$ATTEMPT_ID

This returns the same snapshot. Call it after a reload to pick up where the child left off.

An answer is a POST to /api/v1/attempts/{id}/answers. It names the question’s seq, the try_no, an event_id and the value. A repeat with the same event_id and body returns the stored result, so a retry after a dropped connection is safe. Its reference page shows every field.