Hi! I just learned about HCC yesterday. The extensive API connection makes the product very interesting, especially compared to NOP Commerce. Unfortunately, I still have [b]some problems with the API[/b]. An example: When I try to update a product, I do not get back a ProductDTO object , but only the error message: "Error SendRequest: The remote server returned an error: (500) Internal server error. System | At Hotcakes.CommerceDTO.v1.Client.RestHelper.SendRequest (String serviceUrl, String method, String data, WebProxy proxy, Int32 timeout) \ r \ n at Hotcakes.CommerceDTO.v1.Client.RestHelper.SendWithData [T] (String uri , String method, String data)" [b]Nevertheless the product is updated on the server !!![/b] Here is the sample code: var apiResponse = proxy.ProductsFindBySku("5702015876889"); if (apiResponse.Errors.Count == 0) { if (apiResponse.Content != null) { ProductDTO product = apiResponse.Content; product.LongDescription = "Dies ist ein Test 2"; product.MetaKeywords = "LEGO, Spielzeug, Baustein"; ApiResponse productUpdateResponse = proxy.ProductsUpdate(product); if (productUpdateResponse.Errors.Count == 0) { Console.WriteLine($"{product.Sku} - Update OK"); } else { Console.WriteLine($"{product.Sku} - {productUpdateResponse.Errors[0].Description}"); } } } Greetings from Germany Carsten
|