http://localhost:8080/api/v1https://staging.api.photoplaces.ru/api/v1https://api.photoplaces.ru/api/v1Authorization: Bearer <token>superadmin, moderator, landlord, executor, customer{
"type": "https://api.photoplaces.ru/errors/validation-error",
"title": "Ошибка валидации",
"status": 422,
"detail": "Некорректные входные данные",
"instance": "/api/v1/places",
"errors": [
{ "field": "title", "message": "Название обязательно" }
]
}
// Запрос
{
"email": "user@example.com",
"password": "securePass123",
"role": "customer" // customer | landlord | executor
}
// Ответ 201
{
"user": { "id": "uuid", "email": "...", "role": "customer", "created_at": "..." },
"access_token": "eyJ...",
"refresh_token": "eyJ..." // также устанавливается HttpOnly cookie
}
// Запрос
{
"email": "user@example.com",
"password": "securePass123"
}
// Ответ 200
{
"user": { ... },
"access_token": "eyJ...",
"refresh_token": "eyJ..."
}
Параметры запроса:
type: place | studio (по умолчанию оба)tags: ID тегов через запятуюmin_rating: число 0-5features: ID характеристик через запятуюprice_min, price_max: для студийbounds: sw_lat,sw_lng,ne_lat,ne_lng (область карты)cursor: курсор пагинацииlimit: 1-100 (по умолчанию 20)sort: rating | created_at | distance (требует user_lat,user_lng)Ответ 200:
{
"data": [
{
"id": "uuid",
"type": "place",
"title": "Красивый парк",
"cover_image": "https://cdn.../uuid.jpg",
"coordinates": { "lat": 55.75, "lng": 37.61 },
"address": "Москва, Парковая 1",
"rating": 4.5,
"tags": ["nature", "architecture"],
"features": ["parking", "public_transport"],
"status": "published",
"created_at": "2024-01-15T10:30:00Z"
}
],
"next_cursor": "eyJpZCI6InV1aWQifQ==",
"has_more": true
}
Ответ 200: Полная карточка PlaceCard / StudioCard
{
"id": "uuid",
"type": "studio",
"title": "Студия 'Свет'",
"description": "Профессиональная фотостудия...",
"address": "Москва, ул. Ленина 10, офис 5",
"coordinates": { "lat": 55.75, "lng": 37.61 },
"cover_image": "https://cdn.../cover.jpg",
"images": ["https://cdn.../1.jpg", "https://cdn.../2.jpg"],
"access_info": "Метро 'Площадь Революции', 5 мин пешком. Парковка во дворе.",
"tags": ["portrait", "fashion", "product"],
"features": [
{ "id": "flash", "name": "Импульсные источники" },
{ "id": "continuous", "name": "Постоянный свет" },
{ "id": "cyclorama", "name": "Циклорама" }
],
"pricing": {
"hourly_rate": 1500,
"currency": "RUB",
"min_hours": 2
},
"booking_url": "https://booking.photoplaces.ru/studio/uuid",
"executor_services": [
{ "id": "uuid", "title": "Портретная съемка", "price": 5000, "executor_name": "Иван Фотограф" }
],
"rating": 4.8,
"reviews_count": 24,
"owner": { "id": "uuid", "name": "Студия 'Свет'", "avatar": "..." },
"status": "published",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:22:00Z"
}
Роли: customer (type=place), landlord (type=studio)
// Запрос
{
"type": "studio",
"title": "Новая студия",
"description": "Описание...",
"address": "Москва, ул. Новая 5",
"coordinates": { "lat": 55.76, "lng": 37.62 },
"access_info": "Как добраться...",
"tags": ["portrait", "fashion"],
"features": ["flash", "cyclorama"],
"pricing": { "hourly_rate": 2000, "currency": "RUB", "min_hours": 3 }
}
// Ответ 201
{ "id": "uuid", "status": "pending_moderation", "message": "Отправлено на проверку" }
Роли: Владелец, moderator, superadmin
pending_moderationРоли: Владелец, moderator, superadmin
Роли: moderator, superadmin
// Запрос
{ "action": "approve", "comment": "Всё хорошо" }
// action: approve | reject | request_changes
Параметры: tags, min_rating, price_min, price_max, cursor, limit
Ответ 200: Полная карточка ServiceCard
Роль: executor
{
"title": "Портретная съемка в студии",
"description": "Профессиональная портретная съемка...",
"price": 5000,
"currency": "RUB",
"duration_minutes": 120,
"tags": ["portrait", "studio"],
"portfolio_images": ["https://cdn.../1.jpg"]
}
Роль: Владелец, moderator, superadmin
Роль: Владелец, moderator, superadmin
Публичный профиль
Обновление своего профиля
Свои места (все статусы)
Свои услуги (для исполнителей)
Роли: moderator, superadmin
Параметры: role, status, cursor, limit
Роли: superadmin (все), moderator (кроме superadmin/moderator)
{ "role": "customer", "status": "active" }
// status: active | banned | pending_verification
Роли: moderator, superadmin
Параметры: type: place | studio | service, status: pending | rejected
Роли: moderator, superadmin
{ "action": "approve", "comment": "..." }
Ответ: Список тегов стилей съёмки
[{ "id": "portrait", "name": "Портрет", "category": "style" }, ...]
Ответ: Список характеристик мест
[{ "id": "flash", "name": "Импульсный свет", "category": "equipment" }, ...]
// Запрос
{ "content_type": "image/jpeg", "max_size_mb": 10 }
// Ответ
{ "upload_url": "https://s3...", "file_url": "https://cdn...", "fields": { "key": "...", "policy": "...", "signature": "..." } }
POST /webhooks/cloudpayments
Курсорная:
cursor = base64(JSON) ключа сортировки последнего элемента + IDlimit макс. 100next_cursor и has_more