Welcome Guest! To enable all features please try to register or login.
2 Pages<12
Options
Go to last post Go to first unread
Offline Matt Rutledge  
#21 Posted : Monday, November 6, 2017 7:01:14 PM(UTC)
Matt Rutledge

Rank: Member

Reputation:

Groups: HCC-Customer, HCC-GuestBlogger, Registered, Registered Users, Subscribers
Joined: 12/28/2016(UTC)
Posts: 19

Was thanked: 5 time(s) in 3 post(s)
405 Sounds potentially like a security error. Although if you have the correct API key you should be good. Have you attempted to set the inventory levels to 0 with the ProductInventoryUpdate endpoint and then attempt a delete?
Offline Will Strohl  
#22 Posted : Friday, December 22, 2017 2:04:23 PM(UTC)
Will Strohl

Rank: Administration

Reputation:

Groups: Administrators, HCC-Employee-Store-Manager, HCC-Employee-Support, HCC-Partner, Moderators, Partners, Registered, Registered Users, Subscribers
Joined: 12/22/2016(UTC)
Posts: 342

Thanks: 78 times
Was thanked: 59 time(s) in 57 post(s)
I'm not sure what's different, but I'm unable to reproduce the issues on Hotcakes 03.00.01 using the example code below.

Code:
using System;
using Hotcakes.CommerceDTO.v1.Client;

namespace ApiSample
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Console.WriteLine("This is an API Sample Program for Hotcakes");
            Console.WriteLine();

            var url = "http://hcc301.loc";
            var key = "1-9b2ccf0f-5642-418f-8537-cec3fb876f31";
            var proxy = new Api(url, key);

            var product = proxy.ProductsFindBySku("TEST0001").Content;

            if (product != null)
            {
                Console.WriteLine("Product was found...");
                Console.WriteLine("Attempting delete...");
                Console.WriteLine();

                try
                {
                    proxy.ProductsDelete(product.Bvin);
                    Console.WriteLine("GREAT SUCCESS, YES!!");
                    Console.WriteLine();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("An error occurred!!!");
                    Console.WriteLine();

                    Console.WriteLine(ex.Message);
                    Console.WriteLine();
                }
            }
            else
            {
                Console.WriteLine("No product found!");
            }

            Console.WriteLine("Done - Press a key to continue");
            Console.ReadKey();
        }
    }
}
Will Strohl, Upendo Ventures
Hotcakes Cloud | Get Support | Code Support
Official Cloud & Support provider for Hotcakes
Users browsing this topic
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.180 seconds.

Notification

Icon
Error

Loading
  • Sign-up for the Hotcakes Community Newsletter: