API reference
Appointment types
The kinds of appointments the company has set up, with their duration and price.
Endpoints
List appointment types
GET
/api/v1/appointment-types
All appointment types of the company in screen order, including inactive ones (see is_active).
- Scope
-
appointments.read— Read appointments (with the customer's name, email and phone), appointment types and availability - Required feature
appointments
Example request
curl "https://app.klantly.com/api/v1/appointment-types" \
-H "Authorization: Bearer $KLANTLY_API_KEY"$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.klantly.com/api/v1/',
'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);
$response = $client->request('GET', 'appointment-types');
$data = json_decode((string) $response->getBody(), true)['data'];const response = await fetch('https://app.klantly.com/api/v1/appointment-types', {
headers: {
Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://app.klantly.com/api/v1/appointment-types",
headers={
"Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
},
)
data = response.json()["data"]Response 200
The response is a list with cursor pagination: data contains the objects, meta the pagination.
{
"data": [
{
"object": "appointment_type",
"id": "9d3f7ea4-5a9c-4b1f-8e6d-7c8a9bacbdc5",
"name": "Inmeten",
"names": {
"nl": "Inmeten",
"en": "Measuring",
"de": "Aufmaß",
"fr": "Prise de mesures"
},
"description": null,
"duration_minutes": 60,
"price": "49.50",
"color": "#3B82F6",
"is_active": true
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJpZCI6IjlkM2Y2YzFlIn0",
"prev_cursor": null
}
}Possible errors
-
403
insufficient_scope— This API key has no access to this action.
The object
All fields are always present; a field without a value is null.
| Field | Type | Description |
|---|---|---|
object |
string | Always "appointment_type". |
id |
string (uuid) | Unique id (UUID). |
name |
string | Name in the language of the request. |
names |
object | The name in all four languages. |
names.nl |
string | Dutch name. can be empty (null) |
names.en |
string | English name. can be empty (null) |
names.de |
string | German name. can be empty (null) |
names.fr |
string | French name. can be empty (null) |
description |
string | Description in the language of the request. can be empty (null) |
duration_minutes |
integer | Duration in minutes. can be empty (null) |
price |
string | Price as a string with two decimals, or null. can be empty (null) |
color |
string | Colour in the calendar (hex). can be empty (null) |
is_active |
boolean | Whether the type can still be chosen. |