not able to update products

almostEricalmostEric Member Posts: 14

We have been using this endpoint for a while:

rest/inventory/product/{productid}

and PATCHing the name field.

This seems to have suddenly stopped working and now returns 400 BAD Request - Invalid ID.

This is with the same IDs we have been using and that came from your system.

calling the same endpoint using GET and without a product ID still works and I can verify the IDs are there.

20 comments

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    Hi @almostEric,

    Thank you for contacting us.

    Can you show me some more information like requests, payloads and responses?

  • almostEricalmostEric Member Posts: 14

    This is the endpoint

    rest/inventory/product/{productId}"

    The product ID in question comes from a previous GET call.

    This is the payload: {{"op", "replace"}, {"path", "name"}, {"value", parentItemName}};

    The error is 404 -NOT FOUND, invalid product ID.


    We have been using this endpoint for quite a while and it worked fine. Seems to have suddenly stopped.


    Another endpoint we use :

    rest/financial/receipt

    Is now giving us 400 - BAD REQUEST errors. This endpoint had been working for months.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    So based on the error message this product doesn't exists any more, maybe the product is deleted?

    For rest/financial/receipt endpoint, you need required params.

    For example: /rest/financial/receipt?date=2021-01-26

  • almostEricalmostEric Member Posts: 14

    I can assure you that it is not deleted

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    Can you share me the companyID, server and productID so I can take a look?

  • almostEricalmostEric Member Posts: 14

    Hi Lucien,


    With the new OAUTH setup I'm not sure what the company Id and server are (I guess I could call those endpoints and find out, but they aren't needed in our business case).

    The company is called Bru City Texas, hopefully you can find them.

    Any of these productIDs would be worth taking a look at:

    parent: 1850465

    5oz: 1665260

    9oz: 1850461

    13oz: 1854050

    16oz: 1850462

    32oz: 1850463

    64oz: 1850464

  • almostEricalmostEric Member Posts: 14

    any update?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator
    edited January 27

    I've checked the productIDs and this is the result

    1850465 not found, could be deleted.

    All other IDs are good

  • almostEricalmostEric Member Posts: 14

    strange, because when I do a GET product list, this is included:


     {

      "id": 1850465,

      "name": "Tap 1",

      "visible": true,

      "imageLocation": "",

      "kitchenImageLocation": "",

      "cfdImageLocation": "",

      "price": 0,

      "priceWithoutVat": 0,

      "takeawayPrice": 0,

      "takeawayPriceWithoutVat": 0,

      "deliveryPrice": 0,

      "deliveryPriceWithoutVat": 0,

      "productType": "CHOICE",

      "sku": "T1",

      "taxClass": "BUILTIN-8.25",

      "deliveryTaxClass": "BUILTIN-0.00",

      "takeawayTaxClass": "BUILTIN-0.00",

      "stockAmount": 0,

      "groupIds": [

       908371,

       921611

      ],

      "info": ""

     }

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    Can you show me your URL?

  • almostEricalmostEric Member Posts: 14

    rest/inventory/product/

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    When I look for the sku:T1 I get this:


  • almostEricalmostEric Member Posts: 14
    edited February 1

    look at name instead of sku, although I think customer has manually changed the names just to get things working

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    So could it be possible that the customer deleted the product with ID 1850465 and create the product again, so it automatically gets a new ID.

  • almostEricalmostEric Member Posts: 14

    no, I still see it there.

    The customer has not deleted any products. It is just a name that got changed.

  • almostEricalmostEric Member Posts: 14

    and he only changed the name after we could not get this working

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    But can you explain to me why I can't find any products with that ID?

  • almostEricalmostEric Member Posts: 14

    that is what we are wondering too

  • almostEricalmostEric Member Posts: 14

    I'll check in and see if he has made any more changes lately

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    Okay, very weird then, please let me know if the client changed something.

Sign In or Register to comment.