Logo

API Documentation

Complete API reference for all available endpoints

Технологія бекенду:

Express.js 5.1 • Node.js • TypeScript • TypeORM • PostgreSQL

GET/api/propertiesBoth

Get list of all properties with optional filters

Query Parameters

NameTypeRequiredDescription
propertyTypestringNoFilter by property type: "off-plan" or "secondary"
developerIdstringNoFilter by developer ID (UUID)
cityIdstringNoFilter by city ID (UUID)

Request Example

cURL
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>"

Response Schema

JSON Schema
{
  "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"
    }
  ]
}

Example Response

JSON
{
  "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"
    }
  ]
}
GET/api/properties/:idBoth

Get a single property by ID

Request Example

cURL
curl -X GET "https://admin.foryou-realestate.com/api/api/properties/:id" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your_jwt_token>"

Response Schema

JSON Schema
Same as GET /api/properties, but returns single object instead of array

Example Response

JSON
{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "propertyType": "off-plan",
    "name": "Example Property"
  }
}

Public API Endpoint

For fetching all data in one request, use the public endpoint:

GET https://admin.foryou-realestate.com/api/api/public/data

Headers:

X-API-Key: your_api_key
X-API-Secret: your_api_secret

Returns all properties, countries, cities, areas, developers, and facilities with conversions (AED, sqft).