Before writing code, make sure your programmes are approved for public listing and collect the two values every request uses.
What you need
- A Lernmark subscription on the Platform plan, which includes Admissions.
- An administrator who can manage admissions, to list the school and its programmes. Only active, listed programmes appear in the API.
- A website with server-side code (Node.js, PHP, WordPress, or similar) that can make HTTPS requests.
Turn on public listing
Every school and programme is private until you list it. Nothing appears in the API by default.
Someone with permission to manage admissions does this in Lernmark, under Admissions.
- List your school. In the Your website card, turn on the switch that lists your school. Lernmark may ask you to confirm with two-step sign-in first.
- Choose the programmes. Under Programme availability, turn on On your website for each programme you want to show. Only active programmes can be listed.
- Open applications where you want them. Use the Public applications
switch on each programme that is taking applications. This drives the
application_availablefield. See Apply links. - Hand both values to your developer. They need the school slug and the school ID described below.
Your two values
Value 1
School slug
Lowercase letters, numbers, and hyphens, like siantou.
Where to find it: in Lernmark, open Admissions. Your Public
application link ends with the slug:
https://www.lernmark.app/apply/siantou.
Value 2
School ID
A UUID, like 3f2b6c1e-8a4d-4f7b-9c2e-5d1a0b7e4c93.
Where to find it: in Lernmark, open Admissions. The Your website card shows it, with a Copy ID button.
Keep both in your server configuration, not in templates. The recipes in this guide use these stand-ins until you replace them:
School slug: your-school
School ID: YOUR_INSTITUTION_ID
No secrets involved
The school slug and school ID are not secret. The API is anonymous and read-only, and returns only information your school has approved for public display. You do not need an API key, token, password, or cookie.
Make a test request
Check your values from a terminal before writing any code:
curl -i https://api.lernmark.app/api/v1/public/site/your-school/institutions/YOUR_INSTITUTION_ID
A 200 OK response with your institution's name confirms both values. A
404 Not Found means one of the values is wrong, or listing is not turned on
for that school yet. The API reference
describes the response in full.