Pulling data
Everything the token's person can see on the website, as JSON: the register, the values, and the results built on them.
What you can read
| Endpoint | What |
|---|---|
GET /properties | The properties in scope, and one by id. |
GET /measures | The register: each measure's code, unit, frequency and points (what writes name). |
GET /meters | Meters at the properties in scope. A meter's id is the meterId of its values. |
GET /data-points | Stored values, paged, with incremental sync. |
GET /properties/{id}/scorecard | A property's scores for a year, as the website shows them. |
GET /properties/{id}/footprint | Scope 1, 2 and 3 in kg CO2e for a year. |
GET /travel/summary | Business travel by mode, with no names. |
GET /tasks | Tasks the person can see. |
Paging
GET /data-points answers up to limit values (100 unless asked, at most 500) and a nextCursor. Pass it back as cursor, unchanged and with the same filters, until it is null. The cursor is a position in the order of change, so a value changed while you page is not skipped: it comes again later.
curl "https://portal.canoprise.io/api/v1/data-points?propertyId=PROPERTY_ID&from=2026-01-01&limit=500" \
-H "Authorization: Bearer cnp_…"Incremental sync
Keep the latest updatedAt you have seen and pass it as updatedSince next time. Going back a minute is safe and recommended: values that come again match by id, and a value still being saved when you last asked is not missed. Deleted values are not reported in v1; to catch them, re-read a period now and then.
// Keep values in step with Canoprise: run as often as you like.
const BASE = "https://portal.canoprise.io/api/v1";
const headers = { Authorization: "Bearer cnp_…" }; // the token, from your secret store
async function sync(since) { // since: the latest updatedAt you have stored, or null the first time
const from = since ? new Date(new Date(since).getTime() - 60_000).toISOString() : null; // a minute back: safe, values match by id
let cursor = null, latest = since;
for (;;) {
const q = new URLSearchParams({ limit: "500" });
if (from) q.set("updatedSince", from);
if (cursor) q.set("cursor", cursor);
const res = await fetch(`${BASE}/data-points?${q}`, { headers });
if (res.status === 429) { await new Promise((r) => setTimeout(r, Number(res.headers.get("Retry-After")) * 1000)); continue; } // wait, then ask again
if (!res.ok) throw new Error((await res.json()).error.message);
const page = await res.json();
for (const dp of page.items) { upsert(dp); if (!latest || dp.updatedAt > latest) latest = dp.updatedAt; } // upsert by dp.id
if (!(cursor = page.nextCursor)) break;
}
return latest; // store it for next time
}The rules in full
Stored values at the properties in scope, oldest change first, paged on (updatedAt, id). Give nextCursor back as cursor, unchanged, until it is null. A value changed while you page comes again on a later page, so none is skipped.
Incremental sync: keep the latest updatedAt you have seen and pass it as updatedSince next time (strictly after it). Re-syncing from a minute earlier is safe and recommended: values come again and are matched by id, and a write still being saved when you last asked is not missed. Adding evidence moves a value's updatedAt, so its evidence count syncs too. Deleted data points are not reported: v1 has no feed of deletions.
Statuses: DRAFT, SUBMITTED, REVIEWED, VERIFIED, LOCKED. Drafts appear only with status=DRAFT. A figure held for checking (far from the usual) reports status SUBMITTED with held: true, and status=SUBMITTED includes it. A meter reading appears as the use it produced, with the dial's figure in reading. Needs data.read.