---
title: "Update energy performance diagnosis"
method: PUT
path: "/energy-diagnoses/{id}"
tags: ["Energy Diagnosis"]
---

# Update energy performance diagnosis

`PUT /energy-diagnoses/{id}`

## Request

- Base URL: `https://api.faireplace.com/api`
- URL: `https://api.faireplace.com/api/energy-diagnoses/{id}`
- Auth: HTTP bearer

Updates an existing energy performance diagnosis

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateEnergyDiagnosis: Data for updating an existing DPE. **Update behavior for optional fields**: - **Field absent**: the existing value is preserved (no modification) - **Field present with `null`**: the value is removed (set to NULL in database) - **Field present with value**: the value is updated **Fields subject to this behavior**: - `energy_consumption`: can be set to `null` to remove the value - `ges_emission`: can be set to `null` to remove the value - `heated_area`: can be set to `null` to remove the value - `diagnostician_contact_id`: can be set to `null` to remove the value - `notes`: can be set to `null` to remove the value
  - `reference_number` string, nullable: DPE reference number
  - `diagnosis_date` string, date, nullable: Diagnosis date
  - `valid_until` string, date, nullable: Diagnosis validity date (10 years maximum)
  - `energy_label` 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G': DPE energy label (A to G)
  - `energy_consumption` number, double, nullable: Energy consumption in kWh/m²/year. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - Numeric value: the value is updated
  - `ges_label` 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G': DPE GHG (Greenhouse Gas) label (A to G)
  - `ges_emission` number, double, nullable: GHG emission in kg CO2/m²/year. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - Numeric value: the value is updated
  - `heated_area` number, double, nullable: Heated area in m². **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - Numeric value: the value is updated
  - `construction_year` integer, nullable: Construction year of the property
  - `diagnostician_contact_id` string, uuid, nullable: Diagnostician contact ID. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - Valid UUID: the value is updated
  - `notes` string, nullable: Additional notes about the diagnosis. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - String value: the value is updated
  - `media_id` string, uuid, nullable: Media ID of the uploaded DPE PDF document. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - Valid UUID: the value is updated

## Response `200`

Energy performance diagnosis updated successfully

- EnergyDiagnosis: Complete Energy Performance Diagnosis (DPE)
  - `id` string, uuid, nullable, required: Unique identifier of the DPE
  - `estate_id` string, uuid, nullable: Property (if DPE for a specific property) ID
  - `place_id` string, uuid, nullable: Place (if DPE for a specific place) ID
  - `reference_number` string, nullable, required: DPE reference number
  - `diagnosis_date` string, date, nullable, required: Diagnosis date
  - `valid_until` string, date, nullable, required: Diagnosis validity date (10 years maximum)
  - `energy_label` 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G', required: DPE energy label (A to G)
  - `energy_consumption` number, double, nullable: Energy consumption in kWh/m²/year
  - `ges_label` 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G', required: DPE GHG (Greenhouse Gas) label (A to G)
  - `ges_emission` number, double, nullable: GHG emission in kg CO2/m²/year
  - `heated_area` number, double, nullable: Heated area in m²
  - `construction_year` integer, nullable, required: Construction year of the property
  - `diagnostician_contact_id` string, uuid, nullable: Diagnostician contact ID
  - `notes` string, nullable: Internal notes about the diagnosis
  - `media_id` string, uuid, nullable: Media ID of the uploaded DPE PDF document
  - `created_at` string, date-time, nullable, required: Creation date
  - `updated_at` string, date-time, nullable, required: Last modification date

## Other responses

- `400`: Invalid data (e.g., negative consumption, invalid construction year, etc.)
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Business validation error
- `500`: Internal Server Error

---

[API](https://skmtc.dev/faireplace/apis/faireplace-property-management-api.md) · [All operations](https://skmtc.dev/faireplace/apis/faireplace-property-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/faireplace/apis/faireplace-property-management-api/revisions/69de39762919?raw)
