Download orders 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 |
---|---|---|---|
course_id | optional | number | Finds order if at least one order line is related to the course |
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) |
exported_at_min | optional | string | Show items last exported after date (format: yyyy-mm-dd OR yyyy-mm-dd hh:mm:ss) |
exported_at_max | optional | string | Show items last exported before date (format: yyyy-mm-dd OR yyyy-mm-dd hh:mm:ss) |
user_data | optional | boolean | Include/exclude user info per line item (default: false) |
exported | optional | boolean | Include/exclude exported orders (default: false) |
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: `lines.database_relations.course` `lines.database_relations.participants` |
$request_url = 'https://api.frontcore.com/v2/orders?user_data=true&since_id=1000&created_at_min=1999-03-31&created_at_max=2020-02-01&page=1&limit=75';
$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.
[ { "id": 27244, "title": "Learn REST API #27244", "title_detailed": "04.01.2020 - 06.01.2020 - Sem", "is_paid": true, "payment_method": null, "your_reference": null, "booker": null, "gln_number": null, "customer": { "id": 32714, "title": "Beste Kunde AS", "department": null, "phone": null, "fax": null, "email": null, "webaddress": null, "orgnr": "85454545", "invoice_email": null, "customer_reference_id": null, "customer_reference": "Per Pedersen", "note": null, "turnover": null, "idParentCustomer": null, "invoice_method": "electronic", "country": { "id": 159, "title": "Norway", "code": "NO" }, "status": "Deactivated", "type": "Company", "duedate_days": 10, "seller": null, "invoice_address": { "address": "Kundeveien 10", "address_2": null, "address_3": null, "zipcode": "2130", "city": "Oslo" }, "post_address": { "address": null, "address_2": null, "address_3": null, "zipcode": null, "city": null }, "visit_address": { "address": null, "address_2": null, "address_3": null, "zipcode": null, "city": null }, "custom_properties": null, "created_at": "2017-03-31T20:27:41+02:00", "updated_at": "2024-12-18T08:25:22+01:00" }, "idCampaign": null, "seller_id": null, "invoice_address": null, "invoice_address_2": null, "invoice_address_3": null, "invoice_zipcode": null, "invoice_city": null, "invoice_email": "lars@eksemel.ek", "first_user": { "id": 154420, "firstname": "Lars", "lastname": "Larsen", "date_of_birth": "12.05.1992 00:00:00", "email": "lars@eksemel.ek", "phone": "21212121", "company": "ABC AS", "position": null, "invoice_address": { "address": "Veien 2", "address_2": null, "address_3": null, "zipcode": "3120", "city": "Oslo", "phone": null }, "home_address": { "address": "Veien 2", "address_2": null, "address_3": null, "zipcode": "3120", "city": "Oslo", "phone": null }, "work_address": { "address": null, "address_2": null, "address_3": null, "zipcode": null, "city": null, "phone": null } }, "lines": [ { "id": 31400, "currency": { "id": "1", "title": "NOK", "long_title": "Norwegian kroner" }, "price_at_order_per_item_vat_excluded": 1500, "discount_percent_at_order": 0, "discount_amount_at_order": 0, "discount_calculated_at_order": 0, "price_at_invoice_per_item_vat_excluded": 0, "discount_percent_at_invoice": 0, "discount_calculated_at_invoice": 0, "price_at_export_per_item_vat_excluded": 0, "discount_percent_at_export": 0, "discount_calculated_at_export": 0, "quantity": 1, "database_relations": [ { "type": "participant", "participant_id": 124920, "coursedate_id": 9304757, "user_id": 154420, "course_id": 22353 } ], "product": { "id": 8079, "item_number": "8079", "title": "Learn REST API", "title_label": null, "price": 1500, "currency": "NOK", "is_main_product": true, "vat_percentage": 0 }, "users": [ { "id": 154420, "firstname": "Lars", "lastname": "Larsen", "date_of_birth": "12.05.1992 00:00:00", "email": "lars@eksemel.ek", "phone": "21212121", "company": "ABC AS", "position": null, "invoice_address": { "address": "Veien 2", "address_2": null, "address_3": null, "zipcode": "3120", "city": "Oslo", "phone": null }, "home_address": { "address": "Veien 2", "address_2": null, "address_3": null, "zipcode": "3120", "city": "Oslo", "phone": null }, "work_address": { "address": null, "address_2": null, "address_3": null, "zipcode": null, "city": null, "phone": null }, "invoice_reference": null } ], "created_at": "2017-03-31T20:27:04+02:00", "updated_at": null } ], "booker_admin_user": null, "webintegration_id": null, "custom_properties": null, "calculated_totals": { "total_amount_before_discounts": 1500, "total_amount_after_discounts": 1500, "total_amount_of_discounts": 0, "total_amount_of_vat": 0, "total_amount_incl_discounts_and_vat": 1500 }, "exported_at": null, "updated_at": "2025-01-21T10:06:42+01:00", "created_at": "2017-03-31T20:27:04+02:00" }, { "id": 27243, "title": "Learn REST API #27243", "title_detailed": "02.04.2020 - 10.04.2020 - Oslo", "is_paid": false, "payment_method": null, "your_reference": null, "booker": null, "gln_number": null, "customer": null, "idCampaign": null, "seller_id": null, "invoice_address": null, "invoice_address_2": null, "invoice_address_3": null, "invoice_zipcode": null, "invoice_city": null, "invoice_email": "eksempel@spinnerlabs.no", "first_user": { "id": 154418, "firstname": "P\u00e5l", "lastname": "P\u00e5lsen", "date_of_birth": null, "email": "eksempel@spinnerlabs.no", "phone": "22112211", "company": "Bedrift AS", "position": null, "invoice_address": { "address": "Operaveien 10", "address_2": null, "address_3": null, "zipcode": "2130", "city": "Oslo", "phone": null }, "home_address": { "address": "Operaveien 10", "address_2": null, "address_3": null, "zipcode": "2130", "city": "Oslo", "phone": null }, "work_address": { "address": null, "address_2": null, "address_3": null, "zipcode": null, "city": null, "phone": null } }, "lines": [ { "id": 31399, "currency": { "id": "1", "title": "NOK", "long_title": "Norwegian kroner" }, "price_at_order_per_item_vat_excluded": 1500, "discount_percent_at_order": 0, "discount_amount_at_order": 0, "discount_calculated_at_order": 0, "price_at_invoice_per_item_vat_excluded": 0, "discount_percent_at_invoice": 0, "discount_calculated_at_invoice": 0, "price_at_export_per_item_vat_excluded": 0, "discount_percent_at_export": 0, "discount_calculated_at_export": 0, "quantity": 1, "database_relations": [ { "type": "participant", "participant_id": 124918, "coursedate_id": 9633149, "user_id": 154418, "course_id": 22353 } ], "product": { "id": 8079, "item_number": "8079", "title": "Learn REST API", "title_label": null, "price": 1500, "currency": "NOK", "is_main_product": true, "vat_percentage": 0 }, "users": [ { "id": 154418, "firstname": "P\u00e5l", "lastname": "P\u00e5lsen", "date_of_birth": null, "email": "eksempel@spinnerlabs.no", "phone": "22112211", "company": "Bedrift AS", "position": null, "invoice_address": { "address": "Operaveien 10", "address_2": null, "address_3": null, "zipcode": "2130", "city": "Oslo", "phone": null }, "home_address": { "address": "Operaveien 10", "address_2": null, "address_3": null, "zipcode": "2130", "city": "Oslo", "phone": null }, "work_address": { "address": null, "address_2": null, "address_3": null, "zipcode": null, "city": null, "phone": null }, "invoice_reference": null } ], "created_at": "2017-03-31T18:47:28+02:00", "updated_at": null } ], "booker_admin_user": null, "webintegration_id": null, "custom_properties": null, "calculated_totals": { "total_amount_before_discounts": 1500, "total_amount_after_discounts": 1500, "total_amount_of_discounts": 0, "total_amount_of_vat": 0, "total_amount_incl_discounts_and_vat": 1500 }, "exported_at": null, "updated_at": null, "created_at": "2017-03-31T18:47:28+02:00" } ]
Unsuccessful response sample:
{ "error": "Wrong API Key" }