Download customers contacts 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 |
---|---|---|---|
customer_id | optional | number | |
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) |
$request_url = 'https://api.frontcore.com/v2/customers/contacts';
$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.
[ { "created_at": "2019-10-24T13:33:36+02:00", "customer_id": 32714, "email": "hannee.hansen@example.com", "firstname": "Hanne", "id": 4836, "lastname": "Hansen", "phone": "1", "position": "Kommunikasjonsr\u00e5dgiver", "updated_at": "2019-10-24T13:37:26+02:00" }, { "created_at": "2019-10-24T13:32:52+02:00", "customer_id": 32714, "email": "hannee.hansen@example.com", "firstname": "Hanne", "id": 4835, "lastname": "Hansen", "phone": "1", "position": null, "updated_at": null }, { "created_at": "2019-10-10T15:25:45+02:00", "customer_id": 32714, "email": "karl.karlsen@example.com", "firstname": "Karl", "id": 4719, "lastname": "Karlsen", "phone": "97561289", "position": "Kommunikasjonsr\u00e5dgiver", "updated_at": null } ]
Unsuccessful response sample:
{ "error": "Wrong API Key" }