403 on update

raphaelraphael Member Posts: 39

We have been told that we have all the permission on our eCom api key . However, still receiving


"error": {

        "code": 403,

        "method": "UPDATE",

        "request": "/fc/variants/55322664.json",

        "message": "The server understood the request, but is refusing to fulfill it."

    }

or

{

    "error": {

        "code": 403,

        "method": "UPDATE",

        "request": "/fc/products/32665377.json",

        "message": "The server understood the request, but is refusing to fulfill it."

    }

}


It is time that someone fix our problems, we are being charged for a development environment and it's not working.

11 comments

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 926 moderator

    Hi @raphael,

    Thank you for reaching out to us.

    Can you provide me the shopID?

  • raphaelraphael Member Posts: 39

    Hi @LucienVersendaal,

    thank you for your answer. Here is the store ID : 638739.

    I will also say that we had quite couple of problems with API key. They provide us, I think, 4 different.

    The one that is "working", except for update (have not to create a product, it's the same problem) is this the key starting with 752.

    Thanks

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 926 moderator

    Hi @raphael,

    I see you've an omni account. You can't do an update on products & variants because Retail is leading. Please check https://retail-support.lightspeedhq.com/hc/en-us/articles/115000314354-Getting-started-with-Retail-eCom for more information.

  • raphaelraphael Member Posts: 39
    edited October 2020

    @LucienVersendaal ,

    What about the fields that are only valid for eCom in a product.

    I need to change the filed "Allow backorders" of a Variant.

    Which is stockTracking field in the Variant API call.

    This field does not exist in retail (or is it ? ).

    Post edited by raphael on
  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 926 moderator
    edited October 2020

    @raphael

    Actually you can update "Allow Backorders" field via API by using this payload:

    {
      "variant": {
            "stockTracking": "enabled|indicator = allowing back orders"
      }
    }
    stockTracking (disabled = no tracking; enabled = tracking, disallow backorders; indicator = tracking, allow backorders).
    {“stockTracking”: “disabled|enabled|indicator”}
    

    Please check https://developers.lightspeedhq.com/ecom/endpoints/variant/#put-update-a-variant for more information.

  • raphaelraphael Member Posts: 39
    edited October 2020

    @LucienVersendaal ,

    hum, no I can't, API return 403. That's the whole point of this conversation, or is there something I don't understand in what you propose?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 926 moderator

    Hi @raphael,

    That's really weird, can you provide me your KEY that you are using?

  • raphaelraphael Member Posts: 39

    hello @LucienVersendaal ,

    is this odd or it because we are an omni channel ?

    I also had giving you the first digit of our api key in an other message.

    So, I am afraid you respond pretty fast to our message without putting your mind in the entire situation. I am kindly asking you to read this entire discussion before responding.

    We NEED to be able to change that field with the API as ALL the other possibilities explored with lightspeed API, always end up with "it's not possible". Our next solution is not viable for the client, will force to leave lightspeed.

    our key is 752d0040bf011432ea0379367c936c7d

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 926 moderator

    Hi @raphael,

    Is this odd or it because we are an omni channel ?

    No, this is expected behaviour.

    I've read your situation and I'm saying this is because of the use of omnichannel. You can't edit products/variants because Retail is leading. You can see that as well in the back office when editing a product.

    What you can do is changing this "stockTracking" field via an import of variants. First you create an export of the inventory and if you want disallow back order change the field "Stock_Disable_Sold_Out" to "Y".

    After that you can import this file.

  • raphaelraphael Member Posts: 39

    @LucienVersendaal ,

    good thank you this is what I thought.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 926 moderator

    Okay perfect

Sign In or Register to comment.