Update settings key
curl --request PATCH \
--url https://coreapi.io/settings/{context} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/merge-patch+json' \
--data '
{
"settings": [
{
"key": "hideZeroSetupFee",
"value": false
}
]
}
'import requests
url = "https://coreapi.io/settings/{context}"
payload = { "settings": [
{
"key": "hideZeroSetupFee",
"value": False
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({settings: [{key: 'hideZeroSetupFee', value: false}]})
};
fetch('https://coreapi.io/settings/{context}', 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://coreapi.io/settings/{context}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
[
'key' => 'hideZeroSetupFee',
'value' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/merge-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"settings": {
"key": "value"
},
"inheritance": {
"key": "defaultValue|tenant|customer"
}
}Settings
Update settings key
Update given setting key of the context.
Required permissions:settings:writePATCH
/
settings
/
{context}
Update settings key
curl --request PATCH \
--url https://coreapi.io/settings/{context} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/merge-patch+json' \
--data '
{
"settings": [
{
"key": "hideZeroSetupFee",
"value": false
}
]
}
'import requests
url = "https://coreapi.io/settings/{context}"
payload = { "settings": [
{
"key": "hideZeroSetupFee",
"value": False
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({settings: [{key: 'hideZeroSetupFee', value: false}]})
};
fetch('https://coreapi.io/settings/{context}', 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://coreapi.io/settings/{context}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
[
'key' => 'hideZeroSetupFee',
'value' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/merge-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"settings": {
"key": "value"
},
"inheritance": {
"key": "defaultValue|tenant|customer"
}
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
Setting identifier
Body
application/merge-patch+jsonapplication/vnd.api+json
The updated Setting resource
The settings to update.
Minimum array length:
1Show child attributes
Show child attributes
War diese Seite hilfreich?
⌘I