Skip to main content
For platform users: See the Connections page for dashboard-level guidance, or the Troubleshooting guide for step-by-step resolution instructions.

Overview

A connection represents a link between Nectar and a utility provider. After creation, a connection moves through a series of statuses as Nectar authenticates, discovers accounts, and collects data. Your integration should monitor these statuses and respond appropriately — some require action from you or your end user, while others resolve automatically.

Status flow

Connections follow this general lifecycle:

What each status means for your integration

Healthy statuses — no action needed

StatusAPI valueWhat’s happeningWhat to do
PendingPENDINGConnection was just created and is waiting for the first check.Wait. The first check typically runs within a few days.
ConnectedCONNECTEDNectar can log in and is collecting data on its weekly schedule.Nothing — data is flowing.
Under InvestigationUNDER_INVESTIGATIONNectar’s team has flagged this connection for review.Wait for resolution. Contact support for a status update if needed.

Credential errors — user action required

These statuses mean data collection is paused until the end user provides updated credentials. Your integration should surface these to the user and provide a way to fix them.
StatusAPI valueCauseRequired action
Password IncorrectPASSWORD_INCORRECTThe utility website rejected the stored credentials. The user likely changed their password.User must provide the updated password. Generate a magic link or update credentials through the connection edit flow.
MFA Token ExpiredMFA_TOKEN_EXPIREDThe utility portal requires a multi-factor authentication challenge (SMS code, authenticator app, etc.).User must complete the MFA challenge. This requires an interactive session — generate a magic link so the user can complete it directly.
New Password NeededNEW_PASSWORD_NEEDEDThe utility portal is forcing a password reset (common every 60–90 days on some providers).User must first reset their password on the utility website directly, then provide the new password to Nectar via a magic link or credential update.
Additional Credentials NeededADDITIONAL_CREDENTIALS_NEEDEDThe portal is requesting extra verification — security questions, a PIN, or identity confirmation.User must provide the additional information. Generate a magic link for them to complete the flow.
Magic links are the recommended way to handle credential errors. They let the end user update credentials directly in a secure Nectar-hosted UI without sharing passwords with your application. See Magic link integration.

Provider errors — automatic retry

These statuses are caused by issues on the utility provider’s side. Nectar retries automatically on the next weekly check. No action is required, but you may want to surface them to users for visibility.
StatusAPI valueCauseExpected resolution
Website DownWEBSITE_DOWNThe utility provider’s website is temporarily unavailable.Resolves automatically when the provider comes back online. Usually within a few days.
URL InaccessibleURL_INACCESSIBLEThe provider URL cannot be reached — the site may have moved or changed domains.If persistent, verify the URL is still valid. Contact support if the provider has changed their website.
No Accounts FoundNO_ACCOUNTS_FOUNDNectar logged in successfully but found no utility accounts.May resolve on next check. If persistent, the login may be for a different service (payment-only portal) or accounts may have been closed.
Other ErrorOTHER_ERRORAn unexpected issue not covered by other statuses.May resolve on retry. If persistent, contact support with the connection ID and company name.

System statuses

StatusAPI valueWhat it means
Company InactiveCOMPANY_INACTIVEThe parent company has been deactivated. All connections under it stop running. Contact support to reactivate.

Handling status changes in your integration

Subscribe to webhooks

The most efficient way to track connection status changes is via webhooks. Subscribe to these event types:
Event typeWhen it fires
connection.created.v2A new connection is created.
connection.updated.v2A connection’s details or status change. Includes protectedChanges and old fields so you can see what changed.
connection.validated.v2A connection has been validated by Nectar after initial setup.
The connection.updated.v2 payload includes a protectedChanges array listing which fields changed, and an old object with the previous values:
{
  "eventType": "connection.updated.v2",
  "protectedChanges": ["status"],
  "old": {
    "status": "PENDING"
  },
  "status": "CONNECTED",
  "id": "a6c70a54-34e7-4277-80b0-412869ce087c",
  ...
}

Poll for status

If webhooks aren’t suitable for your architecture, poll the connection detail endpoint periodically:
curl -X GET 'https://external.nectarclimate.com/v2.2/connection/{connectionId}/details' \
  -H 'X-API-Key: YOUR_SECRET_KEY'
Or list all connections for a company and filter by status:
curl -X GET 'https://external.nectarclimate.com/v2.2/connection/company/{companyId}?status=PASSWORD_INCORRECT' \
  -H 'X-API-Key: YOUR_SECRET_KEY'
1

Monitor for credential errors

Subscribe to connection.updated.v2 webhooks. When a status change arrives, check if the new status is one of the four credential errors: PASSWORD_INCORRECT, MFA_TOKEN_EXPIRED, NEW_PASSWORD_NEEDED, or ADDITIONAL_CREDENTIALS_NEEDED.
2

Notify the end user

Surface the error in your application’s UI. Include the connection’s utility provider name (from the datasource.name field) and a clear description of what’s needed.
3

Generate a magic link

Use the magic link endpoint to generate a secure URL the user can visit to update their credentials. See Magic link integration for details.
4

Confirm resolution

After the user completes the flow, a new connection.updated.v2 webhook fires with status: "CONNECTED". Update your UI accordingly.

Account lifecycle

Each connection contains one or more accounts — individual utility accounts discovered on the provider’s website. Accounts have their own status and tracking lifecycle.

Account statuses

StatusAPI valueDescription
DetectedDETECTEDAccount discovered but not yet confirmed.
OnboardedONBOARDEDAccount confirmed and actively tracked.
Pull CompletedPULL_COMPLETEDData has been successfully collected and processed.
No Documents FoundNO_DOCUMENTS_FOUNDNo bills were found for this account.
PDF Download FailedPDF_DOWNLOAD_FAILEDBills exist but could not be downloaded.
Account Not FoundACCOUNT_NOT_FOUNDAccount is no longer visible on the provider’s website.
Workflow Not AccessibleWORKFLOW_NOT_ACCESSIBLEThe parent connection has an issue (e.g., password incorrect).
Other ErrorOTHER_ERRORUnexpected error during collection.
Old AccountOLD_ACCOUNTAccount is closed — no new data expected.
DuplicateDUPLICATEThis account duplicates another tracked account.
Customer Not TrackedCUSTOMER_NOT_TRACKEDYou chose not to track this account.
Company InactiveCOMPANY_INACTIVEParent company is deactivated.

Account tracking

After Nectar discovers accounts on a connection, you can confirm which ones to track using the confirm endpoint:
# Enable tracking for discovered accounts
curl -X PATCH 'https://external.nectarclimate.com/v2.2/connection/{connectionId}/status' \
  -H 'X-API-Key: YOUR_SECRET_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"confirm": true}'
Each account also has a trackingStatus field:
ValueMeaning
UNSETNo tracking decision has been made yet.
ENABLEDAccount is actively tracked.
DISABLEDAccount tracking has been turned off.

Check frequency

  • Connections are checked weekly for new data.
  • Terminal account statuses (OLD_ACCOUNT, DUPLICATE, CUSTOMER_NOT_TRACKED) are not re-checked.
  • Credential errors (PASSWORD_INCORRECT, MFA_TOKEN_EXPIRED, NEW_PASSWORD_NEEDED, ADDITIONAL_CREDENTIALS_NEEDED) pause collection until the user takes action.
  • All other statuses (including provider errors like WEBSITE_DOWN) are retried on the next weekly cycle.

Connection API endpoints

EndpointMethodDescription
/connection/company/{companyId}GETList all connections for a company. Supports status filter.
/connection/company/{companyId}POSTCreate a new connection with credentials and site assignments.
/connection/{connectionId}/detailsGETGet full connection details including accounts.
/connection/{connectionId}/detailsPATCHUpdate connection settings (start date, occupancy multiplier).
/connection/{connectionId}/statusPATCHConfirm or reject discovered accounts.
/connection/company/{companyId}/linkGET, POSTGenerate a magic link for creating a new connection.
/connection/{connectionId}GETGenerate a magic link for editing an existing connection.