Get Resources
curl --request GET \
--url https://api.sonderplan.com/v2/resource \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/resource"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sonderplan.com/v2/resource', 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.sonderplan.com/v2/resource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sonderplan.com/v2/resource"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sonderplan.com/v2/resource")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/resource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 9458,
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"parent_id": 2908,
"order": 4,
"feed": "/feed/resource/0d17a654166d49a4337b65256...",
"icon": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"workspaces": [
{
"id": 9458,
"name": "Sydney Studio",
"description": "Sydney Office, Level 2"
}
],
"rates": [
{
"id": 9458,
"type_id": 9,
"hour_buy_cost": 62.2,
"hour_sell_cost": 100,
"day_buy_cost": 560,
"day_sell_cost": 1000,
"week_buy_cost": 1000,
"week_sell_cost": 3500,
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"currency": "AUD"
}
],
"color_background": "#B0A7F1",
"color_text": "#000000",
"created_id": 3,
"created": 1388552400,
"updated_id": 3,
"updated": 1388552400
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}Resource
Get Resources
In Sonderplan, resources refer to any item or entity that can be booked, such as rooms, people, equipment, or actions like recreation and sick leave.
For people resources, it’s recommended to link them to a corresponding contact record using the type_person_id attribute.
Resources can be organized into hierarchical groups using the parent_id attribute, which enables the visual nesting of similar resources for better organization.
Additionally, resources must be assigned to at least one schedule to appear in the resource selection menu in Sonderplan.
READ access to the ADMIN module is required to access this endpointGET
/
v2
/
resource
Get Resources
curl --request GET \
--url https://api.sonderplan.com/v2/resource \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/resource"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sonderplan.com/v2/resource', 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.sonderplan.com/v2/resource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sonderplan.com/v2/resource"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sonderplan.com/v2/resource")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/resource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 9458,
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"parent_id": 2908,
"order": 4,
"feed": "/feed/resource/0d17a654166d49a4337b65256...",
"icon": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"workspaces": [
{
"id": 9458,
"name": "Sydney Studio",
"description": "Sydney Office, Level 2"
}
],
"rates": [
{
"id": 9458,
"type_id": 9,
"hour_buy_cost": 62.2,
"hour_sell_cost": 100,
"day_buy_cost": 560,
"day_sell_cost": 1000,
"week_buy_cost": 1000,
"week_sell_cost": 3500,
"date_start": "2023-01-01",
"date_end": "2023-12-31",
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"currency": "AUD"
}
],
"color_background": "#B0A7F1",
"color_text": "#000000",
"created_id": 3,
"created": 1388552400,
"updated_id": 3,
"updated": 1388552400
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}