Organization Configuration
Post Settings
Save the settings. The organization’s fields cannot be written here: a document that carries one is a 422.
POST
/
api
/
partners
/
v2.0
/
org
/
{org_id}
/
settings
Post Settings
curl --request POST \
--url https://api.example.com/api/partners/v2.0/org/{org_id}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": "<string>",
"settings": {
"app_config": {
"showHemsFeatureEv": true,
"showHemsFeatureEvCharger": true,
"showHpOptimizationLevel": true,
"showSavings": true,
"allowSteeringToggleHp": true,
"allowSteeringToggleEv": true,
"allowSteeringToggleInv": true,
"showSolarTab": true,
"showChargingTab": true,
"showClimateTab": true,
"showExplainers": true,
"showExplainersHp": true,
"showExplainersInv": true,
"requireExternalUserId": false
},
"feature_flags": {
"useAddressForm": true,
"useNewTheme": true
},
"allow_notifications": true,
"allow_grid_discharge": true,
"learning_phase_enabled": true,
"learning_phase_days": 15,
"learning_phase_probing_hours": 2,
"reauthorization_link_timeout_days": 1073741824,
"price_zone": "<string>",
"is_smart_optimization_active_default": true,
"excluded_device_brand_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_device_type_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"blocked_ev_brand_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://api.example.com/api/partners/v2.0/org/{org_id}/settings"
payload = {
"revision": "<string>",
"settings": {
"app_config": {
"showHemsFeatureEv": True,
"showHemsFeatureEvCharger": True,
"showHpOptimizationLevel": True,
"showSavings": True,
"allowSteeringToggleHp": True,
"allowSteeringToggleEv": True,
"allowSteeringToggleInv": True,
"showSolarTab": True,
"showChargingTab": True,
"showClimateTab": True,
"showExplainers": True,
"showExplainersHp": True,
"showExplainersInv": True,
"requireExternalUserId": False
},
"feature_flags": {
"useAddressForm": True,
"useNewTheme": True
},
"allow_notifications": True,
"allow_grid_discharge": True,
"learning_phase_enabled": True,
"learning_phase_days": 15,
"learning_phase_probing_hours": 2,
"reauthorization_link_timeout_days": 1073741824,
"price_zone": "<string>",
"is_smart_optimization_active_default": True,
"excluded_device_brand_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_device_type_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"blocked_ev_brand_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
revision: '<string>',
settings: {
app_config: {
showHemsFeatureEv: true,
showHemsFeatureEvCharger: true,
showHpOptimizationLevel: true,
showSavings: true,
allowSteeringToggleHp: true,
allowSteeringToggleEv: true,
allowSteeringToggleInv: true,
showSolarTab: true,
showChargingTab: true,
showClimateTab: true,
showExplainers: true,
showExplainersHp: true,
showExplainersInv: true,
requireExternalUserId: false
},
feature_flags: {useAddressForm: true, useNewTheme: true},
allow_notifications: true,
allow_grid_discharge: true,
learning_phase_enabled: true,
learning_phase_days: 15,
learning_phase_probing_hours: 2,
reauthorization_link_timeout_days: 1073741824,
price_zone: '<string>',
is_smart_optimization_active_default: true,
excluded_device_brand_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_device_type_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
blocked_ev_brand_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://api.example.com/api/partners/v2.0/org/{org_id}/settings', 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.example.com/api/partners/v2.0/org/{org_id}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'revision' => '<string>',
'settings' => [
'app_config' => [
'showHemsFeatureEv' => true,
'showHemsFeatureEvCharger' => true,
'showHpOptimizationLevel' => true,
'showSavings' => true,
'allowSteeringToggleHp' => true,
'allowSteeringToggleEv' => true,
'allowSteeringToggleInv' => true,
'showSolarTab' => true,
'showChargingTab' => true,
'showClimateTab' => true,
'showExplainers' => true,
'showExplainersHp' => true,
'showExplainersInv' => true,
'requireExternalUserId' => false
],
'feature_flags' => [
'useAddressForm' => true,
'useNewTheme' => true
],
'allow_notifications' => true,
'allow_grid_discharge' => true,
'learning_phase_enabled' => true,
'learning_phase_days' => 15,
'learning_phase_probing_hours' => 2,
'reauthorization_link_timeout_days' => 1073741824,
'price_zone' => '<string>',
'is_smart_optimization_active_default' => true,
'excluded_device_brand_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'excluded_device_type_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'blocked_ev_brand_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.example.com/api/partners/v2.0/org/{org_id}/settings"
payload := strings.NewReader("{\n \"revision\": \"<string>\",\n \"settings\": {\n \"app_config\": {\n \"showHemsFeatureEv\": true,\n \"showHemsFeatureEvCharger\": true,\n \"showHpOptimizationLevel\": true,\n \"showSavings\": true,\n \"allowSteeringToggleHp\": true,\n \"allowSteeringToggleEv\": true,\n \"allowSteeringToggleInv\": true,\n \"showSolarTab\": true,\n \"showChargingTab\": true,\n \"showClimateTab\": true,\n \"showExplainers\": true,\n \"showExplainersHp\": true,\n \"showExplainersInv\": true,\n \"requireExternalUserId\": false\n },\n \"feature_flags\": {\n \"useAddressForm\": true,\n \"useNewTheme\": true\n },\n \"allow_notifications\": true,\n \"allow_grid_discharge\": true,\n \"learning_phase_enabled\": true,\n \"learning_phase_days\": 15,\n \"learning_phase_probing_hours\": 2,\n \"reauthorization_link_timeout_days\": 1073741824,\n \"price_zone\": \"<string>\",\n \"is_smart_optimization_active_default\": true,\n \"excluded_device_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"excluded_device_type_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"blocked_ev_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/partners/v2.0/org/{org_id}/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": \"<string>\",\n \"settings\": {\n \"app_config\": {\n \"showHemsFeatureEv\": true,\n \"showHemsFeatureEvCharger\": true,\n \"showHpOptimizationLevel\": true,\n \"showSavings\": true,\n \"allowSteeringToggleHp\": true,\n \"allowSteeringToggleEv\": true,\n \"allowSteeringToggleInv\": true,\n \"showSolarTab\": true,\n \"showChargingTab\": true,\n \"showClimateTab\": true,\n \"showExplainers\": true,\n \"showExplainersHp\": true,\n \"showExplainersInv\": true,\n \"requireExternalUserId\": false\n },\n \"feature_flags\": {\n \"useAddressForm\": true,\n \"useNewTheme\": true\n },\n \"allow_notifications\": true,\n \"allow_grid_discharge\": true,\n \"learning_phase_enabled\": true,\n \"learning_phase_days\": 15,\n \"learning_phase_probing_hours\": 2,\n \"reauthorization_link_timeout_days\": 1073741824,\n \"price_zone\": \"<string>\",\n \"is_smart_optimization_active_default\": true,\n \"excluded_device_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"excluded_device_type_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"blocked_ev_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/partners/v2.0/org/{org_id}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"revision\": \"<string>\",\n \"settings\": {\n \"app_config\": {\n \"showHemsFeatureEv\": true,\n \"showHemsFeatureEvCharger\": true,\n \"showHpOptimizationLevel\": true,\n \"showSavings\": true,\n \"allowSteeringToggleHp\": true,\n \"allowSteeringToggleEv\": true,\n \"allowSteeringToggleInv\": true,\n \"showSolarTab\": true,\n \"showChargingTab\": true,\n \"showClimateTab\": true,\n \"showExplainers\": true,\n \"showExplainersHp\": true,\n \"showExplainersInv\": true,\n \"requireExternalUserId\": false\n },\n \"feature_flags\": {\n \"useAddressForm\": true,\n \"useNewTheme\": true\n },\n \"allow_notifications\": true,\n \"allow_grid_discharge\": true,\n \"learning_phase_enabled\": true,\n \"learning_phase_days\": 15,\n \"learning_phase_probing_hours\": 2,\n \"reauthorization_link_timeout_days\": 1073741824,\n \"price_zone\": \"<string>\",\n \"is_smart_optimization_active_default\": true,\n \"excluded_device_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"excluded_device_type_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"blocked_ev_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"revision": "<string>",
"settings": {
"app_config": {
"showHemsFeatureEv": true,
"showHemsFeatureEvCharger": true,
"showHpOptimizationLevel": true,
"showSavings": true,
"allowSteeringToggleHp": true,
"allowSteeringToggleEv": true,
"allowSteeringToggleInv": true,
"showSolarTab": true,
"showChargingTab": true,
"showClimateTab": true,
"showExplainers": true,
"showExplainersHp": true,
"showExplainersInv": true,
"requireExternalUserId": false
},
"feature_flags": {
"useAddressForm": true,
"useNewTheme": true
},
"allow_notifications": true,
"allow_grid_discharge": true,
"learning_phase_enabled": true,
"learning_phase_days": 123,
"learning_phase_probing_hours": 123,
"reauthorization_link_timeout_days": 123,
"price_zone": "<string>",
"is_smart_optimization_active_default": true,
"payout_scheme": "<string>",
"excluded_device_brand_ids": [
"<string>"
],
"excluded_device_type_ids": [
"<string>"
],
"blocked_ev_brand_ids": [
"<string>"
]
},
"readonly": {
"id": "<string>",
"organization_id": "<string>",
"organization_name": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organization": {
"name": "<string>",
"description": "<string>",
"contact": "<string>",
"default_currency": "<string>",
"country": "<string>",
"trading_enabled": true,
"optimization_basis": "<string>",
"audit_log_enabled": true
}
},
"permissions": {
"can_edit": true
},
"options": {
"device_brands": [
{
"key": "<string>",
"label": "<string>",
"category": "<string>",
"ids": [
"<string>"
],
"availability": "<string>"
}
],
"device_types": [
{
"key": "<string>",
"label": "<string>",
"category": "<string>",
"ids": [
"<string>"
],
"availability": "<string>"
}
],
"ev_brands": [
{
"id": "<string>",
"label": "<string>"
}
],
"organization": {
"countries": [
{
"id": "<string>",
"label": "<string>"
}
],
"currencies": [
{
"id": "<string>",
"label": "<string>"
}
],
"optimization_bases": [
{
"id": "<string>",
"label": "<string>"
}
],
"price_zones": [
{
"id": "<string>",
"label": "<string>"
}
]
},
"price_zones": [
{
"id": "<string>",
"label": "<string>"
}
],
"app_settings": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"active": true
}
]
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
FlowClient Credentials
- Token URL
- /oauth2/token/
FlowPassword
- Token URL
- /api/partners/v2.0/auth/token
Path Parameters
Body
application/json
Response
200 - application/json
OK
Was this page helpful?
⌘I
Post Settings
curl --request POST \
--url https://api.example.com/api/partners/v2.0/org/{org_id}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": "<string>",
"settings": {
"app_config": {
"showHemsFeatureEv": true,
"showHemsFeatureEvCharger": true,
"showHpOptimizationLevel": true,
"showSavings": true,
"allowSteeringToggleHp": true,
"allowSteeringToggleEv": true,
"allowSteeringToggleInv": true,
"showSolarTab": true,
"showChargingTab": true,
"showClimateTab": true,
"showExplainers": true,
"showExplainersHp": true,
"showExplainersInv": true,
"requireExternalUserId": false
},
"feature_flags": {
"useAddressForm": true,
"useNewTheme": true
},
"allow_notifications": true,
"allow_grid_discharge": true,
"learning_phase_enabled": true,
"learning_phase_days": 15,
"learning_phase_probing_hours": 2,
"reauthorization_link_timeout_days": 1073741824,
"price_zone": "<string>",
"is_smart_optimization_active_default": true,
"excluded_device_brand_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_device_type_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"blocked_ev_brand_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://api.example.com/api/partners/v2.0/org/{org_id}/settings"
payload = {
"revision": "<string>",
"settings": {
"app_config": {
"showHemsFeatureEv": True,
"showHemsFeatureEvCharger": True,
"showHpOptimizationLevel": True,
"showSavings": True,
"allowSteeringToggleHp": True,
"allowSteeringToggleEv": True,
"allowSteeringToggleInv": True,
"showSolarTab": True,
"showChargingTab": True,
"showClimateTab": True,
"showExplainers": True,
"showExplainersHp": True,
"showExplainersInv": True,
"requireExternalUserId": False
},
"feature_flags": {
"useAddressForm": True,
"useNewTheme": True
},
"allow_notifications": True,
"allow_grid_discharge": True,
"learning_phase_enabled": True,
"learning_phase_days": 15,
"learning_phase_probing_hours": 2,
"reauthorization_link_timeout_days": 1073741824,
"price_zone": "<string>",
"is_smart_optimization_active_default": True,
"excluded_device_brand_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_device_type_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"blocked_ev_brand_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
revision: '<string>',
settings: {
app_config: {
showHemsFeatureEv: true,
showHemsFeatureEvCharger: true,
showHpOptimizationLevel: true,
showSavings: true,
allowSteeringToggleHp: true,
allowSteeringToggleEv: true,
allowSteeringToggleInv: true,
showSolarTab: true,
showChargingTab: true,
showClimateTab: true,
showExplainers: true,
showExplainersHp: true,
showExplainersInv: true,
requireExternalUserId: false
},
feature_flags: {useAddressForm: true, useNewTheme: true},
allow_notifications: true,
allow_grid_discharge: true,
learning_phase_enabled: true,
learning_phase_days: 15,
learning_phase_probing_hours: 2,
reauthorization_link_timeout_days: 1073741824,
price_zone: '<string>',
is_smart_optimization_active_default: true,
excluded_device_brand_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_device_type_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
blocked_ev_brand_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://api.example.com/api/partners/v2.0/org/{org_id}/settings', 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.example.com/api/partners/v2.0/org/{org_id}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'revision' => '<string>',
'settings' => [
'app_config' => [
'showHemsFeatureEv' => true,
'showHemsFeatureEvCharger' => true,
'showHpOptimizationLevel' => true,
'showSavings' => true,
'allowSteeringToggleHp' => true,
'allowSteeringToggleEv' => true,
'allowSteeringToggleInv' => true,
'showSolarTab' => true,
'showChargingTab' => true,
'showClimateTab' => true,
'showExplainers' => true,
'showExplainersHp' => true,
'showExplainersInv' => true,
'requireExternalUserId' => false
],
'feature_flags' => [
'useAddressForm' => true,
'useNewTheme' => true
],
'allow_notifications' => true,
'allow_grid_discharge' => true,
'learning_phase_enabled' => true,
'learning_phase_days' => 15,
'learning_phase_probing_hours' => 2,
'reauthorization_link_timeout_days' => 1073741824,
'price_zone' => '<string>',
'is_smart_optimization_active_default' => true,
'excluded_device_brand_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'excluded_device_type_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'blocked_ev_brand_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.example.com/api/partners/v2.0/org/{org_id}/settings"
payload := strings.NewReader("{\n \"revision\": \"<string>\",\n \"settings\": {\n \"app_config\": {\n \"showHemsFeatureEv\": true,\n \"showHemsFeatureEvCharger\": true,\n \"showHpOptimizationLevel\": true,\n \"showSavings\": true,\n \"allowSteeringToggleHp\": true,\n \"allowSteeringToggleEv\": true,\n \"allowSteeringToggleInv\": true,\n \"showSolarTab\": true,\n \"showChargingTab\": true,\n \"showClimateTab\": true,\n \"showExplainers\": true,\n \"showExplainersHp\": true,\n \"showExplainersInv\": true,\n \"requireExternalUserId\": false\n },\n \"feature_flags\": {\n \"useAddressForm\": true,\n \"useNewTheme\": true\n },\n \"allow_notifications\": true,\n \"allow_grid_discharge\": true,\n \"learning_phase_enabled\": true,\n \"learning_phase_days\": 15,\n \"learning_phase_probing_hours\": 2,\n \"reauthorization_link_timeout_days\": 1073741824,\n \"price_zone\": \"<string>\",\n \"is_smart_optimization_active_default\": true,\n \"excluded_device_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"excluded_device_type_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"blocked_ev_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/partners/v2.0/org/{org_id}/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": \"<string>\",\n \"settings\": {\n \"app_config\": {\n \"showHemsFeatureEv\": true,\n \"showHemsFeatureEvCharger\": true,\n \"showHpOptimizationLevel\": true,\n \"showSavings\": true,\n \"allowSteeringToggleHp\": true,\n \"allowSteeringToggleEv\": true,\n \"allowSteeringToggleInv\": true,\n \"showSolarTab\": true,\n \"showChargingTab\": true,\n \"showClimateTab\": true,\n \"showExplainers\": true,\n \"showExplainersHp\": true,\n \"showExplainersInv\": true,\n \"requireExternalUserId\": false\n },\n \"feature_flags\": {\n \"useAddressForm\": true,\n \"useNewTheme\": true\n },\n \"allow_notifications\": true,\n \"allow_grid_discharge\": true,\n \"learning_phase_enabled\": true,\n \"learning_phase_days\": 15,\n \"learning_phase_probing_hours\": 2,\n \"reauthorization_link_timeout_days\": 1073741824,\n \"price_zone\": \"<string>\",\n \"is_smart_optimization_active_default\": true,\n \"excluded_device_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"excluded_device_type_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"blocked_ev_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/partners/v2.0/org/{org_id}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"revision\": \"<string>\",\n \"settings\": {\n \"app_config\": {\n \"showHemsFeatureEv\": true,\n \"showHemsFeatureEvCharger\": true,\n \"showHpOptimizationLevel\": true,\n \"showSavings\": true,\n \"allowSteeringToggleHp\": true,\n \"allowSteeringToggleEv\": true,\n \"allowSteeringToggleInv\": true,\n \"showSolarTab\": true,\n \"showChargingTab\": true,\n \"showClimateTab\": true,\n \"showExplainers\": true,\n \"showExplainersHp\": true,\n \"showExplainersInv\": true,\n \"requireExternalUserId\": false\n },\n \"feature_flags\": {\n \"useAddressForm\": true,\n \"useNewTheme\": true\n },\n \"allow_notifications\": true,\n \"allow_grid_discharge\": true,\n \"learning_phase_enabled\": true,\n \"learning_phase_days\": 15,\n \"learning_phase_probing_hours\": 2,\n \"reauthorization_link_timeout_days\": 1073741824,\n \"price_zone\": \"<string>\",\n \"is_smart_optimization_active_default\": true,\n \"excluded_device_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"excluded_device_type_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"blocked_ev_brand_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"revision": "<string>",
"settings": {
"app_config": {
"showHemsFeatureEv": true,
"showHemsFeatureEvCharger": true,
"showHpOptimizationLevel": true,
"showSavings": true,
"allowSteeringToggleHp": true,
"allowSteeringToggleEv": true,
"allowSteeringToggleInv": true,
"showSolarTab": true,
"showChargingTab": true,
"showClimateTab": true,
"showExplainers": true,
"showExplainersHp": true,
"showExplainersInv": true,
"requireExternalUserId": false
},
"feature_flags": {
"useAddressForm": true,
"useNewTheme": true
},
"allow_notifications": true,
"allow_grid_discharge": true,
"learning_phase_enabled": true,
"learning_phase_days": 123,
"learning_phase_probing_hours": 123,
"reauthorization_link_timeout_days": 123,
"price_zone": "<string>",
"is_smart_optimization_active_default": true,
"payout_scheme": "<string>",
"excluded_device_brand_ids": [
"<string>"
],
"excluded_device_type_ids": [
"<string>"
],
"blocked_ev_brand_ids": [
"<string>"
]
},
"readonly": {
"id": "<string>",
"organization_id": "<string>",
"organization_name": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organization": {
"name": "<string>",
"description": "<string>",
"contact": "<string>",
"default_currency": "<string>",
"country": "<string>",
"trading_enabled": true,
"optimization_basis": "<string>",
"audit_log_enabled": true
}
},
"permissions": {
"can_edit": true
},
"options": {
"device_brands": [
{
"key": "<string>",
"label": "<string>",
"category": "<string>",
"ids": [
"<string>"
],
"availability": "<string>"
}
],
"device_types": [
{
"key": "<string>",
"label": "<string>",
"category": "<string>",
"ids": [
"<string>"
],
"availability": "<string>"
}
],
"ev_brands": [
{
"id": "<string>",
"label": "<string>"
}
],
"organization": {
"countries": [
{
"id": "<string>",
"label": "<string>"
}
],
"currencies": [
{
"id": "<string>",
"label": "<string>"
}
],
"optimization_bases": [
{
"id": "<string>",
"label": "<string>"
}
],
"price_zones": [
{
"id": "<string>",
"label": "<string>"
}
]
},
"price_zones": [
{
"id": "<string>",
"label": "<string>"
}
],
"app_settings": [
{
"key": "<string>",
"label": "<string>",
"description": "<string>",
"active": true
}
]
}
}