Fiyat Stok Güncelle

Bu metod, bir ürünün stok ve fiyat gibi belirli alanlarını güncellemek için kullanılmaktadır. "Dikkat Edilmesi Gereken Kurallar" alanındaki uyarılara dikkat edilmesi gerekmektedir. Genel olarak, güncellenmesi gereken alanlar dışındaki alanların gönderilmesine gerek yoktur. Aynı durum varyantlar için de geçerlidir; yalnızca güncellenmesi gereken varyant gönderilmelidir.

  • İşlem sonunda sistem tarafından üretilen bir tracking_id değeri alınmaktadır. Bu ID'yi GetProductsTrackingResult'ta kullanarak işlem sonucunu ürün bazında takip edebilirsiniz.

Endpoint Bilgileri

  • URL: https://ws.pttavm.com:93/service.svc HTTP/1.1
  • HTTP Metodu: POST
  • Content-Type: text/xml;charset=UTF-8
  • Content-Length: 1321
  • SOAPAction: http://tempuri.org/IService/UpdateProductsStockPrice
  • Host: ws.pttavm.com:93

Dikkat Edilmesi Gereken Kurallar

  • Boş ürün listesi gönderilemez.
  • Tek bir istekte 1000'den fazla ürün gönderilemez.
  • Aynı istek 5 dakika içinde tekrar gönderilemez.
  • Barkodsuz ürünler işleme alınmayacaktır. Aynı barkodun bir talep içinde birden fazla kez gönderilmediğinden emin olmalısınız (aynı barkoda sahip birden fazla kayıt gönderilirse, sonuncusu dikkate alınacaktır).
  • Barkod 250 karakteri geçmemelidir.
  • Ürünler için belirtilen alanlardan en az birinin güncellenmesi zorunludur: stok, fiyat, kdv oranı veya aktivite durumu.
  • KDV 0, 1, 10 veya 20 değerlerini alabilir. Sağlanmazsa, ürün güncellemeleri sırasında fiyat hesaplamalarında önceki KDV oranı kullanılır.
  • KDV hariç veya KDV dahil fiyat bilgisi gönderilecekse değer 1'den büyük olmalıdır. Hem KDV hariç hem de KDV dahil fiyat bilgisi birlikte gönderilecekse KDV hariç fiyat öncelikli olacaktır.
  • İndirim 70'i geçmemelidir. Negatif bir değer gönderilirse, 0 olarak ayarlanır. Gönderilmezse (isteğe bağlıdır), 0 olarak kabul edilir. Ancak, sağlanırsa, değeri 0 olarak kaydedilir, KDV hariç fiyat aşağıdaki formül kullanılarak ayarlanır.
    VATExcludedPrice = VATExcludedPrice * (1 - (Discount / 100))
  • Stok değeri 0 ile 9999 arasında olmalıdır. Bu aralığın dışındaysa sınırlandırılacaktır (sıfır altında bir değer gönderilirse 0, üstündeyse 9999 olarak kabul edilir.)
  • Bir ürünün varyantları varsa ve bir güncelleme gerekiyorsa, varyantları örnek talepte gösterildiği gibi göndermelisiniz. Varyantların toplam stoğu ana ürünün stoğu olarak ayarlanacaktır. Varyantlar için güncelleme gerekmiyorsa, bunları göndermeye gerek yoktur. Hiçbir varyant gönderilmezse, ürünün hiçbir varyantı silinmeyecektir!
  • Ürün başına maksimum 100 varyant gönderilebilir.
  • Toplam varyant stoku 9999'u geçmemelidir.
  • Ürün ve varyant kombinasyonunun toplamı en az 1 olmalıdır.
  • Ürün aktivasyon durumu, girilen değere göre güncellenecektir; gönderilmediği takdirde güncelleme yapılmayacaktır.
  • Kilitli ürünler güncellenemezken, kilidi açılmış ürünler güncellenebilir. Kilitleme nedeniyle güncellenemeyen tüm ürünler için bir uyarı mesajı sağlanacaktır.
  • İsteklerinizde gibi null değerler gönderirken, "i" etiketleriyle XML etiket yapısını kullanmanız gerekir. Aksi takdirde, şu hata mesajını alırsınız: An error occurred when verifying security for the message.

Örnek Servis İsteği

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ept="http://schemas.datacontract.org/2004/07/ePttAVMService.Model.Requests">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:UpdateProductsStockPrice>
         <!--Optional:-->
         <tem:items xmlns:a="http://schemas.datacontract.org/2004/07/ePttAVMService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <!--Zero or more repetitions:-->
            <ept:ProductStockPriceRequest>
               <!--Optional:-->
               <ept:Active>true</ept:Active>
               <!--Optional:-->
               <ept:Barcode>tshirt-1072</ept:Barcode>
               <!--Optional:-->
               <ept:Discount>0</ept:Discount>
               <!--Optional:-->
               <ept:PriceWithVAT>0</ept:PriceWithVAT>
               <!--Optional:-->
               <ept:PriceWithoutVAT>1000</ept:PriceWithoutVAT>
               <!--Optional:-->
               <ept:VATRate>10</ept:VATRate>
               <!--Optional:-->
               <ept:Variants>
                  <!--Zero or more repetitions:-->
                  <ept:Variant>
                     <!--Optional:-->
                     <ept:Attributes>
                        <!--Zero or more repetitions:-->
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Renk</ept:Definition>                          
                           <!--Optional:-->
                           <ept:Value>Kırmızı</ept:Value>
                        </ept:Attribute>
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Beden</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>XL</ept:Value>
                        </ept:Attribute>
                     </ept:Attributes>
             <!--Optional:-->
                     <ept:Price>10</ept:Price>
                     <!--Optional:-->
                     <ept:Quantity>16</ept:Quantity>
                  </ept:Variant>
                  <ept:Variant>
                     <!--Optional:-->
                     <ept:Attributes>
                        <!--Zero or more repetitions:-->
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Renk</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>Kırmızı</ept:Value>
                        </ept:Attribute>
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Beden</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>L</ept:Value>
                        </ept:Attribute>
                     </ept:Attributes>
             <!--Optional:-->
                     <ept:Price>0</ept:Price>
                     <!--Optional:-->
                     <ept:Quantity>5</ept:Quantity>
                  </ept:Variant>
                  <ept:Variant>
                     <!--Optional:-->
                     <ept:Attributes>
                        <!--Zero or more repetitions:-->
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Renk</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>Mavi</ept:Value>
                        </ept:Attribute>
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Beden</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>XL</ept:Value>
                        </ept:Attribute>
                     </ept:Attributes>
             <!--Optional:-->
                     <ept:Price>0</ept:Price>
                     <!--Optional:-->
                     <ept:Quantity>15</ept:Quantity>
                  </ept:Variant>
                  <ept:Variant>
                     <!--Optional:-->
                     <ept:Attributes>
                        <!--Zero or more repetitions:-->
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Renk</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>Mavi</ept:Value>
                        </ept:Attribute>
                        <ept:Attribute>
                           <!--Optional:-->
                           <ept:Definition>Beden</ept:Definition>
                           <!--Optional:-->
                           <ept:Value>L</ept:Value>
                        </ept:Attribute>
                     </ept:Attributes>
             <!--Optional:-->
                     <ept:Price>0</ept:Price>
                     <!--Optional:-->
                     <ept:Quantity>15</ept:Quantity>
                  </ept:Variant>
               </ept:Variants>
            </ept:ProductStockPriceRequest>
            <ept:ProductStockPriceRequest>
               <!--Optional:-->
               <ept:Barcode>tshirt-1075</ept:Barcode>
               <!--Optional:-->
               <ept:Quantity>50</ept:Quantity>
            </ept:ProductStockPriceRequest>
         </tem:items>
      </tem:UpdateProductsStockPrice>
   </soapenv:Body>
</soapenv:Envelope>

Örnek Servis Cevabı

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <s:Header>
      <ActivityId CorrelationId="3a77fb8d-371d-4c6e-8995-1baafd39784b" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-000000000000</ActivityId>
      <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <u:Timestamp u:Id="_0">
            <u:Created>2024-10-30T22:37:29.803Z</u:Created>
            <u:Expires>2024-10-30T22:42:29.803Z</u:Expires>
         </u:Timestamp>
      </o:Security>
   </s:Header>
   <s:Body>
      <UpdateProductsStockPriceResponse xmlns="http://tempuri.org/">
         <UpdateProductsStockPriceResult xmlns:a="http://schemas.datacontract.org/2004/07/ePttAVMService.Model.Responses" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:Message>İşleminiz başarıyla sıraya alınmıştır. Size verilen tracking id ile takibini sağlayabilirsiniz.</a:Message>
            <a:Success>true</a:Success>
            <a:TrackingId>6722b52983f9c51c40fc1034</a:TrackingId>
            <a:CountOfProductsToBeProcessed>2</a:CountOfProductsToBeProcessed>
         </UpdateProductsStockPriceResult>
      </UpdateProductsStockPriceResponse>
   </s:Body>
</s:Envelope>
Parametre Tür Açıklama
Active boolean Ürün aktivite durumu (isteğe bağlı).
Barcode string Ürün barkodu.
Discount decimal İndirim bilgisi (isteğe bağlı).
PriceWithVAT decimal Ürünün KDV dahil fiyatı.(isteğe bağlı)
PriceWithoutVAT decimal Ürünün KDV hariç fiyatı.(isteğe bağlı)
Quantity integer Ürün stok bilgisi (isteğe bağlı)
VATRate integer Kdv oranı (isteğe bağlı)
Definition string Varyant grubu (Örneğin renk)
Value string Varyant değeri (Örneğin Kırmızı)
Price decimal Varyant kombinasyonu fiyat farkı (KDV dahil). Bu değer, KDV eklenmiş olarak girilmelidir. ( Pozitif bir değer ürünün fiyatına eklenirken, negatif bir değer çıkarılır.)
Quantity integer Varyant stok

Servis Cevap Parametreleri

Parametre Tür Açıklama
Message string İşlem mesajı.
Success boolean İşlem başarı durumu.
TrackingId string İşlem sonucu takibi için ID değeri.
CountOfProductsToBeProcessed integer İşlenecek ürün sayısı.