Locations
List all locations
GET
/
locations
cURL
curl --request GET \
--url https://api.caspen.com/v1/locationsimport requests
url = "https://api.caspen.com/v1/locations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/locations', 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/locations",
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/locations"
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/locations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/locations")
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": "loc_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"name": "Main Clinic",
"description": "Our primary healthcare facility offering comprehensive services.",
"email": "reception@mainclinic.com",
"phone": "+61400123456",
"timezone": "Australia/Sydney",
"online_appointment_booking": true,
"online_class_booking": true,
"tax_identifier": "12 345 678 901",
"tax_identifier_label": "ABN",
"ndis_number": "4050123456",
"logo_id": "med_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"image_id": "med_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"service_ids": [
"ser_01HYHYQHA682J0K1RW7B2HVA9F",
"ser_01HYHYW37MTYJPMT5JV4RN99GK"
],
"practitioner_ids": [
"pra_01HYHYQHA682J0K1RW7B2HVA9F",
"pra_01HYHYW37MTYJPMT5JV4RN99GK"
],
"opening_hours": {
"mon_active": true,
"mon_opens_at": "09:00",
"mon_closes_at": "17:00",
"tue_active": true,
"tue_opens_at": "09:00",
"tue_closes_at": "17:00"
},
"address": {
"line1": "123 Health Street",
"line2": "Level 2",
"city": "Sydney",
"state": "NSW",
"postal_code": "2000",
"country_code": "AU"
},
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}⌘I
cURL
curl --request GET \
--url https://api.caspen.com/v1/locationsimport requests
url = "https://api.caspen.com/v1/locations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/locations', 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/locations",
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/locations"
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/locations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/locations")
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": "loc_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"name": "Main Clinic",
"description": "Our primary healthcare facility offering comprehensive services.",
"email": "reception@mainclinic.com",
"phone": "+61400123456",
"timezone": "Australia/Sydney",
"online_appointment_booking": true,
"online_class_booking": true,
"tax_identifier": "12 345 678 901",
"tax_identifier_label": "ABN",
"ndis_number": "4050123456",
"logo_id": "med_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"image_id": "med_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"service_ids": [
"ser_01HYHYQHA682J0K1RW7B2HVA9F",
"ser_01HYHYW37MTYJPMT5JV4RN99GK"
],
"practitioner_ids": [
"pra_01HYHYQHA682J0K1RW7B2HVA9F",
"pra_01HYHYW37MTYJPMT5JV4RN99GK"
],
"opening_hours": {
"mon_active": true,
"mon_opens_at": "09:00",
"mon_closes_at": "17:00",
"tue_active": true,
"tue_opens_at": "09:00",
"tue_closes_at": "17:00"
},
"address": {
"line1": "123 Health Street",
"line2": "Level 2",
"city": "Sydney",
"state": "NSW",
"postal_code": "2000",
"country_code": "AU"
},
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}