statisicGroup data returned by dailyFinancials bug?

mhcmhc Member Posts: 2


I'm having an issue with the data returned by the dailyFinancials endpoint, e.g. for this call:

https://api.lsk.lightspeed.app/f/finance/{businessLocation}/dailyFinancials?date=2021-12-06&includeConsumers=false&include=payments

The salesLines items normally include a 'categories' field that contains the Statistic Group classifications for the item in the transaction, e.g.

"categories": [{"category": "SomeStatisticGroupName1", "value": "SomeStatisticGroupValue"}, {"category": "SomeStatisticGroupName2", "value": "SomeOtherStatisticGroupValue"}, ...]

However, occasionally, the categories field is missing and instead the data appears in a "statisticGroup" field like this:

"statisticGroup": "[{\"category\":\"SomeStatisticGroupName\",\"value\":\"SomeOtherStatisticGroupValue\"}]

I have noticed that for the transactions in question, these are sales.type VOID and are associated with a infrequently occurring deviceName, in this case "BackOffice"

Is this behaviour expected? It creates difficulty parsing the JSON

4 comments

Sign In or Register to comment.