The public site API exposes one institution and its published programmes. It is anonymous and read-only.
Base URL
{{PRODUCTION_API_BASE_URL}}
For example, the production origin might be https://api.lernmark.com. All
endpoints below are under /api/v1.
Confirm the API origin
Confirm your API base URL with Lernmark, then replace
{{PRODUCTION_API_BASE_URL}} in every example before deploying.
Authentication
None. Do not send tokens, API keys, passwords, or cookies. These endpoints return an anonymous, read-only projection of information already approved for public display.
Get institution
Use this endpoint to confirm that your tenant slug and institution ID map to the expected public institution.
GET {BASE}/api/v1/public/site/{tenant}/institutions/{institutionId}
Accept: application/json
Successful response (200 OK):
{
"data": {
"institution": {
"id": "11111111-1111-4111-8111-111111111111",
"name": "Northfield College",
"code": "NORTHFIELD"
}
},
"meta": { "message": "OK" },
"errors": {}
}
| Field | Type | Meaning |
|---|---|---|
institution.id | UUID | Stable public institution identifier. |
institution.name | string | Public institution name. |
institution.code | string | Public institution code. |
List programmes
This endpoint returns the institution’s published programmes in pages. It also supports a title-or-code search.
GET {BASE}/api/v1/public/site/{tenant}/institutions/{institutionId}/programmes?page=1&per_page=9&search=nursing
Accept: application/json
Query parameters
| Parameter | Type | Rules |
|---|---|---|
page | integer | At least 1; defaults to 1. |
per_page | integer | From 1 to 100. |
search | string | Keep to 100 characters or fewer; matches programme title or code. |
Successful response (200 OK):
{
"data": {
"programmes": [
{
"id": "22222222-2222-4222-8222-222222222222",
"title": "BSc Computing",
"award": "BSc (Hons)",
"academic_unit": "Department of Science",
"duration": "3 years full-time",
"summary": "A short public summary of the programme.",
"application_available": true,
"slug": "bsc-computing",
"last_updated": "2026-08-13T05:23:00+00:00"
}
]
},
"meta": {
"message": "OK",
"pagination": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 9,
"to": 9,
"total": 41
}
},
"errors": {}
}
Programme fields
| Field | Type | Meaning |
|---|---|---|
id | UUID | Stable public programme identifier. |
title | string | Public programme title. |
award | string or null | Award or qualification. |
academic_unit | string or null | Public department or academic-unit name. |
duration | string or null | Human-readable duration. |
summary | string or null | Short public description. |
application_available | boolean | Whether to show an Apply link. |
slug | string | Canonical public programme slug. |
last_updated | ISO-8601 string | When the programme record was last updated. |
Render nullable fields defensively. Omit a missing value; never print the word
null.
Pagination fields
The meta.pagination object contains current_page, from, last_page,
per_page, to, and total. Request the next page while current_page is
less than last_page.
Response envelope
Every response uses the same top-level shape:
{
"data": {},
"meta": {
"message": "OK",
"pagination": {}
},
"errors": {}
}
pagination is present only on paginated responses.
Response headers
| Header | Meaning |
|---|---|
Content-Type: application/json | The response body is JSON. |
Cache-Control: no-store | Lernmark returns fresh data. Cache successful responses on your server. |
X-RateLimit-Limit | Your request limit. The standard limit is 60 requests per minute per client IP and tenant. |
X-RateLimit-Remaining | Requests remaining in the current window. |
X-Request-Id | Request identifier. Include it when contacting support. |
Errors and timeouts
An unknown tenant, invalid institution ID, or institution unavailable for
public listing returns 404 Not Found:
{
"data": null,
"meta": { "message": "Not Found" },
"errors": {}
}
A rate-limit breach returns 429 Too Many Requests. Treat every non-200
response and every timeout as unavailable. Set a 5-second timeout, do not
reuse expired cached data, and show:
<p role="status">Programme information is temporarily unavailable.</p>