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": "<string>",
"location_id": "<string>",
"practitioner_id": "<string>",
"service_id": "<string>",
"service_price": 123,
"price": 123,
"price_per_client": true,
"travel": true,
"travel_name": "<string>",
"travel_price": 123,
"travel_before_duration": 123,
"travel_after_duration": 123,
"travel_address": "<string>",
"travel_expenses": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"price_unit": "km",
"quantity": "<string>"
}
],
"transports": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"price_unit": "km",
"quantity": "<string>"
}
],
"appointment_clients": [
{
"id": "<string>",
"appointment_id": "<string>",
"client_id": "<string>",
"case_id": "<string>",
"client_package_id": "<string>",
"status": "arrived",
"do_not_invoice": true,
"note": "<string>",
"confirmed": true,
"confirmed_at": "<string>",
"cancellation_reason_id": "<string>",
"cancellation_note": "<string>",
"cancelled_at": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"starts_at": "<string>",
"ends_at": "<string>",
"duration": 123,
"room_id": "<string>",
"vehicle_id": "<string>",
"resource_ids": [
"<string>"
],
"note": "<string>",
"cancellation_reason_id": "<string>",
"cancellation_note": "<string>",
"cancelled_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}⌘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": "<string>",
"location_id": "<string>",
"practitioner_id": "<string>",
"service_id": "<string>",
"service_price": 123,
"price": 123,
"price_per_client": true,
"travel": true,
"travel_name": "<string>",
"travel_price": 123,
"travel_before_duration": 123,
"travel_after_duration": 123,
"travel_address": "<string>",
"travel_expenses": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"price_unit": "km",
"quantity": "<string>"
}
],
"transports": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"price_unit": "km",
"quantity": "<string>"
}
],
"appointment_clients": [
{
"id": "<string>",
"appointment_id": "<string>",
"client_id": "<string>",
"case_id": "<string>",
"client_package_id": "<string>",
"status": "arrived",
"do_not_invoice": true,
"note": "<string>",
"confirmed": true,
"confirmed_at": "<string>",
"cancellation_reason_id": "<string>",
"cancellation_note": "<string>",
"cancelled_at": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"starts_at": "<string>",
"ends_at": "<string>",
"duration": 123,
"room_id": "<string>",
"vehicle_id": "<string>",
"resource_ids": [
"<string>"
],
"note": "<string>",
"cancellation_reason_id": "<string>",
"cancellation_note": "<string>",
"cancelled_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}