# Listar contratos de arriendo

GET `https://api.bydomu.com/v1/leases`

Esta referência é gerada a partir do código da API, por isso as descrições estão em espanhol. Nomes, parâmetros e exemplos são iguais em qualquer idioma.

Contratos de arrendamiento, del más reciente al más antiguo (`pageSize` máximo 100).

Permissão pedida

`leases:read`

Cabeçalho obrigatório

`X-API-Key` · chave secreta

Nível de acesso

Nível 2 · automático na Inmobiliaria Pro

## Parâmetros de consulta

5 · todos opcionais

`status` string · opcional

Estado del contrato DRAFT · ACTIVE · EXPIRED · TERMINATED · RENEWED

`propertyId` string · opcional

Propiedad arrendada

`tenantId` string · opcional

Contacto arrendatario

`page` integer · opcional

Página, desde 1 padrão 1 · ≥ 1

**Ver os outros 1 parâmetros**

`pageSize` integer · opcional

Contratos por página (máximo 100) padrão 20 · 1–100

## Resposta 200

`Lease[]` · 13 campos

**`data[]` id · startDate · endDate · monthlyRent · adminFee · securityDeposit · status · paymentDayOfMonth · lateFeePercentage · createdAt · property · tenant · manager**

`id` string

`startDate` string

`endDate` string

`monthlyRent` string Número decimal serializado como texto.

`adminFee` string Número decimal serializado como texto.

`securityDeposit` string Número decimal serializado como texto.

`status` string DRAFT, ACTIVE, EXPIRED, TERMINATED, RENEWED

`paymentDayOfMonth` integer

`lateFeePercentage` string Número decimal serializado como texto.

`createdAt` string

**`property` id · title · address · city · type**

`id` string

`title` string

`address` string

`city` string

`type` string APARTMENT, HOUSE, OFFICE, COMMERCIAL, LAND, WAREHOUSE

**`tenant` id · firstName · lastName · phone · email**

`id` string

`firstName` string

`lastName` string

`phone` string `null` si el contacto llegó por un canal sin número (Instagram, Facebook, chat de la web, correo o WhatsApp con usuario y número oculto)

`email` string

**`manager` id · firstName · lastName**

`id` string

`firstName` string

`lastName` string

**`meta` Paginación por número de página.**

`total` integer Total de registros

`page` integer Página actual

`pageSize` integer Registros por página

`totalPages` integer Total de páginas

## Erros possíveis

com a forma `{ "error": { "code", "message" } }`

- **400** Datos inválidos: el cuerpo o la query no cumplen el esquema, o `Idempotency-Key` está mal formada.
- **401** UNAUTHORIZED
- **403** FORBIDDEN
- **429** RATE_LIMITED
- **500** INTERNAL_ERROR

cURL:

```bash
curl "https://api.bydomu.com/v1/leases" \
  -H "X-API-Key: $BYDOMU_API_KEY"
```

JavaScript:

```js
import { ByDomu } from "@bydomu/sdk";

const bydomu = new ByDomu({
  apiKey: process.env.BYDOMU_API_KEY,
});

const { data, meta } = await bydomu.leases.list();
```

Python:

```python
import os, requests

r = requests.get(
    "https://api.bydomu.com/v1/leases",
    headers={"X-API-Key": os.environ["BYDOMU_API_KEY"]}
)
data = r.json()
```

**Resposta · 200 · exemplo**

```json
{
  "data": [
    {
      "id": "clx1lea001",
      "startDate": "2026-01-01T00:00:00.000Z",
      "endDate": "2027-01-01T00:00:00.000Z",
      "monthlyRent": "2500000.00",
      "adminFee": "350000.00",
      "securityDeposit": "2500000.00",
      "status": "DRAFT",
      "paymentDayOfMonth": 5,
      "lateFeePercentage": "2.00",
      "createdAt": "2025-12-20T10:00:00.000Z",
      "property": {
        "id": "clx1prop002",
        "title": "Apto 301 Laureles",
        "address": "Cra 76 #35-18",
        "city": "Medellín",
        "type": "APARTMENT"
      },
      "tenant": {
        "id": "clx1con001",
        "firstName": "María",
        "lastName": "González",
        "phone": "+573009876543",
        "email": "ana@email.com"
      },
      "manager": {
        "id": "clx1usr001",
        "firstName": "Carlos",
        "lastName": "Rodríguez"
      }
    }
  ],
  "meta": {
    "total": 150,
    "page": 1,
    "pageSize": 20,
    "totalPages": 8
  }
}
```
