Reports

Generate and retrieve deficiency reports for buildings. Reports analyse building documentation and identify gaps in coverage.

List Report Themes

GET/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports

List all deficiency report themes for a building. Returns a flat array of theme objects.

Authentication

x-api-key header

  • buildingOwnerIdstringBuilding owner ID
  • buildingIdstringBuilding ID
  • 200Success
  • 401Missing or invalid API key
  • 404Building not found

All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.

  • [].idstringTheme ID
  • [].nameIdstringName identifier
  • [].themestringTheme group
  • [].namestringDisplay name
  • [].descriptionstringTheme description
  • [].lawsstringRelevant laws and regulations
  • [].disciplinestringTechnical discipline
  • [].commentstringAdditional comment
  • [].statusstringCompliance status
  • [].parentIdstring | nullParent theme ID for hierarchy, null for top-level themes
  • [].createdAtstringISO 8601 creation timestamp
  • [].updatedAtstringISO 8601 last update timestamp

Response

[
  {
    "id": "theme-001",
    "nameId": "fire-safety",
    "theme": "Safety",
    "name": "Fire Safety",
    "description": "Fire safety documentation and compliance",
    "laws": "TEK17 §11",
    "discipline": "Fire",
    "comment": "",
    "status": "partial",
    "parentId": null,
    "createdAt": "2025-06-15T10:00:00Z",
    "updatedAt": "2025-06-15T10:00:00Z"
  }
]

Generate Report

POST/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports

Generate a new deficiency report. Despite the response message wording, the report completes synchronously and is available immediately.

Authentication

x-api-key header

  • buildingOwnerIdstringBuilding owner ID
  • buildingIdstringBuilding ID
  • country'NO' | 'GB'requiredCountry code for regulatory framework
  • version'v1' | 'v2'requiredReport format version

Request Body Example

{
  "country": "NO",
  "version": "v2"
}
  • 200Report generated successfully
  • 400Invalid request body
  • 401Missing or invalid API key
  • 403API key lacks permission
  • 404Building not found

All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.

  • messagestringConfirmation message
  • buildingIdstringBuilding the report is for
  • isGeneratingReportbooleanLegacy field retained for backwards compatibility — always false. Report generation completes synchronously. Ignore this field.

Response

{
  "message": "Deficiency report generation started successfully",
  "buildingId": "bld-789",
  "isGeneratingReport": false
}

Report Documents

GET/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents

List documents linked to a specific report category. Returns a flat array.

Authentication

x-api-key header

  • buildingOwnerIdstringBuilding owner ID
  • buildingIdstringBuilding ID
  • reportIdstringReport theme ID
  • 200Success
  • 401Missing or invalid API key
  • 404Report not found

All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.

  • [].deficiencyReportCategoryIdstringReport category ID
  • [].documentIdstringLinked document ID
  • [].buildingIdstringBuilding ID
  • [].customerIdstringBuilding owner ID
  • [].addedAtstringWhen the document was linked
  • [].updatedAtstringLast update timestamp
  • [].addedBystringUser who linked the document
  • [].updatedBystringUser who last updated the link

Response

[
  {
    "deficiencyReportCategoryId": "theme-001",
    "documentId": "doc-1",
    "buildingId": "bld-789",
    "customerId": "cust-456",
    "addedAt": "2025-07-01T09:00:00Z",
    "updatedAt": "2025-07-01T09:00:00Z",
    "addedBy": "user-123",
    "updatedBy": "user-123"
  }
]

Add Document to Report

PUT/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents/{documentId}

Link a document to a report category. Note: the document ID must be provided in both the URL path and the request body.

Authentication

x-api-key header

  • buildingOwnerIdstringBuilding owner ID
  • buildingIdstringBuilding ID
  • reportIdstringReport theme ID
  • documentIdstringDocument ID to link
  • documentIdstringrequiredDocument ID — validated against the URL path parameter to prevent mismatches.

Request Body Example

{ "documentId": "doc-1" }
  • 200Document linked to report
  • 400Invalid request body
  • 401Missing or invalid API key
  • 403API key lacks permission
  • 404Report or document not found

All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.

  • messagestringConfirmation message
  • deficiencyReportCategoryIdstringReport category the document was linked to
  • documentIdstringLinked document ID

Response

{
  "message": "Document added to report category successfully",
  "deficiencyReportCategoryId": "theme-001",
  "documentId": "doc-1"
}

Remove Document from Report

DELETE/building_owners/{buildingOwnerId}/buildings/{buildingId}/reports/{reportId}/documents/{documentId}

Remove a document from a report category.

Authentication

x-api-key header

  • buildingOwnerIdstringBuilding owner ID
  • buildingIdstringBuilding ID
  • reportIdstringReport theme ID
  • documentIdstringDocument ID to remove
  • 200Document removed from report
  • 401Missing or invalid API key
  • 403API key lacks permission
  • 404Report, document, or link not found

All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.

  • messagestringConfirmation message
  • deficiencyReportCategoryIdstringReport category the document was removed from
  • documentIdstringRemoved document ID

Response

{
  "message": "Document removed from report category successfully",
  "deficiencyReportCategoryId": "theme-001",
  "documentId": "doc-1"
}