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": "<string>",
"name": "<string>",
"description": "<string>",
"email": "<string>",
"phone": "<string>",
"timezone": "<string>",
"online_appointment_booking": true,
"online_class_booking": true,
"tax_identifier": "<string>",
"tax_identifier_label": "<string>",
"ndis_number": "<string>",
"logo_id": "<string>",
"image_id": "<string>",
"service_ids": [
"<string>"
],
"practitioner_ids": [
"<string>"
],
"opening_hours": {
"mon_active": true,
"mon_opens_at": "<string>",
"mon_closes_at": "<string>",
"tue_active": true,
"tue_opens_at": "<string>",
"tue_closes_at": "<string>",
"wed_active": true,
"wed_opens_at": "<string>",
"wed_closes_at": "<string>",
"thu_active": true,
"thu_opens_at": "<string>",
"thu_closes_at": "<string>",
"fri_active": true,
"fri_opens_at": "<string>",
"fri_closes_at": "<string>",
"sat_active": true,
"sat_opens_at": "<string>",
"sat_closes_at": "<string>",
"sun_active": true,
"sun_opens_at": "<string>",
"sun_closes_at": "<string>"
},
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<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/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": "<string>",
"name": "<string>",
"description": "<string>",
"email": "<string>",
"phone": "<string>",
"timezone": "<string>",
"online_appointment_booking": true,
"online_class_booking": true,
"tax_identifier": "<string>",
"tax_identifier_label": "<string>",
"ndis_number": "<string>",
"logo_id": "<string>",
"image_id": "<string>",
"service_ids": [
"<string>"
],
"practitioner_ids": [
"<string>"
],
"opening_hours": {
"mon_active": true,
"mon_opens_at": "<string>",
"mon_closes_at": "<string>",
"tue_active": true,
"tue_opens_at": "<string>",
"tue_closes_at": "<string>",
"wed_active": true,
"wed_opens_at": "<string>",
"wed_closes_at": "<string>",
"thu_active": true,
"thu_opens_at": "<string>",
"thu_closes_at": "<string>",
"fri_active": true,
"fri_opens_at": "<string>",
"fri_closes_at": "<string>",
"sat_active": true,
"sat_opens_at": "<string>",
"sat_closes_at": "<string>",
"sun_active": true,
"sun_opens_at": "<string>",
"sun_closes_at": "<string>"
},
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"created_at": "<string>"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}