Guides
Filtrage
Filtrer avec POST /properties — modes classic et advanced
Le body de POST /properties est une union discriminée par deux champs :
searchMode—"classic"(champs plats) ou"advanced"(arbrecriteriarécursif)paginationType—"page"(offset) ou"cursor"(curseur, voir Pagination)
Mode classic
Tous les filtres sont combinés en AND. C'est le mode recommandé pour 95 % des cas.
| Champ | Type | Valeurs |
|---|---|---|
searchMode | string | "classic" |
paginationType | string | "page" ou "cursor" |
transactionType | string | string[] | SELL, RENT |
propertyTypes | string[] | FLAT, HOUSE, BUILDING, LAND, PARKING, OTHER |
price | PriceRangeDTO | null | { gte, lte } en euros |
area | AreaRangeDTO | null | { gte, lte } en m² |
rooms | IntRangeDTO | null | { gte, lte } |
bedrooms | IntRangeDTO | null | { gte, lte } |
cityIds | integer[] | IDs de communes (voir Geo) |
districtIds | integer[] | IDs de districts |
hasParking | boolean | null | |
hasBalcony | boolean | null | |
hasGarden | boolean | null | |
hasCellar | boolean | null | |
size | integer | 1–100 |
page ou cursor | integer / string | selon paginationType |
Exemple
curl -X POST "https://api-v2.stream.estate/properties" \
-H "X-API-Key: <votre_clé>" \
-H "Content-Type: application/json" \
-d '{
"searchMode": "classic",
"paginationType": "page",
"transactionType": "SELL",
"propertyTypes": ["FLAT", "HOUSE"],
"price": { "gte": 200000, "lte": 600000 },
"area": { "gte": 50 },
"rooms": { "gte": 3, "lte": 5 },
"cityIds": [75056],
"hasBalcony": true,
"page": 1,
"size": 20
}'Mode advanced
Pour composer des filtres en AND/OR arbitraires, utilisez un arbre criteria (CriteriaNodeDTO).
{
"searchMode": "advanced",
"paginationType": "page",
"page": 1,
"size": 20,
"criteria": { /* arbre récursif AND/OR — voir la référence API */ }
}Réponse
Les deux modes renvoient le même PropertySearchResponseDTO :
{
"items": [ /* résultats */ ],
"totalItems": 1847,
"searchAfter": [...],
"pitId": "...",
"hasNextPage": true
}