curl --request GET \
--url https://external.nectarclimate.com/v2.2/usage/document/{document_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/usage/document/{document_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/usage/document/{document_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/usage/document/{document_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/usage/document/{document_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/usage/document/{document_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/usage/document/{document_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{
"totalUsageData": 123,
"perPage": 123,
"totalPages": 123,
"currentPage": 123,
"hasNext": true,
"hasPrevious": true,
"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",
"document": {
"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>",
"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
},
"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>"
}
]
}{
"detail": "<string>",
"error": "<string>"
}Get Usage Data by Document
Retrieve usage data for a specific document. Results are paginated (100 per page). Filter by date types: ‘UPDATED_DATE’, ‘CREATED_DATE’, ‘BILL_DATE’, or ‘USAGE_PERIOD’ (default). Date filters return overlapping data; ‘CREATED_DATE’ and ‘UPDATED_DATE’ use UTC and are truncated to day start. Filter by datasource type to include specific utility types. Filter by meter identifier value (account number, meter number, etc.). User must have company access to view usage data. For complete meter and cost usage information for a document, see the ‘Get Document Details’ endpoint.
curl --request GET \
--url https://external.nectarclimate.com/v2.2/usage/document/{document_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://external.nectarclimate.com/v2.2/usage/document/{document_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/usage/document/{document_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/usage/document/{document_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/usage/document/{document_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/usage/document/{document_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.nectarclimate.com/v2.2/usage/document/{document_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{
"totalUsageData": 123,
"perPage": 123,
"totalPages": 123,
"currentPage": 123,
"hasNext": true,
"hasPrevious": true,
"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",
"document": {
"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>",
"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
},
"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>"
}
]
}{
"detail": "<string>",
"error": "<string>"
}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
Paginated response for usage data in v2.2.