Download products 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 |
---|---|---|---|
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. |
id_type | optional | number | Filter by type of product.
|
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) |
$request_url = 'https://api.frontcore.com/v2/orders/products';
$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.
[ { "account_number": null, "co_products": [], "cost_unit": null, "created_at": "2015-11-14T00:48:45+01:00", "currency": { "id": 1, "title": "NOK", "long_title": "Norwegian kroner" }, "group": { "id": 1, "title": "Courses" }, "id": 8079, "id_external_system": null, "id_product_regular_price": 0, "id_relation": 22353, "id_type": 2, "is_archived": false, "is_deleted": false, "is_main_price": true, "is_member_price": false, "item_number": "8079", "price": 1500, "title": "Learn REST API", "title_label": null, "type": null, "updated_at": "2025-01-22T09:08:02+01:00", "vat": { "id": 1, "vat": 0, "name": "0.00%" } }, { "account_number": null, "co_products": [], "cost_unit": null, "created_at": "2019-05-08T09:50:06+02:00", "currency": { "id": 1, "title": "NOK", "long_title": "Norwegian kroner" }, "group": { "id": 1, "title": "Courses" }, "id": 36345, "id_external_system": null, "id_product_regular_price": 8079, "id_relation": 22353, "id_type": 2, "is_archived": false, "is_deleted": false, "is_main_price": false, "is_member_price": true, "item_number": "36345", "price": 0, "title": "Learn REST API - - Members price", "title_label": null, "type": null, "updated_at": "2020-10-08T13:48:32+02:00", "vat": { "id": 1, "vat": 0, "name": "0.00%" } }, { "account_number": null, "co_products": [], "cost_unit": null, "created_at": "2019-09-27T13:57:32+02:00", "currency": { "id": 1, "title": "NOK", "long_title": "Norwegian kroner" }, "group": { "id": 1, "title": "Courses" }, "id": 41519, "id_external_system": null, "id_product_regular_price": 0, "id_relation": 52972, "id_type": 2, "is_archived": false, "is_deleted": false, "is_main_price": true, "is_member_price": false, "item_number": "41519", "price": 0, "title": "L\u00e6r \u00e5 bli skipper", "title_label": null, "type": null, "updated_at": null, "vat": { "id": 1, "vat": 0, "name": "0.00%" } }, { "account_number": null, "co_products": [], "cost_unit": null, "created_at": "2019-09-27T13:57:32+02:00", "currency": { "id": 1, "title": "NOK", "long_title": "Norwegian kroner" }, "group": { "id": 1, "title": "Courses" }, "id": 41520, "id_external_system": null, "id_product_regular_price": 41519, "id_relation": 52972, "id_type": 2, "is_archived": false, "is_deleted": false, "is_main_price": false, "is_member_price": true, "item_number": "41520", "price": 0, "title": "L\u00e6r \u00e5 bli skipper - - Medlemspris", "title_label": null, "type": null, "updated_at": null, "vat": { "id": 1, "vat": 0, "name": "0.00%" } } ]
Unsuccessful response sample:
{ "error": "Wrong API Key" }