Pazaryeri API Kılavuzu
Mağazanızdaki pazaryeri ürün fiyatları, stokları ve siparişleri uzaktan yönetmek için bu endpoint'leri kullanın. Tüm isteklerde kimlik doğrulama ve tanımlı IP adresi zorunludur.
1. Ürün listeleme
GET /api/v3/marketplace/products?pageSize=20&jt_code=URUN-001
Yanıtta her ürün için jt_marketplacePrices dizisi gelir (platform tipi, fiyat, para birimi).
2. Pazaryeri fiyat güncelleme
PUT /api/v3/marketplace/products/price
Content-Type: application/json
{
"prices": [
{
"jt_code": "URUN-001",
"jt_marketplacePrices": [
{ "jt_type": "n11", "jt_price": 149.90, "jt_currency": "TL" },
{ "jt_type": "ty", "jt_price": 155.00, "jt_currency": "TL" }
],
"jt_syncMarketplaces": "all"
}
]
}
jt_type değerleri: n11, hb, gg, eptt, amz, ty, cs, ms, paz, ned, op, al, idf (mağazanızda aktif olanlar).
3. Stok güncelleme
PUT /api/v3/marketplace/products/stock
{
"stocks": [
{ "jt_code": "URUN-001", "jt_quantity": 25, "jt_syncMarketplaces": "all" }
]
}
4. Ürün güncelleme (fiyat + stok birlikte)
PUT /api/v3/marketplace/products
{
"products": [
{
"jt_code": "URUN-001",
"jt_salePrice": 120,
"jt_quantity": 30,
"jt_marketplacePrices": [
{ "jt_type": "n11", "jt_price": 130, "jt_currency": "TL" }
],
"jt_syncMarketplaces": ["n11", "ty"]
}
]
}
5. Sipariş çekme
POST /api/v3/marketplace/orders/pull
{
"jt_pullType": "new",
"jt_storeId": 0
}
| Alan | Açıklama |
|---|---|
jt_pullType | new = yeni siparişler, current = mevcut sipariş güncellemesi |
jt_storeId | 0 = tüm mağazalar; belirli mağaza için mağaza numarası (yöneticinizden alın) |
6. Sipariş listeleme ve detay
GET /api/v3/marketplace/orders?pageSize=20&jt_startDate=2026-08-01 GET /api/v3/marketplace/orders/123
Detay yanıtında jt_items sipariş satırlarını içerir.
7. Sipariş onaylama
PUT /api/v3/marketplace/orders/123/approve
{}
Sipariş “hazırlanıyor” durumuna alınır. Bazı pazaryerlerinde ek alan gerekebilir; yöneticinize danışın.
8. Sipariş durum güncelleme
PUT /api/v3/marketplace/orders/123/status
{
"jt_status": "shipped",
"jt_shippingCode": "KARGO123",
"jt_shippingFirmId": 1
}
jt_status: new, preparing, shipped, delivered, cancelled, return
Platforma özel parametreler için jt_actionData objesi gönderilebilir (onay ve durum güncellemede).
9. Mağazalar ve listeleme (Faz 3)
GET /api/v3/marketplace/stores
GET /api/v3/marketplace/products/{urun_id}/listings?jt_storeId=1
POST /api/v3/marketplace/products/{urun_id}/listings
PUT /api/v3/marketplace/listings/{listing_id}
POST /api/v3/marketplace/listings/{listing_id}/submit
POST /api/v3/marketplace/products/publish
Listeleme oluşturma örneği (katalog eşleme):
{
"jt_storeId": 1,
"jt_code": "LIST-001",
"jt_barcode": "8690000000001",
"jt_categoryId": "12345",
"jt_marketplaceSelfId": "KATALOG-ID",
"jt_price": 199.90,
"jt_currency": "TL",
"jt_submit": 1
}
jt_catalogMatch durumu listeleme yanıtında jt_statusSync=5 ise katalog onayı bekleniyor demektir.
10. Fatura gönderimi
POST /api/v3/marketplace/orders/123/invoice
{ "jt_invoiceLink": "https://cdn.example.com/fatura.pdf" }
Link verilmezse platformun sendOrderInvoice cron mantığı çalışır (destekleyen mağazalarda).
11. Hata kodları
| code | Anlam |
|---|---|
| MARKETPLACE001 | İstek gövdesinde dizi eksik |
| MARKETPLACE002 | Ürün bulunamadı |
| MARKETPLACE003 | Pazaryeri siparişi bulunamadı |
| MARKETPLACE010 | Mağaza bulunamadı veya pasif |
| MARKETPLACE011–014 | Sipariş onay/durum hatası |
docs/postman/API-V3.postman_collection.json dosyasını Postman'e import edin. base_url, api_key, api_secret değişkenlerini doldurun.