Is there is way to track new sale in Lightspeed through API. Please advice.
Hey @renjithmb, we the best thing would be to run a cron-job to check for new sales every X minute(s). If you persist the data of the count, you can use that to compare new sales.
It would go something like this:
Every 60 Seconds:
Make a request to the Retail API, check the ["@attributes"].count value and store it in a database.
In the next iteration (i.e.) in the next 60 seconds, check to see if the count is greater than the previously stored count value, and then grab the details from the difference.
Hope this helps!
Thanks @Adrian Samuel
Hi @Adrian Samuel , How to retrieve each valid saleline one by one. Please advise.
We are having issues of in progress or paused sales line with saleline API
What constitutes a valid saleline to you?