API referansı · Ürünler
Ürün sil (kaldırıldı)
Bu uç nokta 1 Temmuz 2025'te kaldırıldı ve her çağrıda HTTP 410 döndürür.
POST
https://out.stockmount.com/api/Product/DeleteProduct
Kaldırıldı · HTTP 410
Bu servis kaldırıldı ve HTTP 410 döner. (2025-07-01)
Bunun yerine şunu kullanın: UpdateProduct
İstek gövdesi geçerli bir JSON olduğu sürece, ApiCode ve paket kontrolü yapılmadan HTTP 410 (Gone) döner. Gövde boş veya bozuksa önce ASP.NET 400 hatası alırsınız. Yanıt gövdesinde ErrorCode yoktur ve mesaj yalnızca Türkçedir.
API ile ürün silmek artık mümkün değildir. Ürünü satıştan kaldırmak için StopProduct kullanın veya UpdateProduct ile Quantity: 0 gönderin.
Yanıt alanları (Response)
Başarılı çağrıda Response alanı boş döner; sonucu Result alanından okuyun.
Bu servisin hata kodları
Oturum hataları (00001, 00006) ve tüm kodlar için hata kodları.
İlgili servisler
Örnek istek
{
"ApiCode": "API_CODE",
"ProductId": 987654
}
curl -X POST 'https://out.stockmount.com/api/Product/DeleteProduct' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"ProductId": 987654
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"ProductId": 987654
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Product/DeleteProduct",
new StringContent(json, Encoding.UTF8, "application/json"));
var result = await response.Content.ReadAsStringAsync();
// Result == false ise ErrorCode ve ErrorMessage alanlarına bakın.
Console.WriteLine(result);
<?php
$body = <<<'JSON'
{
"ApiCode": "API_CODE",
"ProductId": 987654
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Product/DeleteProduct');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$result['Result']) {
echo $result['ErrorCode'] . ' ' . $result['ErrorMessage'];
}
import requests
payload = {
"ApiCode": "API_CODE",
"ProductId": 987654
}
response = requests.post("https://out.stockmount.com/api/Product/DeleteProduct", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"ProductId": 987654
};
const response = await fetch("https://out.stockmount.com/api/Product/DeleteProduct", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const result = await response.json();
if (!result.Result) {
console.error(result.ErrorCode, result.ErrorMessage);
}
Örnek yanıt
{
"Result": false,
"ErrorMessage": "Bu endpoint kaldırılmıştır, 'UpdateProduct' endpointini kullanabilirsiniz."
}