Update Status
curl --request PUT \
--url https://api.sonderplan.com/v2/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Confirmed",
"description": "The confirmed status",
"type_id": 1,
"notification": true,
"order": 3,
"color_background": "#B0A7F1",
"color_text": "#000000"
}
'import requests
url = "https://api.sonderplan.com/v2/status"
payload = {
"name": "Confirmed",
"description": "The confirmed status",
"type_id": 1,
"notification": True,
"order": 3,
"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: 'Confirmed',
description: 'The confirmed status',
type_id: 1,
notification: true,
order: 3,
color_background: '#B0A7F1',
color_text: '#000000'
})
};
fetch('https://api.sonderplan.com/v2/status', 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/status",
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' => 'Confirmed',
'description' => 'The confirmed status',
'type_id' => 1,
'notification' => true,
'order' => 3,
'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/status"
payload := strings.NewReader("{\n \"name\": \"Confirmed\",\n \"description\": \"The confirmed status\",\n \"type_id\": 1,\n \"notification\": true,\n \"order\": 3,\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/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Confirmed\",\n \"description\": \"The confirmed status\",\n \"type_id\": 1,\n \"notification\": true,\n \"order\": 3,\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/status")
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\": \"Confirmed\",\n \"description\": \"The confirmed status\",\n \"type_id\": 1,\n \"notification\": true,\n \"order\": 3,\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 2384
}
}{
"error": {
"code": 400,
"message": "name is required... Name of the Status"
}
}Status
Update Status
WRITE access to the ADMIN module is required to access this endpointPUT
/
v2
/
status
Update Status
curl --request PUT \
--url https://api.sonderplan.com/v2/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Confirmed",
"description": "The confirmed status",
"type_id": 1,
"notification": true,
"order": 3,
"color_background": "#B0A7F1",
"color_text": "#000000"
}
'import requests
url = "https://api.sonderplan.com/v2/status"
payload = {
"name": "Confirmed",
"description": "The confirmed status",
"type_id": 1,
"notification": True,
"order": 3,
"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: 'Confirmed',
description: 'The confirmed status',
type_id: 1,
notification: true,
order: 3,
color_background: '#B0A7F1',
color_text: '#000000'
})
};
fetch('https://api.sonderplan.com/v2/status', 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/status",
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' => 'Confirmed',
'description' => 'The confirmed status',
'type_id' => 1,
'notification' => true,
'order' => 3,
'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/status"
payload := strings.NewReader("{\n \"name\": \"Confirmed\",\n \"description\": \"The confirmed status\",\n \"type_id\": 1,\n \"notification\": true,\n \"order\": 3,\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/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Confirmed\",\n \"description\": \"The confirmed status\",\n \"type_id\": 1,\n \"notification\": true,\n \"order\": 3,\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/status")
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\": \"Confirmed\",\n \"description\": \"The confirmed status\",\n \"type_id\": 1,\n \"notification\": true,\n \"order\": 3,\n \"color_background\": \"#B0A7F1\",\n \"color_text\": \"#000000\"\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 2384
}
}{
"error": {
"code": 400,
"message": "name is required... Name of the Status"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The ID of the status you wish to update
Body
application/json
Status model
The status name
Example:
"Confirmed"
Description of what the status represents
Example:
"The confirmed status"
Status type: 1 = Booking, 2 = Project (Future Use)
Example:
1
Are booking notifications triggered when this status is selected
Example:
true
Specify the order of the status with an integer in ascending order
Example:
3
A hex color value of the background of this project
Example:
"#B0A7F1"
A hex color value of the text of this project
Example:
"#000000"
Response
Successful Operation
Show child attributes
Show child attributes
⌘I