Authentication
Nectar supports two authentication methods for connecting to the Watershed API:OAuth 2.0 Client Credentials (recommended)
OAuth 2.0 is Watershed’s enterprise-grade authentication standard. It uses short-lived access tokens instead of a static API key, reducing risk if credentials are compromised. To set up OAuth 2.0:- Log in to the Watershed portal and navigate to the API section under Organization settings.
- Click Create credentials to generate a new Client ID and Client Secret.
- Give the client a name, assign a role, and set the token expiration time (in minutes).
- Save the Client Secret securely — Watershed will not display it again.
- In Nectar, go to Data Export > Integrations > Watershed and choose OAuth Client Credentials as the authentication mode.
- Enter the Client ID and Client Secret. Nectar handles token exchange and renewal automatically.
/oauth/token endpoint with grant_type=client_credentials. Tokens are refreshed automatically before expiration — Watershed does not use refresh tokens.
A common starting point for token lifetime is 60 minutes. Shorter lifetimes offer tighter security but increase token exchange frequency.
Bearer Token (legacy)
Static long-lived API keys. This method is simpler to configure but less secure — if the key is compromised, it remains valid until manually rotated. To set up a Bearer Token:- Generate a Bearer Token API key in the Watershed portal under Organization settings > API.
- In Nectar, choose Bearer Token as the authentication mode and paste the key.
Regional endpoints
Nectar supports both Watershed API regions:| Region | API host |
|---|---|
| Global | api.watershedclimate.com |
| EU | eu.api.watershedclimate.com |
Setup
Navigate to Data Export > Integrations > Watershed and complete setup from Settings > Company > Integrations > Watershed or the setup wizard when prompted. Steps include:- Authentication — Choose OAuth or Bearer Token and enter credentials.
- Connection test — Nectar validates the credentials by fetching available datasets from Watershed.
- Dataset selection — Choose which upload schemas to use for electricity and gas.
- Site mapping — Map Nectar sites to Watershed building identifiers (include or exclude each site).
Integration hub
The Watershed integration page at Data Export > Integrations > Watershed is a single-page layout:- Page header — Archive (deactivate the integration) and Settings (credentials, site mapping, datasets)
- Warning banners — Invalid credentials, unconfigured sites, excluded sites, or disabled data sources block API push until resolved in settings
- Status card — Connected, File export only, or setup warnings, with an Export button that opens the export dialog
- Recent syncs & downloads — Latest Watershed exports and API pushes. Click a sync row to open the upload detail page; click a download row for the export detail sheet
- Data comparison — When API push is fully enabled, month-by-month Nectar vs Watershed usage with discrepancy statuses (same scope as the upload detail comparison)
Exporting
Click Export to open the export dialog. Configure utility type, date range, and sites, and choose whether to push the data to Watershed via API or download an XLSX for manual upload. A progress dialog shows upload status. The sync process follows Watershed’s Data Ingestion API workflow:- Create upload — Registers a new upload with Watershed, specifying the dataset and schema.
- Load data — Sends usage records in batches (up to 10,000 records per request).
- Validate — Watershed checks the uploaded data against the schema and reports errors.
- Submit — Marks the upload as final and associates it with a measurement task.
Recent syncs & downloads
The history card lists your latest Watershed exports and API pushes. Click a sync row to open the upload detail page. Click a download row to open the export detail sheet with configuration and a re-download link. Use Data Export > History for the full cross-integration log.Data comparison — find and resolve discrepancies
When API push is fully configured, the Data comparison section on the hub reconciles what Watershed holds against your Nectar data. Unlike Metrio and Sphera, Watershed data cannot be edited once submitted, so this view is for finding discrepancies and deciding what to re-upload — there are no inline Push/Sync buttons. How to use it:- Set the scope with the filters:
- Year (required) — The comparison always covers one calendar year; clearing it resets to the current year.
- Utility type — Electricity, gas, or water. Only the utility types enabled for your integration appear.
- Sites — Narrow to specific mapped sites. Only sites actively mapped to a Watershed building participate.
- Datasets — Choose which Watershed uploads to count. All submitted and validated uploads are selected by default.
- Read the usage chart — Nectar and Watershed monthly totals are plotted side by side. Click a month to open the aggregation inspector for the selected sites and commodity — this shows exactly which Nectar bills and meters make up that month’s total, so you can see why the two sides differ.
- Scan the monthly comparison table — Each row shows the month, Nectar value, Watershed value, the percentage difference (red = Watershed lower, amber = Watershed higher), and a status.
- Synced — Watershed matches your data for that month
- Diff — Both sides have data but the values differ
- Not on Watershed — Nectar has data Watershed never received
- Missing in Nectar — Watershed holds a value your data no longer produces
- Use the month click → aggregation inspector to confirm whether the gap is a Nectar data issue (missing or flagged bills) or a stale Watershed upload.
- If Nectar is wrong, fix the bills in Data Inventory, then run a new export for the affected scope.
- If Watershed is wrong, delete the affected upload in your Watershed dashboard first, then re-export from Nectar with Upload to Watershed enabled.
Upload detail page
Click a sync in the recent history card to open the upload detail page. It includes:- Upload header — Name, status, and date
- Comparison view — Nectar vs Watershed data for the upload’s scope
- Contributing data — Bills and meters that were included in the upload
Data format
Nectar sends aggregated monthly utility usage to Watershed. Each record includes:| Field | Description |
|---|---|
building_identifier | Watershed building name (mapped from your Nectar site) |
start_date_inclusive | First day of the billing month (YYYY-MM-DD) |
electricity_consumption | Monthly electricity usage value |
electricity_unit | Unit of measurement (kwh or mwh) |
fuel_type | Fuel type (Natural Gas) |
fuel_consumption | Monthly gas usage value |
fuel_unit | Unit of measurement (therm, ccf, mmbtu, etc.) |
FAQ
How does Nectar map sites to Watershed buildings?
How does Nectar map sites to Watershed buildings?
Nectar matches sites to Watershed using the site mapping you configure during setup. Go to the Watershed integration settings to map each Nectar site to its corresponding Watershed building identifier.
Can I edit data after uploading to Watershed?
Can I edit data after uploading to Watershed?
No. Watershed does not allow modification of submitted data via API. If you need to correct data, you may need to work with Watershed support or use their manual correction workflows.
What datasets does Nectar send to Watershed?
What datasets does Nectar send to Watershed?
Nectar sends utility usage data (electricity and gas) to the Utilities dataset in Watershed. Other datasets may be added as Nectar expands data type support.
What happens if my OAuth token expires mid-sync?
What happens if my OAuth token expires mid-sync?
Nectar automatically obtains a new access token before making API requests. If a token expires during a long-running sync, Nectar detects the 401 response and retries with a fresh token.
Which authentication method should I use?
Which authentication method should I use?
OAuth 2.0 Client Credentials is recommended for all new setups. It provides short-lived tokens, reducing the impact of credential compromise. Bearer tokens are supported for backward compatibility but may be deprecated by Watershed in the future.
How do I rotate my Watershed credentials?
How do I rotate my Watershed credentials?
For OAuth: generate new credentials in the Watershed portal and update them in Nectar. For Bearer tokens: generate a new key in Watershed, update it in Nectar, then deactivate the old key. See Watershed’s key rotation guide.