T-SOFT/Admin API/Yorumlar ve Alarmlar

Yorumlar ve Alarmlar

Ürün yorumları

Kapsam: okuma read_reviews, onaylama/yanıtlama/silme write_reviews, müşteri adına yorum ekleme create_reviews.
UçMetotKapsam
catalog/product-commentsGETread_reviews
catalog/product-commentsPOSTcreate_reviews
catalog/product-comments/{id}PATCH, DELETEwrite_reviews
GET /catalog/product-comments
curl 'https://magaza.com/api/v3/admin/2026-01/catalog/product-comments?filter[approved]=0&sort=-id' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Accept: application/vnd.api+json'
AlanAçıklama
productId, productNameÜrün
customerId, memberName, memberSurnameYorumu yazan müşteri
title, commentBaşlık ve metin
ratingPuan (0–5)
approvedOnay durumu; 0 bekliyor, 1 onaylı
answer, answeredByMağazanın yanıtı
img1, img2, img3Yorum görselleri
createdAtYazılma zamanı

Filtreler: productId, customerId, approved, rating, hasImage, title, memberName, productName, rangeBetween.createdAt.

Onaylama ve yanıtlama

PATCH /catalog/product-comments/{id}
curl -X PATCH 'https://magaza.com/api/v3/admin/2026-01/catalog/product-comments/310' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{"data": {"type": "product-comments", "id": "310", "attributes": {"approved": 1, "answer": "Değerlendirmeniz için teşekkürler."}}}'

Müşteri adına yorum ekleme

Yorum toplama uygulamaları (örneğin sipariş sonrası e-postayla puan isteyenler) için. Eklenen yorum mağazanın onayını bekler.

{
  "data": {
    "type": "product-comments",
    "attributes": { "customerId": 318, "productId": 45789, "title": "Çok kaliteli", "comment": "Dikişleri sağlam.", "rating": 5 }
  }
}

customerId, productId, title (en fazla 100 karakter), comment (en fazla 5000 karakter) ve rating zorunludur.

Stok ve fiyat alarmları

Müşterinin "stoğa girince haber ver" ve "fiyatı düşünce haber ver" kayıtları. Bildirimi kendi kanalından gönderen uygulamalar bu kayıtları okur ve gönderdiklerini işaretler.

Kapsam: okuma read_product_alarms, işaretleme ve silme write_product_alarms. Alarm kaydı müşteriye bağlı olduğu için iki kapsam da hassas sayılır.
UçMetotKapsam
catalog/product-alarmsGETread_product_alarms
catalog/product-alarms/{id}GET, DELETEread_product_alarms / write_product_alarms
catalog/product-alarms/{id}/-actions/mark-sentPOSTwrite_product_alarms
AlanAçıklama
productId, subProductIdÜrün ve varyant
customerIdMüşteri
stockNotifytrue ise stok alarmı
basePrice, alarmPrice, currencyAlarm kurulduğundaki fiyat ve hedef fiyat
mailSent, smsSent, webPushSent, mobilePushSentKanal bazında gönderildi bilgisi
dateKurulma zamanı

Filtreler: id, stockNotify.

Gönderildi olarak işaretleme

POST /catalog/product-alarms/{id}/-actions/mark-sent
curl -X POST 'https://magaza.com/api/v3/admin/2026-01/catalog/product-alarms/915/-actions/mark-sent' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/json' \
  -d '{"channel": "mail"}'

channel: mail (varsayılan), sms, web_push, mobile_push. İlgili kanalın gönderildi alanı (mailSent vb.) true olur.