curl --request GET \
--url https://external.nectarclimate.com/v2.2/document/connection/{connection_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/document/connection/{connection_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/document/connection/{connection_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/document/connection/{connection_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/document/connection/{connection_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/document/connection/{connection_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/document/connection/{connection_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{
"totalDocuments": 123,
"perPage": 123,
"totalPages": 123,
"currentPage": 123,
"hasNext": true,
"hasPrevious": true,
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"auditTrailUrl": "<string>",
"url": "<string>",
"billDate": "2023-12-25",
"chargesUnits": "USD",
"utilityCompany": "<string>",
"status": "<string>",
"flaggedStatus": "<string>",
"revisedDocumentId": "<string>",
"connectionId": "<string>",
"company": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyExternalId": "<string>",
"usageData": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"usage": "<string>",
"usageUnits": "J",
"timeOfUseBreakdown": [
{
"timeOfUse": "PEAK",
"usage": "<string>",
"usageUnits": "Wh",
"description": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25"
}
],
"netMeteringGeneratedKwh": "<string>",
"netMeteringGridImportKwh": "<string>",
"exclusion": true,
"revisedDocumentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceAddress": "<string>",
"meter": "<string>",
"site": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataCollectionStopDate": "2023-12-25",
"externalId": "<string>",
"address": "<string>",
"path": [
"<string>"
],
"occupancyPercent": "<string>",
"occupancyApplicationMode": "DISABLED",
"dummySiteReason": "<string>"
},
"identifiers": [
{
"rawName": "<string>",
"value": "<string>",
"name": "<string>"
}
],
"datasourceType": "ELECTRICITY",
"timeOfUse": "PEAK",
"netMeteringType": "EXPORT",
"waterType": "POTABLE_WATER",
"meterHighLow": "HIGH",
"gasType": "NATURAL_GAS",
"fuelType": "ANTHRACITE_COAL",
"districtType": "HEATING",
"districtMediumType": "HOT_WATER",
"wasteDescription": "<string>",
"wasteType": "<string>",
"wasteStream": "<string>",
"refrigerantType": "R11",
"additionalFields": {},
"meterIsTracked": true,
"meterAddress": "<string>",
"electricityType": "USAGE",
"updated": "2023-11-07T05:31:56Z",
"isEstimated": true,
"isImplied": true,
"currentReading": "<string>",
"previousReading": "<string>",
"multiplier": "<string>",
"multiplierDescription": "<string>",
"multiplier2": "<string>",
"multiplier2Description": "<string>",
"fractionRenewable": "<string>",
"netMeteringGridExportKwh": "<string>",
"tariff": "<string>",
"billedDemand": "<string>",
"supplierName": "<string>",
"utilityName": "<string>",
"country": "<string>",
"apparentUsage": "<string>",
"apparentUsageUnits": "kVAh",
"reactiveUsage": "<string>",
"reactiveUsageUnits": "kVArh",
"powerFactor": "<string>"
}
],
"lineItems": [
{
"rate": "<string>",
"usageData": [
"<string>"
],
"totalCharge": "<string>",
"description": "<string>",
"quantity": "<string>",
"quantityUnits": "<string>",
"multipliers": [
"<string>"
],
"accountIds": [
"<string>"
],
"chargeType": "TAX",
"electricityChargeType": "SUPPLY",
"electricityIsDemand": true,
"electricityTimeOfUse": "<string>",
"gasChargeType": "SUPPLY",
"billingPeriod": "CURRENT"
}
],
"supersededDocumentIds": [
"<string>"
],
"demandMeters": [
{
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"isEstimated": true,
"demandUsage": "<string>",
"demandUsageUnits": "kW",
"demandType": "<string>",
"usageDataIds": [
"<string>"
],
"description": "<string>"
}
],
"issues": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issueType": "POTENTIAL_DUPLICATE",
"description": "<string>",
"isResolved": true,
"resolvedAt": "2023-11-07T05:31:56Z",
"resolutionNotes": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"details": {
"potentialDuplicateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"updated": "2023-11-07T05:31:56Z",
"fileName": "<string>",
"email": "jsmith@example.com",
"jobId": "<string>",
"notes": "<string>",
"dueDate": "2023-12-25",
"totalCharges": "<string>",
"sourceType": "INVOICE",
"isFlagged": true,
"invoiceId": "<string>",
"previousCloseBalance": "<string>",
"afterPreviousTotalPayment": "<string>",
"afterPreviousCharges": "<string>",
"afterPreviousCredits": "<string>",
"currentOpenBalance": "<string>",
"currentCharges": "<string>",
"credits": "<string>",
"taxCharges": "<string>",
"interestCharges": "<string>",
"electricitySupplyCharges": "<string>",
"electricityDeliveryCharges": "<string>",
"electricityDemandCharges": "<string>",
"gasSupplyCharges": "<string>",
"gasDeliveryCharges": "<string>"
}
]
}Get Documents by Connection
Retrieve documents for a specified connection. Results are paginated (100 per page). Filter by date types: ‘UPDATED_DATE’, ‘CREATED_DATE’, ‘BILL_DATE’ (default), or ‘USAGE_PERIOD’. Date filters return overlapping data; ‘CREATED_DATE’ and ‘UPDATED_DATE’ use UTC and are truncated to day start. Filter by ‘isDeleted’ to include/exclude soft-deleted documents. User must have connection access to view documents.
curl --request GET \
--url https://external.nectarclimate.com/v2.2/document/connection/{connection_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/document/connection/{connection_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/document/connection/{connection_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/document/connection/{connection_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/document/connection/{connection_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/document/connection/{connection_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/document/connection/{connection_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{
"totalDocuments": 123,
"perPage": 123,
"totalPages": 123,
"currentPage": 123,
"hasNext": true,
"hasPrevious": true,
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"auditTrailUrl": "<string>",
"url": "<string>",
"billDate": "2023-12-25",
"chargesUnits": "USD",
"utilityCompany": "<string>",
"status": "<string>",
"flaggedStatus": "<string>",
"revisedDocumentId": "<string>",
"connectionId": "<string>",
"company": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyExternalId": "<string>",
"usageData": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"usage": "<string>",
"usageUnits": "J",
"timeOfUseBreakdown": [
{
"timeOfUse": "PEAK",
"usage": "<string>",
"usageUnits": "Wh",
"description": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25"
}
],
"netMeteringGeneratedKwh": "<string>",
"netMeteringGridImportKwh": "<string>",
"exclusion": true,
"revisedDocumentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceAddress": "<string>",
"meter": "<string>",
"site": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataCollectionStopDate": "2023-12-25",
"externalId": "<string>",
"address": "<string>",
"path": [
"<string>"
],
"occupancyPercent": "<string>",
"occupancyApplicationMode": "DISABLED",
"dummySiteReason": "<string>"
},
"identifiers": [
{
"rawName": "<string>",
"value": "<string>",
"name": "<string>"
}
],
"datasourceType": "ELECTRICITY",
"timeOfUse": "PEAK",
"netMeteringType": "EXPORT",
"waterType": "POTABLE_WATER",
"meterHighLow": "HIGH",
"gasType": "NATURAL_GAS",
"fuelType": "ANTHRACITE_COAL",
"districtType": "HEATING",
"districtMediumType": "HOT_WATER",
"wasteDescription": "<string>",
"wasteType": "<string>",
"wasteStream": "<string>",
"refrigerantType": "R11",
"additionalFields": {},
"meterIsTracked": true,
"meterAddress": "<string>",
"electricityType": "USAGE",
"updated": "2023-11-07T05:31:56Z",
"isEstimated": true,
"isImplied": true,
"currentReading": "<string>",
"previousReading": "<string>",
"multiplier": "<string>",
"multiplierDescription": "<string>",
"multiplier2": "<string>",
"multiplier2Description": "<string>",
"fractionRenewable": "<string>",
"netMeteringGridExportKwh": "<string>",
"tariff": "<string>",
"billedDemand": "<string>",
"supplierName": "<string>",
"utilityName": "<string>",
"country": "<string>",
"apparentUsage": "<string>",
"apparentUsageUnits": "kVAh",
"reactiveUsage": "<string>",
"reactiveUsageUnits": "kVArh",
"powerFactor": "<string>"
}
],
"lineItems": [
{
"rate": "<string>",
"usageData": [
"<string>"
],
"totalCharge": "<string>",
"description": "<string>",
"quantity": "<string>",
"quantityUnits": "<string>",
"multipliers": [
"<string>"
],
"accountIds": [
"<string>"
],
"chargeType": "TAX",
"electricityChargeType": "SUPPLY",
"electricityIsDemand": true,
"electricityTimeOfUse": "<string>",
"gasChargeType": "SUPPLY",
"billingPeriod": "CURRENT"
}
],
"supersededDocumentIds": [
"<string>"
],
"demandMeters": [
{
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"isEstimated": true,
"demandUsage": "<string>",
"demandUsageUnits": "kW",
"demandType": "<string>",
"usageDataIds": [
"<string>"
],
"description": "<string>"
}
],
"issues": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issueType": "POTENTIAL_DUPLICATE",
"description": "<string>",
"isResolved": true,
"resolvedAt": "2023-11-07T05:31:56Z",
"resolutionNotes": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"details": {
"potentialDuplicateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"updated": "2023-11-07T05:31:56Z",
"fileName": "<string>",
"email": "jsmith@example.com",
"jobId": "<string>",
"notes": "<string>",
"dueDate": "2023-12-25",
"totalCharges": "<string>",
"sourceType": "INVOICE",
"isFlagged": true,
"invoiceId": "<string>",
"previousCloseBalance": "<string>",
"afterPreviousTotalPayment": "<string>",
"afterPreviousCharges": "<string>",
"afterPreviousCredits": "<string>",
"currentOpenBalance": "<string>",
"currentCharges": "<string>",
"credits": "<string>",
"taxCharges": "<string>",
"interestCharges": "<string>",
"electricitySupplyCharges": "<string>",
"electricityDeliveryCharges": "<string>",
"electricityDemandCharges": "<string>",
"gasSupplyCharges": "<string>",
"gasDeliveryCharges": "<string>"
}
]
}Path Parameters
Query Parameters
('Optional. List of datasource types to filter by. If not provided, includes all types. Must be a sublist of "ELECTRICITY", "GAS", "WATER", "SEWER", "DISTRICT", "WASTE", "FUEL", "MISC", "REFRIGERANT", "SOLAR", "TELECOM"',)
ELECTRICITY- ElectricityGAS- GasWATER- WaterSEWER- SewerDISTRICT- DistrictWASTE- WasteFUEL- FuelMISC- MiscREFRIGERANT- RefrigerantSOLAR- SolarTELECOM- Telecom
ELECTRICITY, GAS, WATER, SEWER, DISTRICT, WASTE, FUEL, MISC, REFRIGERANT, SOLAR, TELECOM Filter by date field: 'UPDATED_DATE' (last update date), 'CREATED_DATE' (creation date), 'BILL_DATE' (default, bill date on the document), or 'USAGE_PERIOD' (usage period start and end dates). Each date parameter is applied independently if provided. For 'CREATED_DATE' and 'UPDATED_DATE', dates are truncated to start of day (00:00:00). Example: for data after January 1, 2024, use startDate=2024-01-01; for data before January 31, 2024, use endDate=2024-01-31.
USAGE_PERIOD- Usage PeriodBILL_DATE- Bill DateCREATED_DATE- Created DateUPDATED_DATE- Updated Date
USAGE_PERIOD, BILL_DATE, CREATED_DATE, UPDATED_DATE 1Response
Serializer for paginated document response for v2.2.