Complete API reference for all available endpoints
Технологія бекенду:
Express.js 5.1 • Node.js • TypeScript • TypeORM • PostgreSQL
/api/propertiesBothGet list of all properties with optional filters
| Name | Type | Required | Description |
|---|---|---|---|
| propertyType | string | No | Filter by property type: "off-plan" or "secondary" |
| developerId | string | No | Filter by developer ID (UUID) |
| cityId | string | No | Filter by city ID (UUID) |
curl -X GET "https://admin.foryou-realestate.com/api/api/properties?propertyType=off-plan" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <your_jwt_token>"
{
"success": true,
"data": [
{
"id": "uuid",
"propertyType": "off-plan" | "secondary",
"name": "string",
"description": "string",
"photos": ["string (URLs)"],
"country": { "id": "uuid", "nameEn": "string", "nameRu": "string", "nameAr": "string", "code": "string" },
"city": { "id": "uuid", "nameEn": "string", "nameRu": "string", "nameAr": "string" },
"area": { "id": "uuid", "nameEn": "string", "nameRu": "string", "nameAr": "string" },
"developer": { "id": "uuid", "name": "string" },
"facilities": [{ "id": "uuid", "nameEn": "string", "nameRu": "string", "nameAr": "string", "iconName": "string" }],
"units": [{ "id": "uuid", "unitId": "string", "type": "apartment" | "villa" | "penthouse" | "townhouse" | "office", "price": "number", "totalSize": "number", "balconySize": "number", "planImage": "string" }],
"paymentPlan": "string (for off-plan)",
"price": "number (for secondary)",
"priceFrom": "number (for off-plan)",
"priceAED": "number",
"priceFromAED": "number",
"size": "number",
"sizeFrom": "number",
"sizeTo": "number",
"sizeSqft": "number",
"sizeFromSqft": "number",
"sizeToSqft": "number",
"bedrooms": "number",
"bedroomsFrom": "number",
"bedroomsTo": "number",
"bathrooms": "number",
"latitude": "number",
"longitude": "number",
"createdAt": "ISO date",
"updatedAt": "ISO date"
}
]
}{
"success": true,
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"propertyType": "off-plan",
"name": "Example Property",
"description": "Beautiful property description",
"photos": [
"https://example.com/photo1.jpg"
],
"country": {
"id": "123e4567-e89b-12d3-a456-426614174001",
"nameEn": "United Arab Emirates",
"nameRu": "Объединенные Арабские Эмираты",
"nameAr": "الإمارات العربية المتحدة",
"code": "UAE"
},
"city": {
"id": "123e4567-e89b-12d3-a456-426614174002",
"nameEn": "Dubai",
"nameRu": "Дубай",
"nameAr": "دبي"
},
"area": {
"id": "123e4567-e89b-12d3-a456-426614174003",
"nameEn": "Downtown Dubai",
"nameRu": "Даунтаун Дубай",
"nameAr": "دبي مارينا"
},
"developer": {
"id": "123e4567-e89b-12d3-a456-426614174004",
"name": "Emaar Properties"
},
"facilities": [
{
"id": "123e4567-e89b-12d3-a456-426614174005",
"nameEn": "Swimming Pool",
"nameRu": "Бассейн",
"nameAr": "مسبح",
"iconName": "pool"
}
],
"units": [
{
"id": "123e4567-e89b-12d3-a456-426614174006",
"unitId": "APT-101",
"type": "apartment",
"price": 500000,
"totalSize": 120.5,
"balconySize": 15.2,
"planImage": "https://example.com/plan.jpg"
}
],
"priceFrom": 500000,
"paymentPlan": "70/30 payment plan",
"priceFromAED": 1836500,
"sizeFrom": 80,
"sizeTo": 200,
"sizeFromSqft": 861.12,
"sizeToSqft": 2152.78,
"bedroomsFrom": 1,
"bedroomsTo": 3,
"bathroomsFrom": 1,
"bathroomsTo": 2,
"latitude": 25.2048,
"longitude": 55.2708,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
]
}/api/properties/:idBothGet a single property by ID
curl -X GET "https://admin.foryou-realestate.com/api/api/properties/:id" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <your_jwt_token>"
Same as GET /api/properties, but returns single object instead of array
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"propertyType": "off-plan",
"name": "Example Property"
}
}For fetching all data in one request, use the public endpoint:
GET https://admin.foryou-realestate.com/api/api/public/dataHeaders:
X-API-Key: your_api_key
X-API-Secret: your_api_secretReturns all properties, countries, cities, areas, developers, and facilities with conversions (AED, sqft).