Konumlar
Musterinin birden fazla konum kaydini yonettigi tenant endpointleri.
Base URL: /api/tenant/locations
Yetkilendirme: Bearer Token + X-Api-Key
Modul: Locations modulu musteriye atanmis olmalidir.
Headers:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
X-Api-Key: customer-api-key
Veri Modeli
Country, City, District alanlari tenant veritabaninda tutulmaz; admin katmaninda sistem-geneli referans tablolardan secilir.
| Alan | Tip | Aciklama |
|---|---|---|
countryId | Guid | Base DB GeoCountry kaydi |
cityId | Guid | Base DB GeoCity kaydi |
districtId | Guid | Base DB GeoDistrict kaydi |
address | string | Acik adres |
groupName | string? | Konum gruplama metni |
latitude | decimal | -90..90 |
longitude | decimal | -180..180 |
email | string? | Iletisim e-postasi |
phone | string? | Iletisim telefonu |
googleMapsLink | string? | Harita linki |
isActive | bool | Public'te gorunurluk |
translations[].title | string | Dil bazli baslik |
translations[].name | string | Dil bazli ad |
POST /
Yeni konum olusturur.
Request Body:
{
"countryId": "0f6e2b90-...",
"cityId": "bfa37741-...",
"districtId": "e0f2a1c6-...",
"address": "Bagdat Caddesi No:120 Kadikoy / Istanbul",
"groupName": "Magazalar",
"latitude": 40.9739,
"longitude": 29.0906,
"email": "kadikoy@example.com",
"phone": "+90 216 000 00 00",
"googleMapsLink": "https://maps.google.com/?q=40.9739,29.0906",
"isActive": true,
"translations": [
{
"languageId": "9cd14a82-...",
"title": "Kadikoy Subesi",
"name": "Kadikoy Magaza"
}
]
}
Response — 201 Created: LocationResponse
GET /
Konumlari filtreli ve sayfalanmis listeler.
Query Parametreleri:
| Parametre | Tip | Varsayilan | Aciklama |
|---|---|---|---|
page | int | 1 | Sayfa numarasi |
pageSize | int | 10 | Sayfa basina kayit |
search | string | — | address, groupName, title, name alanlarinda arama |
groupName | string | — | Grup filtresi |
countryId | Guid | — | Ulke filtresi |
cityId | Guid | — | Il filtresi |
districtId | Guid | — | Ilce filtresi |
isActive | bool | — | Aktiflik filtresi |
lang | string | varsayilan dil | Liste cevabinda secili dilde title/name |
Response — 200 OK: PaginatedResult<LocationListResponse>
GET /{id}
Belirli bir konumun detayini getirir.
Response — 200 OK: LocationResponse
PUT /{id}
Mevcut konumu gunceller.
Request Body: POST / ile ayni yapi.
Response — 200 OK: LocationResponse
DELETE /{id}
Konumu soft delete ile siler.
Response — 204 No Content
Olasi Hatalar
| Kod | Durum |
|---|---|
400 | Latitude/Longitude, URL veya body validasyon hatasi |
404 | Konum bulunamadi |
403 | locations modulu tenant'a atanmamis |
Public Geo Notu
Ulke/il/ilce secim listeleri frontend tarafinda su public endpointlerden alinabilir:
GET /api/public/locations/geo/countriesGET /api/public/locations/geo/cities?countryId=...GET /api/public/locations/geo/districts?cityId=...