---
title: "Update estate"
method: PUT
path: "/estates/{id}"
tags: ["Estates"]
---

# Update estate

`PUT /estates/{id}`

## Request

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

Update an estate's properties, including the ability to change its place association.

**Key Features**:
- Allows changing the `place_id` to move an estate to a different place
- Validates that the new `place_id` exists and belongs to the same tenant
- Returns a 404 error if the new place doesn't exist or belongs to another tenant

**Update Behavior**:
- **Field absent**: Existing value is preserved (no modification)
- **Field present with `null`**: Value is removed (set to NULL in database)
- **Field present with value**: Value is updated

**Special Fields**:
- `place_id`: Can be updated to change the estate's place association. The new place must exist and belong to the same tenant.
- `number_of_room`: Can be set to `null` to remove the value

**Example**: To move an estate to a different place, include `place_id` in the request body:
```json
{
  "place_id": "new-place-uuid-here"
}
```

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateEstate: Data for updating an existing property. **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 affected by this behavior**: - `number_of_room`: can be set to `null` to remove the value **Fields assigned directly (can already be set to null)**: - `orientation`, `building`, `floor`, `lot_number`, `housing_tax`, `property_tax`, `acquisition_price`, `construction_date`, `renovation_date`, `address`, `other_detail` **Changing place**: - `place_id`: can be modified to move a property to another place - **Important**: Changing `place_id` is only possible via flat routes `/estates/{id}` (PUT) - Nested routes `/places/{place_id}/estates/{estate_id}` do not allow changing the `place_id` - The new `place_id` must exist and belong to the same tenant, otherwise a 404 error will be returned
  - `name` string, nullable: Property name
  - `place_id` string, uuid, nullable: Identifier of the place to which the property is associated. **Changing place**: - This field can be modified to move a property to another place - Use the flat route `PUT /estates/{id}` to change this field - The new `place_id` must exist and belong to the same tenant - If the new place does not exist or belongs to another tenant, a 404 error will be returned - If this field is absent from the request, the existing value is preserved
  - `estate_type_id` string, uuid, nullable
  - `area` number, nullable
  - `number_of_room` integer, nullable: Number of rooms. **Update behavior**: - Field absent: the existing value is preserved - `null`: the value is removed (set to NULL in database) - Integer: the value is updated
  - `orientation` string, nullable
  - `building` string, nullable
  - `floor` integer, nullable
  - `lot_number` string, nullable
  - `fiscal_identifier` string, nullable: Property tax identifier
  - `housing_tax` number, nullable
  - `property_tax` number, nullable
  - `acquisition_price` number, nullable
  - `rent_amount` number, nullable: Reference rent amount for the property (in euros). **Update behavior**: - Field absent: the existing value is preserved - Field present with `null`: the value is removed (set to NULL) - Field present with value: the value is updated **Note**: Directly modifying this field does not affect existing leases. Active leases retain their rent. This field serves as the default value for future leases.
  - `construction_date` string, date-time, nullable
  - `renovation_date` string, date-time, nullable
  - `address` string, nullable
  - `other_detail` string, nullable
  - `rental_status` 'VACANT' | 'RENTED' | 'NOTICE': Rental status of a property. - **VACANT**: Vacant property, no active lease - **RENTED**: Rented property, at least one active lease - **NOTICE**: Property under notice period, at least one lease under notice (without an active lease) This status is automatically synchronized with the status of associated leases when statuses change (ACTIVE, NOTICE, TERMINATED).

## Response `200`

OK - Estate updated successfully

- Estate
  - `id` string, uuid, nullable
  - `name` string, nullable: Property name
  - `place_id` string, uuid, nullable
  - `estate_type_id` string, uuid, nullable
  - `area` number, nullable
  - `number_of_room` integer, nullable
  - `orientation` string, nullable
  - `building` string, nullable
  - `floor` integer, nullable
  - `owner_id` string, uuid, nullable
  - `previous_owner_id` string, uuid, nullable
  - `lot_number` string, nullable
  - `fiscal_identifier` string, nullable: Property tax identifier (required)
  - `housing_tax` number, nullable
  - `property_tax` number, nullable
  - `acquisition_price` number, nullable
  - `rent_amount` number, nullable: Reference rent amount for the property (in euros). Automatically synchronized with active leases.
  - `rental_status` 'VACANT' | 'RENTED' | 'NOTICE': Rental status of a property. - **VACANT**: Vacant property, no active lease - **RENTED**: Rented property, at least one active lease - **NOTICE**: Property under notice period, at least one lease under notice (without an active lease) This status is automatically synchronized with the status of associated leases when statuses change (ACTIVE, NOTICE, TERMINATED).
  - `construction_date` string, date-time, nullable
  - `renovation_date` string, date-time, nullable
  - `address` string, nullable
  - `other_detail` string, nullable
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found - Estate not found or new place_id doesn't exist
- `422`: Unprocessable Entity
- `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)
