Get next courses

Calendar: List next courses based on course start dates using GET.

Request

GET https://www.kursguiden.no/api/v1/nextcoursedates

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.

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/v1/nextcoursedates';
$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.

{
    "status": "success",
    "nextcoursedates": {
        "12746584": {
            "coursedate_id": 12746584,
            "title": "Learn REST API",
            "start_at": "2025-05-15",
            "start_time_at": "08:00:00",
            "end_at": "2025-05-15",
            "end_time_at": "12:05:00",
            "deadline_at": "2025-05-15",
            "place": {
                "id": 1226,
                "title": "Sem",
                "title_additional_info": null,
                "parent_id": 3,
                "parent_title": "Vestfold"
            },
            "location": {
                "id": 6489,
                "title": "Sem",
                "custom_title": null,
                "address": null,
                "address2": null,
                "address3": null,
                "zipcode": null,
                "city": null,
                "state": "Vestfold",
                "county": "Sem",
                "country": "Norway",
                "country_code": "NO",
                "lat": 59.2823015,
                "lng": 10.3300322,
                "timezone": null,
                "long_text": null,
                "short_text": null,
                "short_text_2": null,
                "capacity_min": null,
                "capacity_max": null,
                "capacity_overbook": null,
                "capacity_budget": null,
                "capacity_wait": null,
                "idInstructor": null,
                "email_booking": null,
                "email_moreinfo": null,
                "is_default": false,
                "is_archived": false,
                "is_virtual": false,
                "cancellation_days": null,
                "notification_days": null,
                "notification_role": null,
                "is_notification_enabled": false,
                "full_address": null,
                "filtered_places": [
                    {
                        "long_name": "Sem"
                    },
                    {
                        "long_name": "Vestfold"
                    }
                ],
                "place": {
                    "id": 1226,
                    "title": "Sem",
                    "title_additional_info": null,
                    "parent_id": 3,
                    "parent_title": "Vestfold"
                }
            },
            "is_virtual": false,
            "is_visible": true,
            "teaching_language": {
                "id": "no",
                "title": "Norwegian"
            },
            "kursguiden_url": "https:\/\/www.kursguiden.no\/kurs\/Organic-food-course\/Learn-REST-API\/",
            "visible_when_passed_deadline": false,
            "reference": null,
            "seats_status": "fully_booked",
            "seats": {
                "allocated_capacity": {
                    "num": 0,
                    "num_overbooked": "0",
                    "num_waiting": "0"
                },
                "free": {
                    "num": 0,
                    "num_waiting": 0
                },
                "booking_status": {
                    "num": 2,
                    "num_confirmed": "1",
                    "num_unconfirmed": 1,
                    "num_waiting": 0
                }
            },
            "gatherings": [
                {
                    "id": 140295,
                    "idInstance": 12746584,
                    "gathering_at": "2025-05-15 08:00",
                    "gathering_end_at": "2025-05-15 12:05",
                    "idLocation": 6489,
                    "description": null,
                    "theme": null,
                    "event_url": null,
                    "created_at": "2020-04-27T22:56:10+02:00",
                    "is_future": true,
                    "updated_at": "2020-04-27T22:56:10+02:00",
                    "instructors": [],
                    "location": {
                        "id": 6489,
                        "title": "Sem",
                        "custom_title": null,
                        "address": null,
                        "address2": null,
                        "address3": null,
                        "zipcode": null,
                        "city": null,
                        "state": "Vestfold",
                        "county": "Sem",
                        "idCountry": "159",
                        "country": "Norway",
                        "country_code": "NO",
                        "idPlace": 1226,
                        "lat": 59.2823015,
                        "lng": 10.3300322,
                        "timezone": null,
                        "long_text": null,
                        "short_text": null,
                        "short_text_2": null,
                        "capacity_min": null,
                        "capacity_max": null,
                        "capacity_overbook": null,
                        "capacity_budget": null,
                        "capacity_wait": null,
                        "idInstructor": null,
                        "email_booking": null,
                        "email_moreinfo": null,
                        "is_default": false,
                        "is_archived": false,
                        "is_virtual": false,
                        "cancellation_days": null,
                        "notification_days": null,
                        "notification_role": null,
                        "is_notification_enabled": false,
                        "full_address": null,
                        "filtered_places": [
                            {
                                "long_name": "Sem"
                            },
                            {
                                "long_name": "Vestfold"
                            }
                        ]
                    }
                }
            ],
            "course": {
                "id": 22353,
                "title": "Learn REST API",
                "reference": "RESTAPI-CA-1001",
                "is_active": true,
                "type": "public",
                "kursguiden_url": "https:\/\/www.kursguiden.no\/kurs\/Organic-food-course\/Learn-REST-API\/",
                "is_full_time": false,
                "is_part_time": true,
                "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"
                    }
                ],
                "tags": [
                    {
                        "id": "501",
                        "title": "Rest API",
                        "is_archived": false,
                        "is_deleted": false
                    }
                ],
                "visit_address": null,
                "visit_address2": null,
                "visit_zipcode": null,
                "visit_city": null
            },
            "custom_properties": null,
            "status": {
                "id": 1,
                "idType": 1,
                "title": "To be defined"
            },
            "created_at": "2020-04-27T22:56:10+02:00",
            "updated_at": null,
            "deleted_at": null
        }
    }
}

Unsuccessful response sample:

{
    "status": "failure",
    "message": "Wrong API Key"
}      
© 2024 FrontCore