Ana içeriğe geç

Ürün/Hizmet Güncelleme

Mevcut ürün/hizmet kaydını güncelleme.

Endpoint

PUT /kolaybi/v1/products/{product_id}

Parametreler

ParametreTipZorunluAçıklama
namestringEvetÜrün adı
codestringHayırÜrün kodu
barcodestringHayırBarkod numarası
descriptionstringHayırÜrün açıklaması
product_typeProductTypeHayırÜrün tipi
vat_rateVATRateHayırKDV oranı
pricenumberHayırSatış fiyatı
price_currencyCurrencyHayırPara birimi
quantitynumberHayırStok miktarı

Örnekler

# Temel ürün güncelleme
curl -X PUT "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/products/1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "name=Güncellenmiş Ürün Adı"

# Detaylı ürün güncelleme
curl -X PUT "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/products/1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "name=Güncellenmiş Ürün&code=URN001&barcode=1234567890&product_type=good&vat_rate=20&price=150.00&price_currency=TRY&quantity=75"

Yanıt Formatı

{
"success": true,
"data": {
"id": 1,
"name": "Güncellenmiş Ürün",
"code": "URN001",
"barcode": "1234567890",
"description": "Ürün açıklaması",
"product_type": "good",
"price": 150.0,
"price_currency": "TRY",
"vat_rate": 20,
"quantity": 75,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}

Yanıt Alanları

AlanTipAçıklama
idintegerÜrün ID
namestringÜrün adı
codestringÜrün kodu
barcodestringBarkod numarası
descriptionstringÜrün açıklaması
product_typestringÜrün tipi
pricenumberSatış fiyatı
price_currencystringPara birimi
vat_rateintegerKDV oranı
quantitynumberStok miktarı
created_atstringOluşturulma tarihi
updated_atstringGüncellenme tarihi

Kurallar

Önemli
  • Ürün ID: Güncellenecek ürünün ID'si URL'de belirtilmeli
  • En az 1 alan: En az 1 alan güncellenmelidir
  • Mevcut ürün: Ürün sistemde mevcut olmalı
  • Veri tipleri: Parametreler doğru veri tipinde olmalı