# FairePlace API

The API for French property management. One integration for leases, eIDAS signatures, and rental compliance.

## The problem

Building property management software for France means dealing with:
- **Loi ALUR** mandatory lease clauses and tenant protections
- **Encadrement des loyers** rent caps by city, neighborhood, room count, and construction period
- **IRL revisions** quarterly index-based rent adjustments
- **Deposit limits** legally capped at 1-2 months depending on furnished status
- **Zone tendue** special rules for 1,149+ tight housing market municipalities
- **eIDAS signatures** legally binding electronic signatures with OTP and certificates

That's months of legal research and development before writing a single line of product code.

## The solution

FairePlace gives you 370+ REST endpoints that handle all of this. You send API calls, we handle the compliance.

```
Your app → FairePlace API → Legally compliant lease (PDF, signed, archived)
```

### What you can build

| Use case | API calls |
|----------|-----------|
| Create a property with owner, building, and apartment | 3 calls |
| Generate a Loi ALUR-compliant lease | 1 call |
| Add tenants with income verification | 2 calls |
| Generate a formatted lease PDF | 1 call |
| Collect eIDAS electronic signatures | 1 call |
| Check rent regulation for a postal code | 1 call |
| Generate a rent receipt (quittance) | 1 call |

### What you don't build

FairePlace handles the hard parts so you don't have to:

| You build | FairePlace handles |
|-----------|-------------------|
| Your UI and user flows | Lease clauses, mandatory annexes, legal formatting |
| Your business logic | Rent cap validation, IRL calculations, deposit limits |
| Your authentication | eIDAS signatures, OTP delivery, PAdES-B certificates |
| Your data model | Multi-tenant isolation, compliance checks, PDF generation |

## Technical overview

| Aspect | Details |
|--------|---------|
| **Protocol** | REST with JSON request/response bodies |
| **Auth** | API key (`fp_*` prefix) as Bearer token |
| **IDs** | UUID v4 for all resources |
| **Dates** | ISO 8601 |
| **Isolation** | Multi-tenant — each API key is scoped to one organization |
| **Rate limit** | 1,000 req/hour (Starter), up to custom (Sur Mesure) |
| **Environments** | Production (`api.faireplace.com`) and Sandbox (`sandbox.faireplace.com`) |
| **Endpoints** | 370+ covering properties, leases, signatures, compliance, payments |

## Base URLs

```
Production: https://api.faireplace.com/api
Sandbox:    https://sandbox.faireplace.com/api
```

## What FairePlace doesn't do

Transparency builds trust. Here's what's out of scope:

- **Full accounting** — We handle rent, charges, and receipts, not general ledger or tax declarations
- **Tenant CRM** — No messaging, ticket system, or tenant-facing portal
- **Property marketplace** — No listing, advertising, or tenant matching
- **International** — Currently France only (regulation data, legal compliance)

## Get started

The fastest way to understand the API is to use it:

1. **[Create your first signed lease](/quickstart/getting-started)** — 10-minute tutorial, copy-paste ready
2. **[Try the sandbox](/quickstart/sandbox)** — Test without real data or charges
3. **[Browse the API reference](/api)** — All 370+ endpoints with request/response schemas

Questions? Contact **api-support@faireplace.com**
