# Inventory API

Track moveable items and furniture for **furnished leases (bail meuble)**. Inventory is used to generate the **Inventaire Mobilier** — the legally required list of furniture and equipment provided by the landlord.

> **Equipment vs Inventory**: Inventory tracks **moveable/furnished items** (furniture, appliances, kitchenware) for the Inventaire Mobilier. For **fixed installations** (radiators, doors, plumbing) used in the État des Lieux, see the [Equipment API](/properties/equipment).

## Quick Example

```bash
# Add a bed to a room with its condition
curl -X POST https://api.faireplace.com/api/places/{place_id}/estates/{estate_id}/rooms/{room_id}/inventory \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inventory_id": "uuid-of-bed-item",
    "quantity_in_room": 1,
    "condition_in_room": "GOOD",
    "condition_notes_in_room": "Sommier et matelas en bon état"
  }'
```

---

## Mandatory Items for Furnished Leases (Decree 2015-981)

French law requires that furnished rentals include at minimum the following items. These should be tracked as inventory:

| Category | Mandatory Items |
|----------|----------------|
| **Bedding** | Bed with mattress, duvet or blanket |
| **Window coverings** | Shutters or curtains in bedrooms |
| **Kitchen - Cooking** | Hotplates (plaques de cuisson) |
| **Kitchen - Appliances** | Oven or microwave oven |
| **Kitchen - Cold storage** | Refrigerator with freezer compartment (or separate freezer of -6C min) |
| **Kitchen - Utensils** | Sufficient cookware, tableware and utensils for the number of occupants |
| **Dining** | Table and seating for the number of occupants |
| **Storage** | Shelves or storage units |
| **Lighting** | Light fixtures in all rooms |
| **Cleaning** | Cleaning equipment appropriate to the property |
| **Living** | Sufficient seating for the number of occupants |

These items must be listed in the **Inventaire Mobilier** attached to the lease. Absence of mandatory items can void the "furnished" classification of the lease.

---

## Overview

Inventory management provides:
- **Categorization**: Items organized by categories and types (furniture, appliances, kitchenware, bedding...)
- **Condition tracking**: Detailed status per item and per room placement
- **Financial tracking**: Purchase price, current value, insured value
- **Maintenance tracking**: Maintenance history, schedules, and frequency
- **Room placement**: Items positioned in specific rooms with coordinates

## Condition Status

| Status | Description |
|--------|-------------|
| `EXCELLENT` | Excellent state |
| `GOOD` | Good state |
| `FAIR` | Fair/acceptable state |
| `POOR` | Poor state |
| `DAMAGED` | Damaged |
| `NEEDS_REPAIR` | Needs repair |
| `BROKEN` | Broken |
| `MISSING` | Missing |

## Authentication

Requires **PropertiesRead**, **PropertiesWrite**, or **PropertiesDelete** permissions.

---

## Inventory Items

### List Items
**GET** `/api/inventory/items`

### Create Item
**POST** `/api/inventory/items`

```json
{
  "name": "Canape 3 places",
  "inventory_type_id": "uuid-of-type",
  "description": "Canape convertible gris",
  "brand": "IKEA",
  "model": "FRIHETEN",
  "serial_number": "IK-2024-78901",
  "quantity": 1,
  "condition_status": "GOOD",
  "purchase_date": "2024-06-15",
  "purchase_price": 499.00,
  "current_value": 350.00
}
```

### Get Item with Details
**GET** `/api/inventory/items/{id}/with-details`

### Update Item
**PUT** `/api/inventory/items/{id}`

### Delete Item
**DELETE** `/api/inventory/items/{id}`

### Search and Filter
- **GET** `/api/inventory/items/search` — Full-text search
- **GET** `/api/inventory/items/condition/{status}` — Filter by condition
- **GET** `/api/inventory/items/type/{type_id}` — Filter by type
- **GET** `/api/inventory/items/maintenance-due` — Items due for maintenance

---

## Categories & Types

Inventory items are organized in a **Category > Type** hierarchy.

### Categories
**GET/POST** `/api/inventory/categories`

Examples: `Furniture`, `Kitchen Appliances`, `Bedding`, `Lighting`

### Types
**GET/POST** `/api/inventory/types`

Examples: `Sofa`, `Dining Table`, `Refrigerator`, `Bed Frame`

---

## Room Inventory (Placement)

Room inventory links items to specific rooms, tracking condition at the room level.

### Add Item to Room
**POST** `/api/places/{place_id}/estates/{estate_id}/rooms/{room_id}/inventory`

```json
{
  "inventory_id": "uuid-of-item",
  "quantity_in_room": 1,
  "condition_in_room": "GOOD",
  "condition_notes_in_room": "No visible damage",
  "location_description": "Against the west wall"
}
```

### List Room Inventory
**GET** `/api/places/{place_id}/estates/{estate_id}/rooms/{room_id}/inventory`

### Update Room Inventory
**PUT** `/api/places/{place_id}/estates/{estate_id}/rooms/{room_id}/inventory/{inventory_id}`

### Remove Item from Room
**DELETE** `/api/places/{place_id}/estates/{estate_id}/rooms/{room_id}/inventory/{inventory_id}`

---

## Common Workflows

### Set up a furnished apartment

1. **Create categories and types** — `POST /api/inventory/categories` then `POST /api/inventory/types`
2. **Create inventory items** — `POST /api/inventory/items` for each item (bed, table, fridge...)
3. **Place items in rooms** — `POST /api/places/{id}/estates/{id}/rooms/{id}/inventory` for each room
4. The inventory data is included in the generated **Inventaire Mobilier** PDF annex

### Entry/exit comparison

1. At lease start: record `condition_in_room` for each placed item
2. At lease end: update `condition_in_room` with current state
3. Compare conditions to assess tenant responsibility for damages

---

## Common Use Cases

- **Furnished lease compliance**: Ensure all mandatory items per Decree 2015-981 are listed
- **Inventaire Mobilier generation**: Produce the legal annex listing all furnished items
- **Condition comparison**: Compare item condition between lease entry and exit
- **Insurance documentation**: Track insured values and policy numbers
- **Maintenance planning**: Schedule and track maintenance for appliances

---

## Related

- **[Equipment API](/properties/equipment)** — Fixed installations for État des Lieux
- **[Rooms API](/properties/rooms)** — Room management
- **[Lease Types](/leases/lease-types)** — Furnished lease configuration
- **[Documents & PDFs](/leases/documents-and-pdfs)** — Generated lease annexes
