API referansı · Siparişler
N11 sipariş kalemini onayla veya reddet
N11 mağazasındaki tek bir sipariş kalemini N11 üzerinde onaylar veya reddeder.
https://out.stockmount.com/api/Integration/ConfirmOrRejectOrderItem
Yalnızca N11 mağazaları içindir; IntegrationId 2 olmalıdır. Diğer değerler 00003 / IntegrationId döndürür.
IntegrationOrderDetailId, N11'in sayısal kalem ID'sidir (GetSales yanıtındaki IntegrationOrderDetailId). İçinde _ olan değerler (ör. ek hizmet satırları) onayda atlanır. Her çağrıda tek kalem işlenir.
Reddetmede N11'e gerekçe olarak ... gönderilir; gerekçe belirleyemezsiniz.
İşlem N11 üzerinde yapılır. StockMount'taki satır durumu bu çağrıyla güncellenmez; bir sonraki N11 sipariş senkronizasyonunda güncellenir.
Doğrulama hataları 00003 ile döner; ErrorMessage: StoreId, Status, IntegrationId veya IntegrationOrderDetailId.
İstek alanları
| Alan | Tip | Açıklama |
|---|---|---|
ApiCode
zorunlu
|
string |
DoLogin ile aldığınız API kodu.
|
StoreId
zorunlu
|
integer | N11 mağazasının ID'si. |
IntegrationId
zorunlu
|
integer |
Pazaryeri ID'si; yalnızca 2 (N11) kabul edilir.
|
IntegrationOrderDetailId
zorunlu
|
string | N11 sipariş kalemi ID'si (sayısal). |
Status
zorunlu
|
integer |
İşlem.
|
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 |
|---|---|
10001 |
StoreId hesabınıza ait bir mağaza değil (ErrorMessage: Invalid store.). |
60001 |
N11 işlemi reddetti; ErrorMessage N11'in mesajıdır. Bağlantı hatalarında ErrorMessage boş olabilir. |
99999 |
Beklenmeyen hata. |
Oturum hataları (00001, 00006) ve tüm kodlar için hata kodları.
İlgili servisler
Örnek istek
{
"ApiCode": "API_CODE",
"StoreId": 12345,
"IntegrationId": 2,
"IntegrationOrderDetailId": "245678901234",
"Status": 1
}
curl -X POST 'https://out.stockmount.com/api/Integration/ConfirmOrRejectOrderItem' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"StoreId": 12345,
"IntegrationId": 2,
"IntegrationOrderDetailId": "245678901234",
"Status": 1
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"StoreId": 12345,
"IntegrationId": 2,
"IntegrationOrderDetailId": "245678901234",
"Status": 1
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/ConfirmOrRejectOrderItem",
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",
"StoreId": 12345,
"IntegrationId": 2,
"IntegrationOrderDetailId": "245678901234",
"Status": 1
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/ConfirmOrRejectOrderItem');
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",
"StoreId": 12345,
"IntegrationId": 2,
"IntegrationOrderDetailId": "245678901234",
"Status": 1
}
response = requests.post("https://out.stockmount.com/api/Integration/ConfirmOrRejectOrderItem", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"StoreId": 12345,
"IntegrationId": 2,
"IntegrationOrderDetailId": "245678901234",
"Status": 1
};
const response = await fetch("https://out.stockmount.com/api/Integration/ConfirmOrRejectOrderItem", {
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.