variant of removed product still available in database - error

Suzanne_CMDCSuzanne_CMDC Member Posts: 2

For a customer, we see that there are still variants of products in the database, of which the product has been removed. This causes problems in this customer's order system.

- We have code retrieves all variants for the shop with the ean, and then retrieves the product per variant. This then crashes in 1 of the 2 variants.

Als je het uitvoert krijg je dit:

Shop 259233 -
Variants with ean 8719645046725:
Variant ID 213594216 with product ID 105366763
Variant ID 213592296 with product ID 105366759Getting product 105366763 from api: Success!
Getting product 105366759 from api: Failure! - No product with that ID found.


  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 991 moderator


    Thank you for contacting us.

    Sometimes this will happen that a worker on the server is not deleting the product/variant completely and is sort of hanging around in the system. To fix this easily is to delete this product via API DELETE /products/12345678.json

  • Suzanne_CMDCSuzanne_CMDC Member Posts: 2

    Well I tried and it doesn't work. If I try to remove the product that is half removed, I get "No product with that ID found."

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 991 moderator

    Hi @Suzanne_CMDC,

    Sorry I was wrong, sometimes the product is deleted but not his variant, so you need to remove the variant instead of the product.

    DELETE /variants/12345678.json

    I did the delete already for you, can you check if this worked for you?

Sign In or Register to comment.