curl --request GET \
--url https://api.sonderplan.com/v2/booking \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/booking"
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/booking', 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/booking",
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/booking"
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/booking")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/booking")
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": 1,
"name": "Test Booking",
"start": 1547501100,
"end": 1547538900,
"start_date_time_iso": "2022-02-22T09:00:00+11:00",
"end_date_time_iso": "2022-02-22T17:00:00+11:00",
"duration_min": "480",
"all_day": "false",
"notes": "Additional note",
"repeat_master": "true",
"repeat_master_id": "0",
"repeat_rule": "FREQ=daily;INTERVAL=2;REPENDTYPE=date;UNTIL=20220228T130000;",
"resources": [
{
"id": 9458,
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"updated": 1388552400,
"parent_id": 99472,
"parent_name": "Edit Suites",
"icon": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"rates": [
{
"rate_scheme_id": 984312,
"rate_scheme_name": "Resource Rate",
"currency": "AUD",
"buy": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
},
"sell": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
}
}
],
"time_entries": [
{
"id": 9879871,
"name": "Colour Grading",
"description": "Opening scenes completed",
"start": 1547501100,
"end": 1547538900
}
]
}
],
"project": [
{
"id": 2342354,
"name": "Andor S1 EP7 Annoucement",
"code": "AND-S1-EP7",
"description": "Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization.",
"start": 1547501100,
"end": 1547538900,
"parent_id": 9348,
"status_id": 1
}
],
"client": [
{
"id": 4,
"uuid": "p4",
"name": "Jane Someone",
"type": "person",
"email": "[email protected]",
"contact_person": {
"id": 2837,
"name": "Fred Flintstone"
}
}
],
"status": [
{
"id": 2,
"name": "Second Hold",
"description": "Has second priority if the first hold cancels",
"notification": true
}
],
"billable_items": [
{
"name": "NAS Storage",
"id": 2342354,
"description": "Rented per TB, per month",
"cost": "25.23",
"buy_cost": "20",
"currency": "AUD",
"quantity": "4",
"total": "100.92",
"buy_total": "80",
"billable_item_id": 897832,
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"create_new": true
}
],
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"created_id": 3,
"created": 1388552400,
"created_name": "John Smith",
"updated_id": 3,
"updated": 1388552400,
"updated_name": "John Smith"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}Get Bookings
Bookings can be understood as time-based events (with start and end dates / times), which are typically represented on a calendar.
Bookings include details about the event’s timing, the resources being used, and additional information such as the client, associated project, rate details, and any custom attributes defined through custom fields.
READ access to the SCHEDULE module is required to access this endpointcurl --request GET \
--url https://api.sonderplan.com/v2/booking \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/booking"
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/booking', 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/booking",
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/booking"
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/booking")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/booking")
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": 1,
"name": "Test Booking",
"start": 1547501100,
"end": 1547538900,
"start_date_time_iso": "2022-02-22T09:00:00+11:00",
"end_date_time_iso": "2022-02-22T17:00:00+11:00",
"duration_min": "480",
"all_day": "false",
"notes": "Additional note",
"repeat_master": "true",
"repeat_master_id": "0",
"repeat_rule": "FREQ=daily;INTERVAL=2;REPENDTYPE=date;UNTIL=20220228T130000;",
"resources": [
{
"id": 9458,
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"updated": 1388552400,
"parent_id": 99472,
"parent_name": "Edit Suites",
"icon": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"rates": [
{
"rate_scheme_id": 984312,
"rate_scheme_name": "Resource Rate",
"currency": "AUD",
"buy": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
},
"sell": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
}
}
],
"time_entries": [
{
"id": 9879871,
"name": "Colour Grading",
"description": "Opening scenes completed",
"start": 1547501100,
"end": 1547538900
}
]
}
],
"project": [
{
"id": 2342354,
"name": "Andor S1 EP7 Annoucement",
"code": "AND-S1-EP7",
"description": "Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization.",
"start": 1547501100,
"end": 1547538900,
"parent_id": 9348,
"status_id": 1
}
],
"client": [
{
"id": 4,
"uuid": "p4",
"name": "Jane Someone",
"type": "person",
"email": "[email protected]",
"contact_person": {
"id": 2837,
"name": "Fred Flintstone"
}
}
],
"status": [
{
"id": 2,
"name": "Second Hold",
"description": "Has second priority if the first hold cancels",
"notification": true
}
],
"billable_items": [
{
"name": "NAS Storage",
"id": 2342354,
"description": "Rented per TB, per month",
"cost": "25.23",
"buy_cost": "20",
"currency": "AUD",
"quantity": "4",
"total": "100.92",
"buy_total": "80",
"billable_item_id": 897832,
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"create_new": true
}
],
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"created_id": 3,
"created": 1388552400,
"created_name": "John Smith",
"updated_id": 3,
"updated": 1388552400,
"updated_name": "John Smith"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
One or more (comma seperated) IDs of booking's to retrieve
Perform a full text search for the booking name
Specify one or more resource ids and return only the bookings that have these as resources
Specify one or more resource ids and return only the bookings that have these as resources
Specify one or more project ids and return only the bookings are booked to thes projects
Return any bookings starting after the given UNIX timestamp
Return any bookings starting before the given UNIX timestamp
The resources object will contain icon information for each resource
The resources object will contain rates data for each resource relatd to the current booking
The resources object will contain the name of the parent of the resource
When set to true, only return bookings that include all the specified resource_ids. If false (default), bookings will be returned if they include any of the specified resource_ids.
When set to true, time entries will be output within each of the the relevant booking resource objects
Return results that were added, edited or deleted since this UNIX timestamp
Comma seperated list of fields you wish to return
Specify the page of results you wish to return
The number of results returned per page. Default if not specified is 10
Specify the field (with type of string or integer) you wish to order (ascending) the response with
Specify the field (with type of string or integer) you wish to order (descending) the response with
Specify if multiple filters should be combined with OR or AND logic
OR, AND