Skip to content

Re-assemble the same paper and mark the submitted ids. Stateless.

POST
/api/v1/papers/{exam}/{subject}/score
curl --request POST \
--url https://api.utmelab.com/api/v1/papers/example/example/score \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "answers": { "additionalProperty": "example" }, "country": "example", "include_explanation": true, "seed": 1 }'
exam
required
string

Exam code, e.g. JAMB.

subject
required
string

Subject slug, e.g. physics.

Media typeapplication/json
object
answers
object
key
additional properties
string
country
string | null
include_explanation

Include answers and explanations with the score. Default: false.

boolean | null
seed
required
integer format: int64

Example generated

{
"answers": {
"additionalProperty": "example"
},
"country": "example",
"include_explanation": true,
"seed": 1
}
Media typeapplication/json
object
exam
required
string
questions
required
Array<object>
object
answer
string | null
correct
required
boolean
explanation
One of:

Why the answer is what it is: teaser, working, and the distractor that catches people.

object
body
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
key_point
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
trap
One of:

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
id
required
string
submitted
string | null
score
required
integer
seed
required
integer format: int64
subject
required
string
total
required
integer

Example

{
"questions": [
{
"explanation": {
"body": {
"inline": [
{
"kind": "bold"
}
]
},
"key_point": {
"inline": [
{
"kind": "bold"
}
]
},
"trap": {
"inline": [
{
"kind": "bold"
}
]
}
}
}
]
}

An API key is missing or invalid.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API key lacks the required scope.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

No such exam subject

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The bank cannot fill this paper yet

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The caller has exceeded the applicable rate limit.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API is temporarily unavailable.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}