Skip to content

Bring a real estate's energy declaration in from a register

POST
/api/tenant/{tenantId}/RealEstates/{id}/energy-declaration/sync
curl --request POST \
--url https://api.nimles.com/property-management/api/tenant/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/RealEstates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/energy-declaration/sync \
--header 'Authorization: Bearer <token>'

Brings a real estate’s energy declaration in from a register: every declaration the register has for the real estate’s municipality and designation becomes (or updates) an EnergyDeclaration record with the declaration’s facts as attributes and its validity, and the newest declaration’s class goes into the energyClass detail. The municipality and designation come from the cadastral reference; a municipality of several words (Upplands Väsby) must be given, and must be the reference’s own first words. A real estate without a cadastral reference takes both from the caller, or, given no designation, is looked up by its own street address in the given municipality (else its address’s State): an apartment, whose declaration is its building’s (the association’s or the landlord’s property), only the declarations with a property at that street number and postal code; 422 AmbiguousAddress, with nothing written, when they are more than one property’s (a property the register gives without a designation counts as one of its own); 422 AddressWithoutPostalCode, without asking, when the real estate’s address has no postal code. Asking the register needs Nimles.PropertyManagement.Contract.RealEstateActions.Sync besides Nimles.PropertyManagement.Contract.RealEstateActions.Write and Nimles.PropertyManagement.Contract.RealEstateRecordActions.Write at the real estate’s resource group. Answers 503 when no register is configured, so the app can hide the lookup after GET RealEstates/providers; 429 when the register’s daily calls are spent, 503 when it throttles and 502 when it cannot be reached. A sync within the last 24 hours (configurable) answers the records it wrote without asking the register again.

id
required
string format: uuid

The real estate.

tenantId
required
string format: uuid

Your tenant id.

provider
string

The register, e.g. boverket; the first configured one when left out.

municipality
string

The municipality (kommun), when it has several words or the real estate has no cadastral reference (for a lookup by address: the address’s municipality, else its State).

designation
string

The designation without the municipality, when the real estate has no cadastral reference; left out without one, the real estate is looked up by its street address.

OK

Media typeapplication/json
object
fields
object
key
additional properties
string
data
Array<object>
nullable
object
fields
object
key
additional properties
object
value
nullable
valueType
string
nullable
values
object
key
additional properties
object
value
nullable
source
object
sourceId
string
nullable
runId
string
nullable
actor
string
nullable
at
string format: date-time
nullable
evidence
string
nullable
aiProvenance
object
model
string
nullable
templateVersion
string
nullable
inputCodes
Array<string>
nullable
runId
string
nullable
client
string
nullable
reviewedBy
string
nullable
reviewedAt
string format: date-time
nullable
lock
object
by
string
nullable
at
string format: date-time
nullable
source
object
sourceId
string
nullable
runId
string
nullable
actor
string
nullable
at
string format: date-time
nullable
evidence
string
nullable
aiProvenance
object
model
string
nullable
templateVersion
string
nullable
inputCodes
Array<string>
nullable
runId
string
nullable
client
string
nullable
reviewedBy
string
nullable
reviewedAt
string format: date-time
nullable
lock
object
by
string
nullable
at
string format: date-time
nullable
accessibility
string
nullable
id
string format: uuid
relations
Array<object>
nullable
object
fields
object
key
additional properties
object
value
nullable
valueType
string
nullable
values
object
key
additional properties
object
value
nullable
source
object
sourceId
string
nullable
runId
string
nullable
actor
string
nullable
at
string format: date-time
nullable
evidence
string
nullable
aiProvenance
object
model
string
nullable
templateVersion
string
nullable
inputCodes
Array<string>
nullable
runId
string
nullable
client
string
nullable
reviewedBy
string
nullable
reviewedAt
string format: date-time
nullable
lock
object
by
string
nullable
at
string format: date-time
nullable
source
object
sourceId
string
nullable
runId
string
nullable
actor
string
nullable
at
string format: date-time
nullable
evidence
string
nullable
aiProvenance
object
model
string
nullable
templateVersion
string
nullable
inputCodes
Array<string>
nullable
runId
string
nullable
client
string
nullable
reviewedBy
string
nullable
reviewedAt
string format: date-time
nullable
lock
object
by
string
nullable
at
string format: date-time
nullable
accessibility
string
nullable
id
string format: uuid
name
string
nullable
entityId
required
string format: uuid
entityType
required
string
>= 1 characters
relationType
required
string
>= 1 characters
tenantId
string format: uuid
nullable
resourceGroupId
string format: uuid
nullable
creatorId
string format: uuid
nullable
createdDate
string format: date-time
nullable
version
integer format: int32
nullable
lastModified
string format: date-time
nullable
startDate
string format: date-time
endDate
string format: date-time
nullable
title
string
nullable
description
string
nullable
grossPrice
number format: double
nullable
netPrice
number format: double
nullable
items
Array<object>
nullable
object
id
string format: uuid
name
string
nullable
description
string
nullable
recordId
string format: uuid
nullable
fileId
string format: uuid
nullable
transactionId
string format: uuid
nullable
attributes
object
key
additional properties
string
fileIds
Array<string>
nullable
buildingId
string format: uuid
nullable
roomId
string format: uuid
nullable
buildingPartId
string format: uuid
nullable
validUntil
string format: date-time
nullable
realEstateId
string format: uuid
nullable
provider
string
nullable
recordType
string
nullable

Example generated

{
"data": [
{
"fields": {
"additionalProperty": {
"value": "example",
"valueType": "example",
"values": {
"additionalProperty": {
"value": "example",
"source": {
"sourceId": "example",
"runId": "example",
"actor": "example",
"at": "2026-04-15T12:00:00Z",
"evidence": "example",
"aiProvenance": {
"model": "example",
"templateVersion": "example",
"inputCodes": [
"example"
],
"runId": "example",
"client": "example",
"reviewedBy": "example",
"reviewedAt": "2026-04-15T12:00:00Z"
},
"lock": {
"by": "example",
"at": "2026-04-15T12:00:00Z"
}
}
}
},
"source": {
"sourceId": "example",
"runId": "example",
"actor": "example",
"at": "2026-04-15T12:00:00Z",
"evidence": "example",
"aiProvenance": {
"model": "example",
"templateVersion": "example",
"inputCodes": [
"example"
],
"runId": "example",
"client": "example",
"reviewedBy": "example",
"reviewedAt": "2026-04-15T12:00:00Z"
},
"lock": {
"by": "example",
"at": "2026-04-15T12:00:00Z"
}
}
}
},
"accessibility": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"relations": [
{
"fields": {
"additionalProperty": {
"value": "example",
"valueType": "example",
"values": {
"additionalProperty": {
"value": "example",
"source": {
"sourceId": "example",
"runId": "example",
"actor": "example",
"at": "2026-04-15T12:00:00Z",
"evidence": "example",
"aiProvenance": {
"model": "example",
"templateVersion": "example",
"inputCodes": [
"example"
],
"runId": "example",
"client": "example",
"reviewedBy": "example",
"reviewedAt": "2026-04-15T12:00:00Z"
},
"lock": {
"by": "example",
"at": "2026-04-15T12:00:00Z"
}
}
}
},
"source": {
"sourceId": "example",
"runId": "example",
"actor": "example",
"at": "2026-04-15T12:00:00Z",
"evidence": "example",
"aiProvenance": {
"model": "example",
"templateVersion": "example",
"inputCodes": [
"example"
],
"runId": "example",
"client": "example",
"reviewedBy": "example",
"reviewedAt": "2026-04-15T12:00:00Z"
},
"lock": {
"by": "example",
"at": "2026-04-15T12:00:00Z"
}
}
}
},
"accessibility": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"entityId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"entityType": "example",
"relationType": "example"
}
],
"tenantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"resourceGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"creatorId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"createdDate": "2026-04-15T12:00:00Z",
"version": 1,
"lastModified": "2026-04-15T12:00:00Z",
"startDate": "2026-04-15T12:00:00Z",
"endDate": "2026-04-15T12:00:00Z",
"title": "example",
"description": "example",
"grossPrice": 1,
"netPrice": 1,
"items": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"description": "example",
"recordId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"fileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"transactionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"attributes": {
"additionalProperty": "example"
},
"fileIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"buildingId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"roomId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"buildingPartId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"validUntil": "2026-04-15T12:00:00Z",
"realEstateId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"provider": "example",
"recordType": "example"
}
]
}

Unauthorized: no bearer token, or one that is expired or not for this API.

Forbidden: the caller holds no role that allows this action at this scope. The body is empty, or a problem whose detail names the action.

Media typeapplication/json

An RFC 9457 problem.

object
detail
string
nullable
instance
string
nullable
status
integer format: int32
nullable
title
string
nullable
type
string
nullable
key
additional properties

Example generated

{
"detail": "example",
"instance": "example",
"status": 1,
"title": "example",
"type": "example"
}

Not found: no such item in the tenant.

Media typeapplication/problem+json

An RFC 9457 problem.

object
detail
string
nullable
instance
string
nullable
status
integer format: int32
nullable
title
string
nullable
type
string
nullable
key
additional properties

Example generated

{
"detail": "example",
"instance": "example",
"status": 1,
"title": "example",
"type": "example"
}

Conflict: the item kept changing under concurrent writes; read it again and retry.

Media typeapplication/problem+json

An RFC 9457 problem.

object
detail
string
nullable
instance
string
nullable
status
integer format: int32
nullable
title
string
nullable
type
string
nullable
key
additional properties

Example generated

{
"detail": "example",
"instance": "example",
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable: the body or the change is invalid. The errors are keyed by member.

Media typeapplication/problem+json

A validation problem: the messages by member (or by JSON Pointer for a patch).

object
errors
object
key
additional properties
Array<string>
status
integer format: int32
nullable
title
string
nullable
type
string
nullable
key
additional properties

Example generated

{
"errors": {
"additionalProperty": [
"example"
]
},
"status": 1,
"title": "example",
"type": "example"
}