Skip to content
Browse the docs

Developer Guide

API reference

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": {}
}
FieldTypeMeaning
institution.idUUIDStable public institution identifier.
institution.namestringPublic institution name.
institution.codestringPublic 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

ParameterTypeRules
pageintegerAt least 1; defaults to 1.
per_pageintegerFrom 1 to 100.
searchstringKeep 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

FieldTypeMeaning
idUUIDStable public programme identifier.
titlestringPublic programme title.
awardstring or nullAward or qualification.
academic_unitstring or nullPublic department or academic-unit name.
durationstring or nullHuman-readable duration.
summarystring or nullShort public description.
application_availablebooleanWhether to show an Apply link.
slugstringCanonical public programme slug.
last_updatedISO-8601 stringWhen 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

HeaderMeaning
Content-Type: application/jsonThe response body is JSON.
Cache-Control: no-storeLernmark returns fresh data. Cache successful responses on your server.
X-RateLimit-LimitYour request limit. The standard limit is 60 requests per minute per client IP and tenant.
X-RateLimit-RemainingRequests remaining in the current window.
X-Request-IdRequest 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>