curl --request PATCH \
--url https://external.nectarclimate.com/v2.2/connection/{connection_id}/details \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"dataCollectionStartDate": "2023-12-25",
"isActive": true,
"externalId": "<string>",
"multiplyByOccupancy": true
}
'import requests
url = "https://external.nectarclimate.com/v2.2/connection/{connection_id}/details"
payload = {
"dataCollectionStartDate": "2023-12-25",
"isActive": True,
"externalId": "<string>",
"multiplyByOccupancy": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataCollectionStartDate: '2023-12-25',
isActive: true,
externalId: '<string>',
multiplyByOccupancy: true
})
};
fetch('https://external.nectarclimate.com/v2.2/connection/{connection_id}/details', 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://external.nectarclimate.com/v2.2/connection/{connection_id}/details",
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([
'dataCollectionStartDate' => '2023-12-25',
'isActive' => true,
'externalId' => '<string>',
'multiplyByOccupancy' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://external.nectarclimate.com/v2.2/connection/{connection_id}/details"
payload := strings.NewReader("{\n \"dataCollectionStartDate\": \"2023-12-25\",\n \"isActive\": true,\n \"externalId\": \"<string>\",\n \"multiplyByOccupancy\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://external.nectarclimate.com/v2.2/connection/{connection_id}/details")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataCollectionStartDate\": \"2023-12-25\",\n \"isActive\": true,\n \"externalId\": \"<string>\",\n \"multiplyByOccupancy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/connection/{connection_id}/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataCollectionStartDate\": \"2023-12-25\",\n \"isActive\": true,\n \"externalId\": \"<string>\",\n \"multiplyByOccupancy\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"multiplyByOccupancy": true,
"publicCompanyId": "<string>",
"connectionMagicLinkSecret": "<string>",
"statusLastUpdateTime": "2023-11-07T05:31:56Z",
"statusFirstSeenTime": "2023-11-07T05:31:56Z",
"statusErrorDetail": "<string>",
"updated": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"datasource": {
"name": "<string>",
"url": "<string>"
},
"accounts": [],
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"externalId": "<string>"
},
"url": "<string>",
"status": "PENDING",
"country": "AF",
"initialSites": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"initialDatasourceTypes": [
"ELECTRICITY"
],
"username": "<string>",
"workflowOwnerEmail": "jsmith@example.com",
"dataCollectionStartDate": "2023-12-25",
"isActive": true
}{
"detail": "<string>",
"error": "<string>"
}Update an Utility Account Connection
Update an existing utility account connection for a company.
curl --request PATCH \
--url https://external.nectarclimate.com/v2.2/connection/{connection_id}/details \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"dataCollectionStartDate": "2023-12-25",
"isActive": true,
"externalId": "<string>",
"multiplyByOccupancy": true
}
'import requests
url = "https://external.nectarclimate.com/v2.2/connection/{connection_id}/details"
payload = {
"dataCollectionStartDate": "2023-12-25",
"isActive": True,
"externalId": "<string>",
"multiplyByOccupancy": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataCollectionStartDate: '2023-12-25',
isActive: true,
externalId: '<string>',
multiplyByOccupancy: true
})
};
fetch('https://external.nectarclimate.com/v2.2/connection/{connection_id}/details', 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://external.nectarclimate.com/v2.2/connection/{connection_id}/details",
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([
'dataCollectionStartDate' => '2023-12-25',
'isActive' => true,
'externalId' => '<string>',
'multiplyByOccupancy' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://external.nectarclimate.com/v2.2/connection/{connection_id}/details"
payload := strings.NewReader("{\n \"dataCollectionStartDate\": \"2023-12-25\",\n \"isActive\": true,\n \"externalId\": \"<string>\",\n \"multiplyByOccupancy\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://external.nectarclimate.com/v2.2/connection/{connection_id}/details")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataCollectionStartDate\": \"2023-12-25\",\n \"isActive\": true,\n \"externalId\": \"<string>\",\n \"multiplyByOccupancy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/connection/{connection_id}/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataCollectionStartDate\": \"2023-12-25\",\n \"isActive\": true,\n \"externalId\": \"<string>\",\n \"multiplyByOccupancy\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"multiplyByOccupancy": true,
"publicCompanyId": "<string>",
"connectionMagicLinkSecret": "<string>",
"statusLastUpdateTime": "2023-11-07T05:31:56Z",
"statusFirstSeenTime": "2023-11-07T05:31:56Z",
"statusErrorDetail": "<string>",
"updated": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"datasource": {
"name": "<string>",
"url": "<string>"
},
"accounts": [],
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"externalId": "<string>"
},
"url": "<string>",
"status": "PENDING",
"country": "AF",
"initialSites": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"initialDatasourceTypes": [
"ELECTRICITY"
],
"username": "<string>",
"workflowOwnerEmail": "jsmith@example.com",
"dataCollectionStartDate": "2023-12-25",
"isActive": true
}{
"detail": "<string>",
"error": "<string>"
}Body
Request body for updating a utility account connection.
Response
Utility account connection, including its current status and magic link secret for editing credentials.
Observable connection status, read-only to API clients. DEACTIVATED means the connection has been deactivated via isActive=False. COMPANY_INACTIVE means the parent company was deactivated. All other values reflect the most recent scrape outcome. See the connection lifecycle docs for the full enum and what each value means.
PENDING- PendingUNDER_INVESTIGATION- Under InvestigationCONNECTED- ConnectedMFA_TOKEN_EXPIRED- Mfa Token ExpiredPASSWORD_INCORRECT- Password IncorrectNEW_PASSWORD_NEEDED- New Password NeededADDITIONAL_CREDENTIALS_NEEDED- Additional Credentials NeededWEBSITE_DOWN- Website DownNO_ACCOUNTS_FOUND- No Accounts FoundOTHER_ERROR- Other ErrorCOMPANY_INACTIVE- Company InactiveDEACTIVATED- DeactivatedURL_INACCESSIBLE- Url Inaccessible
PENDING, UNDER_INVESTIGATION, CONNECTED, MFA_TOKEN_EXPIRED, PASSWORD_INCORRECT, NEW_PASSWORD_NEEDED, ADDITIONAL_CREDENTIALS_NEEDED, WEBSITE_DOWN, NO_ACCOUNTS_FOUND, OTHER_ERROR, COMPANY_INACTIVE, DEACTIVATED, URL_INACCESSIBLE Country of the utility company.
AF- AfAL- AlDZ- DzAS- AsAD- AdAO- AoAI- AiAQ- AqAG- AgAR- ArAM- AmAW- AwAU- AuAT- AtAZ- AzBS- BsBH- BhBD- BdBB- BbBY- ByBE- BeBZ- BzBJ- BjBM- BmBT- BtBO- BoBQ- BqBA- BaBW- BwBV- BvBR- BrIO- IoBN- BnBG- BgBF- BfBI- BiKH- KhCM- CmCA- CaCV- CvKY- KyCF- CfTD- TdCL- ClCN- CnCX- CxCC- CcCO- CoKM- KmCG- CgCD- CdCK- CkCR- CrHR- HrCU- CuCW- CwCY- CyCZ- CzCI- CiDK- DkDJ- DjDM- DmDO- DoEC- EcEG- EgSV- SvGQ- GqER- ErEE- EeET- EtFK- FkFO- FoFJ- FjFI- FiFR- FrGF- GfPF- PfTF- TfGA- GaGM- GmGE- GeDE- DeGH- GhGI- GiGR- GrGL- GlGD- GdGP- GpGU- GuGT- GtGG- GgGN- GnGW- GwGY- GyHT- HtHM- HmVA- VaHN- HnHK- HkHU- HuIS- IsIN- InID- IdIR- IrIQ- IqIE- IeIM- ImIL- IlIT- ItJM- JmJP- JpJE- JeJO- JoKZ- KzKE- KeKI- KiKP- KpKR- KrKW- KwKG- KgLA- LaLV- LvLB- LbLS- LsLR- LrLY- LyLI- LiLT- LtLU- LuMO- MoMK- MkMG- MgMW- MwMY- MyMV- MvML- MlMT- MtMH- MhMQ- MqMR- MrMU- MuYT- YtMX- MxFM- FmMD- MdMC- McMN- MnME- MeMS- MsMA- MaMZ- MzMM- MmNA- NaNR- NrNP- NpNL- NlNC- NcNZ- NzNI- NiNE- NeNG- NgNU- NuNF- NfMP- MpNO- NoOM- OmPK- PkPW- PwPS- PsPA- PaPG- PgPY- PyPE- PePH- PhPN- PnPL- PlPT- PtPR- PrQA- QaRO- RoRU- RuRW- RwRE- ReBL- BlSH- ShKN- KnLC- LcMF- MfPM- PmVC- VcWS- WsSM- SmST- StSA- SaSN- SnRS- RsSC- ScSL- SlSG- SgSX- SxSK- SkSI- SiSB- SbSO- SoZA- ZaGS- GsSS- SsES- EsLK- LkSD- SdSR- SrSJ- SjSZ- SzSE- SeCH- ChSY- SyTW- TwTJ- TjTZ- TzTH- ThTL- TlTG- TgTK- TkTO- ToTT- TtTN- TnTR- TrTM- TmTC- TcTV- TvUG- UgUA- UaAE- AeGB- GbUS- UsUM- UmUY- UyUZ- UzVU- VuVE- VeVN- VnVG- VgVI- ViWF- WfEH- EhYE- YeZM- ZmZW- ZwAX- Ax
AF, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, HR, CU, CW, CY, CZ, CI, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RO, RU, RW, RE, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW, AX Initial datasource types associated with this workflow. Initial datasource types are used to filter the workflows when the number of datasource types associated via accounts is 0.
11ELECTRICITY- ElectricityGAS- GasWATER- WaterSEWER- SewerDISTRICT- DistrictWASTE- WasteFUEL- FuelMISC- MiscREFRIGERANT- RefrigerantSOLAR- SolarTELECOM- Telecom
ELECTRICITY, GAS, WATER, SEWER, DISTRICT, WASTE, FUEL, MISC, REFRIGERANT, SOLAR, TELECOM Whether this connection is actively collecting data. When set to False, the connection stops collecting new data but all historical data is preserved, and the status field will reflect as DEACTIVATED. Set to True to reactivate data collection. This is the preferred way to deactivate a connection instead of deleting it.