Appointments
List all appointments
GET
/
appointments
cURL
curl --request GET \
--url https://api.caspen.com/v1/appointmentsimport requests
url = "https://api.caspen.com/v1/appointments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/appointments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.caspen.com/v1/appointments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.caspen.com/v1/appointments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.caspen.com/v1/appointments")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "app_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"location_id": "loc_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"practitioner_id": "pra_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"service_id": "ser_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"service_price": 12000,
"price": 24000,
"price_unit": "hourly",
"price_per_client": false,
"travel": true,
"travel_name": "Travel",
"travel_price": 5000,
"travel_before_duration": 15,
"travel_after_duration": 15,
"travel_address": "123 Sample Street, Sydney NSW 2000, Australia",
"travel_expenses": [
{
"id": "ate_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"name": "Mileage",
"price": 85,
"price_unit": "km",
"quantity": "42.50"
}
],
"transports": [
{
"id": "atr_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"name": "Client transport",
"price": 85,
"price_unit": "km",
"quantity": "12.00"
}
],
"appointment_clients": [
{
"id": "apc_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"appointment_id": "apt_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"client_id": "cli_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"case_id": "cas_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"client_package_id": "cpk_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"status": "arrived",
"do_not_invoice": false,
"note": "Client requested extra time",
"confirmed": true,
"confirmed_at": "2024-01-01T12:00:00Z",
"cancellation_reason_id": "cnr_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"cancellation_note": "Client called to cancel",
"cancelled_at": "2024-01-01T12:00:00Z",
"starts_at": "2024-01-01T09:00:00Z",
"ends_at": "2024-01-01T10:00:00Z",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-01T12:00:00Z"
}
],
"starts_at": "2024-01-01T10:00:00Z",
"ends_at": "2024-01-01T11:00:00Z",
"duration": 60,
"status": "pending",
"room_id": "rom_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"vehicle_id": "veh_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"resource_ids": [
"res_01HYHYQHA682J0K1RW7B2HVA9F",
"res_01HYHYW37MTYJPMT5JV4RN99GK"
],
"note": "Client requested morning appointment.",
"cancellation_reason_id": "cnr_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"cancellation_note": "Client had to travel unexpectedly.",
"cancelled_at": "2024-01-01T08:00:00Z",
"archived_at": "2024-01-01T08:00:00Z",
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Query Parameters
Available options:
pending, arrived, missed, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
1 <= x <= 100⌘I
cURL
curl --request GET \
--url https://api.caspen.com/v1/appointmentsimport requests
url = "https://api.caspen.com/v1/appointments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/appointments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.caspen.com/v1/appointments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.caspen.com/v1/appointments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.caspen.com/v1/appointments")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "app_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"location_id": "loc_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"practitioner_id": "pra_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"service_id": "ser_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"service_price": 12000,
"price": 24000,
"price_unit": "hourly",
"price_per_client": false,
"travel": true,
"travel_name": "Travel",
"travel_price": 5000,
"travel_before_duration": 15,
"travel_after_duration": 15,
"travel_address": "123 Sample Street, Sydney NSW 2000, Australia",
"travel_expenses": [
{
"id": "ate_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"name": "Mileage",
"price": 85,
"price_unit": "km",
"quantity": "42.50"
}
],
"transports": [
{
"id": "atr_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"name": "Client transport",
"price": 85,
"price_unit": "km",
"quantity": "12.00"
}
],
"appointment_clients": [
{
"id": "apc_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"appointment_id": "apt_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"client_id": "cli_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"case_id": "cas_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"client_package_id": "cpk_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"status": "arrived",
"do_not_invoice": false,
"note": "Client requested extra time",
"confirmed": true,
"confirmed_at": "2024-01-01T12:00:00Z",
"cancellation_reason_id": "cnr_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"cancellation_note": "Client called to cancel",
"cancelled_at": "2024-01-01T12:00:00Z",
"starts_at": "2024-01-01T09:00:00Z",
"ends_at": "2024-01-01T10:00:00Z",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-01T12:00:00Z"
}
],
"starts_at": "2024-01-01T10:00:00Z",
"ends_at": "2024-01-01T11:00:00Z",
"duration": 60,
"status": "pending",
"room_id": "rom_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"vehicle_id": "veh_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"resource_ids": [
"res_01HYHYQHA682J0K1RW7B2HVA9F",
"res_01HYHYW37MTYJPMT5JV4RN99GK"
],
"note": "Client requested morning appointment.",
"cancellation_reason_id": "cnr_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"cancellation_note": "Client had to travel unexpectedly.",
"cancelled_at": "2024-01-01T08:00:00Z",
"archived_at": "2024-01-01T08:00:00Z",
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}