---
title: "Generate a rent receipt (PDF)"
method: POST
path: "/public/tools/quittance/generate"
tags: ["Public Tools"]
---

# Generate a rent receipt (PDF)

`POST /public/tools/quittance/generate`

## Request

- Base URL: `https://api.faireplace.com/api`
- URL: `https://api.faireplace.com/api/public/tools/quittance/generate`
- Auth: none required

Generates a rent receipt PDF. If the amount paid covers the total due the
document is a "Quittance"; otherwise a "Reçu".

Accepts the structured payload below, or a simplified payload for AI agents
(fields like `landlord_name`, `landlord_address`, `tenant_name`,
`property_address`, `month` such as `"avril 2026"`, `rent`, `charges`,
`paid`); the handler auto-detects and converts it.

Public, unauthenticated tool. Returns `application/pdf`.

## Example

```bash
curl -X POST https://api.faireplace.com/api/public/tools/quittance/generate \
  -H "Content-Type: application/json" \
  -d '{ ... }' --output quittance.pdf
```

## Request body

- QuittanceGenerateRequest: Rent-receipt generator (structured form used by the web form). If the amount paid covers the total due the PDF is a "Quittance"; otherwise a "Reçu". The endpoint also accepts a simplified payload (for AI agents) with fields such as `landlord_name`, `landlord_address`, `tenant_name`, `property_address`, `month` ("avril 2026"), `rent`, `charges`, `paid`; the handler auto-detects and converts it. The structured form below is the primary contract.
  - `bailleur` FrPartyDto, required: A party (landlord or tenant) with a French postal address. Used by the quittance and security-deposit bordereau tools.
    - `nom_prenom` string, required: Full name (or company name: SCI, notary, usufructuary…).
    - `adresse` string, required
    - `code_postal` string, required: French postal code (5 digits).
    - `ville` string, required
  - `locataire` FrPartyDto, required: A party (landlord or tenant) with a French postal address. Used by the quittance and security-deposit bordereau tools.
    - `nom_prenom` string, required: Full name (or company name: SCI, notary, usufructuary…).
    - `adresse` string, required
    - `code_postal` string, required: French postal code (5 digits).
    - `ville` string, required
  - `logement` FrPropertyDto, required: A rented dwelling with a French postal address.
    - `adresse` string, required
    - `code_postal` string, required
    - `ville` string, required
    - `nom` string: Optional label ("Appartement T3", "Studio bord de mer").
  - `periode` QuittancePeriodDto, required
    - `debut` string, date, required
    - `fin` string, date, required
  - `loyer_hc` number, required: Monthly rent excluding charges (0–100 000 EUR).
  - `charges` QuittanceChargeLineDto[]: Itemised rental charges (decree 87-713).
    - `libelle` string, required
    - `montant` number, required: Amount in euros (0–10 000).
  - `amount_paid` number, required: Amount actually paid (0–100 000 EUR).
  - `payment_date` string, date, nullable
  - `lieu_signature` string, required

## Response `200`

The generated rent receipt PDF.

## Other responses

- `400`: Bad request
- `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)
