Update avgCost or calcAvgCost? Or refresh AvgCost somehow?

VintageWineGuyVintageWineGuy Member Posts: 97 ✭
edited July 30 in Development

Is it possible to update of refresh avgCost on a SaleLine? or calcAvgCost on Sale? Can you update avgCost from the SaleLine API?

I am trying to clean up a data entry error. We have an assembly that didn't get a default cost before it started selling, and now the avgCost is 0 and all the reports are off. I would love to be able to clean this up retroactively but I am not sure how.

The doc does not show avgCost as a option and I get 400 errors back when I try to do it anyway - it was worth a try I guess. When I try to do something like update employeeID or unitPrice on a SaleLine I get error 422. So I assume it doesn't want me messing with it regardless of what I am doing.

So my big question is "Is there a way to recalc or update an avgCost on SaleLine and/or calcAvgCost on Sale ?"

Thank you

Answers

  • gregaricangregarican Member Posts: 469 

    The employeeID and unitPrice fields appear in the API docs as being mutable --> https://developers.lightspeedhq.com/retail/endpoints/SaleLine/#put-update-a-sale-line. So if you are getting 422 errors as a response, I'd assume that the API docs need to be corrected.

    I can't imagine that the unit costs would allow modification. Especially seeing these fields aren't even mentioned in the API docs. Yet you can edit them in the Retail web client.

    Can anyone on Lightspeed's end chime in? At worst the API documentation could be updated so that there are less gotchas than we already have 😀

Sign In or Register to comment.