API referansı · Genel ve listeler
Mağazaları listele
Hesabınıza bağlı pazaryeri ve e-ticaret mağazalarını StoreId değerleriyle döndürür.
https://out.stockmount.com/api/Integration/GetStores
StoreId, diğer uç noktalarda mağazayı belirtmek için kullandığınız kimliktir. IntegrationId mağazanın bağlı olduğu pazaryerini veya platformu gösterir.
Yalnızca panelde aktif görünen mağazalar listelenir. IntegrationId gönderirseniz yalnızca o entegrasyonun mağazaları döner. Bilinmeyen bir IntegrationId hata vermez, boş liste döner.
Sayfalama yoktur; tüm mağazalar tek yanıtta gelir. Sıralama garanti edilmez. StoreName boş olabilir.
Modeldeki StoreId istek alanı yok sayılır. Integration/GetStore aynı işi yapan eski bir takma addır; yeni entegrasyonlarda GetStores kullanın.
İstek alanları
| Alan | Tip | Açıklama |
|---|---|---|
ApiCode
zorunlu
|
string |
DoLogin yanıtından aldığınız oturum kodu.
|
IntegrationId
|
integer | İsteğe bağlı. Yalnızca bu entegrasyonun mağazalarını döndürür. Gönderilmezse veya 0 ise tüm mağazalar döner. |
Yanıt alanları (Response)
| Alan | Tip | Açıklama |
|---|---|---|
StoreId
|
integer | Mağaza kimliği. |
StoreName
|
string | Mağazanın paneldeki adı. Boş olabilir. |
IntegrationId
|
integer | Mağazanın bağlı olduğu entegrasyonun kimliği. |
IntegrationName
|
string |
Entegrasyonun adı (ör. Trendyol).
|
Bu servisin hata kodları
| Kod | Ne zaman |
|---|---|
99999 |
Sunucu tarafında beklenmeyen bir hata oluştu (ör. veritabanı hatası). Bu uç noktada ErrorMessage çoğunlukla boş gelir. |
Oturum hataları (00001, 00006) ve tüm kodlar için hata kodları.
İlgili servisler
Örnek istek
{
"ApiCode": "API_CODE",
"IntegrationId": 14
}
curl -X POST 'https://out.stockmount.com/api/Integration/GetStores' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"IntegrationId": 14
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"IntegrationId": 14
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/GetStores",
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",
"IntegrationId": 14
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/GetStores');
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",
"IntegrationId": 14
}
response = requests.post("https://out.stockmount.com/api/Integration/GetStores", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"IntegrationId": 14
};
const response = await fetch("https://out.stockmount.com/api/Integration/GetStores", {
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,
"Response": [
{
"StoreId": 1234,
"StoreName": "Örnek Mağaza",
"IntegrationId": 14,
"IntegrationName": "Trendyol"
},
{
"StoreId": 1240,
"StoreName": "Örnek Mağaza Outlet",
"IntegrationId": 14,
"IntegrationName": "Trendyol"
}
]
}
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.
Son istekler
Bu sekmeden gönderdiğiniz son istekler; birine tıklayınca gövdesi yeniden yüklenir.