API referansı · Siparişler
Sipariş notunu kaydet
Bir siparişin StockMount içindeki notunu yazar veya siler.
https://out.stockmount.com/api/Integration/SetOrderNotes
Not yalnızca StockMount'ta saklanır; pazaryerine gönderilmez. Mevcut notun üzerine yazılır. Notes boş veya gönderilmezse not silinir.
Gövde bir sipariş nesnesidir ama yalnızca OrderId ve Notes okunur; diğer alanlar yok sayılır. Başarıda Response boştur.
İstek alanları
| Alan | Tip | Açıklama |
|---|---|---|
ApiCode
zorunlu
|
string |
DoLogin ile aldığınız API kodu.
|
OrderId
zorunlu
|
integer | StockMount sipariş ID'si. |
Notes
|
string | Yeni not. Boşsa mevcut not silinir. |
Yanıt alanları (Response)
Başarılı çağrıda Response alanı boş döner; sonucu Result alanından okuyun.
Bu servisin hata kodları
| Kod | Ne zaman |
|---|---|
99999 |
Sipariş bulunamadı (ErrorMessage: kullanıcı diline göre No changes have been made veya Değişiklik yapılmamıştır!), sipariş başka bir kullanıcıya ait (ErrorMessage boş) ya da veritabanı hatası. |
Oturum hataları (00001, 00006) ve tüm kodlar için hata kodları.
İlgili servisler
Örnek istek
{
"ApiCode": "API_CODE",
"OrderId": 4567890,
"Notes": "Müşteri aradı, hediye paketi istedi."
}
curl -X POST 'https://out.stockmount.com/api/Integration/SetOrderNotes' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"OrderId": 4567890,
"Notes": "Müşteri aradı, hediye paketi istedi."
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"OrderId": 4567890,
"Notes": "Müşteri aradı, hediye paketi istedi."
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/SetOrderNotes",
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",
"OrderId": 4567890,
"Notes": "Müşteri aradı, hediye paketi istedi."
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/SetOrderNotes');
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",
"OrderId": 4567890,
"Notes": "M\u00FC\u015Fteri arad\u0131, hediye paketi istedi."
}
response = requests.post("https://out.stockmount.com/api/Integration/SetOrderNotes", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"OrderId": 4567890,
"Notes": "Müşteri aradı, hediye paketi istedi."
};
const response = await fetch("https://out.stockmount.com/api/Integration/SetOrderNotes", {
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": true
}
Deneyin
İstek tarayıcınızdan doğrudan out.stockmount.com adresine gider. ApiCode bu sitede saklanmaz; yalnızca bu sekme açıkken tutulur.
İstek göndermek için önce ApiCode alın.
Bu servis hesabınızdaki gerçek verileri değiştirir.
Son istekler
Bu sekmeden gönderdiğiniz son istekler; birine tıklayınca gövdesi yeniden yüklenir.