curl --request PUT \
--url https://api.sonderplan.com/v2/resource \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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": [
{
"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"
}
'import requests
url = "https://api.sonderplan.com/v2/resource"
payload = {
"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": [
{
"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"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: [
{
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'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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' => [
[
'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'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sonderplan.com/v2/resource"
payload := strings.NewReader("{\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"order\": 4,\n \"feed\": \"/feed/resource/0d17a654166d49a4337b65256...\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ],\n \"workspaces\": [\n {\n \"id\": 9458,\n \"name\": \"Sydney Studio\",\n \"description\": \"Sydney Office, Level 2\"\n }\n ],\n \"rates\": [\n {\n \"id\": 9458,\n \"type_id\": 9,\n \"hour_buy_cost\": 62.2,\n \"hour_sell_cost\": 100,\n \"day_buy_cost\": 560,\n \"day_sell_cost\": 1000,\n \"week_buy_cost\": 1000,\n \"week_sell_cost\": 3500,\n \"date_start\": \"2023-01-01\",\n \"date_end\": \"2023-12-31\",\n \"taxes\": [\n {\n \"id\": 3247,\n \"name\": \"GST\",\n \"rate\": \"10.00\",\n \"total\": \"151.00\"\n }\n ],\n \"currency\": \"AUD\"\n }\n ],\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.sonderplan.com/v2/resource")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"order\": 4,\n \"feed\": \"/feed/resource/0d17a654166d49a4337b65256...\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ],\n \"workspaces\": [\n {\n \"id\": 9458,\n \"name\": \"Sydney Studio\",\n \"description\": \"Sydney Office, Level 2\"\n }\n ],\n \"rates\": [\n {\n \"id\": 9458,\n \"type_id\": 9,\n \"hour_buy_cost\": 62.2,\n \"hour_sell_cost\": 100,\n \"day_buy_cost\": 560,\n \"day_sell_cost\": 1000,\n \"week_buy_cost\": 1000,\n \"week_sell_cost\": 3500,\n \"date_start\": \"2023-01-01\",\n \"date_end\": \"2023-12-31\",\n \"taxes\": [\n {\n \"id\": 3247,\n \"name\": \"GST\",\n \"rate\": \"10.00\",\n \"total\": \"151.00\"\n }\n ],\n \"currency\": \"AUD\"\n }\n ],\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"order\": 4,\n \"feed\": \"/feed/resource/0d17a654166d49a4337b65256...\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ],\n \"workspaces\": [\n {\n \"id\": 9458,\n \"name\": \"Sydney Studio\",\n \"description\": \"Sydney Office, Level 2\"\n }\n ],\n \"rates\": [\n {\n \"id\": 9458,\n \"type_id\": 9,\n \"hour_buy_cost\": 62.2,\n \"hour_sell_cost\": 100,\n \"day_buy_cost\": 560,\n \"day_sell_cost\": 1000,\n \"week_buy_cost\": 1000,\n \"week_sell_cost\": 3500,\n \"date_start\": \"2023-01-01\",\n \"date_end\": \"2023-12-31\",\n \"taxes\": [\n {\n \"id\": 3247,\n \"name\": \"GST\",\n \"rate\": \"10.00\",\n \"total\": \"151.00\"\n }\n ],\n \"currency\": \"AUD\"\n }\n ],\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 1
}
}{
"error": {
"code": "404",
"message": "Requested resource was not found"
}
}Update Resource
WRITE access to the ADMIN module is required to access this endpointresourceEdited webhook will be fired when this endpoint has run successfullycurl --request PUT \
--url https://api.sonderplan.com/v2/resource \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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": [
{
"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"
}
'import requests
url = "https://api.sonderplan.com/v2/resource"
payload = {
"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": [
{
"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"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: [
{
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'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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' => [
[
'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'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sonderplan.com/v2/resource"
payload := strings.NewReader("{\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"order\": 4,\n \"feed\": \"/feed/resource/0d17a654166d49a4337b65256...\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ],\n \"workspaces\": [\n {\n \"id\": 9458,\n \"name\": \"Sydney Studio\",\n \"description\": \"Sydney Office, Level 2\"\n }\n ],\n \"rates\": [\n {\n \"id\": 9458,\n \"type_id\": 9,\n \"hour_buy_cost\": 62.2,\n \"hour_sell_cost\": 100,\n \"day_buy_cost\": 560,\n \"day_sell_cost\": 1000,\n \"week_buy_cost\": 1000,\n \"week_sell_cost\": 3500,\n \"date_start\": \"2023-01-01\",\n \"date_end\": \"2023-12-31\",\n \"taxes\": [\n {\n \"id\": 3247,\n \"name\": \"GST\",\n \"rate\": \"10.00\",\n \"total\": \"151.00\"\n }\n ],\n \"currency\": \"AUD\"\n }\n ],\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.sonderplan.com/v2/resource")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"order\": 4,\n \"feed\": \"/feed/resource/0d17a654166d49a4337b65256...\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ],\n \"workspaces\": [\n {\n \"id\": 9458,\n \"name\": \"Sydney Studio\",\n \"description\": \"Sydney Office, Level 2\"\n }\n ],\n \"rates\": [\n {\n \"id\": 9458,\n \"type_id\": 9,\n \"hour_buy_cost\": 62.2,\n \"hour_sell_cost\": 100,\n \"day_buy_cost\": 560,\n \"day_sell_cost\": 1000,\n \"week_buy_cost\": 1000,\n \"week_sell_cost\": 3500,\n \"date_start\": \"2023-01-01\",\n \"date_end\": \"2023-12-31\",\n \"taxes\": [\n {\n \"id\": 3247,\n \"name\": \"GST\",\n \"rate\": \"10.00\",\n \"total\": \"151.00\"\n }\n ],\n \"currency\": \"AUD\"\n }\n ],\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"order\": 4,\n \"feed\": \"/feed/resource/0d17a654166d49a4337b65256...\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ],\n \"workspaces\": [\n {\n \"id\": 9458,\n \"name\": \"Sydney Studio\",\n \"description\": \"Sydney Office, Level 2\"\n }\n ],\n \"rates\": [\n {\n \"id\": 9458,\n \"type_id\": 9,\n \"hour_buy_cost\": 62.2,\n \"hour_sell_cost\": 100,\n \"day_buy_cost\": 560,\n \"day_sell_cost\": 1000,\n \"week_buy_cost\": 1000,\n \"week_sell_cost\": 3500,\n \"date_start\": \"2023-01-01\",\n \"date_end\": \"2023-12-31\",\n \"taxes\": [\n {\n \"id\": 3247,\n \"name\": \"GST\",\n \"rate\": \"10.00\",\n \"total\": \"151.00\"\n }\n ],\n \"currency\": \"AUD\"\n }\n ],\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 1
}
}{
"error": {
"code": "404",
"message": "Requested resource was not found"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The ID of the resource to update
Body
Resource object that needs to be updated
Resource model
Name of the resource
"Edit Suite 1"
Additional info about the resource
"Sydney Office, Level 2"
1 = Room, 2 = Person, 3 = Equipment, 4 = Resource Group, 5 = Action
1, 2, 3, 4, 5 1
Unique id of the person (only applies if this resource is a person)
0
Unique id of the resource group that this resource is a child of
2908
Order of the resource in relation to other resources in the same group
4
iCalendar calendar feed URL. Contains all bookings that are booked to this resource
"/feed/resource/0d17a654166d49a4337b65256..."
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Optional. Specify in the field parameter to return
Show child attributes
Show child attributes
Hex color value of the background
"#B0A7F1"
Hex color value of the text
"#000000"
Response
Successful Operation
Show child attributes
Show child attributes