Ürün Listeleme (GetProductList)

Ürün Listeleme (GetProductList)

Ürün servisleri için WSDL adresi: https://api.n11.com/ws/ProductService.wsdl

Sistemde ürünleri listelemek için kullanılır. Metot ürün ile ilgili özet bilgileri getirmektedir. Bu metottan dönen "productSellerCode" bilgisini kullanarak "GetProductBySellerCode" metodu veya "id" bilgisini kullanarak "GetProductById" metodu kullanılarak ürünün detaylı bilgilerine ulaşılabilir.

Sonuçlar, sayfalama bilgisi ile beraber döner. "itemsPerPage" parametresi ile her sayfada listelenecek ürün adedi, "currentPage" parametresi ile de listelenmek istenen sayfanın numarası kontrol edilebilir. Herhangi bir değer girilmediği takdirde, her sayfada 100 adet ürün listelenir ve birinci sayfa listelenir.

pagingData” içinde toplam ürün adedi, sayfa sayısı, mevcut sayfa ve sayfa başına düşen ürün adedi bilgileri kullanıcılara verilir.

GetProductListRequest

auth Bkz: Yetkilendirme
pagingData Bkz: Sayfalandırma

*Bold alanlar zorunlu alanlardır.

GetProductListResponse

result Bkz: Result
products.product Bkz: Ürün Özet Bilgisi

GetProductList Örnek Çağrı

Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.n11.com/ws/schemas">
    <soapenv:Header/>
    <soapenv:Body>
        <sch:GetProductListRequest>
            <auth>
                <appKey>***</appKey>
                <appSecret>***</appSecret>
            </auth>
            <pagingData>
                <currentPage>0</currentPage>
                <pageSize>100</pageSize>
            </pagingData>
        </sch:GetProductListRequest>
    </soapenv:Body>
</soapenv:Envelope>
Response
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
        <ns3:GetProductListResponse xmlns:ns3="http://www.n11.com/ws/schemas">
            <result>
                <status>success</status>
            </result>
            <products>
                <product>
                    <currencyAmount>3000.00</currencyAmount>
                    <currencyType>1</currencyType>
                    <displayPrice>3000.00</displayPrice>
                    <isDomestic>true</isDomestic>
                    <id>16685311</id>
                    <price>3000.00</price>
                    <productSellerCode>Deneme1234567</productSellerCode>
                    <approvalStatus>1</approvalStatus>
                    <saleStatus>2</saleStatus>
                    <stockItems>
                        <stockItem>
                            <currencyAmount>3000.00</currencyAmount>
                            <displayPrice>3000.00</displayPrice>
                            <gtin>0190198066474</gtin>
                            <oem></oem>
                            <n11CatalogId></n11CatalogId>
                            <optionPrice>3000.00</optionPrice>
                            <sellerStockCode>StokKodu1234567890-2</sellerStockCode>
                            <attributes>
                                <attribute>
                                    <id>354091250</id>
                                    <name>Renk</name>
                                    <value>Kırmızı</value>
                                </attribute>
                            </attributes>
                            <id>121876345662</id>
                            <quantity>5</quantity>
                            <version>0</version>
                        </stockItem>
                        <stockItem>
                            <currencyAmount>3000.00</currencyAmount>
                            <displayPrice>3000.00</displayPrice>
                            <gtin>0190198066473</gtin>
                            <oem></oem>
                            <n11CatalogId></n11CatalogId>
                            <optionPrice>3000.00</optionPrice>
                            <sellerStockCode>StokKodu1234567890-1</sellerStockCode>
                            <attributes>
                                <attribute>
                                    <id>354091250</id>
                                    <name>Renk</name>
                                    <value>Mavi</value>
                                </attribute>
                            </attributes>
                            <id>121876345663</id>
                            <quantity>5</quantity>
                            <version>0</version>
                        </stockItem>
                    </stockItems>
                    <subtitle>Lorem ipsum dolor sit amet</subtitle>
                    <title>Lorem Ipsum</title>
                </product>
                ...
            </products>
            <pagingData>
                <currentPage>0</currentPage>
                <pageSize>100</pageSize>
                <totalCount>9</totalCount>
                <pageCount>1</pageCount>
            </pagingData>
        </ns3:GetProductListResponse>
    </env:Body>
</env:Envelope>
GetProductList Örnek Çağrı (JAVA)

public static void main (String []args) {

    String strAppKey = "***";
    String strAppSecret = "***";
    int currentPageValue = 0;
    int pageSizeValue = 3;

    Authentication authentication = new Authentication();
    authentication.setAppKey(strAppKey);
    authentication.setAppSecret(strAppSecret);

    RequestPagingData requestPagingData = new RequestPagingData();
    requestPagingData.setCurrentPage(currentPageValue);
    requestPagingData.setPageSize(pageSizeValue);

    GetProductListRequest getProductListRequest = new GetProductListRequest();
    getProductListRequest.setAuth(authentication);
    getProductListRequest.setPagingData(requestPagingData);

    ProductServicePort port = new ProductServicePortService().getProductServicePortSoap11();
    GetProductListResponse response = port.getProductList(getProductListRequest);
    List<ProductBasic> productList = response.getProducts().getProduct();

    for (ProductBasic sampleProduct:productList
            ) {
        System.out.println("Title of product is : " + sampleProduct.getTitle());
    }
}

Yetkilendirme (Authentication)

auth.appKey Servislere erişim için kullanılacak uygulama anahtarı
auth.appSecret Servislere erişim için kullanılacak uygulama şifresi

Sonuç Durum Bilgisi (Result)

result.status İşlem sonucu durum bilgisini gösterir. “success” ve “failure” durum bilgilerini döner.

Sayfalandırma (Pagination)

pagingData.currentPage Gösterilen sayfa numarası (currentpage 0 ile başlar)
pagingData.pageSize Sayfadaki madde sayısı
pagingData.totalCount* Toplam madde sayısı
pagingData.pageCount* Toplam sayfa sayısı

*Request yaparken kullanılmaz, çağrı yapan tarafa response içinde döner.

Ürün Özet Bilgisi (Product Summary Data)

product.currencyAmount Görüntülenen ürün fiyatının para birimi tutarı
product.currencyType Görüntülenen ürün fiyatının para birimi cinsi
1: TL
2: USD
3: EUR
product.displayPrice Görüntülenen ürün fiyatı (Ürünün indirimler sonucu tanımlanan son fiyat hali)
product.id Ürünün N11 ID si
product.productSellerCode Mağaza ürün kodu
product.title Ürün başlığı
product.subtitle Ürün alt başlığı
product.oldPrice Ürüne ait eski baz fiyatı (Güncelleme yapan metodlar sonrasında döner)
product.price Ürünün baz fiyatı
product.displayPrice Görüntülenen ürün fiyatı (Ürünün indirimler sonucu tanımlanan son fiyat hali)
product.saleStatus 1: Satış Öncesi(Before_Sale)
2: Satışta(On_Sale)
3: Stok yok (Out of_Stock)
4: Satışa kapalı (Sale_Closed)
product.approvalStatus Ürün onay durumu:
1: Aktif (Satışta)
2: Beklemede
3: Yasaklı
product.stockItems.stockItem.id Ürün stok N11 ID si
product.stockItems.stockItem.quantity Ürün stok miktarı
product.stockItems.stockItem.version Ürün stok versiyon numarası
product.stockItems.stockItem.currencyAmount Ürün stok biriminin para birimi cinsinden tutarı
product.stockItems.stockItem.displayPrice Ürün stok biriminin görüntülenen ürün fiyatı (Ürünün satıcı indirimi sonucu tanımlanan son fiyat hali)
product.stockItems.stockItem.bundle Birlikte satış yapılan ürünler
product.stockItems.stockItem.mpn Ürünün üretici parça numarası
product.stockItems.stockItem.gtin Ürünün global ticari öğe numarası
product.stockItems.stockItem.oem Parça/Ürün bağlantı numarası
product.stockItems.stockItem.n11CatalogId Ürünün N11 katalog numarası
product.stockItems.stockItem.sellerStockCode Ürün stok mağaza kodu
product.stockItems.stockItem.oldOptionPrice Ürün stok biriminin önceki liste fiyatı (Güncelleme yapan metodlar sonrasında döner)
product.stockItems.stockItem.optionPrice Ürün stok biriminin liste fiyatı
product.stockItems.stockItem.attributes.attribute.name Stok tanımının olduğu seçenek adı
product.stockItems.stockItem.attributes.attribute.value Stok tanımının olduğu seçenek değeri