Retrieve Companies
curl --request GET \
--url https://external.nectarclimate.com/v2.2/company \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/company"
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/company', 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/company",
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/company"
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/company")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/company")
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[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"isImpliedMeteringEnabled": true,
"isDemandEnabled": true,
"isBasicIdentifierMappingEnabled": true,
"isLowAccuracyModeEnabled": true,
"sites": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataCollectionStopDate": "2023-12-25",
"externalId": "<string>",
"address": "<string>",
"path": [
"<string>"
],
"occupancyPercent": "<string>",
"occupancyApplicationMode": "DISABLED",
"dummySiteReason": "<string>"
}
],
"users": [
"<string>"
],
"externalId": "<string>",
"dataCollectionStartDate": "2023-12-25",
"impliedMeteringFraction": "<string>"
}
]Companies
Retrieve Companies
Get all companies that your API key is associated with. This endpoint returns detailed information about each company, including its ID, name, external ID, and associated sites.
GET
/
company
Retrieve Companies
curl --request GET \
--url https://external.nectarclimate.com/v2.2/company \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/company"
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/company', 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/company",
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/company"
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/company")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/company")
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[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"isImpliedMeteringEnabled": true,
"isDemandEnabled": true,
"isBasicIdentifierMappingEnabled": true,
"isLowAccuracyModeEnabled": true,
"sites": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataCollectionStopDate": "2023-12-25",
"externalId": "<string>",
"address": "<string>",
"path": [
"<string>"
],
"occupancyPercent": "<string>",
"occupancyApplicationMode": "DISABLED",
"dummySiteReason": "<string>"
}
],
"users": [
"<string>"
],
"externalId": "<string>",
"dataCollectionStartDate": "2023-12-25",
"impliedMeteringFraction": "<string>"
}
]Response
200 - application/json
Fraction used to estimate sewer usage from water usage for implied metering. If a sewage charge is found in the data without water usage, this fraction is used to estimate the waste water usage that corresponds to the sewage charge. Defaults to 1.0.
Pattern:
^-?\d{0,1}(?:\.\d{0,2})?$