Partner API v1

Products API

Entegratör sisteminden BaZaaRDan'a ürün oluşturma ve ürün güncelleme akışıdır. Varyant, görsel, kategori ve attribute eşleştirme dahil olacak şekilde tasarlanmıştır.

Endpoint

POST/products.php

AuthenticationHMAC SHA256 required
ScopeSeller scoped
Permissionproducts:write
Base URLhttps://bazaardan.com/api/partner/v1

Required Headers

HeaderAçıklama
X-BZ-CLIENT-IDPartner uygulamasının Client ID değeri.
X-BZ-TIMESTAMPUnix timestamp. Örnek: 1778269200
X-BZ-SIGNATUREClient Secret ile üretilen HMAC SHA256 imzası.
Acceptapplication/json
Content-TypePOST/PUT isteklerinde application/json

Signature Standardı

İmza her zaman base URL sonrasındaki path üzerinden üretilir. Örnek: /products.php

METHOD + "\n" + PATH_WITH_QUERY + "\n" + TIMESTAMP + "\n" + RAW_BODY

Example Request Body

{
  "external_product_id": "ERP-1001",
  "title": "Kadın Basic Tişört",
  "description": "Ürün açıklaması",
  "brand_id": 10,
  "category_id": 25,
  "currency": "TRY",
  "price": 499.90,
  "stock": 24,
  "barcode": "8690000000001",
  "sku": "SKU-1001",
  "attributes": [
    {"attribute_id": 101, "value": "Siyah"},
    {"attribute_id": 102, "value": "M"}
  ],
  "images": [
    "https://cdn.example.com/products/sku-1001-1.webp"
  ],
  "variants": [
    {
      "sku": "SKU-1001-SIYAH-M",
      "barcode": "8690000000002",
      "price": 499.90,
      "stock": 12,
      "attributes": [
        {"attribute_id": 101, "value": "Siyah"},
        {"attribute_id": 102, "value": "M"}
      ]
    }
  ]
}

Example Response

{
  "ok": true,
  "data": {
    "product_id": 356,
    "external_product_id": "ERP-1001",
    "status": "pending_review",
    "message": "Ürün alındı ve kontrol kuyruğuna eklendi."
  }
}