Skip to main content
For platform users: See the Getting Started guide for an introduction to the Nectar dashboard and core concepts.

Prerequisites

  • A valid Nectar API key created in Settings > Organization > API Keys

API key setup in Settings

Create your API key from the Nectar dashboard before making requests.
1

Open API keys

Go to Settings > Organization > API Keys.
2

Create key

Click Create key, then add a descriptive name (for example, prod-sync-service or sandbox-integration-tests).
3

Choose environment

Select Sandbox for testing or Production for live customer data.
4

Copy and store the secret

The key value is shown once. Copy it immediately to your secret manager. Do not commit it to source control or share it in chat/email.
Rotate keys safely by creating a new key, deploying it, validating traffic, and only then deleting the old key.

Make your first request

1

Set up authentication

All API requests require the X-API-Key header with your secret key.For all new integrations, start on v2.2. See API version differences for migration details.Secret keys are always passed as a request header. Iframe integrations use an opaque invitation token in the URL — see Connection invitations.
2

Test your API key

Verify your key is active by calling the Ping endpoint.
A 200 OK response confirms your key is valid.
3

List your companies

Retrieve all companies associated with your API key.
The response is an array of company objects.
Example response
Each company contains sites, connections, and documents. See the data model below for the full hierarchy. Other endpoints like documents and usage data return paginated responses.

Explore the API with Postman or Swagger

You can import the Nectar OpenAPI schema directly into any OpenAPI-compatible client such as Postman, Insomnia, or Swagger UI to browse endpoints, read request and response schemas, and send test requests without writing code.

Download the schema

Start with v2.2 for any new integration.

Import into Postman

1

Open Postman and import the schema

In Postman, click Import, then paste the v2.2 schema URL: https://docs.nectarclimate.com/api-reference/openapi-v2-2.jsonPostman generates a collection with all endpoints pre-populated.
2

Add your API key

In the generated collection, open Variables and set X-API-Key to your secret key. Alternatively, add it as a collection-level header under Authorization.
3

Send a request

Open the Ping request and click Send. A 200 OK confirms your key works.

Use Swagger UI

Paste any schema URL into Swagger Editor or Swagger UI to browse the full endpoint reference interactively in your browser. You can also use the API Reference tab in these docs to explore all endpoints.

Use Insomnia

In Insomnia, click Create > Import, choose From URL, and paste the schema URL. Set the X-API-Key header on the collection’s environment before sending requests.

Error responses

When a request fails, the API returns a JSON error body with a detail field:
401 Unauthorized
403 Forbidden
400 Bad Request

Rate limiting

The Nectar API does not currently enforce hard rate limits. However, you should design your integration to handle 429 Too Many Requests responses gracefully — if the API ever returns a 429, wait and retry with exponential backoff. As a best practice, avoid sending more than 10 concurrent requests.

Data model reference

Each API key is associated with a collection of Company objects. The hierarchy flows from Company down through Sites, Connections, Documents, and UsageData.

Company

A Company is the top-level entity associated with multiple Sites. Each company can have configurations that control how much historical data to process and what types of data to collect. See the Companies API.

Site

A Site represents a physical address associated with a Company. Each site can have multiple connections, documents, and usage data records. The address must be accurate — Nectar matches processed data to the site with the closest address. See the Sites API.

Connection

A Connection represents a secure integration between Nectar and a utility provider. A single connection can cover multiple data types (e.g., Electricity and Gas) and meters across different sites. Nectar identifies providers by their website root URLs. See the Utility Account Connections API.

Document

A Document represents a processed invoice or utility bill, with associated UsageData and LineItems. Documents are automatically downloaded from connected accounts on a regular basis. PDFs and PNGs can also be submitted for processing via the document upload endpoint. See the Documents API.

UsageData

UsageData contains utility consumption data for a specific meter over a specific time period, ultimately associated with a Site. UsageData can be queried by company, sites, or connection. The API also supports filtering by date range and utility type. See the Usage Data API.

Error codes

The Nectar API returns standard HTTP status codes.

Next steps

Developer guide home

Recommended docs order for integration implementation

Sandbox testing

Test with mock utility accounts and sample data

Connection invitations

Embed Nectar’s connection UI in your app

Webhooks

Subscribe to real-time events for connections and data

Pagination

Iterate through paginated API responses

Document upload

Upload bills for processing via the API