PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12/22/2017 3:04 PM by  Will Strohl
API return error
 21 Replies
 1 Subscribed to this topic
 1 Subscribed to this forum
Sort:
You are not authorized to post a reply.
Page 5 of 5 << < 12345
Author Messages





Basic Member






--
11/6/2017 8:01 PM
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?





Veteran Member






--
12/22/2017 3:04 PM
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=csharp]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();
}
}
}[/code]
Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes
You are not authorized to post a reply.
Page 5 of 5 << < 12345


Loading
  • Sign-up for the Hotcakes Community Newsletter: