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 1 of 512345 > >>
Author Messages





New Member






--
10/16/2017 8:15 AM
    I was running a test to properly remove an inventory item and am getting an error and the item is not being deleted. Can you give me some direction?
    Code:
    [code=csharp]namespace BestTestSQLConnectApp
    {
    class Program
    {
    static void Main(string[] args)
    {
    string hotcakesURL = "http://MyActualSite.com";
    string hotcakesKey = "MyActualKey";
    Api hotcakesProxy = new Api(hotcakesURL, hotcakesKey);
    }
    var inventoryId = "3A855F7A-3A2E-44CA-AE5C-AA2014B61018";
    // call the API to delete the product inventory record
    Hotcakes.CommerceDTO.v1.ApiResponse response = hotcakesProxy.ProductInventoryDelete(inventoryId);[/code]

    Error:
    [url=https://1drv.ms/i/s!Ao2-NxXDB_GshtQs0NCUGqruD7JBCw]Link to error message[/url]





    New Member






    --
    10/25/2017 1:09 PM
    Does anyone have any suggestions?





    Veteran Member






    --
    10/26/2017 2:21 PM
    What version of Hotcakes are you running this against? Also, are you certain that your key and URL are correct?

    Just in case, here's the documentation article for this.

    https://hotcakescommerce....ntoryDelete-Endpoint
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    10/26/2017 2:21 PM
    Is this code executing on the same context (server, dnn instance)?

    If so, switch to the server side code instead. It's way faster and more flexible. Let me know if you need some code samples.





    Basic Member






    --
    10/26/2017 2:24 PM
    Also, whenever possible if I need external access, I like to use WebAPI in dnn, wrap my own service and hook to hotcakes server-side code.

    Just makes it a bit more extensible and keeps all of you external code in one place.
    You are not authorized to post a reply.
    Page 1 of 512345 > >>


    Loading
    • Sign-up for the Hotcakes Community Newsletter: