Update EV charging study
curl --request PUT \
--url https://api.suntropy.ai/v2/studies/ev-charging/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientDetails": {
"identifier": "<string>",
"contactNumber": "<string>",
"sector": "<string>",
"email": "<string>",
"cups": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressCode": "<string>",
"dniOrCif": "<string>",
"instalationLocation": "<string>",
"city": "<string>",
"region": "<string>",
"subregion": "<string>",
"tariff": "<string>",
"surname": "<string>",
"includeTaxes": true,
"taxesPercentage": 123,
"business": true,
"businessRepresentative": "<string>",
"phonePrefix": "<string>",
"phoneCountryCode": "<string>",
"typeOfDocument": "<string>",
"typeOfClient": "<string>",
"cifOfClient": "<string>",
"clientBusinessIdentifier": "<string>"
},
"creationTimestamp": "<string>",
"creationUserUID": "<string>",
"lastEditTimestamp": "<string>",
"lastEditUserUID": "<string>",
"clientUID": "<string>",
"name": "<string>",
"identifier": "<string>",
"mapCenter": {},
"selectedCustomAssets": [
"<string>"
],
"economicResults": {},
"referenceId": "<string>",
"market": "<string>",
"comments": [
{}
],
"selectedChargers": [
"<string>"
],
"chargersSelectionMode": "<string>",
"geographicalZone": {
"idZona": 123,
"nombre": "<string>"
},
"atrTariff": {
"idTarifaATR": 123,
"nombre": "<string>",
"periods": 123,
"active": true
},
"chargerFilters": {},
"notes": [
"<string>"
],
"consumerTaskId": 123
}
'import requests
url = "https://api.suntropy.ai/v2/studies/ev-charging/{id}"
payload = {
"clientDetails": {
"identifier": "<string>",
"contactNumber": "<string>",
"sector": "<string>",
"email": "<string>",
"cups": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressCode": "<string>",
"dniOrCif": "<string>",
"instalationLocation": "<string>",
"city": "<string>",
"region": "<string>",
"subregion": "<string>",
"tariff": "<string>",
"surname": "<string>",
"includeTaxes": True,
"taxesPercentage": 123,
"business": True,
"businessRepresentative": "<string>",
"phonePrefix": "<string>",
"phoneCountryCode": "<string>",
"typeOfDocument": "<string>",
"typeOfClient": "<string>",
"cifOfClient": "<string>",
"clientBusinessIdentifier": "<string>"
},
"creationTimestamp": "<string>",
"creationUserUID": "<string>",
"lastEditTimestamp": "<string>",
"lastEditUserUID": "<string>",
"clientUID": "<string>",
"name": "<string>",
"identifier": "<string>",
"mapCenter": {},
"selectedCustomAssets": ["<string>"],
"economicResults": {},
"referenceId": "<string>",
"market": "<string>",
"comments": [{}],
"selectedChargers": ["<string>"],
"chargersSelectionMode": "<string>",
"geographicalZone": {
"idZona": 123,
"nombre": "<string>"
},
"atrTariff": {
"idTarifaATR": 123,
"nombre": "<string>",
"periods": 123,
"active": True
},
"chargerFilters": {},
"notes": ["<string>"],
"consumerTaskId": 123
}
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({
clientDetails: {
identifier: '<string>',
contactNumber: '<string>',
sector: '<string>',
email: '<string>',
cups: '<string>',
phoneNumber: '<string>',
address: '<string>',
addressCode: '<string>',
dniOrCif: '<string>',
instalationLocation: '<string>',
city: '<string>',
region: '<string>',
subregion: '<string>',
tariff: '<string>',
surname: '<string>',
includeTaxes: true,
taxesPercentage: 123,
business: true,
businessRepresentative: '<string>',
phonePrefix: '<string>',
phoneCountryCode: '<string>',
typeOfDocument: '<string>',
typeOfClient: '<string>',
cifOfClient: '<string>',
clientBusinessIdentifier: '<string>'
},
creationTimestamp: '<string>',
creationUserUID: '<string>',
lastEditTimestamp: '<string>',
lastEditUserUID: '<string>',
clientUID: '<string>',
name: '<string>',
identifier: '<string>',
mapCenter: {},
selectedCustomAssets: ['<string>'],
economicResults: {},
referenceId: '<string>',
market: '<string>',
comments: [{}],
selectedChargers: ['<string>'],
chargersSelectionMode: '<string>',
geographicalZone: {idZona: 123, nombre: '<string>'},
atrTariff: {idTarifaATR: 123, nombre: '<string>', periods: 123, active: true},
chargerFilters: {},
notes: ['<string>'],
consumerTaskId: 123
})
};
fetch('https://api.suntropy.ai/v2/studies/ev-charging/{id}', 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.suntropy.ai/v2/studies/ev-charging/{id}",
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([
'clientDetails' => [
'identifier' => '<string>',
'contactNumber' => '<string>',
'sector' => '<string>',
'email' => '<string>',
'cups' => '<string>',
'phoneNumber' => '<string>',
'address' => '<string>',
'addressCode' => '<string>',
'dniOrCif' => '<string>',
'instalationLocation' => '<string>',
'city' => '<string>',
'region' => '<string>',
'subregion' => '<string>',
'tariff' => '<string>',
'surname' => '<string>',
'includeTaxes' => true,
'taxesPercentage' => 123,
'business' => true,
'businessRepresentative' => '<string>',
'phonePrefix' => '<string>',
'phoneCountryCode' => '<string>',
'typeOfDocument' => '<string>',
'typeOfClient' => '<string>',
'cifOfClient' => '<string>',
'clientBusinessIdentifier' => '<string>'
],
'creationTimestamp' => '<string>',
'creationUserUID' => '<string>',
'lastEditTimestamp' => '<string>',
'lastEditUserUID' => '<string>',
'clientUID' => '<string>',
'name' => '<string>',
'identifier' => '<string>',
'mapCenter' => [
],
'selectedCustomAssets' => [
'<string>'
],
'economicResults' => [
],
'referenceId' => '<string>',
'market' => '<string>',
'comments' => [
[
]
],
'selectedChargers' => [
'<string>'
],
'chargersSelectionMode' => '<string>',
'geographicalZone' => [
'idZona' => 123,
'nombre' => '<string>'
],
'atrTariff' => [
'idTarifaATR' => 123,
'nombre' => '<string>',
'periods' => 123,
'active' => true
],
'chargerFilters' => [
],
'notes' => [
'<string>'
],
'consumerTaskId' => 123
]),
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.suntropy.ai/v2/studies/ev-charging/{id}"
payload := strings.NewReader("{\n \"clientDetails\": {\n \"identifier\": \"<string>\",\n \"contactNumber\": \"<string>\",\n \"sector\": \"<string>\",\n \"email\": \"<string>\",\n \"cups\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressCode\": \"<string>\",\n \"dniOrCif\": \"<string>\",\n \"instalationLocation\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"subregion\": \"<string>\",\n \"tariff\": \"<string>\",\n \"surname\": \"<string>\",\n \"includeTaxes\": true,\n \"taxesPercentage\": 123,\n \"business\": true,\n \"businessRepresentative\": \"<string>\",\n \"phonePrefix\": \"<string>\",\n \"phoneCountryCode\": \"<string>\",\n \"typeOfDocument\": \"<string>\",\n \"typeOfClient\": \"<string>\",\n \"cifOfClient\": \"<string>\",\n \"clientBusinessIdentifier\": \"<string>\"\n },\n \"creationTimestamp\": \"<string>\",\n \"creationUserUID\": \"<string>\",\n \"lastEditTimestamp\": \"<string>\",\n \"lastEditUserUID\": \"<string>\",\n \"clientUID\": \"<string>\",\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"mapCenter\": {},\n \"selectedCustomAssets\": [\n \"<string>\"\n ],\n \"economicResults\": {},\n \"referenceId\": \"<string>\",\n \"market\": \"<string>\",\n \"comments\": [\n {}\n ],\n \"selectedChargers\": [\n \"<string>\"\n ],\n \"chargersSelectionMode\": \"<string>\",\n \"geographicalZone\": {\n \"idZona\": 123,\n \"nombre\": \"<string>\"\n },\n \"atrTariff\": {\n \"idTarifaATR\": 123,\n \"nombre\": \"<string>\",\n \"periods\": 123,\n \"active\": true\n },\n \"chargerFilters\": {},\n \"notes\": [\n \"<string>\"\n ],\n \"consumerTaskId\": 123\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.suntropy.ai/v2/studies/ev-charging/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientDetails\": {\n \"identifier\": \"<string>\",\n \"contactNumber\": \"<string>\",\n \"sector\": \"<string>\",\n \"email\": \"<string>\",\n \"cups\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressCode\": \"<string>\",\n \"dniOrCif\": \"<string>\",\n \"instalationLocation\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"subregion\": \"<string>\",\n \"tariff\": \"<string>\",\n \"surname\": \"<string>\",\n \"includeTaxes\": true,\n \"taxesPercentage\": 123,\n \"business\": true,\n \"businessRepresentative\": \"<string>\",\n \"phonePrefix\": \"<string>\",\n \"phoneCountryCode\": \"<string>\",\n \"typeOfDocument\": \"<string>\",\n \"typeOfClient\": \"<string>\",\n \"cifOfClient\": \"<string>\",\n \"clientBusinessIdentifier\": \"<string>\"\n },\n \"creationTimestamp\": \"<string>\",\n \"creationUserUID\": \"<string>\",\n \"lastEditTimestamp\": \"<string>\",\n \"lastEditUserUID\": \"<string>\",\n \"clientUID\": \"<string>\",\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"mapCenter\": {},\n \"selectedCustomAssets\": [\n \"<string>\"\n ],\n \"economicResults\": {},\n \"referenceId\": \"<string>\",\n \"market\": \"<string>\",\n \"comments\": [\n {}\n ],\n \"selectedChargers\": [\n \"<string>\"\n ],\n \"chargersSelectionMode\": \"<string>\",\n \"geographicalZone\": {\n \"idZona\": 123,\n \"nombre\": \"<string>\"\n },\n \"atrTariff\": {\n \"idTarifaATR\": 123,\n \"nombre\": \"<string>\",\n \"periods\": 123,\n \"active\": true\n },\n \"chargerFilters\": {},\n \"notes\": [\n \"<string>\"\n ],\n \"consumerTaskId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.suntropy.ai/v2/studies/ev-charging/{id}")
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 \"clientDetails\": {\n \"identifier\": \"<string>\",\n \"contactNumber\": \"<string>\",\n \"sector\": \"<string>\",\n \"email\": \"<string>\",\n \"cups\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressCode\": \"<string>\",\n \"dniOrCif\": \"<string>\",\n \"instalationLocation\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"subregion\": \"<string>\",\n \"tariff\": \"<string>\",\n \"surname\": \"<string>\",\n \"includeTaxes\": true,\n \"taxesPercentage\": 123,\n \"business\": true,\n \"businessRepresentative\": \"<string>\",\n \"phonePrefix\": \"<string>\",\n \"phoneCountryCode\": \"<string>\",\n \"typeOfDocument\": \"<string>\",\n \"typeOfClient\": \"<string>\",\n \"cifOfClient\": \"<string>\",\n \"clientBusinessIdentifier\": \"<string>\"\n },\n \"creationTimestamp\": \"<string>\",\n \"creationUserUID\": \"<string>\",\n \"lastEditTimestamp\": \"<string>\",\n \"lastEditUserUID\": \"<string>\",\n \"clientUID\": \"<string>\",\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"mapCenter\": {},\n \"selectedCustomAssets\": [\n \"<string>\"\n ],\n \"economicResults\": {},\n \"referenceId\": \"<string>\",\n \"market\": \"<string>\",\n \"comments\": [\n {}\n ],\n \"selectedChargers\": [\n \"<string>\"\n ],\n \"chargersSelectionMode\": \"<string>\",\n \"geographicalZone\": {\n \"idZona\": 123,\n \"nombre\": \"<string>\"\n },\n \"atrTariff\": {\n \"idTarifaATR\": 123,\n \"nombre\": \"<string>\",\n \"periods\": 123,\n \"active\": true\n },\n \"chargerFilters\": {},\n \"notes\": [\n \"<string>\"\n ],\n \"consumerTaskId\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"warning": {}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Recarga de vehículos
Update EV charging study
Required permission: studies:write.
Send the full study document retrieved by GET, not a partial patch. The path ID is authoritative. Existing calculation, credit and persistence rules apply. Returns the saved metadata.
PUT
/
v2
/
studies
/
ev-charging
/
{id}
Update EV charging study
curl --request PUT \
--url https://api.suntropy.ai/v2/studies/ev-charging/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientDetails": {
"identifier": "<string>",
"contactNumber": "<string>",
"sector": "<string>",
"email": "<string>",
"cups": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressCode": "<string>",
"dniOrCif": "<string>",
"instalationLocation": "<string>",
"city": "<string>",
"region": "<string>",
"subregion": "<string>",
"tariff": "<string>",
"surname": "<string>",
"includeTaxes": true,
"taxesPercentage": 123,
"business": true,
"businessRepresentative": "<string>",
"phonePrefix": "<string>",
"phoneCountryCode": "<string>",
"typeOfDocument": "<string>",
"typeOfClient": "<string>",
"cifOfClient": "<string>",
"clientBusinessIdentifier": "<string>"
},
"creationTimestamp": "<string>",
"creationUserUID": "<string>",
"lastEditTimestamp": "<string>",
"lastEditUserUID": "<string>",
"clientUID": "<string>",
"name": "<string>",
"identifier": "<string>",
"mapCenter": {},
"selectedCustomAssets": [
"<string>"
],
"economicResults": {},
"referenceId": "<string>",
"market": "<string>",
"comments": [
{}
],
"selectedChargers": [
"<string>"
],
"chargersSelectionMode": "<string>",
"geographicalZone": {
"idZona": 123,
"nombre": "<string>"
},
"atrTariff": {
"idTarifaATR": 123,
"nombre": "<string>",
"periods": 123,
"active": true
},
"chargerFilters": {},
"notes": [
"<string>"
],
"consumerTaskId": 123
}
'import requests
url = "https://api.suntropy.ai/v2/studies/ev-charging/{id}"
payload = {
"clientDetails": {
"identifier": "<string>",
"contactNumber": "<string>",
"sector": "<string>",
"email": "<string>",
"cups": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressCode": "<string>",
"dniOrCif": "<string>",
"instalationLocation": "<string>",
"city": "<string>",
"region": "<string>",
"subregion": "<string>",
"tariff": "<string>",
"surname": "<string>",
"includeTaxes": True,
"taxesPercentage": 123,
"business": True,
"businessRepresentative": "<string>",
"phonePrefix": "<string>",
"phoneCountryCode": "<string>",
"typeOfDocument": "<string>",
"typeOfClient": "<string>",
"cifOfClient": "<string>",
"clientBusinessIdentifier": "<string>"
},
"creationTimestamp": "<string>",
"creationUserUID": "<string>",
"lastEditTimestamp": "<string>",
"lastEditUserUID": "<string>",
"clientUID": "<string>",
"name": "<string>",
"identifier": "<string>",
"mapCenter": {},
"selectedCustomAssets": ["<string>"],
"economicResults": {},
"referenceId": "<string>",
"market": "<string>",
"comments": [{}],
"selectedChargers": ["<string>"],
"chargersSelectionMode": "<string>",
"geographicalZone": {
"idZona": 123,
"nombre": "<string>"
},
"atrTariff": {
"idTarifaATR": 123,
"nombre": "<string>",
"periods": 123,
"active": True
},
"chargerFilters": {},
"notes": ["<string>"],
"consumerTaskId": 123
}
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({
clientDetails: {
identifier: '<string>',
contactNumber: '<string>',
sector: '<string>',
email: '<string>',
cups: '<string>',
phoneNumber: '<string>',
address: '<string>',
addressCode: '<string>',
dniOrCif: '<string>',
instalationLocation: '<string>',
city: '<string>',
region: '<string>',
subregion: '<string>',
tariff: '<string>',
surname: '<string>',
includeTaxes: true,
taxesPercentage: 123,
business: true,
businessRepresentative: '<string>',
phonePrefix: '<string>',
phoneCountryCode: '<string>',
typeOfDocument: '<string>',
typeOfClient: '<string>',
cifOfClient: '<string>',
clientBusinessIdentifier: '<string>'
},
creationTimestamp: '<string>',
creationUserUID: '<string>',
lastEditTimestamp: '<string>',
lastEditUserUID: '<string>',
clientUID: '<string>',
name: '<string>',
identifier: '<string>',
mapCenter: {},
selectedCustomAssets: ['<string>'],
economicResults: {},
referenceId: '<string>',
market: '<string>',
comments: [{}],
selectedChargers: ['<string>'],
chargersSelectionMode: '<string>',
geographicalZone: {idZona: 123, nombre: '<string>'},
atrTariff: {idTarifaATR: 123, nombre: '<string>', periods: 123, active: true},
chargerFilters: {},
notes: ['<string>'],
consumerTaskId: 123
})
};
fetch('https://api.suntropy.ai/v2/studies/ev-charging/{id}', 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.suntropy.ai/v2/studies/ev-charging/{id}",
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([
'clientDetails' => [
'identifier' => '<string>',
'contactNumber' => '<string>',
'sector' => '<string>',
'email' => '<string>',
'cups' => '<string>',
'phoneNumber' => '<string>',
'address' => '<string>',
'addressCode' => '<string>',
'dniOrCif' => '<string>',
'instalationLocation' => '<string>',
'city' => '<string>',
'region' => '<string>',
'subregion' => '<string>',
'tariff' => '<string>',
'surname' => '<string>',
'includeTaxes' => true,
'taxesPercentage' => 123,
'business' => true,
'businessRepresentative' => '<string>',
'phonePrefix' => '<string>',
'phoneCountryCode' => '<string>',
'typeOfDocument' => '<string>',
'typeOfClient' => '<string>',
'cifOfClient' => '<string>',
'clientBusinessIdentifier' => '<string>'
],
'creationTimestamp' => '<string>',
'creationUserUID' => '<string>',
'lastEditTimestamp' => '<string>',
'lastEditUserUID' => '<string>',
'clientUID' => '<string>',
'name' => '<string>',
'identifier' => '<string>',
'mapCenter' => [
],
'selectedCustomAssets' => [
'<string>'
],
'economicResults' => [
],
'referenceId' => '<string>',
'market' => '<string>',
'comments' => [
[
]
],
'selectedChargers' => [
'<string>'
],
'chargersSelectionMode' => '<string>',
'geographicalZone' => [
'idZona' => 123,
'nombre' => '<string>'
],
'atrTariff' => [
'idTarifaATR' => 123,
'nombre' => '<string>',
'periods' => 123,
'active' => true
],
'chargerFilters' => [
],
'notes' => [
'<string>'
],
'consumerTaskId' => 123
]),
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.suntropy.ai/v2/studies/ev-charging/{id}"
payload := strings.NewReader("{\n \"clientDetails\": {\n \"identifier\": \"<string>\",\n \"contactNumber\": \"<string>\",\n \"sector\": \"<string>\",\n \"email\": \"<string>\",\n \"cups\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressCode\": \"<string>\",\n \"dniOrCif\": \"<string>\",\n \"instalationLocation\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"subregion\": \"<string>\",\n \"tariff\": \"<string>\",\n \"surname\": \"<string>\",\n \"includeTaxes\": true,\n \"taxesPercentage\": 123,\n \"business\": true,\n \"businessRepresentative\": \"<string>\",\n \"phonePrefix\": \"<string>\",\n \"phoneCountryCode\": \"<string>\",\n \"typeOfDocument\": \"<string>\",\n \"typeOfClient\": \"<string>\",\n \"cifOfClient\": \"<string>\",\n \"clientBusinessIdentifier\": \"<string>\"\n },\n \"creationTimestamp\": \"<string>\",\n \"creationUserUID\": \"<string>\",\n \"lastEditTimestamp\": \"<string>\",\n \"lastEditUserUID\": \"<string>\",\n \"clientUID\": \"<string>\",\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"mapCenter\": {},\n \"selectedCustomAssets\": [\n \"<string>\"\n ],\n \"economicResults\": {},\n \"referenceId\": \"<string>\",\n \"market\": \"<string>\",\n \"comments\": [\n {}\n ],\n \"selectedChargers\": [\n \"<string>\"\n ],\n \"chargersSelectionMode\": \"<string>\",\n \"geographicalZone\": {\n \"idZona\": 123,\n \"nombre\": \"<string>\"\n },\n \"atrTariff\": {\n \"idTarifaATR\": 123,\n \"nombre\": \"<string>\",\n \"periods\": 123,\n \"active\": true\n },\n \"chargerFilters\": {},\n \"notes\": [\n \"<string>\"\n ],\n \"consumerTaskId\": 123\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.suntropy.ai/v2/studies/ev-charging/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientDetails\": {\n \"identifier\": \"<string>\",\n \"contactNumber\": \"<string>\",\n \"sector\": \"<string>\",\n \"email\": \"<string>\",\n \"cups\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressCode\": \"<string>\",\n \"dniOrCif\": \"<string>\",\n \"instalationLocation\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"subregion\": \"<string>\",\n \"tariff\": \"<string>\",\n \"surname\": \"<string>\",\n \"includeTaxes\": true,\n \"taxesPercentage\": 123,\n \"business\": true,\n \"businessRepresentative\": \"<string>\",\n \"phonePrefix\": \"<string>\",\n \"phoneCountryCode\": \"<string>\",\n \"typeOfDocument\": \"<string>\",\n \"typeOfClient\": \"<string>\",\n \"cifOfClient\": \"<string>\",\n \"clientBusinessIdentifier\": \"<string>\"\n },\n \"creationTimestamp\": \"<string>\",\n \"creationUserUID\": \"<string>\",\n \"lastEditTimestamp\": \"<string>\",\n \"lastEditUserUID\": \"<string>\",\n \"clientUID\": \"<string>\",\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"mapCenter\": {},\n \"selectedCustomAssets\": [\n \"<string>\"\n ],\n \"economicResults\": {},\n \"referenceId\": \"<string>\",\n \"market\": \"<string>\",\n \"comments\": [\n {}\n ],\n \"selectedChargers\": [\n \"<string>\"\n ],\n \"chargersSelectionMode\": \"<string>\",\n \"geographicalZone\": {\n \"idZona\": 123,\n \"nombre\": \"<string>\"\n },\n \"atrTariff\": {\n \"idTarifaATR\": 123,\n \"nombre\": \"<string>\",\n \"periods\": 123,\n \"active\": true\n },\n \"chargerFilters\": {},\n \"notes\": [\n \"<string>\"\n ],\n \"consumerTaskId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.suntropy.ai/v2/studies/ev-charging/{id}")
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 \"clientDetails\": {\n \"identifier\": \"<string>\",\n \"contactNumber\": \"<string>\",\n \"sector\": \"<string>\",\n \"email\": \"<string>\",\n \"cups\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": \"<string>\",\n \"addressCode\": \"<string>\",\n \"dniOrCif\": \"<string>\",\n \"instalationLocation\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"subregion\": \"<string>\",\n \"tariff\": \"<string>\",\n \"surname\": \"<string>\",\n \"includeTaxes\": true,\n \"taxesPercentage\": 123,\n \"business\": true,\n \"businessRepresentative\": \"<string>\",\n \"phonePrefix\": \"<string>\",\n \"phoneCountryCode\": \"<string>\",\n \"typeOfDocument\": \"<string>\",\n \"typeOfClient\": \"<string>\",\n \"cifOfClient\": \"<string>\",\n \"clientBusinessIdentifier\": \"<string>\"\n },\n \"creationTimestamp\": \"<string>\",\n \"creationUserUID\": \"<string>\",\n \"lastEditTimestamp\": \"<string>\",\n \"lastEditUserUID\": \"<string>\",\n \"clientUID\": \"<string>\",\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"mapCenter\": {},\n \"selectedCustomAssets\": [\n \"<string>\"\n ],\n \"economicResults\": {},\n \"referenceId\": \"<string>\",\n \"market\": \"<string>\",\n \"comments\": [\n {}\n ],\n \"selectedChargers\": [\n \"<string>\"\n ],\n \"chargersSelectionMode\": \"<string>\",\n \"geographicalZone\": {\n \"idZona\": 123,\n \"nombre\": \"<string>\"\n },\n \"atrTariff\": {\n \"idTarifaATR\": 123,\n \"nombre\": \"<string>\",\n \"periods\": 123,\n \"active\": true\n },\n \"chargerFilters\": {},\n \"notes\": [\n \"<string>\"\n ],\n \"consumerTaskId\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"warning": {}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^[a-fA-F0-9]{24}$Query Parameters
State belonging to this tenant.
Body
application/json
Show child attributes
Show child attributes
Available options:
single_phase, three_phase Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
individual, colective, VECharger, heatpumps, battery