API Referans
ERONTA REST API'si, panel üzerindeki tüm operasyonlara programatik erişim sağlar. Tüm yanıtlar JSON formatındadır.
Temel URL
İstek Formatı
Tüm isteklerde Content-Type: application/json gereklidir. Kimlik doğrulaması için API anahtarı (X-API-Client + X-API-Key) başlıkları kullanılır.
Kimlik Doğrulama
Eronta API kimlik doğrulama yöntemi:
| Yöntem | Header(lar) | Kullanım Amacı |
|---|---|---|
| API Key | X-API-Client: <clientId>X-API-Key: <clientSecret> |
Tüm istekler. Paneldeki Özel Uygulamalar sayfasından oluşturulur. Detaylar → |
X-API-Client ve X-API-Key header'larını gönderin. Kullanıcı adı veya şifre gerekmez.
Hata Kodları
| Kod | Açıklama |
|---|---|
400 | Geçersiz istek (eksik veya hatalı parametre) |
401 | Kimlik doğrulama gerekli veya token geçersiz |
403 | Bu işlem için yetkiniz yok |
404 | Kayıt bulunamadı |
429 | Rate limit aşıldı |
500 | Sunucu hatası |
API Key Kimlik Doğrulama
| Header | Açıklama |
|---|---|
X-API-Client | Uygulamanın Client ID değeri (UUID formatı) zorunlu |
X-API-Key | Uygulamanın Client Secret değeri (64 hex karakter) zorunlu |
GET /api/products?limit=20
X-API-Client: 59cbbab1-867a-4020-be4a-da534a3c4aca
X-API-Key: 6f85f588f9...
curl "https://api.eronta.com/api/products?limit=20" \
-H "X-API-Client: <clientId>" \
-H "X-API-Key: <clientSecret>"
Panel → Özel Uygulamalar → Yeni Uygulama Ekle ile oluşturulan her uygulama için bir clientId ve clientSecret üretilir. clientSecret yalnızca bir kere gösterilir; kaybedilirse yeniden oluşturulmalıdır.
{
"ok": true,
"products": [ ... ],
"total": 9954
}
{ "ok": false, "error": "Oturum gerekli" }
Ürün Listesi
| Parametre | Tip | Açıklama |
|---|---|---|
page | number | Sayfa no (varsayılan: 1) isteğe bağlı |
limit | number | Sayfa başına kayıt (maks: 200) isteğe bağlı |
q | string | Ad / barkod araması isteğe bağlı |
marketplace | string | trendyol | hepsiburada isteğe bağlı |
{ "ok": true, "total": 1240, "products": [{ "id": "MP-001", "barcode": "8691234567890", "title": "Ürün Başlığı", "marketplace": "trendyol", "price": 299.90, "stock": 42, "status": "active" }] }
Ürün Detayı
{ "ok": true, "product": { "id": "MP-001", "barcode": "8691234567890", "title": "Ürün Başlığı", "marketplace": "trendyol", "price": 299.90, "listPrice": 349.90, "stock": 42, "brand": "Marka", "status": "active" } }
Ürün Oluştur
| Alan | Tip | Açıklama |
|---|---|---|
title | string | Ürün adı zorunlu |
barcode | string | Barkod — benzersiz isteğe bağlı |
sku | string | Stok kodu / SKU isteğe bağlı |
sellPrice | number | Satış fiyatı isteğe bağlı |
listPrice | number | Liste fiyatı (KDV dahil) isteğe bağlı |
discountPrice | number | İndirimli fiyat isteğe bağlı |
buyPrice | number | Alış fiyatı isteğe bağlı |
stockCount | number | Stok adedi isteğe bağlı |
description | string | Ürün açıklaması (HTML destekli) isteğe bağlı |
brand | string | Marka adı isteğe bağlı |
category | string | Kategori adı isteğe bağlı |
images | string[] | Görsel URL listesi isteğe bağlı |
attributesKV | object[] | [{"key":"Renk","value":"Siyah"}] isteğe bağlı |
source | string | Kaynak platform. Varsayılan: eronta isteğe bağlı |
POST /api/products
Content-Type: application/json
{ "title": "Pamuklu T-Shirt Siyah L", "barcode": "8690000112233", "sku": "TSH-BLK-L", "sellPrice": 249.90, "listPrice": 299.90, "stockCount": 50, "brand": "MyBrand", "category": "Giyim > T-Shirt", "images": ["https://cdn.example.com/tshirt.jpg"], "attributesKV": [{"key":"Renk","value":"Siyah"},{"key":"Beden","value":"L"}] }
{ "ok": true, "product": { "id": "f9a3c1d2-...", "source": "eronta", "title": "Pamuklu T-Shirt Siyah L", "barcode": "8690000112233", "sellPrice": 249.90, "stockCount": 50, "createdAt": 1743000000000 } }
409 Conflict — Aynı barkodla ürün zaten varsa: {"ok":false,"error":"Bu barcode ile zaten bir ürün mevcut.","code":"BARCODE_CONFLICT"}
Ürün Güncelle
| Alan | Tip | Açıklama |
|---|---|---|
name / title | string | Ürün adı isteğe bağlı |
barcode | string | Yeni barkod isteğe bağlı |
sku | string | SKU / stok kodu isteğe bağlı |
sellPrice | number | Satış fiyatı isteğe bağlı |
discountPrice | number | İndirimli fiyat isteğe bağlı |
buyPrice | number | Alış fiyatı isteğe bağlı |
stockCount | number | Stok adedi isteğe bağlı |
description | string | Açıklama isteğe bağlı |
brand | string | Marka isteğe bağlı |
category | string | Kategori isteğe bağlı |
isActive | boolean | Aktif / pasif isteğe bağlı |
attributesKV | object[] | Özellikler [{key,value}] isteğe bağlı |
priceLists | object[] | [{priceListId,salePrice,discountedPrice}] isteğe bağlı |
Yalnızca gönderilen alanlar güncellenir. Stok veya fiyat değiştiğinde Trendyol / Hepsiburada'ya otomatik push tetiklenir.
PUT /api/products/f9a3c1d2-...
Content-Type: application/json
{ "sellPrice": 279.90, "discountPrice": 259.90, "stockCount": 42, "isActive": true }
{ "ok": true, "product": { "id": "f9a3c1d2-...", "sellPrice": 279.90, "stockCount": 42 } }
Stok Güncelle
PUT /api/products/:id endpoint'inin stok odaklı kullanımı. Yalnızca stockCount gönderildiğinde pazaryeri stok push'u otomatik tetiklenir.
PUT /api/products/f9a3c1d2-...
{ "stockCount": 100 }
{ "ok": true, "product": { "id": "f9a3c1d2-...", "stockCount": 100, "updatedAt": 1743120000000 } }
Toplu stok için: POST /api/products/import veya fiyat listeleri üzerinden toplu güncelleme yapabilirsiniz.
Fiyat Güncelle
PUT /api/products/f9a3c1d2-...
{ "sellPrice": 349.90, "discountPrice": 299.90 }
PUT /api/products/f9a3c1d2-...
{ "sellPrice": 349.90, "priceLists": [{ "priceListId": "pl-001", "salePrice": 349.90, "discountedPrice": 299.90 }] }
{ "ok": true, "product": { "id": "f9a3c1d2-...", "sellPrice": 349.90 } }
Görsel Yükle
En fazla 20 görsel, toplam 20 MB. Formatlar: jpg, png, webp.
curl -X POST https://api.eronta.com/api/products/f9a3c1d2-.../images \
-H "X-API-Client: <clientId>" -H "X-API-Key: <secret>" \
-F "images=@/path/to/photo1.jpg" -F "images=@/path/to/photo2.jpg"
{ "ok": true, "added": 2, "images": ["https://api.eronta.com/api/uploads/abc123.jpg","https://api.eronta.com/api/uploads/def456.jpg"] }
Ürün Sil
{ "ok": true, "deleted": "f9a3c1d2-..." }
Toplu İçe Aktar
multipart/form-data ile .xlsx / .csv dosyası gönderin.
| Alan | Tip | Açıklama |
|---|---|---|
file | file | xlsx veya csv dosyası zorunlu |
mode | string | upsert | stock_only | price_only isteğe bağlı |
{ "ok": true, "imported": 145, "updated": 32, "skipped": 3, "errors": [] }
Sipariş Listesi
| Alan | Tip | Açıklama |
|---|---|---|
source | string | trendyol | hepsiburada | all isteğe bağlı |
status | string | Sipariş durumu isteğe bağlı |
startDate | string | ISO 8601 tarih isteğe bağlı |
endDate | string | ISO 8601 tarih isteğe bağlı |
q | string | Sipariş no / müşteri adı isteğe bağlı |
page | number | Sayfa no isteğe bağlı |
limit | number | Sayfa başına kayıt isteğe bağlı |
{ "source": "trendyol", "startDate": "2026-03-01T00:00:00Z", "endDate": "2026-03-28T23:59:59Z", "page": 1, "limit": 25 }
{ "ok": true, "total": 318, "orders": [{ "id": "12345678", "source": "trendyol", "status": "Delivered", "customerName": "Ahmet Y.", "totalPrice": 459.90, "currency": "TRY", "createdAt": "2026-03-20T14:32:00Z" }] }
Sipariş Detayı
source: trendyol | hepsiburada | ikas
{
"ok": true,
"order": {
"id": "12345678", "source": "trendyol", "status": "Delivered",
"customerName": "Ahmet Yılmaz",
"shippingAddress": { "fullName": "Ahmet Yılmaz", "address": "Atatürk Cad. No:5", "city": "İstanbul", "district": "Kadıköy" },
"lines": [{ "barcode": "8690000112233", "productName": "Pamuklu T-Shirt", "quantity": 2, "amount": 249.90 }],
"totalPrice": 499.80, "cargoTrackingNumber": "TR123456789", "cargoCompany": "Yurtiçi Kargo"
}
}
Sipariş İstatistikleri
{ "ok": true, "today": { "orderCount": 24, "revenue": 8740.50 }, "last7days": { "orderCount": 187, "revenue": 68450.75 }, "last30days": { "orderCount": 823, "revenue": 298120.40 }, "bySource": { "trendyol": { "count": 512, "revenue": 183000 }, "hepsiburada": { "count": 311, "revenue": 115120 } } }
Fatura Kes
{ "ok": true, "invoiceNo": "EAR-2026-00124", "invoiceUrl": "https://..." }
Siparişleri Dışa Aktar
| Alan | Tip | Açıklama |
|---|---|---|
format | string | csv | xlsx zorunlu |
startDate | string | Başlangıç tarihi isteğe bağlı |
endDate | string | Bitiş tarihi isteğe bağlı |
Yanıt olarak dosya stream döner (application/octet-stream).
Müşteri Sorularını Listele
| Alan | Tip | Açıklama |
|---|---|---|
status | string | WAITING_FOR_ANSWER | ANSWERED isteğe bağlı |
page | number | Sayfa (0'dan başlar) isteğe bağlı |
size | number | Sayfa başına kayıt, maks 200 isteğe bağlı |
{ "ok": true, "totalElements": 14, "questions": [{ "id": "q-98765", "text": "Bu ürün L beden büyük mü kesiliyor?", "status": "WAITING_FOR_ANSWER", "barcode": "8690000112233", "productName": "Pamuklu T-Shirt Siyah L", "platform": "trendyol" }] }
AI Cevap Üret
Eronta AI, ürün açıklaması ve özellikleri göz önünde bulundurarak doğal dilde cevap taslağı üretir.
| Alan | Tip | Açıklama |
|---|---|---|
question | string | Müşteri soru metni zorunlu |
barcode | string | Ürün barkodu isteğe bağlı |
productData | object | Manuel ürün bağlamı isteğe bağlı |
POST /api/questions/generate
{ "question": "Bu ürün L beden büyük mü kesiliyor?", "barcode": "8690000112233" }
{ "ok": true, "answer": "Merhaba! Ürünümüz standart kesimde olmakla birlikte rahat bir kullanım için bir beden büyük almanızı öneririz." }
Not: AI paketi gerektiren bir özelliktir. Paketsiz hesaplarda 403 FEATURE_DISABLED döner.
Cevap Gönder
| Alan | Tip | Açıklama |
|---|---|---|
text | string | Cevap metni (10–2000 karakter) zorunlu |
{ "ok": true, "message": "Cevap gönderildi." }
Oto-Cevap Ayarları
{ "ok": true, "storePrompt": "Mağazamız hafta içi 09:00-18:00 açıktır. Kargo 1-3 iş günü.", "autoMode": "generate", "lastAutoRunAt": 1743100000000 }
autoMode: off — devre dışı | generate — AI taslak, onay bekler | auto — otomatik yanıtla
POST /api/questions/settings
{ "storePrompt": "Kargo 1-3 iş günü. İadeler 14 gün içinde.", "autoMode": "generate" }
Fiyat Listeleri — Listele
{ "ok": true, "priceLists": [{ "id": 3, "name": "Trendyol Yazlık", "currency": "TRY", "itemCount": 248, "createdAt": "2026-01-15T08:00:00Z" }] }
Fiyat Listesi — Oluştur
| Alan | Tip | Açıklama |
|---|---|---|
name | string | Liste adı zorunlu |
description | string | Açıklama isteğe bağlı |
currency | string | Para birimi (varsayılan: TRY) isteğe bağlı |
{ "ok": true, "id": 5, "name": "Yaz Kampanyası" }
Fiyat Listesi — Ürün Ekle
| Alan | Tip | Açıklama |
|---|---|---|
barcode | string | Ürün barkodu zorunlu |
price | number | Satış fiyatı zorunlu |
salePrice | number | İndirimli fiyat isteğe bağlı |
{ "ok": true }
Fiyat Listesi — İçe / Dışa Aktar
Excel dosyası (application/octet-stream) döner.
multipart/form-data ile file alanında XLS gönderilir.
{ "ok": true, "imported": 248, "skipped": 2 }
Buybox Ürünleri
{ "ok": true, "products": [{ "barcode": "8691234567890", "title": "Ürün Başlığı", "marketplace": "trendyol", "myPrice": 299.90, "buyboxPrice": 279.90, "hasBuybox": false }] }
Fiyat Öner (Reprice)
| Alan | Tip | Açıklama |
|---|---|---|
barcode | string | Ürün barkodu zorunlu |
marketplace | string | trendyol | hepsiburada zorunlu |
{ "ok": true, "suggestedPrice": 274.90, "minAllowedPrice": 267.50, "profitMargin": 0.14 }
Buybox Ayarları
{ "ok": true, "settings": { "autoSync": true, "autoSyncInterval": 30, "minMarginPercent": 10 } }
AI Sohbet
| Alan | Tip | Açıklama |
|---|---|---|
message | string | Kullanıcı sorusu zorunlu |
conversationId | string | Devam eden sohbet ID'si isteğe bağlı |
{ "ok": true, "conversationId": "conv_xkq82", "reply": "Bu hafta en çok satan 5 ürününüz..." }
AI İçgörüler
{ "ok": true, "insights": [{ "id": "ins_m9k3", "type": "low_stock", "severity": "warning", "title": "8 ürününüzde stok kritik", "isRead": false }] }
AI Öneriler
{ "ok": true, "recommendations": [{ "id": "rec_p2a1", "type": "price_adjustment", "title": "Buybox kazanmak için fiyat düşürün", "impact": "high" }] }
Ayarları Getir
{ "ok": true, "settings": { "stockBuffer": 2, "currency": "TRY", "timezone": "Europe/Istanbul" } }
Kullanıcılar
{ "ok": true, "users": [{ "id": 42, "email": "kullanici@firma.com", "fullName": "Ad Soyad", "role": "admin", "isActive": true }] }