---
title: "Create an energy performance diagnosis"
method: POST
path: "/energy-diagnoses"
tags: ["Energy Diagnosis"]
---

# Create an energy performance diagnosis

`POST /energy-diagnoses`

## Request

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

Creates a new energy performance diagnosis. Must specify either estate_id or place_id, but not both

## Request body

- CreateEnergyDiagnosis: Data for creating a new DPE
  - `estate_id` string, uuid, nullable: Property (required if place_id is not provided) ID
  - `place_id` string, uuid, nullable: Place (required if estate_id is not provided) ID
  - `reference_number` string: DPE reference number
  - `diagnosis_date` string, date: Diagnosis date
  - `valid_until` string, date: 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
  - `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
  - `heated_area` number, double, nullable: Heated area in m²
  - `construction_year` integer: 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

## Response `201`

Energy performance diagnosis created 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
- `422`: Business validation error (e.g., estate_id and place_id both provided simultaneously)
- `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)
