Download customers 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. |
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: employees | Automatically added for customer type 'Private' |
$request_url = 'https://api.frontcore.com/v2/customers';
$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": 64925, "title": "1", "department": "2", "phone": "5", "fax": "7", "email": "4", "webaddress": "8", "orgnr": "6", "invoice_email": "23", "customer_reference_id": "9", "customer_reference": null, "note": "29", "turnover": null, "idParentCustomer": null, "invoice_method": "electronic", "country": { "id": 203, "title": "Sweden", "code": "SE" }, "status": "Deactivated", "type": "Private", "employees": [], "duedate_days": 0, "seller": null, "invoice_address": { "address": null, "address_2": "17", "address_3": "18", "zipcode": "19", "city": "20" }, "post_address": { "address": "11", "address_2": "12", "address_3": "13", "zipcode": "14", "city": "15" }, "visit_address": { "address": "24", "address_2": "25", "address_3": "26", "zipcode": "27", "city": "28" }, "custom_properties": null, "created_at": "2019-10-24T14:41:26+02:00", "updated_at": "2025-01-21T09:50:39+01:00" }, { "id": 64926, "title": "1", "department": "2", "phone": "5", "fax": "7", "email": "4", "webaddress": "8", "orgnr": "6", "invoice_email": "23", "customer_reference_id": "9", "customer_reference": "21", "note": "29", "turnover": null, "idParentCustomer": null, "invoice_method": "electronic", "country": { "id": 203, "title": "Sweden", "code": "SE" }, "status": "Deactivated", "type": "Private", "employees": [], "duedate_days": 22, "seller": null, "invoice_address": { "address": "16", "address_2": "17", "address_3": "18", "zipcode": "19", "city": "20" }, "post_address": { "address": "11", "address_2": "12", "address_3": "13", "zipcode": "14", "city": "15" }, "visit_address": { "address": "24", "address_2": "25", "address_3": "26", "zipcode": "27", "city": "28" }, "custom_properties": null, "created_at": "2019-10-24T14:44:28+02:00", "updated_at": "2025-01-21T09:50:39+01:00" }, { "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" } ]
Unsuccessful response sample:
{ "error": "Wrong API Key" }