Sitz des Mandanten erfassen oder zurück zum Standard
curl --request PUT \
--url https://ki.muster.example/api/v1/mandanten/{id}/location \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"sites": [
{
"name": "<string>"
}
]
}
'import requests
url = "https://ki.muster.example/api/v1/mandanten/{id}/location"
payload = {
"country": "<string>",
"sites": [{ "name": "<string>" }]
}
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({country: '<string>', sites: [{name: '<string>'}]})
};
fetch('https://ki.muster.example/api/v1/mandanten/{id}/location', 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://ki.muster.example/api/v1/mandanten/{id}/location",
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([
'country' => '<string>',
'sites' => [
[
'name' => '<string>'
]
]
]),
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://ki.muster.example/api/v1/mandanten/{id}/location"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"sites\": [\n {\n \"name\": \"<string>\"\n }\n ]\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://ki.muster.example/api/v1/mandanten/{id}/location")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"<string>\",\n \"sites\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ki.muster.example/api/v1/mandanten/{id}/location")
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 \"country\": \"<string>\",\n \"sites\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}Sitz des Mandanten erfassen oder zurück zum Standard
Sitz des Mandanten erfassen oder zurück zum Standard.
Im Chat mit «Mono Admin»: .
PUT
/
mandanten
/
{id}
/
location
Sitz des Mandanten erfassen oder zurück zum Standard
curl --request PUT \
--url https://ki.muster.example/api/v1/mandanten/{id}/location \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"sites": [
{
"name": "<string>"
}
]
}
'import requests
url = "https://ki.muster.example/api/v1/mandanten/{id}/location"
payload = {
"country": "<string>",
"sites": [{ "name": "<string>" }]
}
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({country: '<string>', sites: [{name: '<string>'}]})
};
fetch('https://ki.muster.example/api/v1/mandanten/{id}/location', 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://ki.muster.example/api/v1/mandanten/{id}/location",
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([
'country' => '<string>',
'sites' => [
[
'name' => '<string>'
]
]
]),
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://ki.muster.example/api/v1/mandanten/{id}/location"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"sites\": [\n {\n \"name\": \"<string>\"\n }\n ]\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://ki.muster.example/api/v1/mandanten/{id}/location")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"<string>\",\n \"sites\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ki.muster.example/api/v1/mandanten/{id}/location")
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 \"country\": \"<string>\",\n \"sites\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}Autorisierungen
Body
application/json
- Option 1
- Option 2
Verfügbare Optionen:
CH-AG, CH-AI, CH-AR, CH-BE, CH-BL, CH-BS, CH-FR, CH-GE, CH-GL, CH-GR, CH-JU, CH-LU, CH-NE, CH-NW, CH-OW, CH-SG, CH-SH, CH-SO, CH-SZ, CH-TG, CH-TI, CH-UR, CH-VD, CH-VS, CH-ZG, CH-ZH, DE-BW, DE-BY, DE-BE, DE-BB, DE-HB, DE-HH, DE-HE, DE-MV, DE-NI, DE-NW, DE-RP, DE-SL, DE-SN, DE-ST, DE-SH, DE-TH, AT-1, AT-2, AT-3, AT-4, AT-5, AT-6, AT-7, AT-8, AT-9, IT-21, IT-23, IT-25, IT-BZ, IT-TN, IT-34, IT-36, IT-42, IT-45, IT-52, IT-55, IT-57, IT-62, IT-65, IT-67, IT-72, IT-75, IT-77, IT-78, IT-82, IT-88 Antwort
Erfolgreich. Die Form der Antwort beschreibt diese Referenz noch nicht.