Get start date, end date, deadline, place for a course date using GET.
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.
Name | Required | Value | Description |
---|---|---|---|
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: `course.products` |
$request_url = 'https://api.frontcore.com/v2/courses/22353/coursedates/9304757';
$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);
If the method is successful it responds with an JSON structure, as it is shown below.
{ "coursedate_id": 9304757, "title": "Learn REST API", "start_at": "2020-01-04", "start_time_at": "06:00:00", "end_at": "2020-01-06", "end_time_at": "07:30:00", "deadline_at": "2020-01-03", "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": true, "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": 0, "num_confirmed": 0, "num_unconfirmed": 0, "num_waiting": 0 } }, "gatherings": [ { "id": 91083, "idInstance": 9304757, "gathering_at": "2020-01-04 06:00", "gathering_end_at": "2020-01-04 07:30", "idLocation": null, "description": null, "theme": null, "event_url": null, "created_at": "2019-05-08T10:39:05+02:00", "is_future": false, "updated_at": "2019-05-08T10:39:05+02:00", "instructors": [], "location": null }, { "id": 91084, "idInstance": 9304757, "gathering_at": "2020-01-06 ", "gathering_end_at": "2020-01-06 ", "idLocation": null, "description": null, "theme": null, "event_url": null, "created_at": "2019-05-08T10:39:05+02:00", "is_future": false, "updated_at": "2019-05-08T10:39:05+02:00", "instructors": [], "location": null } ], "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, "lessons_hours": null, "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": "2015-01-21T21:30:31+01:00", "updated_at": null, "deleted_at": null, "contacts": [] }
Unsuccessful response sample:
{ "error": "Wrong API Key" }