Saleline Missing from Lightspeed API Account
We have a custom application that we use for accounting sales data in an external system. We will query Sales and Salelines from the Lightspeed API account and register them in our system to track changes in quantities via sales and returns. We have experienced a handful of instances in which we have some abnormality with our external system's quantities, and will see that it is related to an API update. When I use Postman to hunt down the offending Sale and associated Saleline, the Saleline returns a 404. This is very strange because it will often skip over the Primary ID of the Saleline and reference the next in the same Sale. For example:
Sale with saleID 1427 has a SaleLine with saleLineID 2114 for an Item (itemID 6758) that was returned. In our application's history we are seeing that there should also be a SaleLine with saleLineID 2113 as a part of the above sale and with a Item (itemID 8560) which was sold. When I review the inventory and sales data in our Lightspeed UI there is no recorded sale of Item(8560) and its inventory is still at the pre-sale value. When I attempt to query SaleLine(2113) I receive the following response:
"httpMessage": "Not Found",
"message": "Object of type 'SaleLine' not found with primary ID '2113'.",
I don't understand how a SaleLine, which had implications for our Application, as it could read it shortly after it occurred, could suddenly cease to exist. Is this a UI action or some other strangeness?
This is a real example, so if there are any engineers reviewing this Discussion, I would love for you to delve into our Account (I can give you our account ID separately) and try to help us determine if there is some system issue or a issue on our end not using best practices.