POST
/api/properties
x-api-key: uytop_secret_key_123
| title | String | ||
| description | String | ||
| price | Number | ||
| currency | String | ||
| type | String | ||
| propertyType | String | ||
| rooms | Number | ||
| area | Number | ||
| city | String | ||
| address | String | ||
| latitude | Number | ||
| longitude | Number | ||
| photos | Array | ||
| contactName | String | ||
| contactPhone | String | ||
| contactTelegram | String | ||
| isVip | Boolean |
curl -X POST http://localhost:3000/api/properties \
-H "Content-Type: application/json" \
-H "x-api-key: uytop_secret_key_123" \
-d '{
"title": "3-комнатный дом в исторической Самарканде",
"description": "Продается прекрасный дом в Самарканде. Свежий ремонт, все коммуникации, зеленый сад во дворе.",
"price": 95000,
"currency": "USD",
"type": "sale",
"propertyType": "house",
"rooms": 3,
"area": 140,
"city": "Samarkand",
"address": "ул. Регистанская 45",
"latitude": 39.6547,
"longitude": 66.9757,
"contactName": "Алишер",
"contactPhone": "+998909876543",
"contactTelegram": "alisher_realty",
"isVip": true
}'
const payload = {
title: "2-комнатная новостройка на Чиланзаре",
description: "Аренда новой двухкомнатной квартиры с современной мебелью и кондиционером.",
price: 500,
currency: "USD",
type: "rent",
propertyType: "apartment",
rooms: 2,
area: 60,
city: "Tashkent",
address: "Чиланзар 5-квартал",
latitude: 41.282594,
longitude: 69.213234,
contactName: "Камола",
contactPhone: "+998931112233"
};
fetch('http://localhost:3000/api/properties', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'uytop_secret_key_123'
},
body: JSON.stringify(payload)
})
.then(res => res.json())
.then(data => console.log('Успешно опубликовано:', data))
.catch(err => console.error('Ошибка:', err));
import requests
url = "http://localhost:3000/api/properties"
headers = {
"Content-Type": "application/json",
"x-api-key": "uytop_secret_key_123"
}
payload = {
"title": "Коммерческий склад в Сергели",
"description": "Сдается охраняемый складской ангар. Удобный подъезд для грузовых авто.",
"price": 12000000,
"currency": "UZS",
"type": "rent",
"propertyType": "commercial",
"rooms": 1,
"area": 450,
"city": "Tashkent",
"address": "Сергелийский район, промзона",
"latitude": 41.222594,
"longitude": 69.203234,
"contactName": "Фарход ака",
"contactPhone": "+998909009988"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
{
"success": true,
"data": {
"id": "prop-x5r8y1n9",
"title": "3-комнатный дом в исторической Самарканде",
"description": "Продается прекрасный дом в Самарканде. Свежий ремонт, все коммуникации, зеленый сад во дворе.",
"price": 95000,
"currency": "USD",
"priceUsd": 95000,
"priceUzs": 1216000000,
"type": "sale",
"propertyType": "house",
"rooms": 3,
"area": 140,
"city": "Samarkand",
"address": "ул. Регистанская 45",
"latitude": 39.6547,
"longitude": 66.9757,
"photos": [
"/uploads/example-listing.jpg"
],
"contactName": "Алишер",
"contactPhone": "+998909876543",
"contactTelegram": "alisher_realty",
"isVip": true,
"createdAt": "2026-07-02T05:30:00.000Z"
},
"telegramPosted": true,
"telegramMsg": "TELEGRAM_POSTED"
}
GET
/api/stats
{
"success": true,
"stats": {
"total": 5,
"sales": 3,
"rents": 2,
"avgSalePriceUsd": 150000,
"avgSalePriceUzs": 1920000000,
"exchangeRate": 12800
}
}