exportStockImageBase64JSON
Genel Bilgi
| Özellik |
Değer |
| Endpoint Adı |
exportStockImageBase64JSON |
| SOAPAction |
urn:WebticariService#exportStockImageBase64JSON |
| Açıklama |
Stok kartlarına ait resimleri Base64 kodlanmış JSON formatında dışa aktarır. |
| Kimlik Doğrulama Gerektirir |
Evet (token) |
İstek Parametreleri
| Parametre |
Tip |
Zorunlu |
Açıklama |
token |
xsd:string |
Evet |
login endpoint'inden alınan oturum token'ı |
jsonId |
xsd:string |
Evet |
Resmi alınacak stok kartının JSON ID değeri |
imageNo |
xsd:integer |
Hayır |
Resim sıra numarası. Varsayılan 1; ikinci, üçüncü resim için 2, 3 gönderilebilir. |
thumbnail |
xsd:string |
Hayır |
1 gönderilirse küçük boyutlu (thumbnail) resim döner |
Yanıt Parametreleri
| Parametre |
Tip |
Açıklama |
return |
xsd:string |
Resimlerin Base64 kodlanmış verilerini içeren JSON yanıtı |
Örnek SOAP İstek
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="urn:WebticariService">
<soapenv:Header/>
<soapenv:Body>
<tns:exportStockImageBase64JSON>
<token>abc123tokendeğeri</token>
<jsonId>1042</jsonId>
<imageNo>1</imageNo>
<thumbnail>0</thumbnail>
</tns:exportStockImageBase64JSON>
</soapenv:Body>
</soapenv:Envelope>
Yanıt JSON Yapısı
[
{
"id": 42,
"order": 1,
"image": "/9j/4AAQSkZJRgABA...",
"filename": "urun_gorseli.jpg"
},
{
"id": 55,
"order": 1,
"image": null,
"filename": null
}
]
| Alan |
Açıklama |
id |
İstekte gönderilen stok ur_no değeri |
order |
Resim sıra numarası (imageNo ile aynı) |
image |
Base64 kodlanmış resim verisi; resim bulunamazsa null |
filename |
Resim dosya adı; resim bulunamazsa null |
Örnek SOAP İstek
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="urn:WebticariService">
<soapenv:Header/>
<soapenv:Body>
<tns:exportStockImageBase64JSON>
<token>abc123tokendeğeri</token>
<jsonId>[42, 55]</jsonId>
<imageNo>1</imageNo>
<thumbnail></thumbnail>
</tns:exportStockImageBase64JSON>
</soapenv:Body>
</soapenv:Envelope>
Hata Durumları
| Durum |
Açıklama |
Invalid Token |
Token geçersiz veya süresi dolmuş (30 dakika) |
image: null |
Stok bulunamadı ya da resim dosyası mevcut değil |
Notlar
jsonId tek bir ID (42) veya JSON dizi ([42, 55]) olarak gönderilebilir.
imageNo varsayılan değeri 1'dir; ikinci, üçüncü resim için 2, 3 gönderilebilir.
thumbnail dolu gönderilirse resim_upload/thumbnail/{db}/tmb128_{resim} yolundan okunur; aksi hâlde resim_upload/urun/{db}/{resim} yolundan okunur.
- Resim dosya sisteminde bulunmuyorsa
null döner, hata fırlatmaz.
- Ürünün resim alanı boş ya da
urundefault.png ise barkod üzerinden önbellekten (WtFastCache) resim aranmaya çalışılır.