---
title: "Check and apply legal compliance"
method: POST
path: "/leases/{lease_id}/compliance/update"
tags: ["Leases"]
---

# Check and apply legal compliance

`POST /leases/{lease_id}/compliance/update`

## Request

- Base URL: `https://api.faireplace.com/api`
- URL: `https://api.faireplace.com/api/leases/{lease_id}/compliance/update`
- Auth: HTTP bearer

Checks the regulatory compliance of a lease AND automatically updates the lease with compliance information.

**Difference with the read-only check:**
- `GET /leases/{lease_id}/compliance` : checks only, leaves the lease untouched
- `POST /leases/{lease_id}/compliance/update` : checks AND updates the lease

**Automatic updates performed:**

For French leases:
- Updates `is_subject_to_rent_evolution_decree` and `is_subject_to_reference_rent_cap`
- Calculates and updates `reference_rent_per_m2` and `reference_rent_increased_per_m2`
- Calculates and updates `base_rent_amount` and `rent_complement_amount` according to regulations
- Updates `rent_regulation_zone_type` (TENDUE or STANDARD)
- Calculates and updates IRL (Rent Reference Index) information:
  - `rent_revision_date`: Rent revision date
  - `irl_reference_quarter`: IRL reference quarter (e.g.: "T3-2024")
  - `irl_reference_value`: Official IRL value
- Updates `rent_regulation_compliance_status` with the overall status
- Updates `rent_regulation_applied_at` and `rent_regulation_last_check` with the current date

**Currently supported rent control zones:**
- **Paris**: 75001 to 75020
- **Lyon**: 69001 to 69009, 69100
- **Plaine Commune**: 93200, 93300, 93400, 93450, 93800, 93120, 93430, 93380, 93240
- **Est Ensemble**: 93170, 93000, 93140, 93310, 93260, 93100, 93130, 93500, 93230
- **Montpellier**: 34000, 34070, 34080, 34090
- **Bordeaux**: 33000, 33100, 33200, 33300, 33800
- **Lille**: 59000, 59800, 59160, 59260
- **Pays Basque**: All 64xxx postal codes
- **Grenoble**: All 38xxx postal codes

**Important:** This operation modifies the lease. Make sure you have `leases:write` permissions.

## Path parameters

- `lease_id` string, uuid, required

## Response `200`

Compliance checked and lease updated successfully.

The response contains the compliance check result with all calculated information.
The lease has been automatically updated in the database with:
- Calculated reference rents
- IRL information
- Compliance status
- Regulation metadata

- LeaseComplianceCheckResponse: Lease compliance check result
  - `lease_id` string, uuid, required: Lease ID
  - `country_code` string, required: Country code
  - `country_name` string, required: Country name
  - `postal_code` string, required: Postal code
  - `compliance_checks` ComplianceCheck[], required: Checks list
    - `check_type` 'RentControl' | 'RentRegulation' | 'ZoneRegulation', required: Type of compliance check performed. - `RentControl`: Rent control verification (Alur law) - `RentRegulation`: Rent regulation verification (high-demand zones) - `ZoneRegulation`: Verification of regulations specific to the geographical area
    - `status` union, required: Compliance status of a check. **Possible values:** - `"Compliant"`: The lease complies with regulations - `"NonCompliant"`: The lease does not comply (action required) - `"Warning"`: Warning (compliant but attention required) - `"NotApplicable"`: The check is not applicable to this lease - `{"Error": {"message": "..."}}`: Error during verification (with detailed message) **Examples:** ```json "Compliant" ``` ```json { "Error": { "message": "Verification error: Unable to retrieve regulation data" } } ```
      - 'Compliant' | 'NonCompliant' | 'Warning' | 'NotApplicable': Simple compliance status
      - object: Error status with detailed message
        - `Error` object, required
          - `message` string, required: Detailed error message explaining the reason for the error
    - `details` string, required: Check details
    - `recommendations` string[], required: Recommendations
  - `overall_status` union, required: Compliance status of a check. **Possible values:** - `"Compliant"`: The lease complies with regulations - `"NonCompliant"`: The lease does not comply (action required) - `"Warning"`: Warning (compliant but attention required) - `"NotApplicable"`: The check is not applicable to this lease - `{"Error": {"message": "..."}}`: Error during verification (with detailed message) **Examples:** ```json "Compliant" ``` ```json { "Error": { "message": "Verification error: Unable to retrieve regulation data" } } ```
    - 'Compliant' | 'NonCompliant' | 'Warning' | 'NotApplicable': Simple compliance status
    - object: Error status with detailed message
      - `Error` object, required
        - `message` string, required: Detailed error message explaining the reason for the error
  - `rent_revision_date` string, date, nullable: Rent revision date
  - `irl_reference_quarter` string, nullable: IRL reference quarter
  - `irl_reference_value` number, nullable: IRL reference value

## Other responses

- `400`: Invalid request. May occur if: - The lease ID is malformed - The lease data is incomplete for performing the check - The property address is incomplete (missing street name) - Validation error during the update
- `401`: Unauthorized
- `403`: Access denied. The user does not have the required `leases:write` permission to update the lease.
- `404`: Lease not found. The specified lease does not exist or does not belong to the user's tenant.
- `500`: Internal server error. May occur if: - Database connection issue - Error when calling compliance verification services - Error during the lease update - Error when retrieving regulation data

---

[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)
