{"openapi":"3.1.0","info":{"title":"Canoprise API","version":"1.0.0","description":"Read and write the Canoprise data a person can see and enter on the website, and work out carbon for trips and energy.\n\n**Authentication.** Every call but GET /openapi.json carries a token made on the profile (Apps and AI tools) in the header\n`Authorization: Bearer cnp_…`, and nowhere else: a `token` or `access_token` in the address or the body answers 400 `token_in_url`.\nA token acts as its person, with their role and their properties, looked up afresh on every call. Phone app sign-ins are not accepted here.\nA revoked or expired token, or one whose person is deactivated, answers 401 `invalid_token`; when the group has switched access with\ntokens off, every call answers 403 `access_off`.\n\n**Permissions.** Reads need the role's `data.read` (GET /me does not); without it, 403 `forbidden`. Writes need a read-and-write token\n(else 403 `read_only_token`) and the role's `data.enter` (values, readings, evidence) or `tasks.assign` (tasks). POST /calculate stores\nnothing and is a read. Anything outside the person's properties answers 404 `not_found`, exactly as something that does not exist.\n\n**Limits.** Per token, in fixed one-minute windows: 120 reads and 30 writes a minute. A batch is one call; POST /calculate\ncounts as a read. Over the limit the answer is 429 `rate_limited` with `Retry-After` (seconds until the next window); a 429 is not counted.\nJSON bodies are capped at 1 MB and evidence uploads at 25 MB (413 `too_large`).\n\n**Errors** all have one shape, `{ \"error\": { \"code\": \"…\", \"message\": \"…\" } }`: `bad_request` and `token_in_url` 400, `invalid_token` 401,\n`forbidden`, `access_off` and `read_only_token` 403, `not_found` 404, `method_not_allowed` 405, `too_large` 413, `rate_limited` 429,\nand `server_error` 500 with no detail. OPTIONS answers 405 everywhere: the API sends no CORS headers and is for servers, not web pages.\n\n**Formats.** JSON, camelCase fields, dates as `YYYY-MM-DD` and times in ISO 8601 with a zone. A period's `periodEnd` is the day after its last.\n`meterId` always means a meter's id as GET /meters gives it (the series); the number printed on the meter itself is `serial`.\n\n**Webhooks.** A group administrator subscribes an https address to events in Group settings, Webhooks. Each event is POSTed as JSON (at most\n64 KB) with `Canoprise-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.body\">` and `Canoprise-Event-Id`, at least once:\nde-duplicate on the event id. A failed attempt is tried again after 1 min, 5 min, 30 min, 2 h, 6 h, then every\n6 h, for 24 hours; then the subscription is paused and its administrator told. Redirects are not followed. See the `webhooks` of this description."},"servers":[{"url":"https://portal.canoprise.io/api/v1","description":"Production"},{"url":"https://staging.canoprise.io/api/v1","description":"Staging"}],"tags":[{"name":"Account"},{"name":"Properties"},{"name":"Register","description":"Measures and meters: what writes name."},{"name":"Data points"},{"name":"Tasks"},{"name":"Travel"},{"name":"Calculator"},{"name":"Description"},{"name":"Webhooks","description":"What Canoprise sends to a subscription's address."}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Who the token acts as","description":"The person's name, role and the role's full permissions, how many properties the token sees, whether it can write, and when it expires. Needs no permission: any valid token.","security":[{"bearer":[]}],"responses":{"200":{"description":"The token's person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"},"example":{"name":"Priya Shah","role":"Property manager","permissions":["data.read","data.enter","tasks.assign"],"properties":4,"write":true,"expiresAt":"2027-02-27T10:00:00.000Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/properties":{"get":{"operationId":"listProperties","tags":["Properties"],"summary":"Properties in scope","description":"The properties the token's person can see, by name. Needs `data.read`.","security":[{"bearer":[]}],"responses":{"200":{"description":"The properties.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Property"}},"example":[{"id":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","name":"Tideway Bristol","country":"UK","brand":"Tideway","segment":"HOTEL","orgUnit":"UK & Ireland","rooms":180}]}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/properties/{id}":{"get":{"operationId":"getProperty","tags":["Properties"],"summary":"One property","description":"One property in scope. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The property's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Property"},"example":{"id":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","name":"Tideway Bristol","country":"UK","brand":"Tideway","segment":"HOTEL","orgUnit":"UK & Ireland","rooms":180}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/properties/{id}/scorecard":{"get":{"operationId":"getScorecard","tags":["Properties"],"summary":"A property's scorecard for a year","description":"The overall score, last year's, how much data is entered, each dimension's score and each measure's value, score, baseline, target and pace, as the website shows them. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The property's id.","schema":{"type":"string"}},{"name":"year","in":"query","description":"From 2015 to the reporting year; the reporting year when left out.","schema":{"type":"integer","minimum":2015}}],"responses":{"200":{"description":"The scorecard.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scorecard"},"example":{"propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","name":"Tideway Bristol","year":2026,"score":71.4,"lastYear":66.2,"dataEnteredPct":83,"dimensions":[{"name":"Environment","score":74.5}],"measures":[{"code":"ENV-01","name":"Energy consumption","topic":"Energy","domain":"ENVIRONMENT","value":61.2,"unit":"kWh","perRoomNight":true,"lowerIsBetter":true,"score":68.3,"baseline":70.1,"target":56.1,"pace":"ON_TRACK"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/properties/{id}/footprint":{"get":{"operationId":"getFootprint","tags":["Properties"],"summary":"A property's carbon footprint for a year","description":"Scope 1, Scope 2 (location- and market-based) and Scope 3 in kg CO2e. Scope 3 includes business travel on the CO2e basis; `travel` gives it on both bases. A property not in the group that year has zeros. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The property's id.","schema":{"type":"string"}},{"name":"year","in":"query","description":"From 2015 to the reporting year; the reporting year when left out.","schema":{"type":"integer","minimum":2015}}],"responses":{"200":{"description":"The footprint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Footprint"},"example":{"year":2026,"scope1Kg":182340.5,"scope2LocationKg":95210.2,"scope2MarketKg":40112.8,"scope3Kg":61022.4,"travel":{"co2eKg":8120.3,"withNonCo2Kg":13804.5}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/measures":{"get":{"operationId":"listMeasures","tags":["Register"],"summary":"The register of measures","description":"Each measure's code, name, domain, unit and frequency, and its points in order (number, type, unit). The same for every group. Needs `data.read`.","security":[{"bearer":[]}],"responses":{"200":{"description":"The measures.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Measure"}},"example":[{"code":"ENV-01","name":"Energy consumption","domain":"ENVIRONMENT","unit":"kWh","frequency":"MONTHLY","points":[{"number":1,"name":"Energy used, per series","type":"METER","unit":"kWh"},{"number":2,"name":"Energy cost, per series","type":"MONEY","unit":null}]}]}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/meters":{"get":{"operationId":"listMeters","tags":["Register"],"summary":"Meters in scope","description":"The meters (series) at the properties in scope, for pushing values and readings. A meter's `id` is the `meterId` of data points; `serial` is the number printed on the meter. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"propertyId","in":"query","required":false,"description":"Only this property's meters. Outside the token's scope: 404.","schema":{"type":"string"}}],"responses":{"200":{"description":"The meters.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Meter"}},"example":[{"id":"3e1430e1-e9b1-4c4d-ac85-c43085a1b2c3","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","point":1,"name":"Main electricity meter","sourceType":"grid_electricity","unit":"kWh","serial":"E1","role":"PRIMARY","active":true}]}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/data-points":{"get":{"operationId":"listDataPoints","tags":["Data points"],"summary":"Values, paged, with incremental sync","description":"Stored values at the properties in scope, oldest change first, paged on (updatedAt, id). Give `nextCursor` back as `cursor`, unchanged,\nuntil it is null. A value changed while you page comes again on a later page, so none is skipped.\n\n**Incremental sync:** keep the latest `updatedAt` you have seen and pass it as `updatedSince` next time (strictly after it). Re-syncing from\na 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\nmissed. Adding evidence moves a value's `updatedAt`, so its evidence count syncs too. Deleted data points are not reported: v1 has no feed of\ndeletions.\n\n**Statuses:** DRAFT, SUBMITTED, REVIEWED, VERIFIED, LOCKED. Drafts appear only with `status=DRAFT`. A figure held for checking (far from the\nusual) reports status SUBMITTED with `held: true`, and `status=SUBMITTED` includes it. A meter reading appears as the use it produced, with the\ndial's figure in `reading`. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"propertyId","in":"query","required":false,"description":"Only this property's values. Outside the token's scope: 404.","schema":{"type":"string"}},{"name":"measure","in":"query","description":"A measure's code.","schema":{"type":"string"}},{"name":"from","in":"query","description":"Values whose period overlaps this day or later.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Values whose period overlaps this day or earlier.","schema":{"type":"string","format":"date"}},{"name":"status","in":"query","description":"One status. Drafts appear only when asked for; SUBMITTED includes held figures.","schema":{"type":"string","enum":["DRAFT","SUBMITTED","REVIEWED","VERIFIED","LOCKED"]}},{"name":"updatedSince","in":"query","description":"Changed strictly after this moment: ISO 8601 with a zone, e.g. 2026-11-29T10:00:00Z.","schema":{"type":"string","format":"date-time"}},{"name":"cursor","in":"query","description":"nextCursor from the page before, unchanged.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Values a page.","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"A page of values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPointPage"},"example":{"items":[{"id":"9b7e1c20-4f3a-4d8e-b6a1-2c3d4e5f6a7b","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","point":1,"meterId":"3e1430e1-e9b1-4c4d-ac85-c43085a1b2c3","periodStart":"2026-10-01","periodEnd":"2026-11-01","value":41250,"unit":"kWh","status":"SUBMITTED","held":false,"estimated":false,"evidence":1,"updatedAt":"2026-11-29T10:00:00.000Z","reading":182340}],"nextCursor":"eyJ1IjoiMjAyNi0xMS0yOVQxMDowMDowMC4wMDBaIiwiaSI6IjliN2UxYzIwLTRmM2EtNGQ4ZS1iNmExLTJjM2Q0ZTVmNmE3YiJ9"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"writeDataPoints","tags":["Data points"],"summary":"Push values and meter readings","description":"Up to 100 values or meter readings, `{ \"items\": [...] }`, saved in order, each on its own (a reading needs the one before it), through\nthe same checks as the website: the person's access to the property, locked periods, one figure per meter and period, and figures far from the\nusual held for checking. A well-formed batch answers 200 with one result per item, in order: SAVED; HELD (saved, held for checking: it reads\nback as SUBMITTED with `held: true`); DUPLICATE (already received: nothing saved again, the first outcome and data point given); REJECTED with\nwhy. A malformed body, or more than 100 items, is 400. Needs a read-and-write token and `data.enter`.\n\n**A value:** `measure` (code) and `point` as GET /measures gives them, `periodStart`, `periodEnd` (the day after the last; one day when\nleft out), `value`, `unit` (the measure's own when left out); a meter's value also names its `meterId`. **A reading:** `meterId` and\n`reading` (the dial), with `readAt`; use since the last reading is saved as the value. A meter's first reading is kept as its opening\n(SAVED, no data point yet). Types entered through the API: METER, PCT, COUNT, MONEY, SCORE, BOOL; others answer REJECTED \"This measure is not\nentered through the API.\" (documents and files go through evidence).\n\n**Idempotency:** each item's `idempotencyKey` (8 to 64 of A-Z a-z 0-9 _ -) is scoped to the token: the same key on another token is another\nitem. The same key again on this token answers DUPLICATE with the first outcome. An item rejected by Canoprise's own checks (access to the\nproperty, a locked period, the meter, the period's date, the figure, a figure already there) uses up the key: a retry answers DUPLICATE with\nthe first REJECTED outcome, so send the corrected item with a new key. A malformed item (a bad idempotencyKey, an unknown measure code, no such\npoint, a type not entered through the API, neither value nor reading) does not use up the key: correct it and send it with the same key. An\nitem whose key another call is still processing answers REJECTED \"An item with this idempotencyKey is still being processed. Try again shortly.\"\nA key whose call stopped midway (a crash or a lost connection) is released after 5 minutes: a retry after that is processed afresh.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPointBatch"},"example":{"items":[{"idempotencyKey":"bms-2026-10-main","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","point":1,"meterId":"3e1430e1-e9b1-4c4d-ac85-c43085a1b2c3","periodStart":"2026-10-01","periodEnd":"2026-11-01","value":41250,"unit":"kWh"},{"idempotencyKey":"dial-2026-11-29-e1","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","point":1,"meterId":"3e1430e1-e9b1-4c4d-ac85-c43085a1b2c3","reading":182340,"readAt":"2026-11-29T08:15:00Z"},{"idempotencyKey":"renewable-share-2026","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-02","point":1,"periodStart":"2026-01-01","periodEnd":"2027-01-01","value":64}]}}}},"responses":{"200":{"description":"One result per item, in order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResults"},"example":{"items":[{"idempotencyKey":"bms-2026-10-main","outcome":"SAVED","message":null,"dataPointId":"9b7e1c20-4f3a-4d8e-b6a1-2c3d4e5f6a7b"},{"idempotencyKey":"dial-2026-11-29-e1","outcome":"HELD","message":"Saved: 3120 kWh used over 29 days. Far from the usual figure, so it is held for checking in Canoprise.","dataPointId":"0d4c8b2a-6e1f-4a3b-9c7d-5e6f7a8b9c0d"},{"idempotencyKey":"renewable-share-2026","outcome":"REJECTED","message":"That period is locked. Ask a group administrator.","dataPointId":null}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/data-points/{id}/evidence":{"post":{"operationId":"attachEvidence","tags":["Data points"],"summary":"Attach a file to a value","description":"A file sent as multipart/form-data in the field `file`, up to 25 MB, checked by its content like any upload (PDF, images, spreadsheets, CSV and text). The data point must be in scope (404 otherwise) and not in a locked period (400). The same file twice answers the first evidence. Adding evidence moves the data point's `updatedAt`. Needs a read-and-write token and `data.enter`.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The data point's id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","description":"The file."}}}}}},"responses":{"200":{"description":"The evidence stored (or the one already there for the same file).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evidence"},"example":{"id":"e8f9a0b1-c2d3-4e5f-a6b7-c8d9e0f1a2b3","dataPointId":"9b7e1c20-4f3a-4d8e-b6a1-2c3d4e5f6a7b"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tasks":{"get":{"operationId":"listTasks","tags":["Tasks"],"summary":"Tasks the person can see","description":"As on the website's task list: the person's own (given to them or made by them) and, with `tasks.assign`, everyone's on properties in scope and those with no property. A task of their own on a property outside their scope shows no property or measure. By due date. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"status","in":"query","description":"Only open or only done tasks; all when left out.","schema":{"type":"string","enum":["OPEN","DONE"]}}],"responses":{"200":{"description":"The tasks.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"example":[{"id":"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f","title":"Read the main electricity meter","note":"The meter is in the basement plant room.","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","assignee":{"id":"u_7f3a9c","name":"Tom Reyes"},"dueDate":"2026-12-15","status":"OPEN","repeat":"NONE","doneAt":null}]}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createTask","tags":["Tasks"],"summary":"Create a task","description":"Through the same check as the website and the AI tools. `assigneeId` is required and must be someone the person may give this task (GET /people/assignable), else 400; a property outside scope is 404; `measure` is a code. With `idempotencyKey` (scoped to the token), a retry answers the first task with `duplicate: true`; a key already used for another write on the token, or one still being made, is 400 (a key whose call stopped midway is released after 5 minutes). Needs a read-and-write token and `tasks.assign`.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskWrite"},"example":{"idempotencyKey":"erp-task-2026-0042","title":"Read the main electricity meter","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","assigneeId":"u_7f3a9c","dueDate":"2026-12-15","note":"The meter is in the basement plant room."}}}},"responses":{"200":{"description":"The task, as GET /tasks gives it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreated"},"example":{"id":"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f","title":"Read the main electricity meter","note":"The meter is in the basement plant room.","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","assignee":{"id":"u_7f3a9c","name":"Tom Reyes"},"dueDate":"2026-12-15","status":"OPEN","repeat":"NONE","doneAt":null,"duplicate":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/people/assignable":{"get":{"operationId":"listAssignablePeople","tags":["Tasks"],"summary":"People a task could be given to","description":"Active people of the group who can see the property. Without `tasks.assign`, only the person themself. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"propertyId","in":"query","required":true,"description":"The property the task is about. Outside the token's scope: 404.","schema":{"type":"string"}}],"responses":{"200":{"description":"The people.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"example":[{"id":"u_7f3a9c","name":"Tom Reyes"},{"id":"u_2b81de","name":"Priya Shah"}]}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/travel/summary":{"get":{"operationId":"getTravelSummary","tags":["Travel"],"summary":"Business travel by mode","description":"Trips at the properties in scope that started in the year, by mode, on both climate bases, with no names. With no properties, an empty summary. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"year","in":"query","description":"From 2015 to the reporting year; the reporting year when left out.","schema":{"type":"integer","minimum":2015}}],"responses":{"200":{"description":"The summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelSummary"},"example":{"year":2026,"byMode":[{"mode":"FLIGHT","legs":12,"co2eKg":7310.4,"withNonCo2Kg":12427.7},{"mode":"RAIL","legs":9,"co2eKg":41.2,"withNonCo2Kg":41.2}],"totalKg":7351.6}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/calculate":{"post":{"operationId":"calculate","tags":["Calculator"],"summary":"Carbon for trips, hotel nights, electricity and fuel","description":"Kg CO2e for up to 100 items, each worked out on its own with the methods and factors the app uses for the group, for a year (2019 or\nlater; the reporting year when left out). Nothing is stored, so it is a read: `data.read`, any token of the group, counted against the read\nlimit. An item that cannot be worked out has `kgCo2e: null`, method \"Not calculated\" and an `error`; the others are still answered, and\n`totalKgCo2e` adds up those answered.\n\nEach answer gives the method and its factor, with the factor's source and vintage. `factor.checked` is false when the figure has not yet\nbeen read against its published source (an assumption, or a typical figure). A flight's factor carries `includesNonCo2Uplift: true`: it counts\nthe extra warming of flying at altitude, so `kgWithNonCo2` is the factor's figure and `kgCo2e` is that ÷ 1.7, the last step of `method`.\nElectricity is the location-based grid factor for the country; a country with none is an error on that item. Find airport codes with\nGET /airports.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalcRequest"},"example":{"year":2026,"items":[{"type":"flight","from":"LHR","to":"JFK","cabin":"business","returnTrip":true},{"type":"hotel","nights":3,"country":"France","stars":4},{"type":"transfer","by":"taxi","distanceKm":25},{"type":"electricity","kWh":10000,"country":"UK"}]}}}},"responses":{"200":{"description":"Each item answered, and the total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalcResponse"},"example":{"year":2026,"items":[{"type":"flight","kgCo2e":4082.533989,"kgWithNonCo2":6940.307781,"method":"LHR–JFK: 5,540 km great circle + 8% for routing, there and back = 11966 km × 0.58 kg per passenger-km; ÷ 1.7 to leave out the warming at altitude = 4082.5 kg CO2e","factor":{"key":"flight:long:business","value":0.58,"unit":"per passenger-km","source":"DESNZ business travel – air (earlier edition)","vintage":null,"checked":false,"includesNonCo2Uplift":true}},{"type":"hotel","kgCo2e":22.2,"method":"3 nights × 7.4 kg per room-night (France, 4-star)","factor":{"key":"hotel:class","value":7.4,"unit":"kg CO2e per room-night","source":"Cornell Hotel Sustainability Benchmarking Index 2025 (2023 data), HCMI rooms footprint per occupied room, non-resort hotels, country median","vintage":"2025","checked":true}},{"type":"transfer","kgCo2e":3.71525,"method":"transfer by taxi: 25 km × 0.14861 kg per passenger-km","factor":{"key":"taxi","value":0.14861,"unit":"per passenger-km","source":"DESNZ 2025 business travel – land (secondary listing)","vintage":null,"checked":false}},{"type":"electricity","kgCo2e":2070,"method":"10000 kWh × 0.207 kg CO2e per kWh (location-based grid, UK)","factor":{"key":"grid:UK","value":0.207,"unit":"kg CO2e per kWh","source":"DEFRA 2025 location-based","vintage":"2025","checked":false}}],"totalKgCo2e":6178.449239}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/airports":{"get":{"operationId":"searchAirports","tags":["Calculator"],"summary":"Find airports","description":"Airports by code, city or name, best match first, for a flight in POST /calculate. Needs `data.read`.","security":[{"bearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"description":"At least 2 characters: a code, a city or a name.","schema":{"type":"string","minLength":2}},{"name":"limit","in":"query","description":"How many.","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"The airports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AirportList"},"example":{"items":[{"code":"LHR","name":"Heathrow Airport","city":"London","country":"GB","label":"London Heathrow (LHR)","scheduled":true}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/InvalidToken"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","tags":["Description"],"summary":"This description","description":"This OpenAPI 3.1 description of the API. Public: no token.","security":[],"responses":{"200":{"description":"The description.","content":{"application/json":{"schema":{"type":"object"},"example":{"openapi":"3.1.0","info":{"title":"Canoprise API","version":"1.0.0"}}}}}}}}},"webhooks":{"data_point.saved":{"post":{"operationId":"webhook_data_point_saved","tags":["Webhooks"],"summary":"A value is submitted","description":"A value was submitted: on the website, from a file, the phone app, the API, a survey or an approved policy. Drafts are not sent. A value held for checking (far from the usual figure) is SUBMITTED with `held` true; when someone confirms it, it is sent again with `held` false. A value changed in place (an amendment, a file or survey replacing it, a policy approval turning a No into a Yes) is sent again with `amended` true and its status as it now stands.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDataPointSaved"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"data_point.saved","createdAt":"2026-11-29T10:15:00.000Z","data":{"dataPointId":"9b7e1c20-4f3a-4d8e-b6a1-2c3d4e5f6a7b","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","point":1,"meterId":"3e1430e1-e9b1-4c4d-ac85-c43085a1b2c3","periodStart":"2026-10-01","periodEnd":"2026-11-01","value":41250,"unit":"kWh","status":"SUBMITTED","held":false,"amended":false,"importId":null}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"data_point.reviewed":{"post":{"operationId":"webhook_data_point_reviewed","tags":["Webhooks"],"summary":"A value is marked as reviewed","description":"A submitted value was marked as reviewed by someone who may review values.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDataPointReviewed"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"data_point.reviewed","createdAt":"2026-11-29T10:15:00.000Z","data":{"dataPointId":"9b7e1c20-4f3a-4d8e-b6a1-2c3d4e5f6a7b","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","measure":"ENV-01","point":1,"meterId":"3e1430e1-e9b1-4c4d-ac85-c43085a1b2c3","periodStart":"2026-10-01","periodEnd":"2026-11-01","status":"REVIEWED","reviewedBy":"u_7f3a9c"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"task.created":{"post":{"operationId":"webhook_task_created","tags":["Webhooks"],"summary":"A task is created","description":"A task was created by a person: on the website (also from a plan action or a survey follow-up), through the API or an AI tool, or as the next of a repeating task. Tasks Canoprise gives administrators itself are not sent.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTaskCreated"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"task.created","createdAt":"2026-11-29T10:15:00.000Z","data":{"taskId":"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","title":"Read the main electricity meter","assigneeId":"u_7f3a9c","createdBy":"u_2b8e1d","dueDate":"2026-12-15","repeat":"NONE","status":"OPEN","measure":"ENV-01"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"task.done":{"post":{"operationId":"webhook_task_done","tags":["Webhooks"],"summary":"A task is marked done","description":"A task was marked done. Reopening a task sends nothing.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTaskDone"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"task.done","createdAt":"2026-11-29T10:15:00.000Z","data":{"taskId":"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","doneAt":"2026-11-29T10:15:00.000Z","doneBy":"u_7f3a9c"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"policy.approved":{"post":{"operationId":"webhook_policy_approved","tags":["Webhooks"],"summary":"A policy is approved","description":"A version of a policy, or of a property's addendum to one, was approved.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPolicyApproved"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"policy.approved","createdAt":"2026-11-29T10:15:00.000Z","data":{"policyId":"0d4c2b1a-7e6f-4a5b-9c8d-1e2f3a4b5c6d","kind":"environment","addendumId":null,"propertyId":null,"versionId":"7a6b5c4d-3e2f-4a1b-8c9d-0e1f2a3b4c5d","version":3,"approvedAt":"2026-11-29T10:15:00.000Z","approvedBy":"u_7f3a9c"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"period.locked":{"post":{"operationId":"webhook_period_locked","tags":["Webhooks"],"summary":"The reporting lock is set","description":"A group administrator set the reporting lock: values for periods ending on or before `lockedThrough` can no longer be changed, except by an administrator with a reason.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPeriodLocked"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"period.locked","createdAt":"2026-11-29T10:15:00.000Z","data":{"lockedThrough":"2026-09-30","reason":"Q3 report submitted","setBy":"u_7f3a9c"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"import.staged":{"post":{"operationId":"webhook_import_staged","tags":["Webhooks"],"summary":"A file or a connection's figures are ready to check","description":"A file was uploaded, or a scheduled connection read its figures, and they wait for a person to check and save them. Nothing is saved yet: each value saved later sends its own `data_point.saved`.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookImportStaged"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"import.staged","createdAt":"2026-11-29T10:15:00.000Z","data":{"importId":"b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e","propertyId":"5f0c2a3e-8d1b-4c7a-9e2f-1a2b3c4d5e6f","source":"connection","fileName":"Xero 2026 purchases.json","rows":42,"uploadedBy":"u_7f3a9c","connectionId":"e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b","period":"2025"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}},"ping":{"post":{"operationId":"webhook_ping","tags":["Webhooks"],"summary":"A test","description":"Sent only by \"Send a test\" on the subscription's page, to that subscription. Tried once, never retried.","parameters":[{"name":"Canoprise-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with the subscription's signing secret>`.","schema":{"type":"string"}},{"name":"Canoprise-Event-Id","in":"header","required":true,"description":"The event's id: the same on every retry.","schema":{"type":"string"}},{"name":"Canoprise-Event-Type","in":"header","required":true,"description":"The event's type.","schema":{"type":"string","enum":["data_point.saved","data_point.reviewed","task.created","task.done","policy.approved","period.locked","import.staged","ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPing"},"example":{"id":"3f2e1d0c-9b8a-4765-a4b3-c2d1e0f9a8b7","type":"ping","createdAt":"2026-11-29T10:15:00.000Z","data":{"webhookId":"f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is tried again."}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A token made on the profile (Apps and AI tools), cnp_…"}},"schemas":{"Error":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["code","message"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["bad_request","token_in_url","invalid_token","forbidden","access_off","read_only_token","not_found","method_not_allowed","too_large","rate_limited","server_error"]},"message":{"type":"string"}}}}},"Me":{"type":"object","required":["name","role","permissions","properties","write","expiresAt"],"additionalProperties":false,"properties":{"name":{"type":"string"},"role":{"type":["string","null"],"description":"The role's name; null when the person has none."},"permissions":{"type":"array","items":{"type":"string","enum":["data.read","data.enter","data.amend","data.review","data.override_lock","evidence.read","data.export","certification.export","plan.manage","meters.manage","targets.manage","maturity.manage","surveys.manage","projects.manage","travel.manage","tasks.assign","audit.read","explore.use","reports.create","reports.share","projects.approve","compare.named","properties.all","structure.manage","settings.manage","roles.manage","users.deactivate","users.invite"]},"description":"The role's full list of permissions."},"properties":{"type":"integer","description":"How many properties the token can see."},"write":{"type":"boolean","description":"A read-and-write token."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"When the token stops working; null when it has no end date (it still stops after 90 days unused)."}}},"Property":{"type":"object","required":["id","name","country","brand","segment","orgUnit","rooms"],"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":["string","null"]},"brand":{"type":["string","null"]},"segment":{"type":"string"},"orgUnit":{"type":["string","null"],"description":"The organisation unit's name."},"rooms":{"type":["integer","null"]}}},"Measure":{"type":"object","required":["code","name","domain","unit","frequency","points"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"What writes and filters name the measure by, e.g. ENV-01."},"name":{"type":"string"},"domain":{"type":"string","enum":["ENVIRONMENT","PEOPLE","COMMUNITY_CULTURE","ECONOMY"]},"unit":{"type":["string","null"]},"frequency":{"type":"string","description":"MONTHLY, QUARTERLY, ANNUAL or ON_CHANGE."},"points":{"type":"array","items":{"$ref":"#/components/schemas/MeasurePoint"}}}},"MeasurePoint":{"type":"object","required":["number","name","type","unit"],"additionalProperties":false,"properties":{"number":{"type":"integer","minimum":1,"description":"The `point` of a data point."},"name":{"type":"string"},"type":{"type":"string","description":"METER, PCT, COUNT, MONEY, SCORE and BOOL are entered through the API; DOC, TEXT, DATE, PICK and DERIVED are not."},"unit":{"type":["string","null"]}}},"Meter":{"type":"object","required":["id","propertyId","measure","point","name","sourceType","unit","serial","role","active"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The meter's id: what `meterId` means everywhere in the API."},"propertyId":{"type":"string"},"measure":{"type":"string"},"point":{"type":"integer"},"name":{"type":"string"},"sourceType":{"type":"string","description":"e.g. grid_electricity, natural_gas."},"unit":{"type":"string","description":"The unit its readings are in."},"serial":{"type":["string","null"],"description":"The number printed on the meter itself; not an id in the API."},"role":{"type":"string","enum":["PRIMARY","SUB","RECORD"],"description":"PRIMARY counts towards the property's total; SUB is a sub-meter; RECORD is kept for history."},"active":{"type":"boolean"}}},"DataPoint":{"type":"object","required":["id","propertyId","measure","point","meterId","periodStart","periodEnd","value","unit","status","held","estimated","evidence","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"measure":{"type":"string"},"point":{"type":"integer"},"meterId":{"type":["string","null"],"description":"The meter (GET /meters id), when the value is a meter's."},"periodStart":{"type":"string","format":"date","description":"The period's first day."},"periodEnd":{"type":"string","format":"date","description":"The day after the period's last."},"value":{"type":"number"},"unit":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","SUBMITTED","REVIEWED","VERIFIED","LOCKED"]},"held":{"type":"boolean","description":"Held for checking: far from the usual figure. Its status is SUBMITTED."},"estimated":{"type":"boolean"},"evidence":{"type":"integer","description":"How many files are attached."},"updatedAt":{"type":"string","format":"date-time"},"reading":{"type":"number","description":"For a meter reading's use: the dial's figure."}}},"DataPointPage":{"type":"object","required":["items","nextCursor"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DataPoint"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last."}}},"DataPointWrite":{"type":"object","required":["idempotencyKey","propertyId","measure"],"additionalProperties":false,"properties":{"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$","description":"Your id for this item, scoped to the token."},"propertyId":{"type":"string"},"measure":{"type":"string","description":"The measure's code."},"point":{"type":"integer","minimum":1,"default":1},"meterId":{"type":["string","null"],"description":"The meter (GET /meters id). Needed for a reading."},"periodStart":{"type":"string","format":"date","description":"The period's first day. For a reading without readAt, the day it was read."},"periodEnd":{"type":["string","null"],"format":"date","description":"The day after the period's last; one day when left out."},"value":{"type":["number","boolean"],"description":"The figure, 0 or more (a percentage up to 100; yes/no as true or false)."},"unit":{"type":["string","null"],"description":"The unit of value or reading; the measure's (or meter's) own when left out."},"estimated":{"type":"boolean","default":false},"reading":{"type":"number","minimum":0,"description":"A meter's dial figure; the use since the last reading becomes the value."},"readAt":{"type":"string","description":"When the dial was read: a date and time with a zone, or a day."}},"anyOf":[{"required":["value"]},{"required":["reading"]}]},"DataPointBatch":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/DataPointWrite"}}}},"WriteResult":{"type":"object","required":["idempotencyKey","outcome","message","dataPointId"],"additionalProperties":false,"properties":{"idempotencyKey":{"type":"string"},"outcome":{"type":"string","enum":["SAVED","HELD","DUPLICATE","REJECTED"]},"message":{"type":["string","null"],"description":"Why it was rejected, what a duplicate was first answered, or what a reading worked out."},"dataPointId":{"type":["string","null"]}}},"WriteResults":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WriteResult"}}}},"Evidence":{"type":"object","required":["id","dataPointId"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The evidence's id."},"dataPointId":{"type":"string"}}},"Person":{"type":"object","required":["id","name"],"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"Task":{"type":"object","required":["id","title","note","propertyId","measure","assignee","dueDate","status","repeat","doneAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"},"note":{"type":["string","null"]},"propertyId":{"type":["string","null"],"description":"Null for a group-wide task, and for one of the person's own on a property outside their scope."},"measure":{"type":["string","null"]},"assignee":{"$ref":"#/components/schemas/Person"},"dueDate":{"type":"string","format":"date","description":"When it is due."},"status":{"type":"string","enum":["OPEN","DONE"]},"repeat":{"type":"string"},"doneAt":{"type":["string","null"],"format":"date-time"}}},"TaskCreated":{"type":"object","required":["id","title","note","propertyId","measure","assignee","dueDate","status","repeat","doneAt","duplicate"],"additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"},"note":{"type":["string","null"]},"propertyId":{"type":["string","null"],"description":"Null for a group-wide task, and for one of the person's own on a property outside their scope."},"measure":{"type":["string","null"]},"assignee":{"$ref":"#/components/schemas/Person"},"dueDate":{"type":"string","format":"date","description":"When it is due."},"status":{"type":"string","enum":["OPEN","DONE"]},"repeat":{"type":"string"},"doneAt":{"type":["string","null"],"format":"date-time"},"duplicate":{"type":"boolean","description":"True when the idempotencyKey had made this task before."}}},"TaskWrite":{"type":"object","required":["title","assigneeId"],"additionalProperties":false,"properties":{"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$","description":"Optional: a retry with the same key answers the first task."},"title":{"type":"string","minLength":1,"maxLength":160},"propertyId":{"type":["string","null"]},"measure":{"type":["string","null"],"description":"A measure's code."},"assigneeId":{"type":"string","description":"Someone from GET /people/assignable."},"dueDate":{"type":["string","null"],"format":"date","description":"From today to a year ahead; a week from today when left out."},"note":{"type":["string","null"],"maxLength":400}}},"Scorecard":{"type":"object","required":["propertyId","name","year","score","lastYear","dataEnteredPct","dimensions","measures"],"additionalProperties":false,"properties":{"propertyId":{"type":"string"},"name":{"type":"string"},"year":{"type":"integer"},"score":{"type":["number","null"]},"lastYear":{"type":["number","null"],"description":"Last year's overall score."},"dataEnteredPct":{"type":"integer"},"dimensions":{"type":"array","items":{"type":"object","required":["name","score"],"additionalProperties":false,"properties":{"name":{"type":"string"},"score":{"type":["number","null"]}}}},"measures":{"type":"array","items":{"type":"object","required":["code","name","topic","domain","value","unit","perRoomNight","lowerIsBetter","score","baseline","target","pace"],"additionalProperties":false,"properties":{"code":{"type":"string"},"name":{"type":"string"},"topic":{"type":"string"},"domain":{"type":"string"},"value":{"type":["number","null"]},"unit":{"type":["string","null"]},"perRoomNight":{"type":"boolean"},"lowerIsBetter":{"type":"boolean"},"score":{"type":["number","null"]},"baseline":{"type":["number","null"]},"target":{"type":["number","null"]},"pace":{"type":["string","null"],"enum":["MET","ON_TRACK","OFF_TRACK","BACKWARDS","NO_VALUE",null],"description":"Against the target; null without one."}}}}}},"Footprint":{"type":"object","required":["year","scope1Kg","scope2LocationKg","scope2MarketKg","scope3Kg","travel"],"additionalProperties":false,"properties":{"year":{"type":"integer"},"scope1Kg":{"type":"number"},"scope2LocationKg":{"type":"number"},"scope2MarketKg":{"type":"number"},"scope3Kg":{"type":"number","description":"Includes business travel on the CO2e basis."},"travel":{"type":"object","required":["co2eKg","withNonCo2Kg"],"additionalProperties":false,"properties":{"co2eKg":{"type":"number"},"withNonCo2Kg":{"type":"number","description":"With the extra warming of flying at altitude."}}}}},"TravelSummary":{"type":"object","required":["year","totalKg","byMode"],"additionalProperties":false,"properties":{"year":{"type":"integer"},"totalKg":{"type":"number","description":"On the CO2e basis."},"byMode":{"type":"array","items":{"type":"object","required":["mode","legs","co2eKg","withNonCo2Kg"],"additionalProperties":false,"properties":{"mode":{"type":"string","enum":["FLIGHT","RAIL","COACH","TAXI","CAR","FERRY","HOTEL"]},"legs":{"type":"integer"},"co2eKg":{"type":"number"},"withNonCo2Kg":{"type":"number"}}}}}},"CalcRequest":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/CalcItem"}},"year":{"type":"integer","minimum":2019,"maximum":2100}}},"CalcItem":{"oneOf":[{"$ref":"#/components/schemas/CalcFlight"},{"$ref":"#/components/schemas/CalcLand"},{"$ref":"#/components/schemas/CalcTransfer"},{"$ref":"#/components/schemas/CalcHotel"},{"$ref":"#/components/schemas/CalcElectricity"},{"$ref":"#/components/schemas/CalcFuel"}]},"CalcFlight":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["flight"]},"from":{"type":"string","description":"Airport code (GET /airports)."},"to":{"type":"string"},"distanceKm":{"type":"number","exclusiveMinimum":0,"description":"Instead of from and to."},"band":{"type":"string","enum":["domestic","short","long"],"description":"Its assumed distance, when neither airports nor distance are known."},"cabin":{"type":"string","enum":["economy","premium","business","first"],"default":"economy"},"returnTrip":{"type":"boolean","default":false}},"description":"From and to (great circle + 8%, domestic inside one country), or distanceKm, or band."},"CalcLand":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["rail","coach","car","taxi","ferry"]},"distanceKm":{"type":"number","exclusiveMinimum":0},"kind":{"type":"string","description":"rail: national or international; coach: coach or bus; car: petrol, diesel or electric; none for taxi and ferry."},"fare":{"type":"number","exclusiveMinimum":0,"description":"A taxi only, when the distance is not known."}}},"CalcTransfer":{"type":"object","required":["type","by","distanceKm"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["transfer"]},"by":{"type":"string","enum":["taxi","shuttle","coach"]},"distanceKm":{"type":"number","exclusiveMinimum":0}},"description":"An airport or station run."},"CalcHotel":{"type":"object","required":["type","nights","country"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["hotel"]},"nights":{"type":"integer","minimum":1},"country":{"type":"string","description":"The country's name or code."},"stars":{"type":["integer","string"],"enum":[2,3,4,5,"2","3","4","5"]}}},"CalcElectricity":{"type":"object","required":["type","kWh","country"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["electricity"]},"kWh":{"type":"number","exclusiveMinimum":0},"country":{"type":"string","description":"Two-letter code, e.g. UK (GB is taken as UK)."}}},"CalcFuel":{"type":"object","required":["type","fuel","quantity","unit"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["fuel"]},"fuel":{"type":"string","enum":["gas","oil","lpg","diesel","petrol"]},"quantity":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","description":"One the fuel is measured in, e.g. m³ or kWh for gas, L for oil."}}},"CalcFactor":{"type":"object","required":["key","value","unit","source","vintage","checked"],"additionalProperties":false,"properties":{"key":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string"},"source":{"type":"string"},"vintage":{"type":["string","null"]},"checked":{"type":"boolean","description":"False when the figure has not been read against its published source."},"includesNonCo2Uplift":{"type":"boolean","enum":[true],"description":"A flight factor: it counts the extra warming at altitude."}}},"CalcAnswer":{"type":"object","required":["type","kgCo2e","method","factor"],"additionalProperties":false,"properties":{"type":{"type":"string"},"kgCo2e":{"type":["number","null"]},"kgWithNonCo2":{"type":"number","description":"Flights: with the extra warming at altitude."},"method":{"type":"string"},"factor":{"oneOf":[{"$ref":"#/components/schemas/CalcFactor"},{"type":"null"}]},"error":{"type":"string","description":"Why the item could not be worked out."}}},"CalcResponse":{"type":"object","required":["year","items","totalKgCo2e"],"additionalProperties":false,"properties":{"year":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CalcAnswer"}},"totalKgCo2e":{"type":"number"}}},"AirportList":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","required":["code","name","city","country","label","scheduled"],"additionalProperties":false,"properties":{"code":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"label":{"type":"string"},"scheduled":{"type":"boolean","description":"Has scheduled passenger flights."}}}}}},"WebhookDataPointSaved":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["data_point.saved"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["dataPointId","propertyId","measure","point","meterId","periodStart","periodEnd","value","unit","status","held","amended","importId"],"additionalProperties":false,"properties":{"dataPointId":{"type":"string","description":"The data point, as GET /data-points gives it."},"propertyId":{"type":"string","description":"Its property."},"measure":{"type":"string","description":"The measure's code."},"point":{"type":"integer"},"meterId":{"type":["string","null"],"description":"The meter, for a metered point."},"periodStart":{"type":"string","format":"date","description":"First day of the period."},"periodEnd":{"type":"string","format":"date","description":"The day after its last."},"value":{"type":"number","description":"The stored value, in `unit`."},"unit":{"type":["string","null"]},"status":{"type":"string","enum":["SUBMITTED","REVIEWED","VERIFIED","LOCKED"]},"held":{"type":"boolean"},"amended":{"type":"boolean","description":"True when an existing value was changed in place; false for a new value or a held one confirmed."},"importId":{"type":["string","null"],"description":"The import it was saved from, if any."}}}},"description":"A value is submitted"},"WebhookDataPointReviewed":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["data_point.reviewed"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["dataPointId","propertyId","measure","point","meterId","periodStart","periodEnd","status","reviewedBy"],"additionalProperties":false,"properties":{"dataPointId":{"type":"string","description":"The data point."},"propertyId":{"type":"string","description":"Its property."},"measure":{"type":["string","null"],"description":"The measure's code."},"point":{"type":"integer"},"meterId":{"type":["string","null"],"description":"The meter, for a metered point."},"periodStart":{"type":"string","format":"date","description":"First day of the period."},"periodEnd":{"type":"string","format":"date","description":"The day after its last."},"status":{"type":"string","enum":["REVIEWED"]},"reviewedBy":{"type":"string","description":"Who reviewed it: a person's id."}}}},"description":"A value is marked as reviewed"},"WebhookTaskCreated":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["task.created"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["taskId","propertyId","title","assigneeId","createdBy","dueDate","repeat","status","measure"],"additionalProperties":false,"properties":{"taskId":{"type":"string","description":"The task, as GET /tasks gives it."},"propertyId":{"type":["string","null"],"description":"Its property, if any."},"title":{"type":"string"},"assigneeId":{"type":"string","description":"Who it is for."},"createdBy":{"type":["string","null"],"description":"Who created it; null when Canoprise did."},"dueDate":{"type":"string","format":"date","description":"When it is due."},"repeat":{"type":"string","enum":["NONE","WEEKLY","MONTHLY","QUARTERLY","YEARLY"]},"status":{"type":"string","enum":["OPEN"]},"measure":{"type":["string","null"],"description":"The measure's code, if any."}}}},"description":"A task is created"},"WebhookTaskDone":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["task.done"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["taskId","propertyId","doneAt","doneBy"],"additionalProperties":false,"properties":{"taskId":{"type":"string","description":"The task."},"propertyId":{"type":["string","null"],"description":"Its property, if any."},"doneAt":{"type":"string","format":"date-time","description":"When it was marked done."},"doneBy":{"type":"string","description":"Who marked it done."}}}},"description":"A task is marked done"},"WebhookPolicyApproved":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["policy.approved"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["policyId","kind","addendumId","propertyId","versionId","version","approvedAt","approvedBy"],"additionalProperties":false,"properties":{"policyId":{"type":"string","description":"The policy."},"kind":{"type":"string","description":"Which policy it is, such as `environment`."},"addendumId":{"type":["string","null"],"description":"The property's addendum, when that is what was approved."},"propertyId":{"type":["string","null"],"description":"The addendum's property."},"versionId":{"type":"string","description":"The approved version."},"version":{"type":"integer","minimum":1},"approvedAt":{"type":"string","format":"date-time","description":"When."},"approvedBy":{"type":"string","description":"Who approved it."}}}},"description":"A policy is approved"},"WebhookPeriodLocked":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["period.locked"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["lockedThrough","reason","setBy"],"additionalProperties":false,"properties":{"lockedThrough":{"type":"string","format":"date","description":"The last day locked."},"reason":{"type":["string","null"]},"setBy":{"type":"string","description":"Who set it."}}}},"description":"The reporting lock is set"},"WebhookImportStaged":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["import.staged"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["importId","propertyId","source","fileName","rows","uploadedBy","connectionId","period"],"additionalProperties":false,"properties":{"importId":{"type":"string","description":"The import."},"propertyId":{"type":"string","description":"Its property."},"source":{"type":"string","enum":["upload","connection"]},"fileName":{"type":"string"},"rows":{"type":"integer","minimum":0,"description":"Lines or table rows read."},"uploadedBy":{"type":"string","description":"Who uploaded it, or who approves the connection's imports."},"connectionId":{"type":["string","null"],"description":"The connection, for a connection's figures."},"period":{"type":["string","null"],"description":"The period a connection read, such as `2026`."}}}},"description":"A file or a connection's figures are ready to check"},"WebhookPing":{"type":"object","required":["id","type","createdAt","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The event's id, also in Canoprise-Event-Id: the same on every retry, so de-duplicate on it."},"type":{"type":"string","enum":["ping"]},"createdAt":{"type":"string","format":"date-time","description":"When the change was made."},"data":{"type":"object","required":["webhookId"],"additionalProperties":false,"properties":{"webhookId":{"type":"string","description":"The subscription."}}}},"description":"A test"}},"responses":{"BadRequest":{"description":"bad_request: a parameter or body that cannot be read; token_in_url: a token in the address or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"bad_request","message":"limit must be a whole number from 1 to 500."}}}}},"InvalidToken":{"description":"invalid_token: missing, wrong, revoked or expired token, a deactivated person, or a phone app token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_token","message":"Missing, wrong or expired token."}}}}},"Forbidden":{"description":"forbidden: the role lacks the permission; access_off: the group has switched access with tokens off; read_only_token: a write with a read-only token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"forbidden","message":"This person's role cannot read data."}}}}},"NotFound":{"description":"not_found: it does not exist, or is outside the token's scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"Not found"}}}}},"TooLarge":{"description":"too_large: the body is over the cap (1 MB of JSON; 25 MB for evidence).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"too_large","message":"The body is over 1000000 bytes."}}}}},"RateLimited":{"description":"rate_limited: over 120 reads or 30 writes this minute.","headers":{"Retry-After":{"description":"Seconds until the next one-minute window.","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"Too many calls. Try again later."}}}}}}}}