B2C Ürün Servisleri

B2C servisleri içerisinde "Tüm Ürünleri Listeleme Servisi", "Ürün Koduna Göre Ürün Kaydetme", "Ürün Koduna Göre Ürün Stok Sorgulama", "Ürün Koduna Göre Ürün Stok Güncelleme", "Ürün Koduna Göre Ürün Satış Fiyatı Sorgulama", "Ürün Koduna Göre Ürün Satış Fiyatı Güncelleme", "Ürün Koduna Göre Ürün Durum Sorgulama", "Ürün Koduna Göre Ürün Durum Güncelleme" servisleri bulunmaktadır.

Tüm Ürünleri Listeleme

Ürün Koduna Göre Ürün Kaydetme (Tek Ürün)

Ürün Koduna Göre Ürün Stok Sorgulama

Ürün Koduna Göre Ürün Stok Güncelleme

Ürün Koduna Göre Ürün Satış Fiyatı Sorgulama

Ürün Koduna Göre Ürün Satış Fiyatı Güncelleme

Ürün Koduna Göre Ürün Durum Sorgulama

Ürün Koduna Göre Ürün Durum Güncelleme

Tüm Ürünleri Listeleme

Bu servis ile mağazanızda bulunan tüm ürünleri alabilirsiniz.

Request


POST /api/b2c/ProductServices/GetAll
Host: https://kmk.apiservisi.com
Content-Type: application/json; charset=utf-8

{
    "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
    "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
    "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
}



Response


HTTP 200 OK
Content-Type: application/json; charset=utf-8

[
    {
    "UrunId": "", (int)
    "urunOzelKodu": "", (string)
    "urunIzinKodu": "", (string)
    "urunVariantlari": [
        {
            "urunVariantKodu": "", (string)
            "urunVariantBasligi": "", (string)
            "urunVariantDegeri": "", (string)
            "urunVariantStok": 1, (int)
            "urunVariantFiyati": 0.0, (float)
            "hata": "" (string)
        }
    ],
    "urunMarkasi": "", (string)
    "urunKategorileri": [
        "" (string)
    ],
    "urunUretimTarihi": "02.07.2019", (string)
    "urunSonKullanmaTarihi": "01.01.2000 00:00", (string)
    "urunHazirlanmaSuresi": "0 GÜN", (string)
    "urunKodu": "", (string)
    "urunGtinKodu": "", (string)
    "urunMpnKodu": "", (string)
    "urunBaslik": "", (string)
    "urunAltBaslik": "", (string)
    "urunAciklama": "", (string)
    "urunDetay": "", (string)
    "urunSatisFiyati": 10.0, (float)
    "urunIndirimTutari": 7.0, (float)
    "urunParaBirimi": "", (string) --> Alabileceği değerler : TL, EUR, USD
    "urunBirimAcıklama": "", (string) --> Alabileceği değerler : Adet, Kilo
    "urunStok": 4, (int)
    "urunMinimumSatisMiktari": 0, (int)
    "urunMaximumSatisMiktari": 0, (int)
    "urunFotograf": "", (string)
    "urunSeoLink": "", (string)
    "urunDurumu": "", (string) --> Alabileceği değerler : Aktif, Pasif
    "acıklama": "" (string)
    }
]



Tüm Ürünlerin Listesi için Servis Örnek Kod(C#)


public async Task GetAllProducts(StoreGetAllProductRequest storeGetAllProductRequest)
{
    var httpClient = new HttpClient();
    StringContent content = new StringContent(JsonConvert.SerializeObject(storeGetAllProductRequest), Encoding.UTF8, "application/json");
    var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/GetAll", content);
    string apiResponse = await response.Content.ReadAsStringAsync();
    
    bool showError = false;
    IEnumerable productsResponse = new List();
    ProductErrorResponse productErrorResponse = new ProductErrorResponse();
    try
    {
        productsResponse = JsonConvert.DeserializeObject>(apiResponse);
    }
    catch
    {
        showError = true;
    }

    try
    {
        productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = false;
    }

    string jsonText = null;
    if (showError == false)
    {
        jsonText = JsonConvert.SerializeObject(productsResponse, Formatting.Indented);
    }

    if (showError == true)
    {
        jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
    }

    return jsonText;
}

Ürün Koduna Göre Ürün Kaydetme

Bu servis kullanarak parametre ile gönderilen ürün kodu mağazanızda varsa ürün güncelleme yoksa ekleme işlemi yapabilirsiniz.

Request


POST /api/b2c/ProductServices/SaveProduct
Host: https://kmk.apiservisi.com
Content-Type: application/json; charset=utf-8

{
    "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
    "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
    "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
    "UrunOzelKodu":"", (string)
    "UrunIzinKodu":"", (string)
    "UrunMarka":"", (string)
    "UrunKategorileri":[
        "" (string) --> NOT : Eğer alt kategori ise bağlı olduğu ana kategoriyi belirtmelisiniz
    ],
    "UrunUretimTarihi":"07.02.2019 15:34", (string)
    "UrunSonKullanmaTarihi":"07.02.2019 15:34", (string)
    "UrunHazirlanmaSuresi": 1, (int)
    "UrunKodu":"entegrasyonu yapılmak istenen mağazanın eklenecek veya güncellenecek ürünün kodu", (string)
    "UrunGtinKodu":"", (string)
    "UrunMpnKodu":"", (string)
    "UrunBaslik":"", (string)
    "UrunAciklama":"", (string)
    "UrunDetay":"", (string)
    "UrunFiyati":"7,25", (string) --> NOT : Ondalık ayıraç virgül(,) olmalıdır. Örnek Format : 12,99 veya 1234,99 gibi
    "UrunIndirimTutari":"1,25", (string) --> NOT : Ondalık ayıraç virgül(,) olmalıdır. Örnek Format : 12,99 veya 1234,99 gibi.    
    "UrunParaBirimi":"", (string) --> Alabileceği değerler : TL, USD, EUR, GBP, CNY
    "UrunBirimId": 1, (int) --> Alabileceği değerler : 1, 2 (NOT : 1 = Adet, 2 = Kilo)
    "UrunStok": 5, (int)
    "UrunVariantlari":[
        {
            "UrunVariantOzellikleri": [
                {
                    "UrunVariantOzellikTanimi":"renk", (string)
                    "UrunVariantOzellikDegeri":"yeşil" (string)
                },
                {
                    "UrunVariantOzellikTanimi":"Ayakkabı Numarası", (string)
                    "UrunVariantOzellikDegeri":"38" (string)
                }
            ],
            "UrunVariantKodu":"", (string)
            "UrunVariantStok":"20", (string)
            "UrunVariantFiyati":"10.00" (string)
            },
            {
            "UrunVariantOzellikleri": [
                {
                    "UrunVariantOzellikTanimi":"renk", (string)
                    "UrunVariantOzellikDegeri":"kırmızı" (string)
                },
                {
                    "UrunVariantOzellikTanimi":"Ayakkabı Numarası", (string)
                    "UrunVariantOzellikDegeri":"41" (string)
                }
            ],
            "UrunVariantKodu":"", (string)
            "UrunVariantStok":"5", (string)
            "UrunVariantFiyati":"20.00" (string)
            },
            {
            "UrunVariantOzellikleri": [
                {
                    "UrunVariantOzellikTanimi":"renk", (string)
                    "UrunVariantOzellikDegeri":"yeşil" (string)
                },
                {
                    "UrunVariantOzellikTanimi":"Ayakkabı Numarası", (string)
                    "UrunVariantOzellikDegeri":"43" (string)
                }
            ],
            "UrunVariantKodu":"", (string)
            "UrunVariantStok":"10", (string)
            "UrunVariantFiyati":"15.00" (string)
        },
    ],
    "UrunMinimumSatisMiktari": 5, (int)
    "UrunMaximumSatisMiktari": 10, (int)
    "UrunFotograflari":[
        "resim dosya yolu yada linki", (string)
        "resim dosya yolu yada linki" (string)
    ],
    "UrunDurumu":"" (string) --> Alabileceği değerler : Aktif, Pasif (NOT : Bu parametre ürün güncellerken etkindir.)
}



Response


HTTP 200 OK
Content-Type: application/json; charset=utf-8

{
    "durum": "Başarılı", (string)
    "acıklama": "", (string)
}


Ürün Koduna Göre Ürün Kaydetme için Servis Örnek Kod(C#)


public async Task SaveProduct(StoreSaveProductRequest storeSaveProductRequest)
{
    var httpClient = new HttpClient();
    StringContent content = new StringContent(JsonConvert.SerializeObject(storeSaveProductRequest), Encoding.UTF8, "application/json");
    var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/SaveProduct", content);
    string apiResponse = await response.Content.ReadAsStringAsync();
    
    bool showError = false;
    StoreSaveProductResponse storeSaveProductResponse = new StoreSaveProductResponse();
    ProductErrorResponse productErrorResponse = new ProductErrorResponse();
    try
    {
        storeSaveProductResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = true;
    }

    try
    {
        productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = false;
    }

    string jsonText = null;
    if (showError == false)
    {
        jsonText = JsonConvert.SerializeObject(storeSaveProductResponse, Formatting.Indented);
    }

    if (showError == true)
    {
        jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
    }

    return jsonText;
}

Ürün Koduna Göre Ürün Stok Sorgulama

Bu servis ile mağazanızda bulunan ürünlerin koduna göre stok sorgulaması yapabilirsiniz.

Request


POST /api/b2c/ProductServices/GetProductStockByProductCode
Host: https://kmk.apiservisi.com
Content-Type: application/json; charset=utf-8

{
    "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
    "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
    "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
    "UrunKodu":"entegrasyonu yapılmak istenen sitenin stok sorgulaması yapılacak ürününün kodu" (string)
}



Response


HTTP 200 OK
Content-Type: application/json; charset=utf-8

{
    "urunStok":"4", (int)
    "acıklama":"", (string) 
}



Ürün Koduna Göre Ürün Stok Sorgulama için Servis Örnek Kod(C#)


public async Task GetProductStockByProductCode(StoreGetProductByProductCodeRequest storeGetProductByProductCodeRequest)
{
    var httpClient = new HttpClient();
    StringContent content = new StringContent(JsonConvert.SerializeObject(storeGetProductByProductCodeRequest), Encoding.UTF8, "application/json");
    var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/GetProductStockByProductCode", content);
    string apiResponse = await response.Content.ReadAsStringAsync();
    
    bool showError = false;
    StoreGetProductStockByProductCodeResponse storeGetProductStockByProductCodeResponse = new StoreGetProductStockByProductCodeResponse();
    ProductErrorResponse productErrorResponse = new ProductErrorResponse();
    try
    {
        storeGetProductStockByProductCodeResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = true;
    }

    try
    {
        productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = false;
    }

    string jsonText = null;
    if (showError == false)
    {
        jsonText = JsonConvert.SerializeObject(storeGetProductStockByProductCodeResponse, Formatting.Indented);
    }

    if (showError == true)
    {
        jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
    }

    return jsonText;
}

Ürün Koduna Göre Ürün Stok Güncelleme

Bu servis ile mağazanızda bulunan ürünlerin koduna göre stok güncellemesi yapabilirsiniz.

Request

    
    POST /api/b2c/ProductServices/UpdateProductStockByProductCode
    Host: https://kmk.apiservisi.com
    Content-Type: application/json; charset=utf-8
    
    {
        "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
        "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
        "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
        "UrunKodu":"entegrasyonu yapılmak istenen sitenin stok güncellemesi yapılacak ürününün kodu" (string)
        "UrunStok":"yeni stok değeri" (int)
    }
    
    
    
    

Response

    
    HTTP 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "durum":"Başarılı", (string)
        "acıklama":"", (string) 
    }
    
    
    
    

Ürün Koduna Göre Ürün Stok Güncelleme için Servis Örnek Kod(C#)

    
    public async Task UpdateProductStockByProductCode(StoreUpdateProductStockByProductCodeRequest storeUpdateProductStockByProductCodeRequest)
    {
        var httpClient = new HttpClient();
        StringContent content = new StringContent(JsonConvert.SerializeObject(storeUpdateProductStockByProductCodeRequest), Encoding.UTF8, "application/json");
        var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/UpdateProductStockByProductCode", content);
        string apiResponse = await response.Content.ReadAsStringAsync();
        
        bool showError = false;
        StoreUpdateProductResponse storeUpdateProductResponse = new StoreUpdateProductResponse();
        ProductErrorResponse productErrorResponse = new ProductErrorResponse();
        try
        {
            storeUpdateProductResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = true;
        }
    
        try
        {
            productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = false;
        }
    
        string jsonText = null;
        if (showError == false)
        {
            jsonText = JsonConvert.SerializeObject(storeUpdateProductResponse, Formatting.Indented);
        }
    
        if (showError == true)
        {
            jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
        }
    
        return jsonText;
    }
    
    

Ürün Koduna Göre Ürün Satış Fiyatı Sorgulama

Bu servis ile mağazanızda bulunan ürünlerin koduna göre ürün satış fiyatı sorgulaması yapabilirsiniz.

Request

    
    POST /api/b2c/ProductServices/GetProductPriceByProductCode
    Host: https://kmk.apiservisi.com
    Content-Type: application/json; charset=utf-8
    
    {
        "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
        "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
        "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
        "UrunKodu":"entegrasyonu yapılmak istenen sitenin fiyat sorgulaması yapılacak ürününün kodu" (string)
    }
    
    
    
    

Response

    
    HTTP 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "urunSatisFiyati": 5.25, (float)
        "urunSatisFiyatiParaBirimi":"TL", (string)
        "acıklama":"", (string) 
    }
    
    
    
    

Ürün Koduna Göre Fiyat Sorgulama için Servis Örnek Kod(C#)

    
    public async Task GetProductPriceByProductCode(StoreGetProductByProductCodeRequest StoreGetProductByProductCodeRequest)
    {
        var httpClient = new HttpClient();
        StringContent content = new StringContent(JsonConvert.SerializeObject(storeGetProductByProductCodeRequest), Encoding.UTF8, "application/json");
        var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/GetProductPriceByProductCode", content);
        string apiResponse = await response.Content.ReadAsStringAsync();
        
        bool showError = false;
        StoreGetProductPriceByProductCodeResponse storeGetProductPriceByProductCodeResponse = new StoreGetProductPriceByProductCodeResponse();
        ProductErrorResponse productErrorResponse = new ProductErrorResponse();
        try
        {
            storeGetProductPriceByProductCodeResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = true;
        }
    
        try
        {
            productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = false;
        }
    
        string jsonText = null;
        if (showError == false)
        {
            jsonText = JsonConvert.SerializeObject(storeGetProductPriceByProductCodeResponse, Formatting.Indented);
        }
    
        if (showError == true)
        {
            jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
        }
    
        return jsonText;
    }
    
    

Ürün Koduna Göre Ürün Fiyat Güncelleme

Bu servis ile mağazanızda bulunan ürünlerin koduna göre ürün satış fiyatı güncellemesi yapabilirsiniz.

Request


POST /api/b2c/ProductServices/UpdateProductPriceByProductCode
Host: https://kmk.apiservisi.com
Content-Type: application/json; charset=utf-8

{
    "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
    "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
    "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
    "UrunKodu":"entegrasyonu yapılmak istenen sitenin satış fiyatı güncellemesi yapılacak ürünün kodu" (string)
    "UrunFiyati":"7,25" (string) --> NOT : Ondalık ayıraç virgül(,) olmalıdır. Örnek Format : 12,99 veya 1234,99
    "UrunIndirimTutari":"1,25" (string) --> NOT : Ondalık ayıraç virgül(,) olmalıdır. Örnek Format : 12,99 veya 1234,99
    "UrunParaBirimi":"TL" (string) --> Alabileceği değerler : TL, USD, EUR, GBP, CNY
}



Response


HTTP 200 OK
Content-Type: application/json; charset=utf-8

{
    "durum":"Başarılı", (string)
    "acıklama":"", (string) 
}



Ürün Koduna Göre Ürün Satış Fiyatı Güncelleme için Servis Örnek Kod(C#)

    
    public async Task UpdateProductPriceByProductCode(StoreUpdateProductPriceByProductCodeRequest storeUpdateProductPriceByProductCodeRequest)
    {
        var httpClient = new HttpClient();
        StringContent content = new StringContent(JsonConvert.SerializeObject(storeUpdateProductPriceByProductCodeRequest), Encoding.UTF8, "application/json");
        var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/UpdateProductPriceByProductCode", content);
        string apiResponse = await response.Content.ReadAsStringAsync();
        
        bool showError = false;
        StoreUpdateProductResponse storeUpdateProductResponse = new StoreUpdateProductResponse();
        ProductErrorResponse productErrorResponse = new ProductErrorResponse();
        try
        {
            storeUpdateProductResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = true;
        }
    
        try
        {
            productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = false;
        }
    
        string jsonText = null;
        if (showError == false)
        {
            jsonText = JsonConvert.SerializeObject(storeUpdateProductResponse, Formatting.Indented);
        }
    
        if (showError == true)
        {
            jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
        }
    
        return jsonText;
    }
    
    

Ürün Koduna Göre Ürün Durum Sorgulama

Bu servis ile mağazanızda bulunan ürünlerin koduna göre durum sorgulaması yapabilirsiniz.

Request

    
    POST /api/b2c/ProductServices/GetProductStateByProductCode
    Host: https://kmk.apiservisi.com
    Content-Type: application/json; charset=utf-8
    
    {
        "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
        "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
        "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
        "UrunKodu":"entegrasyonu yapılmak istenen sitenin durum sorgulaması yapılacak ürünün kodu" (string)
    }
    
    
    
    

Response

    
    HTTP 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "urunDurumu":"Aktif", (string) --> Alabileceği değerler : Aktif, Pasif
        "acıklama":"", (string) 
    }
    
    
    
    

Ürün Koduna Göre Ürün Durum Sorgulama için Servis Örnek Kod(C#)

    
public async Task GetProductStateByProductCode(StoreGetProductByProductCodeRequest storeGetProductByProductCodeRequest)
    {
        var httpClient = new HttpClient();
        StringContent content = new StringContent(JsonConvert.SerializeObject(storeGetProductByProductCodeRequest), Encoding.UTF8, "application/json");
        var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/GetProductStateByProductCode", content);
        string apiResponse = await response.Content.ReadAsStringAsync();
        
        bool showError = false;
        StoreGetProductStateByProductCodeResponse storeGetProductStateByProductCodeResponse = new StoreGetProductStateByProductCodeResponse();
        ProductErrorResponse productErrorResponse = new ProductErrorResponse();
        try
        {
            storeGetProductStateByProductCodeResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = true;
        }
    
        try
        {
            productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
        }
        catch
        {
            showError = false;
        }
    
        string jsonText = null;
        if (showError == false)
        {
            jsonText = JsonConvert.SerializeObject(storeGetProductStateByProductCodeResponse, Formatting.Indented);
        }
    
        if (showError == true)
        {
            jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
        }
    
        return jsonText;
    }
    
    

Ürün Koduna Göre Ürün Durum Güncelleme

Bu servis ile mağazanızda bulunan ürünlerin koduna göre durum güncellemesi yapabilirsiniz.

Request

    
    POST /api/b2c/ProductServices/UpdateProductStockByProductCode
    Host: https://kmk.apiservisi.com
    Content-Type: application/json; charset=utf-8
    
    {
        "Domain":"entegrasyonu yapılmak istenen sitenin domaini", (string)
        "ApiKey":"entegrasyonu yapılmak istenen sitenin ApiKey bilgisi", (string) 
        "ApiPassword":"entegrasyonu yapılmak istenen sitenin ApiPassword bilgisi" (string)
        "UrunKodu":"entegrasyonu yapılmak istenen sitenin durum güncellemesi yapılacak ürününün kodu" (string)
        "UrunDurumu":"yeni durum değeri" (int) --> Alabileceği değerler : Aktif, Pasif
    }
    
    
    
    

Response

    
    HTTP 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "durum":"Başarılı", (string)
        "acıklama":"", (string) 
    }
    
    
    
    

Ürün Koduna Göre Ürün Durum Güncelleme için Servis Örnek Kod(C#)


public async Task UpdateProductStateByProductCode(StoreUpdateProductStateByProductCodeRequest storeUpdateProductStateByProductCodeRequest)
{
    var httpClient = new HttpClient();
    StringContent content = new StringContent(JsonConvert.SerializeObject(storeUpdateProductStateByProductCodeRequest), Encoding.UTF8, "application/json");
    var response = await httpClient.PostAsync("https://kmk.apiservisi.com/api/b2c/ProductServices/UpdateProductStateByProductCode", content);
    string apiResponse = await response.Content.ReadAsStringAsync();
    
    bool showError = false;
    StoreUpdateProductResponse storeUpdateProductResponse = new StoreUpdateProductResponse();
    ProductErrorResponse productErrorResponse = new ProductErrorResponse();
    try
    {
        storeUpdateProductResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = true;
    }

    try
    {
        productErrorResponse = JsonConvert.DeserializeObject(apiResponse);
    }
    catch
    {
        showError = false;
    }

    string jsonText = null;
    if (showError == false)
    {
        jsonText = JsonConvert.SerializeObject(storeUpdateProductResponse, Formatting.Indented);
    }

    if (showError == true)
    {
        jsonText = JsonConvert.SerializeObject(productErrorResponse, Formatting.Indented);
    }

    return jsonText;
}

    
Copyright © 1998- KMK Bilgi Teknolojileri A.Ş. | Tüm Hakları Saklıdır.