List courses

Download course ID, title, duration, price and other attributes using GET.

Request

GET https://www.kursguiden.no/api/v2/courses

For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.

Parameters

Name Required Value Description
limit optional number Amount of results (default: 75) (maximum: 250)
page optional number Page to show (default: 1)
since_id optional number Restrict results to after the specified ID.
created_at_min optional string Show items created after date (format: yyyy-mm-dd OR yyyy-mm-dd hh:mm:ss)
created_at_max optional string Show items created before date (format: yyyy-mm-dd OR yyyy-mm-dd hh:mm:ss)
updated_at_min optional string Show items last updated after date (format: yyyy-mm-dd OR yyyy-mm-dd hh:mm:ss)
updated_at_max optional string Show items last updated before date (format: yyyy-mm-dd OR yyyy-mm-dd hh:mm:ss)
include[] optional string Request additional information by specifying the 'include' parameter as a path using dot notation.
You can include multiple objects at once by specifying multiple items in the include array.

Supported items for this endpoint:
`products`

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/v2/courses';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'X-API-Key: {your-api-key}',
  'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
               

Response

If the method is successful it responds with an JSON structure, as it is shown below.

[
    {
        "id": 22353,
        "title": "Learn REST API",
        "reference": "RESTAPI-CA-1001",
        "is_active": true,
        "kursguiden_url": "https:\/\/www.kursguiden.no\/kurs\/Organic-food-course\/Learn-REST-API\/",
        "is_full_time": false,
        "is_part_time": true,
        "type": "public",
        "level": {
            "id": 6,
            "title": "Courses"
        },
        "form_of_teaching": {
            "id": 1,
            "title": "Classroom"
        },
        "teaching_language": {
            "id": "no",
            "title": "Norwegian"
        },
        "time_of_day": {
            "id": 2,
            "title": "Evening class"
        },
        "duration": {
            "value": 6,
            "unit": "Time(r)"
        },
        "price": {
            "value": 1500,
            "currency": "NOK",
            "comment": "Includes a free beer."
        },
        "categories": [
            {
                "id": 1075,
                "title": "Organic food course",
                "idParent": 1456,
                "titleParent": "Cooking class"
            },
            {
                "id": 1473,
                "title": "Norwegian food",
                "idParent": 1456,
                "titleParent": "Cooking class"
            }
        ],
        "external_booking_url": null,
        "external_more_info_url": null,
        "descriptions": {
            "lead": "REST API is very useful.",
            "description": "<p>REST API is a easy way of sharing information between sites.<\/p>",
            "place": "<p>At IT Fornebu.<\/p>",
            "prerequisites": "<p>Normal programming skills.<\/p>",
            "duration": "<p>2 sessions. Each session is 3 hours.<\/p>",
            "credits": "<p>No credts.<\/p>",
            "submissions": "<p>Two tasks to be submitted online.<\/p>",
            "hotelInfo": "<p>Scandic Fornebu.<\/p>",
            "audience": "<p>Programmers and web developers.<\/p>"
        },
        "lead_settings": {
            "email_booking": "booking@exampleschool.no",
            "email_more_info": "more.info@exampleschool.no"
        },
        "tags": [
            {
                "id": "501",
                "title": "Rest API",
                "is_archived": false,
                "is_deleted": false
            }
        ],
        "custom_properties": null,
        "visit_address": null,
        "visit_address2": null,
        "visit_zipcode": null,
        "visit_city": null,
        "created_at": "2015-01-21T21:30:31+01:00",
        "updated_at": "2024-05-03T21:54:44+02:00",
        "deleted_at": "2024-05-03T01:27:36+02:00",
        "related_items_updated_at": "2024-05-04T00:22:51+02:00"
    }
]

Unsuccessful response sample:

{
    "error": "Wrong API Key"
}      
© 2024 FrontCore