Klantly Developers

API reference

Company

Your own company details: name, address, language and VAT settings.

Endpoints

Retrieve the company

GET /api/v1/company

The details of the company the key belongs to, including the default VAT rate and whether prices include VAT.

Scope
company.read — Read company details

Example request

cURL
curl "https://app.klantly.com/api/v1/company" \
  -H "Authorization: Bearer $KLANTLY_API_KEY"
PHP
$client = new \GuzzleHttp\Client([
    'base_uri' => 'https://app.klantly.com/api/v1/',
    'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);

$response = $client->request('GET', 'company');

$data = json_decode((string) $response->getBody(), true)['data'];
JavaScript
const response = await fetch('https://app.klantly.com/api/v1/company', {
  headers: {
    Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
  },
});

const { data } = await response.json();
Python
import os

import requests

response = requests.get(
    "https://app.klantly.com/api/v1/company",
    headers={
        "Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
    },
)
data = response.json()["data"]

Response 200

Example response
{
  "data": {
    "object": "company",
    "id": "42",
    "name": "De Vries Bouw",
    "email": "info@devriesbouw.nl",
    "phone": "+31 30 1234567",
    "website": "https://devriesbouw.nl",
    "coc_number": "12345678",
    "vat_number": "NL123456789B01",
    "address": "Industrieweg 5",
    "postal_code": "3542 AD",
    "city": "Utrecht",
    "country": "NL",
    "language": "nl",
    "currency": "EUR",
    "timezone": "Europe/Amsterdam",
    "default_vat_rate": "21.00",
    "prices_include_vat": false
  }
}

Possible errors

In addition, every endpoint can return the general errors, such as an invalid key or a reached limit. See all error codes.

The object

All fields are always present; a field without a value is null.

FieldTypeDescription
object string Always "company".
id string Id of the company.
name string Company name.
email string General email address. can be empty (null)
phone string Phone number. can be empty (null)
website string Website. can be empty (null)
coc_number string Chamber of Commerce number. can be empty (null)
vat_number string VAT number. can be empty (null)
address string Street and house number. can be empty (null)
postal_code string Postal code. can be empty (null)
city string City. can be empty (null)
country string Country, as a two-letter ISO code (for example NL). can be empty (null)
language string Main language of the company. one of: nl, en, de, fr
currency string Always "EUR".
timezone string Time zone in which Klantly shows times to the company. The API always returns times in UTC.
default_vat_rate string Default VAT percentage, as a string with two decimals.
prices_include_vat boolean Whether prices are entered including VAT by default.