Venzigo Web API Dokümantasyonu

Mobil, SPA ve ERP istemcileri için REST API. Vitrin uçları herkese açık; ürün yazma uçları JWT Bearer ve roldeki Web Servis (API) iznini ister. Dil: query lang=tr-TR veya Accept-Language.

Base: /api/v1 JSON JWT Bearer Access token: 15 dk Kullanıcı limiti · 429

Yetkilendirme

Yönetim uçları için önce POST /api/v1/auth/login ile token alın. Sonraki isteklerde header zorunludur:

Header
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
Accept: application/json
Ürün yazma uçları Web Servis (API) izni ister. Rol formunda (Kullanıcılar → Roller) bu kutu işaretlenir; token’a admin.perm = WebApi yazılır. Admin rolü bu izne sahiptir. Manager veya özel rol izinsizse 403. Vitrin /api/v1/catalog/* anonimdir. Kullanıcı formundaki dakika / saat / sayfa tavanı aşılırsa 429 (liste pageSize kısılır).

Hata formatı

ASP.NET ProblemDetails (400) veya kısa JSON ({"error":"..."}).

HTTPAnlam
400Eksik/geçersiz gövde veya validation
401Token yok veya geçersiz
403Web Servis (API) izni yok
404Kayıt bulunamadı
409Çakışma (SKU, pazaryeri kodu, varyantlı stok)
429Kullanıcı API limiti aşıldı (dakika / saat / eşzamanlı)

Sayfalama

Liste uçları ortak PagedResult kullanır. page ≥ 1, pageSize 1–200.

PagedResult
{
  "items": [ /* kayıtlar */ ],
  "totalCount": 120,
  "page": 1,
  "pageSize": 24,
  "totalPages": 5,
  "hasPrevious": false,
  "hasNext": true
}

Auth

POST /api/v1/auth/login

E-posta ve şifre ile giriş. Access token ~15 dakika; refresh ile yenilenir.

Request body

AlanTipAçıklama
emailstringzorunluKullanıcı e-posta
passwordstringzorunluŞifre

Örnek istek

JSON
{
  "email": "admin@magaza.com",
  "password": "********"
}

Örnek yanıt · 200

JSON
{
  "accessToken": "eyJhbGciOi...",
  "accessTokenExpiresAt": "2026-10-28T15:15:00Z",
  "refreshToken": "...",
  "refreshTokenExpiresAt": "2026-11-27T15:00:00Z",
  "user": {
    "id": "a1b2c3d4-....",
    "email": "admin@magaza.com",
    "userName": "admin@magaza.com",
    "firstName": "Ayşe",
    "lastName": "Yılmaz",
    "roles": ["Admin"]
  }
}
POST /api/v1/auth/refresh

Access token yeniler. Body: {"refreshToken":"..."}.

GET /api/v1/auth/me JWT

Oturumdaki kullanıcı profili ve roller.

Vitrin ürün

Anonim. Yalnızca aktif ve ERP referansı olan ürünler döner. Dil: lang veya Accept-Language.

GET /api/v1/catalog/products

Vitrin kart listesi (sayfalı).

Query

ParametreTipAçıklama
searchstringAd / SKU arama
categoryIdsguid[]
brandIdsguid[]
minPrice / maxPricedecimal
page / pageSizeint24
GET /api/v1/catalog/products/{slug}

Vitrin detay: varyant, özellik, fiyat, stok, görseller.

Örnek yanıt · 200

JSON
{
  "id": "24686e93-....",
  "sku": "4171S",
  "name": "Deri Bot",
  "slug": "deri-bot",
  "listPrice": 1299,
  "salesPrice": 695,
  "currency": "TRY",
  "stock": 0,
  "variants": [
    { "id": "...", "sku": "4171S-36", "salesPrice": 695, "stock": 83 }
  ],
  "attributes": [
    { "typeCode": "MAT", "valueCode": "BIC52", "name": "Bic52" }
  ]
}
GET /api/v1/catalog/products/by-sku/{sku}

Aynı detay DTO; ürün SKU veya varyant SKU ile. Mobil / ERP okuma için.

Ürün yönetimi

JWT + Web Servis (API) izni. Gövde ProductUpsertModel / ProductDetailDto.

GET /api/v1/products Web Servis

Yönetim ürün listesi (sayfalı).

Query

ParametreTipAçıklama
qstringSKU, barkod, ad
brandId / categoryIdguid
isActivebool
page / pageSizeint24
GET /api/v1/products/{id} Web Servis

Tam detay: çeviriler, varyantlar, stok, özellikler, pazaryeri profilleri.

Örnek yanıt · 200

JSON
{
  "id": "24686e93-....",
  "sku": "4171S",
  "listPrice": 1299,
  "salesPrice": 695,
  "currency": "TRY",
  "stockQuantity": 0,
  "isActive": true,
  "translations": [
    { "languageCode": "tr-TR", "name": "Deri Bot", "slug": "deri-bot" }
  ],
  "attributeValueIds": ["...."],
  "variants": [
    { "id": "...", "sku": "4171S-36", "salesPrice": 695, "stockQuantity": 83, "stockAvailable": 83 }
  ]
}
POST /api/v1/products Web Servis

Yeni ürün. Aynı SKU varsa 409. Yanıt: ProductDetailDto, Location /api/v1/products/{id}.

Örnek istek

JSON
{
  "sku": "TSHIRT-01",
  "currency": "TRY",
  "listPrice": 399,
  "salesPrice": 299,
  "isActive": true,
  "translations": [
    { "languageCode": "tr-TR", "name": "Basic Tişört" }
  ]
}
PUT /api/v1/products/{id} Web Servis

Ürün güncelleme. Body POST ile aynı ProductUpsertModel.

DELETE /api/v1/products/{id} Web Servis

Ürünü siler. 204 / 404.

PUT /api/v1/products/{id}/attributes Web Servis

Ürün özellik değerlerini değiştirir (HesapOn stock-items/{id}/attributes). Olmayan value id → 404.

Request body

JSON
{
  "attributeValueIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}

Varyant · fiyat · stok

Stok uçları mutlak adet yazar. Varyantlı üründe ürün stoğu 409 döner.

PUT /api/v1/products/{id}/price Web Servis

Ürün seviyesinde liste / satış fiyatı.

Request body

JSON
{
  "listPrice": 1299,
  "salesPrice": 695,
  "currency": "TRY"
}
PUT /api/v1/products/{id}/stock Web Servis

Varyantsız ürün stoğu. Varyant varsa 409.

Request body

JSON
{ "quantity": 40 }
GET /api/v1/products/{id}/variants Web Servis

Ürünün varyant listesi (fiyat + stok).

POST /api/v1/products/{id}/variants Web Servis

Yeni varyant. Aynı SKU 409.

Örnek istek

JSON
{
  "sku": "TSHIRT-01-KIRMIZI-M",
  "colorId": "....",
  "size1Id": "....",
  "listPrice": 399,
  "salesPrice": 299,
  "currency": "TRY",
  "isActive": true,
  "initialStock": 12
}
PUT /api/v1/products/{id}/variants/{variantId} Web Servis

Varyant güncelleme. Body ProductVariantUpsertModel.

DELETE /api/v1/products/{id}/variants/{variantId} Web Servis

Varyantı siler. 204 / 404.

PUT /api/v1/products/{id}/variants/{variantId}/price Web Servis

Varyant fiyatı.

Request body

JSON
{
  "listPrice": 399,
  "salesPrice": 299,
  "currency": "TRY"
}
PUT /api/v1/products/{id}/variants/{variantId}/stock Web Servis

Varyant stoğunu mutlak adet olarak yazar. 0 ise tükendi bayrağı set edilir.

Request body

JSON
{ "quantity": 83 }

Özellikler

Özellik kataloğu, renk ve beden listeleri. Yazma yok; salt okunur.

GET /api/v1/attribute-types Web Servis

Özellik tipi listesi (sayfalı). Query: q, isActive, page, pageSize.

GET /api/v1/attribute-types/catalog Web Servis

Aktif tipler, değerler ve her birinin pazaryeri eşlemesi. Ürün attribute seçici + mevcut map’leri okumak için.

Örnek yanıt · 200

JSON
[
  {
    "id": "....",
    "code": "MAT",
    "name": "Materyal",
    "marketplaceMaps": [
      { "providerCode": "trendyol", "marketplaceAttributeCode": "344" },
      { "providerCode": "ozon", "marketplaceAttributeCode": "9533" },
      { "providerCode": "hepsiburada", "marketplaceAttributeCode": null },
      { "providerCode": "n11", "marketplaceAttributeCode": null }
    ],
    "values": [
      {
        "id": "....",
        "code": "BIC52",
        "name": "Bic52",
        "marketplaceMaps": [
          { "providerCode": "trendyol", "marketplaceAttributeValueCode": "348" },
          { "providerCode": "ozon", "marketplaceAttributeValueCode": null },
          { "providerCode": "hepsiburada", "marketplaceAttributeValueCode": null },
          { "providerCode": "n11", "marketplaceAttributeValueCode": null }
        ]
      }
    ]
  }
]
GET /api/v1/colors Web Servis

Renk listesi (varyant colorId). Query: q, isActive, sayfalama.

GET /api/v1/sizes Web Servis

Beden listesi (varyant size1Id / size2Id). Query: q, group, isActive.

Pazaryeri attribute

Sağlayıcı kodları: trendyol · ozon · hepsiburada · n11. Tüm eşlemeleri bir arada görmek için GET /api/v1/attribute-types/catalog. Geçersiz kod 409.

GET /api/v1/attribute-types/{id}/marketplace-maps Web Servis

Tek özellik tipinin dört pazaryeri eşlemesini listeler. Kod yoksa null.

Örnek yanıt · 200

JSON
[
  { "providerCode": "trendyol", "marketplaceAttributeCode": "344" },
  { "providerCode": "ozon", "marketplaceAttributeCode": "9533" },
  { "providerCode": "hepsiburada", "marketplaceAttributeCode": null },
  { "providerCode": "n11", "marketplaceAttributeCode": null }
]
PUT /api/v1/attribute-types/{id}/marketplace-maps Web Servis

Özellik tipini pazaryeri attribute koduna bağlar. Boş kod eşlemeyi siler. Yanıt: güncel dört sağlayıcı listesi.

Request body

JSON
{
  "providerCode": "ozon",
  "marketplaceAttributeCode": "9533"
}
GET /api/v1/attribute-values/{id}/marketplace-maps Web Servis

Tek özellik değerinin dört pazaryeri eşlemesini listeler.

Örnek yanıt · 200

JSON
[
  { "providerCode": "trendyol", "marketplaceAttributeValueCode": "348" },
  { "providerCode": "ozon", "marketplaceAttributeValueCode": null },
  { "providerCode": "hepsiburada", "marketplaceAttributeValueCode": null },
  { "providerCode": "n11", "marketplaceAttributeValueCode": null }
]
PUT /api/v1/attribute-values/{id}/marketplace-maps Web Servis

Özellik değerini pazaryeri value koduna bağlar. Yanıt: güncel liste.

Request body

JSON
{
  "providerCode": "trendyol",
  "marketplaceAttributeValueCode": "348"
}

Bu dilimde yok

Görsel yükleme, paket / asorti / konfigüratör, pazaryeri ürün push, stok hareketi ve depo uçları sonraki dilimde.