Get a customer

Get a customer using GET.

Request

GET https://www.kursguiden.no/api/v2/customers/:id

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.

Parameters

Name Required Value Description
include[] optional string: employees Automatically added for customer type 'Private'

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/v2/customers/32714';
$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);
               

Response

If the method is successful it responds with an JSON structure, as it is shown below.

{
    "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-04-05T06:06:52+02:00"
}

Unsuccessful response sample:

{
    "error": "Wrong API Key"
}      
© 2024 FrontCore