Get Company Utility Account Connections
curl --request GET \
--url https://external.nectarclimate.com/v2.2/connection/company/{company_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/connection/company/{company_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://external.nectarclimate.com/v2.2/connection/company/{company_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://external.nectarclimate.com/v2.2/connection/company/{company_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://external.nectarclimate.com/v2.2/connection/company/{company_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external.nectarclimate.com/v2.2/connection/company/{company_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/connection/company/{company_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"totalConnections": 123,
"perPage": 123,
"totalPages": 123,
"currentPage": 123,
"hasNext": true,
"hasPrevious": true,
"connections": [
{
"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
}
]
}Connections
Get Company Utility Account Connections
Retrieve all utility account connections for a company by ID. Requires company access permission. Results are paginated (100 per page by default). Returns connection details including ID, account number, and status. Optional filters: connectionOwnerEmail, status, and sites. Each connection has a unique secret key and company ID for secure access, editing, and reauthentication.
GET
/
connection
/
company
/
{company_id}
Get Company Utility Account Connections
curl --request GET \
--url https://external.nectarclimate.com/v2.2/connection/company/{company_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/connection/company/{company_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://external.nectarclimate.com/v2.2/connection/company/{company_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://external.nectarclimate.com/v2.2/connection/company/{company_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://external.nectarclimate.com/v2.2/connection/company/{company_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external.nectarclimate.com/v2.2/connection/company/{company_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/connection/company/{company_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"totalConnections": 123,
"perPage": 123,
"totalPages": 123,
"currentPage": 123,
"hasNext": true,
"hasPrevious": true,
"connections": [
{
"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
}
]
}Path Parameters
Query Parameters
Filter by connection status.
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
Available options:
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 Minimum string length:
1Response
Paginated response envelope for company connection lists.